@cartbot/plate-search 3.1.5 → 3.1.6
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/build/dist/js/plate-search.js +6 -6
- package/dist/js/plate-search.es.js +169 -155
- package/dist/js/plate-search.js +6 -6
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as a from "react";
|
|
2
|
-
import Gt, { createContext as xa, useState as
|
|
2
|
+
import Gt, { createContext as xa, useState as q, useRef as Me, useEffect as j, forwardRef as ya, useImperativeHandle as Ea } from "react";
|
|
3
3
|
import { createRoot as Yt } from "react-dom/client";
|
|
4
4
|
const _a = "/css/plate-search.css";
|
|
5
5
|
/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
|
|
@@ -24,8 +24,8 @@ z || (z = function(t) {
|
|
|
24
24
|
B || (B = function(t) {
|
|
25
25
|
return t;
|
|
26
26
|
});
|
|
27
|
-
dt || (dt = function(t, c,
|
|
28
|
-
return t.apply(c,
|
|
27
|
+
dt || (dt = function(t, c, l) {
|
|
28
|
+
return t.apply(c, l);
|
|
29
29
|
});
|
|
30
30
|
mt || (mt = function(t, c) {
|
|
31
31
|
return new t(...c);
|
|
@@ -34,27 +34,27 @@ const Ve = F(Array.prototype.forEach), ka = F(Array.prototype.lastIndexOf), It =
|
|
|
34
34
|
function F(o) {
|
|
35
35
|
return function(t) {
|
|
36
36
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
37
|
-
for (var c = arguments.length,
|
|
38
|
-
|
|
39
|
-
return dt(o, t,
|
|
37
|
+
for (var c = arguments.length, l = new Array(c > 1 ? c - 1 : 0), u = 1; u < c; u++)
|
|
38
|
+
l[u - 1] = arguments[u];
|
|
39
|
+
return dt(o, t, l);
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
function Ma(o) {
|
|
43
43
|
return function() {
|
|
44
|
-
for (var t = arguments.length, c = new Array(t),
|
|
45
|
-
c[
|
|
44
|
+
for (var t = arguments.length, c = new Array(t), l = 0; l < t; l++)
|
|
45
|
+
c[l] = arguments[l];
|
|
46
46
|
return mt(o, c);
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
function g(o, t) {
|
|
50
50
|
let c = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Be;
|
|
51
51
|
Ot && Ot(o, null);
|
|
52
|
-
let
|
|
53
|
-
for (;
|
|
54
|
-
let u = t[
|
|
52
|
+
let l = t.length;
|
|
53
|
+
for (; l--; ) {
|
|
54
|
+
let u = t[l];
|
|
55
55
|
if (typeof u == "string") {
|
|
56
56
|
const h = c(u);
|
|
57
|
-
h !== u && (Aa(t) || (t[
|
|
57
|
+
h !== u && (Aa(t) || (t[l] = h), u = h);
|
|
58
58
|
}
|
|
59
59
|
o[u] = !0;
|
|
60
60
|
}
|
|
@@ -67,18 +67,18 @@ function Na(o) {
|
|
|
67
67
|
}
|
|
68
68
|
function Q(o) {
|
|
69
69
|
const t = Xt(null);
|
|
70
|
-
for (const [c,
|
|
71
|
-
W(o, c) && (Array.isArray(
|
|
70
|
+
for (const [c, l] of qt(o))
|
|
71
|
+
W(o, c) && (Array.isArray(l) ? t[c] = Na(l) : l && typeof l == "object" && l.constructor === Object ? t[c] = Q(l) : t[c] = l);
|
|
72
72
|
return t;
|
|
73
73
|
}
|
|
74
74
|
function Ce(o, t) {
|
|
75
75
|
for (; o !== null; ) {
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
78
|
-
if (
|
|
79
|
-
return F(
|
|
80
|
-
if (typeof
|
|
81
|
-
return F(
|
|
76
|
+
const l = Ta(o, t);
|
|
77
|
+
if (l) {
|
|
78
|
+
if (l.get)
|
|
79
|
+
return F(l.get);
|
|
80
|
+
if (typeof l.value == "function")
|
|
81
|
+
return F(l.value);
|
|
82
82
|
}
|
|
83
83
|
o = Ra(o);
|
|
84
84
|
}
|
|
@@ -119,10 +119,10 @@ const Le = {
|
|
|
119
119
|
}, Ba = function(t, c) {
|
|
120
120
|
if (typeof t != "object" || typeof t.createPolicy != "function")
|
|
121
121
|
return null;
|
|
122
|
-
let
|
|
122
|
+
let l = null;
|
|
123
123
|
const u = "data-tt-policy-suffix";
|
|
124
|
-
c && c.hasAttribute(u) && (
|
|
125
|
-
const h = "dompurify" + (
|
|
124
|
+
c && c.hasAttribute(u) && (l = c.getAttribute(u));
|
|
125
|
+
const h = "dompurify" + (l ? "#" + l : "");
|
|
126
126
|
try {
|
|
127
127
|
return t.createPolicy(h, {
|
|
128
128
|
createHTML(p) {
|
|
@@ -156,7 +156,7 @@ function Qt() {
|
|
|
156
156
|
let {
|
|
157
157
|
document: c
|
|
158
158
|
} = o;
|
|
159
|
-
const
|
|
159
|
+
const l = c, u = l.currentScript, {
|
|
160
160
|
DocumentFragment: h,
|
|
161
161
|
HTMLTemplateElement: p,
|
|
162
162
|
Node: m,
|
|
@@ -166,7 +166,7 @@ function Qt() {
|
|
|
166
166
|
HTMLFormElement: b,
|
|
167
167
|
DOMParser: N,
|
|
168
168
|
trustedTypes: T
|
|
169
|
-
} = o,
|
|
169
|
+
} = o, x = w.prototype, O = Ce(x, "cloneNode"), I = Ce(x, "remove"), $ = Ce(x, "nextSibling"), We = Ce(x, "childNodes"), ee = Ce(x, "parentNode");
|
|
170
170
|
if (typeof p == "function") {
|
|
171
171
|
const d = c.createElement("template");
|
|
172
172
|
d.content && d.content.ownerDocument && (c = d.content.ownerDocument);
|
|
@@ -179,7 +179,7 @@ function Qt() {
|
|
|
179
179
|
getElementsByTagName: Ge
|
|
180
180
|
} = c, {
|
|
181
181
|
importNode: Ne
|
|
182
|
-
} =
|
|
182
|
+
} = l;
|
|
183
183
|
let L = Zt();
|
|
184
184
|
t.isSupported = typeof qt == "function" && typeof ee == "function" && ce && ce.createHTMLDocument !== void 0;
|
|
185
185
|
const {
|
|
@@ -217,7 +217,7 @@ function Qt() {
|
|
|
217
217
|
enumerable: !0,
|
|
218
218
|
value: !1
|
|
219
219
|
}
|
|
220
|
-
})), oe = null, ye = null, Ee = !0,
|
|
220
|
+
})), oe = null, ye = null, Ee = !0, i = !0, v = !1, y = !0, E = !1, ne = !0, G = !1, ie = !1, Xe = !1, me = !1, Pe = !1, De = !1, ft = !0, gt = !1;
|
|
221
221
|
const ha = "user-content-";
|
|
222
222
|
let Ke = !0, _e = !1, he = {}, pe = null;
|
|
223
223
|
const wt = g({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
@@ -238,7 +238,7 @@ function Qt() {
|
|
|
238
238
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
239
239
|
if (!(fe && fe === e)) {
|
|
240
240
|
if ((!e || typeof e != "object") && (e = {}), e = Q(e), Ae = // eslint-disable-next-line unicorn/prefer-includes
|
|
241
|
-
fa.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? ga : e.PARSER_MEDIA_TYPE, M = Ae === "application/xhtml+xml" ? nt : Be, _ = W(e, "ALLOWED_TAGS") ? g({}, e.ALLOWED_TAGS, M) : xe, S = W(e, "ALLOWED_ATTR") ? g({}, e.ALLOWED_ATTR, M) : He, et = W(e, "ALLOWED_NAMESPACES") ? g({}, e.ALLOWED_NAMESPACES, nt) : pa, Je = W(e, "ADD_URI_SAFE_ATTR") ? g(Q(xt), e.ADD_URI_SAFE_ATTR, M) : xt, bt = W(e, "ADD_DATA_URI_TAGS") ? g(Q(vt), e.ADD_DATA_URI_TAGS, M) : vt, pe = W(e, "FORBID_CONTENTS") ? g({}, e.FORBID_CONTENTS, M) : wt, oe = W(e, "FORBID_TAGS") ? g({}, e.FORBID_TAGS, M) : Q({}), ye = W(e, "FORBID_ATTR") ? g({}, e.FORBID_ATTR, M) : Q({}), he = W(e, "USE_PROFILES") ? e.USE_PROFILES : !1, Ee = e.ALLOW_ARIA_ATTR !== !1,
|
|
241
|
+
fa.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? ga : e.PARSER_MEDIA_TYPE, M = Ae === "application/xhtml+xml" ? nt : Be, _ = W(e, "ALLOWED_TAGS") ? g({}, e.ALLOWED_TAGS, M) : xe, S = W(e, "ALLOWED_ATTR") ? g({}, e.ALLOWED_ATTR, M) : He, et = W(e, "ALLOWED_NAMESPACES") ? g({}, e.ALLOWED_NAMESPACES, nt) : pa, Je = W(e, "ADD_URI_SAFE_ATTR") ? g(Q(xt), e.ADD_URI_SAFE_ATTR, M) : xt, bt = W(e, "ADD_DATA_URI_TAGS") ? g(Q(vt), e.ADD_DATA_URI_TAGS, M) : vt, pe = W(e, "FORBID_CONTENTS") ? g({}, e.FORBID_CONTENTS, M) : wt, oe = W(e, "FORBID_TAGS") ? g({}, e.FORBID_TAGS, M) : Q({}), ye = W(e, "FORBID_ATTR") ? g({}, e.FORBID_ATTR, M) : Q({}), he = W(e, "USE_PROFILES") ? e.USE_PROFILES : !1, Ee = e.ALLOW_ARIA_ATTR !== !1, i = e.ALLOW_DATA_ATTR !== !1, v = e.ALLOW_UNKNOWN_PROTOCOLS || !1, y = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, E = e.SAFE_FOR_TEMPLATES || !1, ne = e.SAFE_FOR_XML !== !1, G = e.WHOLE_DOCUMENT || !1, me = e.RETURN_DOM || !1, Pe = e.RETURN_DOM_FRAGMENT || !1, De = e.RETURN_TRUSTED_TYPE || !1, Xe = e.FORCE_BODY || !1, ft = e.SANITIZE_DOM !== !1, gt = e.SANITIZE_NAMED_PROPS || !1, Ke = e.KEEP_CONTENT !== !1, _e = e.IN_PLACE || !1, ve = e.ALLOWED_URI_REGEXP || Kt, ue = e.NAMESPACE || X, Fe = e.MATHML_TEXT_INTEGRATION_POINTS || Fe, Ze = e.HTML_INTEGRATION_POINTS || Ze, A = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && yt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (A.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && yt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (A.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (A.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), E && (i = !1), Pe && (me = !0), he && (_ = g({}, Dt), S = [], he.html === !0 && (g(_, Pt), g(S, Ut)), he.svg === !0 && (g(_, rt), g(S, st), g(S, je)), he.svgFilters === !0 && (g(_, it), g(S, st), g(S, je)), he.mathMl === !0 && (g(_, lt), g(S, zt), g(S, je))), e.ADD_TAGS && (_ === xe && (_ = Q(_)), g(_, e.ADD_TAGS, M)), e.ADD_ATTR && (S === He && (S = Q(S)), g(S, e.ADD_ATTR, M)), e.ADD_URI_SAFE_ATTR && g(Je, e.ADD_URI_SAFE_ATTR, M), e.FORBID_CONTENTS && (pe === wt && (pe = Q(pe)), g(pe, e.FORBID_CONTENTS, M)), Ke && (_["#text"] = !0), G && g(_, ["html", "head", "body"]), _.table && (g(_, ["tbody"]), delete oe.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
242
242
|
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
243
243
|
throw Se('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
244
244
|
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -256,7 +256,7 @@ function Qt() {
|
|
|
256
256
|
});
|
|
257
257
|
const s = Be(e.tagName), R = Be(n.tagName);
|
|
258
258
|
return et[e.namespaceURI] ? e.namespaceURI === ze ? n.namespaceURI === X ? s === "svg" : n.namespaceURI === Ue ? s === "svg" && (R === "annotation-xml" || Fe[R]) : !!Et[s] : e.namespaceURI === Ue ? n.namespaceURI === X ? s === "math" : n.namespaceURI === ze ? s === "math" && Ze[R] : !!_t[s] : e.namespaceURI === X ? n.namespaceURI === ze && !Ze[R] || n.namespaceURI === Ue && !Fe[R] ? !1 : !_t[s] && (ua[s] || !Et[s]) : !!(Ae === "application/xhtml+xml" && et[e.namespaceURI]) : !1;
|
|
259
|
-
},
|
|
259
|
+
}, Y = function(e) {
|
|
260
260
|
Te(t.removed, {
|
|
261
261
|
element: e
|
|
262
262
|
});
|
|
@@ -280,7 +280,7 @@ function Qt() {
|
|
|
280
280
|
if (n.removeAttribute(e), e === "is")
|
|
281
281
|
if (me || Pe)
|
|
282
282
|
try {
|
|
283
|
-
|
|
283
|
+
Y(n);
|
|
284
284
|
} catch {
|
|
285
285
|
}
|
|
286
286
|
else
|
|
@@ -311,7 +311,7 @@ function Qt() {
|
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
const P = n.body || n.documentElement;
|
|
314
|
-
return e && s && P.insertBefore(c.createTextNode(s), P.childNodes[0] || null), ue === X ? Ge.call(n,
|
|
314
|
+
return e && s && P.insertBefore(c.createTextNode(s), P.childNodes[0] || null), ue === X ? Ge.call(n, G ? "html" : "body")[0] : G ? n.documentElement : P;
|
|
315
315
|
}, Rt = function(e) {
|
|
316
316
|
return $e.call(
|
|
317
317
|
e.ownerDocument || e,
|
|
@@ -333,13 +333,13 @@ function Qt() {
|
|
|
333
333
|
const kt = function(e) {
|
|
334
334
|
let n = null;
|
|
335
335
|
if (K(L.beforeSanitizeElements, e, null), at(e))
|
|
336
|
-
return
|
|
336
|
+
return Y(e), !0;
|
|
337
337
|
const s = M(e.nodeName);
|
|
338
338
|
if (K(L.uponSanitizeElement, e, {
|
|
339
339
|
tagName: s,
|
|
340
340
|
allowedTags: _
|
|
341
341
|
}), ne && e.hasChildNodes() && !Tt(e.firstElementChild) && U(/<[/\w!]/g, e.innerHTML) && U(/<[/\w!]/g, e.textContent) || e.nodeType === Le.progressingInstruction || ne && e.nodeType === Le.comment && U(/<[/\w]/g, e.data))
|
|
342
|
-
return
|
|
342
|
+
return Y(e), !0;
|
|
343
343
|
if (!_[s] || oe[s]) {
|
|
344
344
|
if (!oe[s] && Ct(s) && (A.tagNameCheck instanceof RegExp && U(A.tagNameCheck, s) || A.tagNameCheck instanceof Function && A.tagNameCheck(s)))
|
|
345
345
|
return !1;
|
|
@@ -349,13 +349,13 @@ function Qt() {
|
|
|
349
349
|
const C = P.length;
|
|
350
350
|
for (let Z = C - 1; Z >= 0; --Z) {
|
|
351
351
|
const J = O(P[Z], !0);
|
|
352
|
-
J.__removalCount = (e.__removalCount || 0) + 1, R.insertBefore(J,
|
|
352
|
+
J.__removalCount = (e.__removalCount || 0) + 1, R.insertBefore(J, $(e));
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
|
-
return
|
|
356
|
+
return Y(e), !0;
|
|
357
357
|
}
|
|
358
|
-
return e instanceof w && !ba(e) || (s === "noscript" || s === "noembed" || s === "noframes") && U(/<\/no(script|embed|frames)/i, e.innerHTML) ? (
|
|
358
|
+
return e instanceof w && !ba(e) || (s === "noscript" || s === "noembed" || s === "noframes") && U(/<\/no(script|embed|frames)/i, e.innerHTML) ? (Y(e), !0) : (E && e.nodeType === Le.text && (n = e.textContent, Ve([ae, re, de], (R) => {
|
|
359
359
|
n = ke(n, R, " ");
|
|
360
360
|
}), e.textContent !== n && (Te(t.removed, {
|
|
361
361
|
element: e.cloneNode()
|
|
@@ -363,7 +363,7 @@ function Qt() {
|
|
|
363
363
|
}, St = function(e, n, s) {
|
|
364
364
|
if (ft && (n === "id" || n === "name") && (s in c || s in wa))
|
|
365
365
|
return !1;
|
|
366
|
-
if (!(
|
|
366
|
+
if (!(i && !ye[n] && U(Ye, n))) {
|
|
367
367
|
if (!(Ee && U(Oe, n))) {
|
|
368
368
|
if (!S[n] || ye[n]) {
|
|
369
369
|
if (
|
|
@@ -377,7 +377,7 @@ function Qt() {
|
|
|
377
377
|
} else if (!Je[n]) {
|
|
378
378
|
if (!U(ve, ke(s, Ie, ""))) {
|
|
379
379
|
if (!((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && Ca(s, "data:") === 0 && bt[e])) {
|
|
380
|
-
if (!(
|
|
380
|
+
if (!(v && !U(qe, ke(s, Ie, "")))) {
|
|
381
381
|
if (s)
|
|
382
382
|
return !1;
|
|
383
383
|
}
|
|
@@ -446,7 +446,7 @@ function Qt() {
|
|
|
446
446
|
}
|
|
447
447
|
if (D !== ot)
|
|
448
448
|
try {
|
|
449
|
-
Z ? e.setAttributeNS(Z, C, D) : e.setAttribute(C, D), at(e) ?
|
|
449
|
+
Z ? e.setAttributeNS(Z, C, D) : e.setAttribute(C, D), at(e) ? Y(e) : It(t.removed);
|
|
450
450
|
} catch {
|
|
451
451
|
ge(C, e);
|
|
452
452
|
}
|
|
@@ -478,13 +478,13 @@ function Qt() {
|
|
|
478
478
|
} else if (d instanceof m)
|
|
479
479
|
n = At("<!---->"), s = n.ownerDocument.importNode(d, !0), s.nodeType === Le.element && s.nodeName === "BODY" || s.nodeName === "HTML" ? n = s : n.appendChild(s);
|
|
480
480
|
else {
|
|
481
|
-
if (!me && !E &&
|
|
481
|
+
if (!me && !E && !G && // eslint-disable-next-line unicorn/prefer-includes
|
|
482
482
|
d.indexOf("<") === -1)
|
|
483
483
|
return k && De ? k.createHTML(d) : d;
|
|
484
484
|
if (n = At(d), !n)
|
|
485
485
|
return me ? null : De ? te : "";
|
|
486
486
|
}
|
|
487
|
-
n && Xe &&
|
|
487
|
+
n && Xe && Y(n.firstChild);
|
|
488
488
|
const C = Rt(_e ? d : n);
|
|
489
489
|
for (; R = C.nextNode(); )
|
|
490
490
|
kt(R), Lt(R), R.content instanceof h && va(R.content);
|
|
@@ -496,10 +496,10 @@ function Qt() {
|
|
|
496
496
|
P.appendChild(n.firstChild);
|
|
497
497
|
else
|
|
498
498
|
P = n;
|
|
499
|
-
return (S.shadowroot || S.shadowrootmode) && (P = Ne.call(
|
|
499
|
+
return (S.shadowroot || S.shadowrootmode) && (P = Ne.call(l, P, !0)), P;
|
|
500
500
|
}
|
|
501
|
-
let Z =
|
|
502
|
-
return
|
|
501
|
+
let Z = G ? n.outerHTML : n.innerHTML;
|
|
502
|
+
return G && _["!doctype"] && n.ownerDocument && n.ownerDocument.doctype && n.ownerDocument.doctype.name && U(Jt, n.ownerDocument.doctype.name) && (Z = "<!DOCTYPE " + n.ownerDocument.doctype.name + `>
|
|
503
503
|
` + Z), E && Ve([ae, re, de], (J) => {
|
|
504
504
|
Z = ke(Z, J, " ");
|
|
505
505
|
}), k && De ? k.createHTML(Z) : Z;
|
|
@@ -698,7 +698,7 @@ const Wa = /* @__PURE__ */ new Map([
|
|
|
698
698
|
(o, t) => {
|
|
699
699
|
const {
|
|
700
700
|
alt: c,
|
|
701
|
-
color:
|
|
701
|
+
color: l,
|
|
702
702
|
size: u,
|
|
703
703
|
weight: h,
|
|
704
704
|
mirrored: p,
|
|
@@ -710,7 +710,7 @@ const Wa = /* @__PURE__ */ new Map([
|
|
|
710
710
|
size: b,
|
|
711
711
|
weight: N = "regular",
|
|
712
712
|
mirrored: T = !1,
|
|
713
|
-
...
|
|
713
|
+
...x
|
|
714
714
|
} = a.useContext(Ka);
|
|
715
715
|
return /* @__PURE__ */ a.createElement(
|
|
716
716
|
"svg",
|
|
@@ -719,10 +719,10 @@ const Wa = /* @__PURE__ */ new Map([
|
|
|
719
719
|
xmlns: "http://www.w3.org/2000/svg",
|
|
720
720
|
width: u ?? b,
|
|
721
721
|
height: u ?? b,
|
|
722
|
-
fill:
|
|
722
|
+
fill: l ?? f,
|
|
723
723
|
viewBox: "0 0 256 256",
|
|
724
724
|
transform: p || T ? "scale(-1, 1)" : void 0,
|
|
725
|
-
...
|
|
725
|
+
...x,
|
|
726
726
|
...r
|
|
727
727
|
},
|
|
728
728
|
!!c && /* @__PURE__ */ a.createElement("title", null, c),
|
|
@@ -757,8 +757,8 @@ var la = { exports: {} };
|
|
|
757
757
|
*/
|
|
758
758
|
(function(o, t) {
|
|
759
759
|
(function(c) {
|
|
760
|
-
var
|
|
761
|
-
if (o.exports = c(),
|
|
760
|
+
var l;
|
|
761
|
+
if (o.exports = c(), l = !0, !l) {
|
|
762
762
|
var u = window.Cookies, h = window.Cookies = c();
|
|
763
763
|
h.noConflict = function() {
|
|
764
764
|
return window.Cookies = u, h;
|
|
@@ -773,7 +773,7 @@ var la = { exports: {} };
|
|
|
773
773
|
}
|
|
774
774
|
return p;
|
|
775
775
|
}
|
|
776
|
-
function
|
|
776
|
+
function l(h) {
|
|
777
777
|
return h.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
|
|
778
778
|
}
|
|
779
779
|
function u(h) {
|
|
@@ -791,19 +791,19 @@ var la = { exports: {} };
|
|
|
791
791
|
}
|
|
792
792
|
f = h.write ? h.write(f, r) : encodeURIComponent(String(f)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent), r = encodeURIComponent(String(r)).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent).replace(/[\(\)]/g, escape);
|
|
793
793
|
var T = "";
|
|
794
|
-
for (var
|
|
795
|
-
b[
|
|
794
|
+
for (var x in b)
|
|
795
|
+
b[x] && (T += "; " + x, b[x] !== !0 && (T += "=" + b[x].split(";")[0]));
|
|
796
796
|
return document.cookie = r + "=" + f + T;
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
799
|
function w(r, f) {
|
|
800
800
|
if (!(typeof document > "u")) {
|
|
801
801
|
for (var b = {}, N = document.cookie ? document.cookie.split("; ") : [], T = 0; T < N.length; T++) {
|
|
802
|
-
var
|
|
802
|
+
var x = N[T].split("="), O = x.slice(1).join("=");
|
|
803
803
|
!f && O.charAt(0) === '"' && (O = O.slice(1, -1));
|
|
804
804
|
try {
|
|
805
|
-
var I =
|
|
806
|
-
if (O = (h.read || h)(O, I) ||
|
|
805
|
+
var I = l(x[0]);
|
|
806
|
+
if (O = (h.read || h)(O, I) || l(O), f)
|
|
807
807
|
try {
|
|
808
808
|
O = JSON.parse(O);
|
|
809
809
|
} catch {
|
|
@@ -847,7 +847,7 @@ function da() {
|
|
|
847
847
|
}
|
|
848
848
|
da.resetWarningCache = ca;
|
|
849
849
|
var ao = function() {
|
|
850
|
-
function o(
|
|
850
|
+
function o(l, u, h, p, m, w) {
|
|
851
851
|
if (w !== to) {
|
|
852
852
|
var r = new Error(
|
|
853
853
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
@@ -981,11 +981,11 @@ function no({ className: o, alt: t = "Partbot Logo" }) {
|
|
|
981
981
|
))
|
|
982
982
|
));
|
|
983
983
|
}
|
|
984
|
-
const ro = "3.1.
|
|
984
|
+
const ro = "3.1.6", ht = {
|
|
985
985
|
version: ro
|
|
986
986
|
}, jt = ["ACT", "NSW", "NT", "QLD", "SA", "TAS", "VIC", "WA"], Bt = "https://api.partbot.io/v1/vehicles/plate-search", Wt = "https://api.partbot.io/v1/vehicles/plate-search-retry";
|
|
987
987
|
function ut(o) {
|
|
988
|
-
const [t, c] =
|
|
988
|
+
const [t, c] = q(!1), [l, u] = q(!1), [h, p] = q(""), [m, w] = q(""), [r, f] = q(null), [b, N] = q(!1), T = Me(null), [x, O] = q(Bt), [I, $] = q(null), We = o.apiKey, ee = o.callbackUrl, k = o.productsUrl, te = o.useGeolocation === "true", ce = o.themeColor || "#4f46e5", $e = o.buttonTheme || "light", be = o.responsive !== void 0 ? o.responsive : !0, Ge = o.intro || "Enter your Number Plate and select your State or Territory to find your vehicle.", Ne = o.placeholder || "PL8SRCH", L = o.supportMessage, ae = o.isOpen !== void 0, re = o.isOpen, de = o.onOpenChange, Ye = o.hideDefaultButton || !1, Oe = o.onModalClose, qe = o.autoCloseOnSelect || !1, Ie = o.actionButtonLabel || "Show Products", V = ae ? re : t;
|
|
989
989
|
j(() => {
|
|
990
990
|
console.log(
|
|
991
991
|
"[PlateSearch] Controlled:",
|
|
@@ -998,44 +998,44 @@ function ut(o) {
|
|
|
998
998
|
t
|
|
999
999
|
);
|
|
1000
1000
|
}, [ae, re, V, t]);
|
|
1001
|
-
const ve = (
|
|
1002
|
-
ae || c(
|
|
1001
|
+
const ve = (i) => {
|
|
1002
|
+
ae || c(i), de && de(i);
|
|
1003
1003
|
}, _ = () => {
|
|
1004
1004
|
ve(!1);
|
|
1005
|
-
const
|
|
1005
|
+
const i = new CustomEvent("plate-search-modal-close", {
|
|
1006
1006
|
detail: { timestamp: Date.now() }
|
|
1007
1007
|
});
|
|
1008
|
-
document.dispatchEvent(
|
|
1008
|
+
document.dispatchEvent(i), Oe && Oe();
|
|
1009
1009
|
};
|
|
1010
1010
|
j(() => {
|
|
1011
1011
|
console.info(
|
|
1012
1012
|
`Vehicle Registration Search (v${ht.version}) powered by Partbot https://use.partbot.io`
|
|
1013
1013
|
);
|
|
1014
1014
|
}, []), j(() => {
|
|
1015
|
-
const
|
|
1015
|
+
const i = localStorage.getItem(
|
|
1016
1016
|
"partbot_selected_vehicle"
|
|
1017
1017
|
);
|
|
1018
|
-
if (
|
|
1019
|
-
const
|
|
1020
|
-
|
|
1018
|
+
if (i) {
|
|
1019
|
+
const v = JSON.parse(i);
|
|
1020
|
+
v.description && (v.vehicle_ids.length > 0 || Object.values(v.vehicle).every(
|
|
1021
1021
|
(y) => y !== null && y !== "" && (typeof y != "object" || Object.keys(y).length > 0)
|
|
1022
|
-
)) &&
|
|
1022
|
+
)) && $(v);
|
|
1023
1023
|
}
|
|
1024
1024
|
}, []), j(() => {
|
|
1025
1025
|
document.documentElement.style.setProperty("--partbot-theme", ce);
|
|
1026
1026
|
}, [ce]), j(() => {
|
|
1027
|
-
t && te && "geolocation" in navigator && navigator.geolocation.getCurrentPosition(async function(
|
|
1028
|
-
const { latitude:
|
|
1027
|
+
t && te && "geolocation" in navigator && navigator.geolocation.getCurrentPosition(async function(i) {
|
|
1028
|
+
const { latitude: v, longitude: y } = i.coords;
|
|
1029
1029
|
try {
|
|
1030
1030
|
const ne = await (await fetch(
|
|
1031
|
-
`https://maps.googleapis.com/maps/api/geocode/json?latlng=${
|
|
1031
|
+
`https://maps.googleapis.com/maps/api/geocode/json?latlng=${v},${y}&key=AIzaSyDAdDL5E8iWK_oc0FLqdW-QAhZo84xIX0k`
|
|
1032
1032
|
)).json();
|
|
1033
1033
|
if (ne.results && ne.results[0]) {
|
|
1034
|
-
const
|
|
1034
|
+
const G = ne.results[0].address_components.find(
|
|
1035
1035
|
(ie) => ie.types.includes("administrative_area_level_1")
|
|
1036
1036
|
);
|
|
1037
|
-
if (
|
|
1038
|
-
const ie =
|
|
1037
|
+
if (G) {
|
|
1038
|
+
const ie = G.short_name;
|
|
1039
1039
|
w(ie);
|
|
1040
1040
|
}
|
|
1041
1041
|
}
|
|
@@ -1044,28 +1044,42 @@ function ut(o) {
|
|
|
1044
1044
|
}
|
|
1045
1045
|
});
|
|
1046
1046
|
}, [te, t]), j(() => {
|
|
1047
|
-
let
|
|
1048
|
-
|
|
1047
|
+
let i = localStorage.getItem("partbot_plate_details");
|
|
1048
|
+
i && (i = JSON.parse(i), i.plate ? p(i.plate.number) : localStorage.removeItem("partbot_plate_details"));
|
|
1049
|
+
}, []), j(() => {
|
|
1050
|
+
const i = (v) => {
|
|
1051
|
+
var y;
|
|
1052
|
+
(y = v.detail) != null && y.userSelected && (localStorage.removeItem("partbot_plate_details"), p(""), f(null), $(null));
|
|
1053
|
+
};
|
|
1054
|
+
return document.addEventListener(
|
|
1055
|
+
"vehicle-search-change",
|
|
1056
|
+
i
|
|
1057
|
+
), () => {
|
|
1058
|
+
document.removeEventListener(
|
|
1059
|
+
"vehicle-search-change",
|
|
1060
|
+
i
|
|
1061
|
+
);
|
|
1062
|
+
};
|
|
1049
1063
|
}, []), j(() => {
|
|
1050
|
-
V && !
|
|
1051
|
-
}, [V,
|
|
1064
|
+
V && !l && u(!0), V && T.current && T.current.focus();
|
|
1065
|
+
}, [V, l]), j(() => {
|
|
1052
1066
|
if (V) {
|
|
1053
|
-
const
|
|
1067
|
+
const i = document.documentElement.style.overflow, v = document.documentElement.style.paddingRight, y = window.innerWidth - document.documentElement.clientWidth;
|
|
1054
1068
|
return y > 0 && (document.documentElement.style.paddingRight = `${y}px`), document.documentElement.style.overflow = "hidden", () => {
|
|
1055
|
-
document.documentElement.style.overflow =
|
|
1069
|
+
document.documentElement.style.overflow = i, document.documentElement.style.paddingRight = v;
|
|
1056
1070
|
};
|
|
1057
1071
|
}
|
|
1058
1072
|
}, [V]);
|
|
1059
|
-
const xe = (
|
|
1060
|
-
if (
|
|
1073
|
+
const xe = (i) => {
|
|
1074
|
+
if (i && i.preventDefault(), !m || !h)
|
|
1061
1075
|
return;
|
|
1062
1076
|
N(!0);
|
|
1063
|
-
const
|
|
1077
|
+
const v = {
|
|
1064
1078
|
plate: h,
|
|
1065
1079
|
state: m
|
|
1066
1080
|
};
|
|
1067
1081
|
async function y() {
|
|
1068
|
-
return (await fetch(
|
|
1082
|
+
return (await fetch(x, {
|
|
1069
1083
|
method: "POST",
|
|
1070
1084
|
mode: "cors",
|
|
1071
1085
|
// no-cors, *cors, same-origin
|
|
@@ -1081,7 +1095,7 @@ function ut(o) {
|
|
|
1081
1095
|
// manual, *follow, error
|
|
1082
1096
|
referrerPolicy: "no-referrer",
|
|
1083
1097
|
// no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url
|
|
1084
|
-
body: JSON.stringify(
|
|
1098
|
+
body: JSON.stringify(v)
|
|
1085
1099
|
})).json();
|
|
1086
1100
|
}
|
|
1087
1101
|
y().then((E) => {
|
|
@@ -1092,10 +1106,10 @@ function ut(o) {
|
|
|
1092
1106
|
};
|
|
1093
1107
|
j(() => {
|
|
1094
1108
|
xe();
|
|
1095
|
-
}, [
|
|
1096
|
-
const S = (
|
|
1109
|
+
}, [x]);
|
|
1110
|
+
const S = (i) => {
|
|
1097
1111
|
localStorage.removeItem("partbot_plate_details"), localStorage.removeItem("partbot_selected_vehicle"), ct.remove("partbot_selected_vehicle"), f(null), O(Wt);
|
|
1098
|
-
}, He = (
|
|
1112
|
+
}, He = (i) => {
|
|
1099
1113
|
window.open(
|
|
1100
1114
|
`mailto:report@partbot.io?subject=${encodeURIComponent(
|
|
1101
1115
|
"Registration Search Issue"
|
|
@@ -1103,47 +1117,47 @@ function ut(o) {
|
|
|
1103
1117
|
`Incorrect vehicles were shown for ${m} number plate: ${h}, vehicle: ${r.factory_vehicle.make} ${r.factory_vehicle.model} ${r.factory_vehicle.year} ${r.factory_vehicle.body} ${r.factory_vehicle.series}. Please provide details of the correct vehicle below:`
|
|
1104
1118
|
)}`
|
|
1105
1119
|
);
|
|
1106
|
-
}, A = (
|
|
1107
|
-
p(""), f(null), O(Bt),
|
|
1108
|
-
}, oe = (
|
|
1109
|
-
var
|
|
1110
|
-
description:
|
|
1111
|
-
vehicle_ids:
|
|
1120
|
+
}, A = (i) => {
|
|
1121
|
+
p(""), f(null), O(Bt), $(null), localStorage.removeItem("partbot_plate_details"), localStorage.removeItem("partbot_selected_vehicle"), ct.remove("partbot_selected_vehicle");
|
|
1122
|
+
}, oe = (i) => {
|
|
1123
|
+
var v = JSON.stringify({
|
|
1124
|
+
description: i.description,
|
|
1125
|
+
vehicle_ids: i.vehicle_ids,
|
|
1112
1126
|
vehicle: {
|
|
1113
|
-
...
|
|
1127
|
+
...i.vehicle,
|
|
1114
1128
|
year: r.factory_vehicle.year
|
|
1115
1129
|
}
|
|
1116
1130
|
});
|
|
1117
|
-
localStorage.setItem("partbot_selected_vehicle",
|
|
1131
|
+
localStorage.setItem("partbot_selected_vehicle", v), ct.set("partbot_selected_vehicle", v, {
|
|
1118
1132
|
secure: !0
|
|
1119
1133
|
});
|
|
1120
1134
|
var y = new CustomEvent("plate-search-change", {
|
|
1121
1135
|
detail: {
|
|
1122
|
-
vehicle_ids:
|
|
1136
|
+
vehicle_ids: i.vehicle_ids
|
|
1123
1137
|
}
|
|
1124
1138
|
});
|
|
1125
|
-
document.dispatchEvent(y),
|
|
1126
|
-
}, ye = (
|
|
1139
|
+
document.dispatchEvent(y), $(i), qe && _(), ee && ee !== window.location.href && (_(), window.location.href = ee + window.location.search);
|
|
1140
|
+
}, ye = (i) => {
|
|
1127
1141
|
if (_(), k)
|
|
1128
1142
|
try {
|
|
1129
|
-
const
|
|
1130
|
-
if (
|
|
1143
|
+
const v = new URL(k, window.location.origin);
|
|
1144
|
+
if (v.origin !== window.location.origin) {
|
|
1131
1145
|
console.warn(
|
|
1132
1146
|
"Partbot: Blocked navigation to external productsUrl",
|
|
1133
|
-
|
|
1147
|
+
v.toString()
|
|
1134
1148
|
);
|
|
1135
1149
|
return;
|
|
1136
1150
|
}
|
|
1137
|
-
window.location.assign(
|
|
1138
|
-
} catch (
|
|
1151
|
+
window.location.assign(v.href);
|
|
1152
|
+
} catch (v) {
|
|
1139
1153
|
console.error(
|
|
1140
1154
|
"Partbot: Invalid productsUrl provided",
|
|
1141
1155
|
k,
|
|
1142
|
-
|
|
1156
|
+
v
|
|
1143
1157
|
);
|
|
1144
1158
|
}
|
|
1145
|
-
}, Ee = (
|
|
1146
|
-
const
|
|
1159
|
+
}, Ee = (i) => {
|
|
1160
|
+
const v = [
|
|
1147
1161
|
"series",
|
|
1148
1162
|
"variant",
|
|
1149
1163
|
"body",
|
|
@@ -1153,12 +1167,12 @@ function ut(o) {
|
|
|
1153
1167
|
"engine_capacity",
|
|
1154
1168
|
"cylinders"
|
|
1155
1169
|
];
|
|
1156
|
-
return Object.entries(
|
|
1170
|
+
return Object.entries(i).filter(([y, E]) => E !== null && v.includes(y) && typeof E != "object").map(([y, E]) => y === "cylinders" ? `${E}cyl` : E).join(" ");
|
|
1157
1171
|
};
|
|
1158
1172
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, !Ye && /* @__PURE__ */ React.createElement(
|
|
1159
1173
|
"button",
|
|
1160
1174
|
{
|
|
1161
|
-
onClick: (
|
|
1175
|
+
onClick: (i) => ve(!V),
|
|
1162
1176
|
type: "button",
|
|
1163
1177
|
className: `${$e === "dark" ? "bg-transparent text-stone-100 hover:text-white" : "bg-white text-stone-700 hover:bg-stone-50"} inline-flex items-center ${be ? "px-2 md:px-3" : "px-3"} text-md focus:outline-none focus:ring-bg-theme-color h-[44px] rounded-md border-4 border-double border-stone-400 font-license text-base font-medium shadow-sm transition cursor-pointer leading-none`
|
|
1164
1178
|
},
|
|
@@ -1183,10 +1197,10 @@ function ut(o) {
|
|
|
1183
1197
|
className: `${V ? "modal-container modal-container-open" : "modal-container modal-container-close"}`,
|
|
1184
1198
|
style: {
|
|
1185
1199
|
zIndex: 2147483647,
|
|
1186
|
-
...!V && !
|
|
1200
|
+
...!V && !l ? { display: "none" } : {}
|
|
1187
1201
|
},
|
|
1188
|
-
onClick: (
|
|
1189
|
-
|
|
1202
|
+
onClick: (i) => {
|
|
1203
|
+
i.target === i.currentTarget && _();
|
|
1190
1204
|
}
|
|
1191
1205
|
},
|
|
1192
1206
|
/* @__PURE__ */ React.createElement(
|
|
@@ -1207,19 +1221,19 @@ function ut(o) {
|
|
|
1207
1221
|
/* @__PURE__ */ React.createElement("span", { className: "sr-only" }, "Close"),
|
|
1208
1222
|
/* @__PURE__ */ React.createElement(na, { size: 16, weight: "bold", "aria-hidden": "true" })
|
|
1209
1223
|
)),
|
|
1210
|
-
r && !I && /* @__PURE__ */ React.createElement("div", { className: "modal-content" }, /* @__PURE__ */ React.createElement("div", { className: "mb-5 text-center" }, /* @__PURE__ */ React.createElement("div", { className: "inline-flex items-center text-center text-2xl font-extrabold tracking-tight text-black" }, /* @__PURE__ */ React.createElement("div", null, "Results for", " ", /* @__PURE__ */ React.createElement("span", { className: "text-theme-color" }, h, " (", m, ")"))), /* @__PURE__ */ React.createElement("div", { className: "mt-6" }, /* @__PURE__ */ React.createElement("div", { className: "modal-scroll-area" }, r.vehicles ? /* @__PURE__ */ React.createElement("div", { className: "grid gap-3 text-left" }, r.vehicles.map(function(
|
|
1224
|
+
r && !I && /* @__PURE__ */ React.createElement("div", { className: "modal-content" }, /* @__PURE__ */ React.createElement("div", { className: "mb-5 text-center" }, /* @__PURE__ */ React.createElement("div", { className: "inline-flex items-center text-center text-2xl font-extrabold tracking-tight text-black" }, /* @__PURE__ */ React.createElement("div", null, "Results for", " ", /* @__PURE__ */ React.createElement("span", { className: "text-theme-color" }, h, " (", m, ")"))), /* @__PURE__ */ React.createElement("div", { className: "mt-6" }, /* @__PURE__ */ React.createElement("div", { className: "modal-scroll-area" }, r.vehicles ? /* @__PURE__ */ React.createElement("div", { className: "grid gap-3 text-left" }, r.vehicles.map(function(i, v) {
|
|
1211
1225
|
return /* @__PURE__ */ React.createElement(
|
|
1212
1226
|
"div",
|
|
1213
1227
|
{
|
|
1214
|
-
key:
|
|
1228
|
+
key: v,
|
|
1215
1229
|
className: "focus:outline-none relative grid cursor-pointer gap-4 rounded-lg border border-stone-300 bg-white px-4 py-4 shadow-sm hover:border-stone-400 sm:flex sm:justify-between"
|
|
1216
1230
|
},
|
|
1217
|
-
/* @__PURE__ */ React.createElement("div", { className: "pr-5 text-xs" }, /* @__PURE__ */ React.createElement("div", { className: "grid gap-2" }, /* @__PURE__ */ React.createElement("div", { className: "text-sm font-bold text-stone-900" },
|
|
1231
|
+
/* @__PURE__ */ React.createElement("div", { className: "pr-5 text-xs" }, /* @__PURE__ */ React.createElement("div", { className: "grid gap-2" }, /* @__PURE__ */ React.createElement("div", { className: "text-sm font-bold text-stone-900" }, i.description), /* @__PURE__ */ React.createElement("div", { className: "text-stone-600" }, Ee(i.vehicle)))),
|
|
1218
1232
|
/* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
|
|
1219
1233
|
"button",
|
|
1220
1234
|
{
|
|
1221
1235
|
className: "justify-center rounded-md border border-transparent bg-theme-color px-2 py-1.5 text-xs font-medium text-white shadow-sm",
|
|
1222
|
-
onClick: () => oe(
|
|
1236
|
+
onClick: () => oe(i)
|
|
1223
1237
|
},
|
|
1224
1238
|
"Select vehicle"
|
|
1225
1239
|
))
|
|
@@ -1241,10 +1255,10 @@ function ut(o) {
|
|
|
1241
1255
|
}
|
|
1242
1256
|
)
|
|
1243
1257
|
)), /* @__PURE__ */ React.createElement("div", { className: "border-t border-stone-200 px-4 py-3" }, /* @__PURE__ */ React.createElement("div", { className: "grid gap-3" }, r.vehicle_breakdown && r.vehicle_breakdown.map(
|
|
1244
|
-
(
|
|
1258
|
+
(i, v) => /* @__PURE__ */ React.createElement(
|
|
1245
1259
|
"div",
|
|
1246
1260
|
{
|
|
1247
|
-
key:
|
|
1261
|
+
key: v,
|
|
1248
1262
|
className: "flex items-center justify-between rounded-md border border-stone-200 p-3 text-sm"
|
|
1249
1263
|
},
|
|
1250
1264
|
/* @__PURE__ */ React.createElement("div", null, r.differing_attributes.map(
|
|
@@ -1256,13 +1270,13 @@ function ut(o) {
|
|
|
1256
1270
|
},
|
|
1257
1271
|
/* @__PURE__ */ React.createElement("span", { className: "font-medium capitalize" }, y, ":"),
|
|
1258
1272
|
" ",
|
|
1259
|
-
|
|
1273
|
+
i.vehicle[y]
|
|
1260
1274
|
)
|
|
1261
1275
|
)),
|
|
1262
1276
|
/* @__PURE__ */ React.createElement(
|
|
1263
1277
|
"button",
|
|
1264
1278
|
{
|
|
1265
|
-
onClick: () => oe(
|
|
1279
|
+
onClick: () => oe(i),
|
|
1266
1280
|
className: "ml-4 rounded-md bg-theme-color px-3 py-1.5 text-xs font-medium text-white hover:bg-opacity-90"
|
|
1267
1281
|
},
|
|
1268
1282
|
"Select"
|
|
@@ -1276,7 +1290,7 @@ function ut(o) {
|
|
|
1276
1290
|
__html: Vt.sanitize(L)
|
|
1277
1291
|
}
|
|
1278
1292
|
}
|
|
1279
|
-
),
|
|
1293
|
+
), x !== Wt && /* @__PURE__ */ React.createElement(
|
|
1280
1294
|
"button",
|
|
1281
1295
|
{
|
|
1282
1296
|
type: "button",
|
|
@@ -1356,38 +1370,38 @@ function ut(o) {
|
|
|
1356
1370
|
className: `pl8srch-input h-[130px] w-full rounded-xl border-[6px] px-6 pt-5 pb-2 text-center font-license text-[60px] uppercase md:h-[150px] md:border-8 md:text-[75px] focus:outline-none focus:ring-bg-theme-color focus:border-theme-color transition-all duration-200 ${h ? "border-theme-color" : "border-stone-300"}`,
|
|
1357
1371
|
placeholder: Ne,
|
|
1358
1372
|
value: h,
|
|
1359
|
-
onChange: (
|
|
1373
|
+
onChange: (i) => p(i.target.value.toUpperCase())
|
|
1360
1374
|
}
|
|
1361
1375
|
),
|
|
1362
|
-
/* @__PURE__ */ React.createElement("span", { className: "relative z-0 my-5 flex w-full rounded-md items-stretch shadow-sm" }, jt.map((
|
|
1376
|
+
/* @__PURE__ */ React.createElement("span", { className: "relative z-0 my-5 flex w-full rounded-md items-stretch shadow-sm" }, jt.map((i, v) => {
|
|
1363
1377
|
let y = "bg-white text-stone-700 hover:bg-stone-50 border-stone-300";
|
|
1364
|
-
return
|
|
1378
|
+
return i === m && (y = "bg-theme-color text-white hover:bg-theme-color border-theme-color"), v === 0 ? /* @__PURE__ */ React.createElement(
|
|
1365
1379
|
"button",
|
|
1366
1380
|
{
|
|
1367
|
-
key:
|
|
1368
|
-
onClick: (E) => w(
|
|
1381
|
+
key: i,
|
|
1382
|
+
onClick: (E) => w(i),
|
|
1369
1383
|
type: "button",
|
|
1370
1384
|
className: `focus:outline-none focus:ring-bg-theme-color text-center justify-center flex-grow focus:border-bg-theme-color relative inline-flex items-center cursor-pointer rounded-l-md border px-2 py-2 text-xs font-medium focus:z-10 focus:ring-1 sm:px-3 ${y}`
|
|
1371
1385
|
},
|
|
1372
|
-
|
|
1373
|
-
) : jt.length ===
|
|
1386
|
+
i
|
|
1387
|
+
) : jt.length === v + 1 ? /* @__PURE__ */ React.createElement(
|
|
1374
1388
|
"button",
|
|
1375
1389
|
{
|
|
1376
|
-
key:
|
|
1377
|
-
onClick: (E) => w(
|
|
1390
|
+
key: i,
|
|
1391
|
+
onClick: (E) => w(i),
|
|
1378
1392
|
type: "button",
|
|
1379
1393
|
className: `focus:outline-none focus:ring-bg-theme-color text-center justify-center flex-grow focus:border-bg-theme-color relative -ml-px inline-flex items-center cursor-pointer rounded-r-md border px-2 py-2 text-xs font-medium focus:z-10 focus:ring-1 sm:px-3 ${y}`
|
|
1380
1394
|
},
|
|
1381
|
-
|
|
1395
|
+
i
|
|
1382
1396
|
) : /* @__PURE__ */ React.createElement(
|
|
1383
1397
|
"button",
|
|
1384
1398
|
{
|
|
1385
|
-
key:
|
|
1386
|
-
onClick: (E) => w(
|
|
1399
|
+
key: i,
|
|
1400
|
+
onClick: (E) => w(i),
|
|
1387
1401
|
type: "button",
|
|
1388
1402
|
className: `focus:outline-none focus:ring-bg-theme-color text-center justify-center flex-grow focus:border-bg-theme-color relative -ml-px inline-flex items-center cursor-pointer border px-2 py-2 text-xs font-medium focus:z-10 focus:ring-1 sm:px-3 ${y}`
|
|
1389
1403
|
},
|
|
1390
|
-
|
|
1404
|
+
i
|
|
1391
1405
|
);
|
|
1392
1406
|
})),
|
|
1393
1407
|
/* @__PURE__ */ React.createElement(
|
|
@@ -1441,19 +1455,19 @@ ut.propTypes = {
|
|
|
1441
1455
|
};
|
|
1442
1456
|
const pt = '@import"https://fonts.googleapis.com/css2?family=Inter:wght@400..800&display=swap";/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}plate-search,plate-search *,plate-search:before,plate-search:after,plate-search::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}:host,:host *,:host:before,:host:after,:host::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-400:oklch(70.4% .191 22.216);--color-red-800:oklch(44.4% .177 26.899);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-stone-50:oklch(98.5% .001 106.423);--color-stone-100:oklch(97% .001 106.424);--color-stone-200:oklch(92.3% .003 48.717);--color-stone-300:oklch(86.9% .005 56.366);--color-stone-400:oklch(70.9% .01 56.259);--color-stone-500:oklch(55.3% .013 58.071);--color-stone-600:oklch(44.4% .011 73.639);--color-stone-700:oklch(37.4% .01 67.558);--color-stone-900:oklch(21.6% .006 56.043);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-lg:32rem;--container-2xl:42rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--text-8xl:6rem;--text-8xl--line-height:1;--font-weight-medium:500;--font-weight-bold:700;--font-weight-extrabold:800;--tracking-tight:-.025em;--tracking-wide:.025em;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-license:"License Plate"}plate-search,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-400:oklch(70.4% .191 22.216);--color-red-800:oklch(44.4% .177 26.899);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-stone-50:oklch(98.5% .001 106.423);--color-stone-100:oklch(97% .001 106.424);--color-stone-200:oklch(92.3% .003 48.717);--color-stone-300:oklch(86.9% .005 56.366);--color-stone-400:oklch(70.9% .01 56.259);--color-stone-500:oklch(55.3% .013 58.071);--color-stone-600:oklch(44.4% .011 73.639);--color-stone-700:oklch(37.4% .01 67.558);--color-stone-900:oklch(21.6% .006 56.043);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-lg:32rem;--container-2xl:42rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--text-8xl:6rem;--text-8xl--line-height:1;--font-weight-medium:500;--font-weight-bold:700;--font-weight-extrabold:800;--tracking-tight:-.025em;--tracking-wide:.025em;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-license:"License Plate"}:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-400:oklch(70.4% .191 22.216);--color-red-800:oklch(44.4% .177 26.899);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-stone-50:oklch(98.5% .001 106.423);--color-stone-100:oklch(97% .001 106.424);--color-stone-200:oklch(92.3% .003 48.717);--color-stone-300:oklch(86.9% .005 56.366);--color-stone-400:oklch(70.9% .01 56.259);--color-stone-500:oklch(55.3% .013 58.071);--color-stone-600:oklch(44.4% .011 73.639);--color-stone-700:oklch(37.4% .01 67.558);--color-stone-900:oklch(21.6% .006 56.043);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-lg:32rem;--container-2xl:42rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--text-8xl:6rem;--text-8xl--line-height:1;--font-weight-medium:500;--font-weight-bold:700;--font-weight-extrabold:800;--tracking-tight:-.025em;--tracking-wide:.025em;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-license:"License Plate"}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components{.modal-container{inset:calc(var(--spacing)*0);top:calc(var(--spacing)*0);z-index:9999;background-color:#00000080;justify-content:center;align-items:flex-start;width:100vw;height:100vh;display:flex;position:fixed;overflow-y:auto}@supports (color:color-mix(in lab,red,red)){.modal-container{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.modal-container{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media (min-width:48rem){.modal-container{align-items:center}}.modal-container-open{pointer-events:auto;opacity:1;--tw-duration:.2s;--tw-ease:var(--ease-out);transition-duration:.2s;transition-timing-function:var(--ease-out)}.modal-container-close{pointer-events:none;opacity:0;--tw-duration:.2s;--tw-ease:var(--ease-in);transition-duration:.2s;transition-timing-function:var(--ease-in)}.modal{width:100vw;height:100vh;transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,);overscroll-behavior:auto;background-color:var(--color-white);padding-inline:calc(var(--spacing)*6);padding-top:calc(var(--spacing)*8);padding-bottom:calc(var(--spacing)*8);text-align:left;vertical-align:bottom;font-family:var(--font-sans);--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));display:inline-block;overflow:hidden}@media (min-width:40rem){.modal{margin-block:calc(var(--spacing)*8);width:100%;max-width:var(--container-lg);vertical-align:middle}}@media (min-width:48rem){.modal{margin:calc(var(--spacing)*3);height:auto;max-width:var(--container-lg);border-radius:var(--radius-xl);padding-inline:calc(var(--spacing)*12)}}.modal-close{--tw-translate-y:calc(var(--spacing)*4);translate:var(--tw-translate-x)var(--tw-translate-y);opacity:0;--tw-duration:.2s;--tw-ease:var(--ease-in);transition-duration:.2s;transition-timing-function:var(--ease-in)}@media (min-width:40rem){.modal-close{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}}.modal-open{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y);opacity:1;--tw-duration:.3s;--tw-ease:var(--ease-out);transition-duration:.3s;transition-timing-function:var(--ease-out)}.modal-scroll-area{margin-top:calc(var(--spacing)*3);margin-bottom:calc(var(--spacing)*3);max-height:380px;overflow:auto}.pl8srch-text a{color:var(--partbot-theme);opacity:.8;transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));--tw-duration:.2s;text-decoration-line:underline;transition-duration:.2s}@media (hover:hover){.pl8srch-text a:hover{color:var(--partbot-theme);opacity:1}}}@layer utilities{.visible{visibility:visible}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.right-0{right:calc(var(--spacing)*0)}.isolate{isolation:isolate}.z-0{z-index:0}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.my-4{margin-block:calc(var(--spacing)*4)}.my-5{margin-block:calc(var(--spacing)*5)}.my-6{margin-block:calc(var(--spacing)*6)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-5{margin-top:calc(var(--spacing)*5)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-12{margin-top:calc(var(--spacing)*12)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.-ml-1{margin-left:calc(var(--spacing)*-1)}.-ml-px{margin-left:-1px}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.\\!h-5{height:calc(var(--spacing)*5)!important}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-\\[44px\\]{height:44px}.h-\\[130px\\]{height:130px}.h-full{height:100%}.min-h-screen{min-height:100vh}.\\!w-5{width:calc(var(--spacing)*5)!important}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-full{width:100%}.max-w-7xl{max-width:var(--container-7xl)}.max-w-prose{max-width:65ch}.max-w-sm{max-width:var(--container-sm)}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.flex-grow-0{flex-grow:0}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-5{gap:calc(var(--spacing)*5)}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-md{border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.rounded-r-md{border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-\\[6px\\]{border-style:var(--tw-border-style);border-width:6px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-double{--tw-border-style:double;border-style:double}.border-stone-200{border-color:var(--color-stone-200)}.border-stone-300{border-color:var(--color-stone-300)}.border-stone-400{border-color:var(--color-stone-400)}.border-theme-color{border-color:var(--partbot-theme)}.border-transparent{border-color:#0000}.border-t-white\\/20{border-top-color:#fff3}@supports (color:color-mix(in lab,red,red)){.border-t-white\\/20{border-top-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.border-b-emerald-600{border-bottom-color:var(--color-emerald-600)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-red-50{background-color:var(--color-red-50)}.bg-stone-50{background-color:var(--color-stone-50)}.bg-theme-color{background-color:var(--partbot-theme)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-8{padding:calc(var(--spacing)*8)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-5{padding-block:calc(var(--spacing)*5)}.py-8{padding-block:calc(var(--spacing)*8)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-5{padding-top:calc(var(--spacing)*5)}.pr-4{padding-right:calc(var(--spacing)*4)}.pr-5{padding-right:calc(var(--spacing)*5)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.text-center{text-align:center}.text-left{text-align:left}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[60px\\]{font-size:60px}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.text-balance{text-wrap:balance}.whitespace-normal\\!{white-space:normal!important}.whitespace-nowrap{white-space:nowrap}.text-black{color:var(--color-black)}.text-emerald-100{color:var(--color-emerald-100)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-700{color:var(--color-emerald-700)}.text-red-400{color:var(--color-red-400)}.text-red-800{color:var(--color-red-800)}.text-stone-100{color:var(--color-stone-100)}.text-stone-400{color:var(--color-stone-400)}.text-stone-500{color:var(--color-stone-500)}.text-stone-600{color:var(--color-stone-600)}.text-stone-700{color:var(--color-stone-700)}.text-stone-900{color:var(--color-stone-900)}.text-theme-color{color:var(--partbot-theme)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.shadow,.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.group-open\\:rotate-180:is(:where(.group):is([open],:popover-open,:open) *){rotate:180deg}@media (hover:hover){.hover\\:border-stone-400:hover{border-color:var(--color-stone-400)}.hover\\:bg-emerald-500:hover{background-color:var(--color-emerald-500)}.hover\\:bg-stone-50:hover{background-color:var(--color-stone-50)}.hover\\:bg-theme-color:hover{background-color:var(--partbot-theme)}.hover\\:text-stone-500:hover{color:var(--color-stone-500)}.hover\\:text-white:hover{color:var(--color-white)}}.focus\\:z-10:focus{z-index:10}.focus\\:border-bg-theme-color:focus,.focus\\:border-theme-color:focus{border-color:var(--partbot-theme)}.focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-bg-theme-color:focus{--tw-ring-color:var(--partbot-theme)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}@media (min-width:40rem){.sm\\:flex{display:flex}.sm\\:max-w-prose{max-width:65ch}.sm\\:justify-between{justify-content:space-between}.sm\\:overflow-hidden{overflow:hidden}.sm\\:px-3{padding-inline:calc(var(--spacing)*3)}.sm\\:px-6{padding-inline:calc(var(--spacing)*6)}}@media (min-width:48rem){.md\\:mt-6{margin-top:calc(var(--spacing)*6)}.md\\:mt-12{margin-top:calc(var(--spacing)*12)}.md\\:mr-2{margin-right:calc(var(--spacing)*2)}.md\\:-ml-1{margin-left:calc(var(--spacing)*-1)}.md\\:inline{display:inline}.md\\:h-\\[150px\\]{height:150px}.md\\:max-w-2xl{max-width:var(--container-2xl)}.md\\:flex-row{flex-direction:row}.md\\:items-center{align-items:center}.md\\:justify-center{justify-content:center}.md\\:border-8{border-style:var(--tw-border-style);border-width:8px}.md\\:p-4{padding:calc(var(--spacing)*4)}.md\\:px-3{padding-inline:calc(var(--spacing)*3)}.md\\:py-12{padding-block:calc(var(--spacing)*12)}.md\\:text-center{text-align:center}.md\\:text-7xl{font-size:var(--text-7xl);line-height:var(--tw-leading,var(--text-7xl--line-height))}.md\\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.md\\:text-\\[75px\\]{font-size:75px}}@media (min-width:64rem){.lg\\:px-8{padding-inline:calc(var(--spacing)*8)}.lg\\:py-12{padding-block:calc(var(--spacing)*12)}.lg\\:text-8xl{font-size:var(--text-8xl);line-height:var(--tw-leading,var(--text-8xl--line-height))}.lg\\:leading-20{--tw-leading:calc(var(--spacing)*20);line-height:calc(var(--spacing)*20)}}.\\[\\&_summary\\:\\:-webkit-details-marker\\]\\:hidden summary::-webkit-details-marker{display:none}.\\[\\&\\>a\\]\\:text-theme-color>a{color:var(--partbot-theme)}@media (hover:hover){.hover\\:\\[\\&\\>a\\]\\:text-theme-color:hover>a{color:var(--partbot-theme)}}.font-license{font-family:var(--font-license)}}@font-face{font-family:License Plate;src:url(https://res.cloudinary.com/proex/raw/upload/v1730709140/partbot/PartbotPlate.woff2)format("woff2");font-weight:400;font-style:normal}:host{overflow-wrap:break-word;white-space:normal;display:block;overflow:visible}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@keyframes spin{to{transform:rotate(360deg)}}';
|
|
1443
1457
|
function io({ domElement: o, webComponentInstance: t }) {
|
|
1444
|
-
const c = o.getAttribute("data-api-key"),
|
|
1458
|
+
const c = o.getAttribute("data-api-key"), l = o.getAttribute("data-callback-url"), u = o.getAttribute("data-products-url"), h = o.getAttribute("data-theme-color"), p = o.getAttribute("data-use-geolocation") === "true", m = o.getAttribute("data-button"), w = o.getAttribute("data-responsive") ? o.getAttribute("data-responsive") === "true" : !0, r = o.getAttribute("data-placeholder"), f = o.getAttribute("data-intro"), b = o.getAttribute("data-support-message"), N = o.getAttribute("data-action-button-label"), T = o.getAttribute("data-hide-default-button") === "true", x = o.getAttribute("data-auto-close-on-select") === "true", [O, I] = q(!1);
|
|
1445
1459
|
return j(() => {
|
|
1446
1460
|
t && (t._modalControls = {
|
|
1447
1461
|
open: () => I(!0),
|
|
1448
1462
|
close: () => I(!1),
|
|
1449
|
-
toggle: () => I((
|
|
1463
|
+
toggle: () => I(($) => !$)
|
|
1450
1464
|
});
|
|
1451
1465
|
}, [t]), /* @__PURE__ */ React.createElement("div", { className: "App" }, /* @__PURE__ */ React.createElement(
|
|
1452
1466
|
ut,
|
|
1453
1467
|
{
|
|
1454
1468
|
className: "partbot",
|
|
1455
1469
|
apiKey: c,
|
|
1456
|
-
callbackUrl:
|
|
1470
|
+
callbackUrl: l,
|
|
1457
1471
|
productsUrl: u,
|
|
1458
1472
|
themeColor: h,
|
|
1459
1473
|
useGeolocation: p,
|
|
@@ -1464,7 +1478,7 @@ function io({ domElement: o, webComponentInstance: t }) {
|
|
|
1464
1478
|
supportMessage: b,
|
|
1465
1479
|
actionButtonLabel: N,
|
|
1466
1480
|
hideDefaultButton: T,
|
|
1467
|
-
autoCloseOnSelect:
|
|
1481
|
+
autoCloseOnSelect: x,
|
|
1468
1482
|
isOpen: O,
|
|
1469
1483
|
onOpenChange: I
|
|
1470
1484
|
}
|
|
@@ -1492,7 +1506,7 @@ class we extends HTMLElement {
|
|
|
1492
1506
|
`https://unpkg.com/@cartbot/plate-search@${m}/build/dist/css/plate-search.css`
|
|
1493
1507
|
);
|
|
1494
1508
|
}
|
|
1495
|
-
const
|
|
1509
|
+
const l = [
|
|
1496
1510
|
["data-api-key", this.apiKey],
|
|
1497
1511
|
["data-callback-url", this.callbackUrl],
|
|
1498
1512
|
["data-products-url", this.productsUrl],
|
|
@@ -1531,7 +1545,7 @@ class we extends HTMLElement {
|
|
|
1531
1545
|
));
|
|
1532
1546
|
const h = document.createElement("template");
|
|
1533
1547
|
if (h.innerHTML = `
|
|
1534
|
-
<div class="partbot-plate-search isolate" ${
|
|
1548
|
+
<div class="partbot-plate-search isolate" ${l}></div>`, this.attachShadow({ mode: "open" }), we.__stylePromise.then((m) => {
|
|
1535
1549
|
var w, r;
|
|
1536
1550
|
if (m) {
|
|
1537
1551
|
if (m instanceof CSSStyleSheet ? this.shadowRoot.adoptedStyleSheets = [m] : m instanceof HTMLStyleElement && this.shadowRoot.prepend(m.cloneNode(!0)), this.debug)
|
|
@@ -1581,7 +1595,7 @@ class we extends HTMLElement {
|
|
|
1581
1595
|
customElements.define("plate-search", we);
|
|
1582
1596
|
const co = ya(
|
|
1583
1597
|
function(t, c) {
|
|
1584
|
-
const
|
|
1598
|
+
const l = Me(null), u = Me(null), h = Me(null), p = Me(null), [m, w] = q(!1);
|
|
1585
1599
|
return Ea(
|
|
1586
1600
|
c,
|
|
1587
1601
|
() => ({
|
|
@@ -1597,32 +1611,32 @@ const co = ya(
|
|
|
1597
1611
|
}),
|
|
1598
1612
|
[t.onOpenChange, t.isOpen]
|
|
1599
1613
|
), j(() => {
|
|
1600
|
-
if (!
|
|
1601
|
-
const r =
|
|
1614
|
+
if (!l.current || u.current) return;
|
|
1615
|
+
const r = l.current.attachShadow({ mode: "open" });
|
|
1602
1616
|
u.current = r;
|
|
1603
1617
|
const f = document.createElement("div");
|
|
1604
1618
|
if (h.current = f, r.appendChild(f), !document.head.querySelector('link[href*="fonts.googleapis.com"]')) {
|
|
1605
|
-
const
|
|
1606
|
-
|
|
1619
|
+
const x = document.createElement("link");
|
|
1620
|
+
x.rel = "stylesheet", x.href = "https://fonts.googleapis.com/css2?family=Inter:wght@400..800&display=swap", document.head.appendChild(x);
|
|
1607
1621
|
}
|
|
1608
1622
|
if (!document.head.querySelector("style[data-partbot-license]")) {
|
|
1609
|
-
const
|
|
1610
|
-
|
|
1623
|
+
const x = document.createElement("style");
|
|
1624
|
+
x.setAttribute("data-partbot-license", ""), x.textContent = `
|
|
1611
1625
|
@font-face {
|
|
1612
1626
|
font-family: "License Plate";
|
|
1613
1627
|
src: url(https://res.cloudinary.com/proex/raw/upload/v1730709140/partbot/PartbotPlate.woff2)
|
|
1614
1628
|
format("woff2");
|
|
1615
1629
|
font-weight: normal;
|
|
1616
1630
|
font-style: normal;
|
|
1617
|
-
}`, document.head.appendChild(
|
|
1631
|
+
}`, document.head.appendChild(x);
|
|
1618
1632
|
}
|
|
1619
1633
|
const b = pt.replace(/@import\s+["']https:\/\/fonts\.googleapis\.com[^;]+;/g, "").replace(/@import\s+["']tailwindcss["'];/g, ""), N = document.createElement("style");
|
|
1620
1634
|
N.textContent = b, r.appendChild(N);
|
|
1621
1635
|
const T = Yt(f);
|
|
1622
1636
|
return p.current = T, w(!0), () => {
|
|
1623
1637
|
p.current && (setTimeout(() => {
|
|
1624
|
-
var
|
|
1625
|
-
(
|
|
1638
|
+
var x;
|
|
1639
|
+
(x = p.current) == null || x.unmount();
|
|
1626
1640
|
}, 0), p.current = null);
|
|
1627
1641
|
};
|
|
1628
1642
|
}, []), j(() => {
|
|
@@ -1655,7 +1669,7 @@ const co = ya(
|
|
|
1655
1669
|
]), /* @__PURE__ */ React.createElement(
|
|
1656
1670
|
"div",
|
|
1657
1671
|
{
|
|
1658
|
-
ref:
|
|
1672
|
+
ref: l,
|
|
1659
1673
|
style: {
|
|
1660
1674
|
position: "relative",
|
|
1661
1675
|
zIndex: 2147483647
|
|
@@ -1683,17 +1697,17 @@ if (le) {
|
|
|
1683
1697
|
webComponentInstance: le
|
|
1684
1698
|
})
|
|
1685
1699
|
);
|
|
1686
|
-
},
|
|
1700
|
+
}, l = [
|
|
1687
1701
|
...le.shadowRoot ? le.shadowRoot.querySelectorAll("link") : le.querySelectorAll("link")
|
|
1688
1702
|
];
|
|
1689
|
-
if (
|
|
1703
|
+
if (l.length === 0)
|
|
1690
1704
|
c();
|
|
1691
1705
|
else {
|
|
1692
1706
|
let u = 0;
|
|
1693
1707
|
const h = () => {
|
|
1694
|
-
++u >=
|
|
1708
|
+
++u >= l.length && c();
|
|
1695
1709
|
};
|
|
1696
|
-
|
|
1710
|
+
l.forEach((p) => {
|
|
1697
1711
|
p.sheet || p.complete ? h() : (p.addEventListener("load", h, { once: !0 }), p.addEventListener("error", h, { once: !0 }));
|
|
1698
1712
|
});
|
|
1699
1713
|
}
|