proto-sudoku-wc 0.1.67 → 0.1.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/{index-DX7gStMP.js → index-vwAjVR0m.js} +150 -110
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/proto-sudoku-wc.cjs.js +4 -3
- package/dist/cjs/proto-sudoku.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/{index-BJPfPsHf.js → index-moxqhnZq.js} +151 -110
- package/dist/esm/loader.js +3 -2
- package/dist/esm/proto-sudoku-wc.js +4 -3
- package/dist/esm/proto-sudoku.entry.js +1 -1
- package/dist/proto-sudoku-wc/{p-2465fde4.entry.js → p-416bc43f.entry.js} +2 -2
- package/dist/proto-sudoku-wc/p-DQuL1Twl.js +1 -0
- package/dist/proto-sudoku-wc/p-moxqhnZq.js +2 -0
- package/dist/proto-sudoku-wc/proto-sudoku-wc.esm.js +1 -1
- package/dist/types/stencil-public-runtime.d.ts +12 -5
- package/package.json +7 -7
- package/dist/proto-sudoku-wc/p-BJPfPsHf.js +0 -2
@@ -3,11 +3,8 @@
|
|
3
3
|
const NAMESPACE = 'proto-sudoku-wc';
|
4
4
|
const BUILD = /* proto-sudoku-wc */ { hydratedSelectorName: "hydrated", lazyLoad: true, updatable: true, watchCallback: false };
|
5
5
|
|
6
|
-
const globalScripts = () => {};
|
7
|
-
const globalStyles = "";
|
8
|
-
|
9
6
|
/*
|
10
|
-
Stencil Client Platform v4.
|
7
|
+
Stencil Client Platform v4.36.0 | MIT Licensed | https://stenciljs.com
|
11
8
|
*/
|
12
9
|
var __defProp = Object.defineProperty;
|
13
10
|
var __export = (target, all) => {
|
@@ -104,6 +101,7 @@ var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
|
|
104
101
|
}
|
105
102
|
return false;
|
106
103
|
})() ;
|
104
|
+
var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
|
107
105
|
var queuePending = false;
|
108
106
|
var queueDomReads = [];
|
109
107
|
var queueDomWrites = [];
|
@@ -203,12 +201,24 @@ var unwrapErr = (result) => {
|
|
203
201
|
throw result.value;
|
204
202
|
}
|
205
203
|
};
|
204
|
+
|
205
|
+
// src/utils/style.ts
|
206
|
+
function createStyleSheetIfNeededAndSupported(styles2) {
|
207
|
+
return void 0;
|
208
|
+
}
|
209
|
+
|
210
|
+
// src/utils/shadow-root.ts
|
211
|
+
var globalStyleSheet;
|
206
212
|
function createShadowRoot(cmpMeta) {
|
213
|
+
var _a;
|
207
214
|
const shadowRoot = this.attachShadow({ mode: "open" });
|
208
|
-
if (
|
209
|
-
|
210
|
-
|
211
|
-
|
215
|
+
if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported()) != null ? _a : null;
|
216
|
+
if (globalStyleSheet) {
|
217
|
+
if (supportsMutableAdoptedStyleSheets) {
|
218
|
+
shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
|
219
|
+
} else {
|
220
|
+
shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
|
221
|
+
}
|
212
222
|
}
|
213
223
|
}
|
214
224
|
var createTime = (fnName, tagName = "") => {
|
@@ -225,6 +235,110 @@ var uniqueTime = (key, measureText) => {
|
|
225
235
|
};
|
226
236
|
}
|
227
237
|
};
|
238
|
+
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
239
|
+
var registerStyle = (scopeId2, cssText, allowCS) => {
|
240
|
+
let style = styles.get(scopeId2);
|
241
|
+
if (supportsConstructableStylesheets && allowCS) {
|
242
|
+
style = style || new CSSStyleSheet();
|
243
|
+
if (typeof style === "string") {
|
244
|
+
style = cssText;
|
245
|
+
} else {
|
246
|
+
style.replaceSync(cssText);
|
247
|
+
}
|
248
|
+
} else {
|
249
|
+
style = cssText;
|
250
|
+
}
|
251
|
+
styles.set(scopeId2, style);
|
252
|
+
};
|
253
|
+
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
254
|
+
var _a;
|
255
|
+
const scopeId2 = getScopeId(cmpMeta);
|
256
|
+
const style = styles.get(scopeId2);
|
257
|
+
if (!win.document) {
|
258
|
+
return scopeId2;
|
259
|
+
}
|
260
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
261
|
+
if (style) {
|
262
|
+
if (typeof style === "string") {
|
263
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
264
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
265
|
+
let styleElm;
|
266
|
+
if (!appliedStyles) {
|
267
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
268
|
+
}
|
269
|
+
if (!appliedStyles.has(scopeId2)) {
|
270
|
+
{
|
271
|
+
styleElm = win.document.createElement("style");
|
272
|
+
styleElm.innerHTML = style;
|
273
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
274
|
+
if (nonce != null) {
|
275
|
+
styleElm.setAttribute("nonce", nonce);
|
276
|
+
}
|
277
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
278
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
279
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
280
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
281
|
+
styleContainerNode.insertBefore(
|
282
|
+
styleElm,
|
283
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
284
|
+
);
|
285
|
+
} else if ("host" in styleContainerNode) {
|
286
|
+
if (supportsConstructableStylesheets) {
|
287
|
+
const stylesheet = new CSSStyleSheet();
|
288
|
+
stylesheet.replaceSync(style);
|
289
|
+
if (supportsMutableAdoptedStyleSheets) {
|
290
|
+
styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
|
291
|
+
} else {
|
292
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
293
|
+
}
|
294
|
+
} else {
|
295
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
296
|
+
if (existingStyleContainer) {
|
297
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
298
|
+
} else {
|
299
|
+
styleContainerNode.prepend(styleElm);
|
300
|
+
}
|
301
|
+
}
|
302
|
+
} else {
|
303
|
+
styleContainerNode.append(styleElm);
|
304
|
+
}
|
305
|
+
}
|
306
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
307
|
+
styleContainerNode.insertBefore(styleElm, null);
|
308
|
+
}
|
309
|
+
}
|
310
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
311
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
312
|
+
}
|
313
|
+
if (appliedStyles) {
|
314
|
+
appliedStyles.add(scopeId2);
|
315
|
+
}
|
316
|
+
}
|
317
|
+
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
318
|
+
if (supportsMutableAdoptedStyleSheets) {
|
319
|
+
styleContainerNode.adoptedStyleSheets.push(style);
|
320
|
+
} else {
|
321
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
322
|
+
}
|
323
|
+
}
|
324
|
+
}
|
325
|
+
return scopeId2;
|
326
|
+
};
|
327
|
+
var attachStyles = (hostRef) => {
|
328
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
329
|
+
const elm = hostRef.$hostElement$;
|
330
|
+
const flags = cmpMeta.$flags$;
|
331
|
+
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
332
|
+
const scopeId2 = addStyle(
|
333
|
+
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
334
|
+
cmpMeta);
|
335
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
336
|
+
elm["s-sc"] = scopeId2;
|
337
|
+
elm.classList.add(scopeId2 + "-h");
|
338
|
+
}
|
339
|
+
endAttachStyles();
|
340
|
+
};
|
341
|
+
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
228
342
|
var h = (nodeName, vnodeData, ...children) => {
|
229
343
|
let child = null;
|
230
344
|
let key = null;
|
@@ -352,102 +466,6 @@ var emitEvent = (elm, name, opts) => {
|
|
352
466
|
elm.dispatchEvent(ev);
|
353
467
|
return ev;
|
354
468
|
};
|
355
|
-
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
356
|
-
var registerStyle = (scopeId2, cssText, allowCS) => {
|
357
|
-
let style = styles.get(scopeId2);
|
358
|
-
if (supportsConstructableStylesheets && allowCS) {
|
359
|
-
style = style || new CSSStyleSheet();
|
360
|
-
if (typeof style === "string") {
|
361
|
-
style = cssText;
|
362
|
-
} else {
|
363
|
-
style.replaceSync(cssText);
|
364
|
-
}
|
365
|
-
} else {
|
366
|
-
style = cssText;
|
367
|
-
}
|
368
|
-
styles.set(scopeId2, style);
|
369
|
-
};
|
370
|
-
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
371
|
-
var _a;
|
372
|
-
const scopeId2 = getScopeId(cmpMeta);
|
373
|
-
const style = styles.get(scopeId2);
|
374
|
-
if (!win.document) {
|
375
|
-
return scopeId2;
|
376
|
-
}
|
377
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
378
|
-
if (style) {
|
379
|
-
if (typeof style === "string") {
|
380
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
381
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
382
|
-
let styleElm;
|
383
|
-
if (!appliedStyles) {
|
384
|
-
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
385
|
-
}
|
386
|
-
if (!appliedStyles.has(scopeId2)) {
|
387
|
-
{
|
388
|
-
styleElm = win.document.createElement("style");
|
389
|
-
styleElm.innerHTML = style;
|
390
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
391
|
-
if (nonce != null) {
|
392
|
-
styleElm.setAttribute("nonce", nonce);
|
393
|
-
}
|
394
|
-
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
395
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
396
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
397
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
398
|
-
styleContainerNode.insertBefore(
|
399
|
-
styleElm,
|
400
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
401
|
-
);
|
402
|
-
} else if ("host" in styleContainerNode) {
|
403
|
-
if (supportsConstructableStylesheets) {
|
404
|
-
const stylesheet = new CSSStyleSheet();
|
405
|
-
stylesheet.replaceSync(style);
|
406
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
407
|
-
} else {
|
408
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
409
|
-
if (existingStyleContainer) {
|
410
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
411
|
-
} else {
|
412
|
-
styleContainerNode.prepend(styleElm);
|
413
|
-
}
|
414
|
-
}
|
415
|
-
} else {
|
416
|
-
styleContainerNode.append(styleElm);
|
417
|
-
}
|
418
|
-
}
|
419
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
420
|
-
styleContainerNode.insertBefore(styleElm, null);
|
421
|
-
}
|
422
|
-
}
|
423
|
-
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
424
|
-
styleElm.innerHTML += SLOT_FB_CSS;
|
425
|
-
}
|
426
|
-
if (appliedStyles) {
|
427
|
-
appliedStyles.add(scopeId2);
|
428
|
-
}
|
429
|
-
}
|
430
|
-
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
431
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
432
|
-
}
|
433
|
-
}
|
434
|
-
return scopeId2;
|
435
|
-
};
|
436
|
-
var attachStyles = (hostRef) => {
|
437
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
438
|
-
const elm = hostRef.$hostElement$;
|
439
|
-
const flags = cmpMeta.$flags$;
|
440
|
-
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
441
|
-
const scopeId2 = addStyle(
|
442
|
-
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
443
|
-
cmpMeta);
|
444
|
-
if (flags & 10 /* needsScopedEncapsulation */) {
|
445
|
-
elm["s-sc"] = scopeId2;
|
446
|
-
elm.classList.add(scopeId2 + "-h");
|
447
|
-
}
|
448
|
-
endAttachStyles();
|
449
|
-
};
|
450
|
-
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
451
469
|
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
452
470
|
if (oldValue === newValue) {
|
453
471
|
return;
|
@@ -760,7 +778,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
760
778
|
!isInitialRender && BUILD.updatable && oldChildren !== null
|
761
779
|
) {
|
762
780
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
763
|
-
}
|
781
|
+
} else ;
|
764
782
|
if (isSvgMode && tag === "svg") {
|
765
783
|
isSvgMode = false;
|
766
784
|
}
|
@@ -816,6 +834,12 @@ var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
816
834
|
}
|
817
835
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
818
836
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
837
|
+
if (isInitialLoad) {
|
838
|
+
queueMicrotask(() => {
|
839
|
+
dispatch();
|
840
|
+
});
|
841
|
+
return;
|
842
|
+
}
|
819
843
|
return writeTask(dispatch) ;
|
820
844
|
};
|
821
845
|
var dispatchHooks = (hostRef, isInitialLoad) => {
|
@@ -933,9 +957,10 @@ var postUpdateComponent = (hostRef) => {
|
|
933
957
|
}
|
934
958
|
};
|
935
959
|
var forceUpdate = (ref) => {
|
960
|
+
var _a;
|
936
961
|
{
|
937
962
|
const hostRef = getHostRef(ref);
|
938
|
-
const isConnected = hostRef.$hostElement
|
963
|
+
const isConnected = (_a = hostRef == null ? void 0 : hostRef.$hostElement$) == null ? void 0 : _a.isConnected;
|
939
964
|
if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
940
965
|
scheduleUpdate(hostRef, false);
|
941
966
|
}
|
@@ -964,6 +989,9 @@ var addHydratedFlag = (elm) => {
|
|
964
989
|
var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
965
990
|
var setValue = (ref, propName, newVal, cmpMeta) => {
|
966
991
|
const hostRef = getHostRef(ref);
|
992
|
+
if (!hostRef) {
|
993
|
+
return;
|
994
|
+
}
|
967
995
|
if (!hostRef) {
|
968
996
|
throw new Error(
|
969
997
|
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
|
@@ -1023,6 +1051,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1023
1051
|
Object.defineProperty(prototype, memberName, {
|
1024
1052
|
set(newValue) {
|
1025
1053
|
const ref = getHostRef(this);
|
1054
|
+
if (!ref) {
|
1055
|
+
return;
|
1056
|
+
}
|
1026
1057
|
if (origSetter) {
|
1027
1058
|
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
1028
1059
|
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
@@ -1086,7 +1117,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1086
1117
|
} else if (propName == null) {
|
1087
1118
|
const hostRef = getHostRef(this);
|
1088
1119
|
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
1089
|
-
if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
1120
|
+
if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
1090
1121
|
const instance = hostRef.$lazyInstance$ ;
|
1091
1122
|
const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
|
1092
1123
|
entry == null ? void 0 : entry.forEach((callbackName) => {
|
@@ -1191,6 +1222,9 @@ var fireConnectedCallback = (instance, elm) => {
|
|
1191
1222
|
var connectedCallback = (elm) => {
|
1192
1223
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
1193
1224
|
const hostRef = getHostRef(elm);
|
1225
|
+
if (!hostRef) {
|
1226
|
+
return;
|
1227
|
+
}
|
1194
1228
|
const cmpMeta = hostRef.$cmpMeta$;
|
1195
1229
|
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
1196
1230
|
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
@@ -1305,7 +1339,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1305
1339
|
}
|
1306
1340
|
}
|
1307
1341
|
connectedCallback() {
|
1308
|
-
getHostRef(this);
|
1342
|
+
const hostRef = getHostRef(this);
|
1343
|
+
if (!hostRef) {
|
1344
|
+
return;
|
1345
|
+
}
|
1309
1346
|
if (!this.hasRegisteredEventListeners) {
|
1310
1347
|
this.hasRegisteredEventListeners = true;
|
1311
1348
|
}
|
@@ -1324,6 +1361,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1324
1361
|
plt.raf(() => {
|
1325
1362
|
var _a3;
|
1326
1363
|
const hostRef = getHostRef(this);
|
1364
|
+
if (!hostRef) {
|
1365
|
+
return;
|
1366
|
+
}
|
1327
1367
|
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
1328
1368
|
if (i2 > -1) {
|
1329
1369
|
deferredConnectedCallbacks.splice(i2, 1);
|
@@ -1334,7 +1374,8 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1334
1374
|
});
|
1335
1375
|
}
|
1336
1376
|
componentOnReady() {
|
1337
|
-
|
1377
|
+
var _a3;
|
1378
|
+
return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
|
1338
1379
|
}
|
1339
1380
|
};
|
1340
1381
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
@@ -1380,7 +1421,6 @@ var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1380
1421
|
exports.bootstrapLazy = bootstrapLazy;
|
1381
1422
|
exports.forceUpdate = forceUpdate;
|
1382
1423
|
exports.getRenderingRef = getRenderingRef;
|
1383
|
-
exports.globalScripts = globalScripts;
|
1384
1424
|
exports.h = h;
|
1385
1425
|
exports.promiseResolve = promiseResolve;
|
1386
1426
|
exports.registerInstance = registerInstance;
|
package/dist/cjs/loader.cjs.js
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
var index = require('./index-
|
3
|
+
var index = require('./index-vwAjVR0m.js');
|
4
|
+
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
4
5
|
|
5
6
|
const defineCustomElements = async (win, options) => {
|
6
7
|
if (typeof window === 'undefined') return undefined;
|
7
|
-
await
|
8
|
+
await appGlobals.globalScripts();
|
8
9
|
return index.bootstrapLazy([["proto-sudoku.cjs",[[1,"proto-sudoku",{"tag":[1],"platform":[1]}]]]], options);
|
9
10
|
};
|
10
11
|
|
@@ -1,10 +1,11 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
var index = require('./index-
|
3
|
+
var index = require('./index-vwAjVR0m.js');
|
4
|
+
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
4
5
|
|
5
6
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
6
7
|
/*
|
7
|
-
Stencil Client Patch Browser v4.
|
8
|
+
Stencil Client Patch Browser v4.36.0 | MIT Licensed | https://stenciljs.com
|
8
9
|
*/
|
9
10
|
|
10
11
|
var patchBrowser = () => {
|
@@ -17,7 +18,7 @@ var patchBrowser = () => {
|
|
17
18
|
};
|
18
19
|
|
19
20
|
patchBrowser().then(async (options) => {
|
20
|
-
await
|
21
|
+
await appGlobals.globalScripts();
|
21
22
|
return index.bootstrapLazy([["proto-sudoku.cjs",[[1,"proto-sudoku",{"tag":[1],"platform":[1]}]]]], options);
|
22
23
|
});
|
23
24
|
|
@@ -1,11 +1,8 @@
|
|
1
1
|
const NAMESPACE = 'proto-sudoku-wc';
|
2
2
|
const BUILD = /* proto-sudoku-wc */ { hydratedSelectorName: "hydrated", lazyLoad: true, updatable: true, watchCallback: false };
|
3
3
|
|
4
|
-
const globalScripts = () => {};
|
5
|
-
const globalStyles = "";
|
6
|
-
|
7
4
|
/*
|
8
|
-
Stencil Client Platform v4.
|
5
|
+
Stencil Client Platform v4.36.0 | MIT Licensed | https://stenciljs.com
|
9
6
|
*/
|
10
7
|
var __defProp = Object.defineProperty;
|
11
8
|
var __export = (target, all) => {
|
@@ -102,6 +99,7 @@ var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
|
|
102
99
|
}
|
103
100
|
return false;
|
104
101
|
})() ;
|
102
|
+
var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
|
105
103
|
var queuePending = false;
|
106
104
|
var queueDomReads = [];
|
107
105
|
var queueDomWrites = [];
|
@@ -201,12 +199,24 @@ var unwrapErr = (result) => {
|
|
201
199
|
throw result.value;
|
202
200
|
}
|
203
201
|
};
|
202
|
+
|
203
|
+
// src/utils/style.ts
|
204
|
+
function createStyleSheetIfNeededAndSupported(styles2) {
|
205
|
+
return void 0;
|
206
|
+
}
|
207
|
+
|
208
|
+
// src/utils/shadow-root.ts
|
209
|
+
var globalStyleSheet;
|
204
210
|
function createShadowRoot(cmpMeta) {
|
211
|
+
var _a;
|
205
212
|
const shadowRoot = this.attachShadow({ mode: "open" });
|
206
|
-
if (
|
207
|
-
|
208
|
-
|
209
|
-
|
213
|
+
if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported()) != null ? _a : null;
|
214
|
+
if (globalStyleSheet) {
|
215
|
+
if (supportsMutableAdoptedStyleSheets) {
|
216
|
+
shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
|
217
|
+
} else {
|
218
|
+
shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
|
219
|
+
}
|
210
220
|
}
|
211
221
|
}
|
212
222
|
var createTime = (fnName, tagName = "") => {
|
@@ -223,6 +233,110 @@ var uniqueTime = (key, measureText) => {
|
|
223
233
|
};
|
224
234
|
}
|
225
235
|
};
|
236
|
+
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
237
|
+
var registerStyle = (scopeId2, cssText, allowCS) => {
|
238
|
+
let style = styles.get(scopeId2);
|
239
|
+
if (supportsConstructableStylesheets && allowCS) {
|
240
|
+
style = style || new CSSStyleSheet();
|
241
|
+
if (typeof style === "string") {
|
242
|
+
style = cssText;
|
243
|
+
} else {
|
244
|
+
style.replaceSync(cssText);
|
245
|
+
}
|
246
|
+
} else {
|
247
|
+
style = cssText;
|
248
|
+
}
|
249
|
+
styles.set(scopeId2, style);
|
250
|
+
};
|
251
|
+
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
252
|
+
var _a;
|
253
|
+
const scopeId2 = getScopeId(cmpMeta);
|
254
|
+
const style = styles.get(scopeId2);
|
255
|
+
if (!win.document) {
|
256
|
+
return scopeId2;
|
257
|
+
}
|
258
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
259
|
+
if (style) {
|
260
|
+
if (typeof style === "string") {
|
261
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
262
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
263
|
+
let styleElm;
|
264
|
+
if (!appliedStyles) {
|
265
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
266
|
+
}
|
267
|
+
if (!appliedStyles.has(scopeId2)) {
|
268
|
+
{
|
269
|
+
styleElm = win.document.createElement("style");
|
270
|
+
styleElm.innerHTML = style;
|
271
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
272
|
+
if (nonce != null) {
|
273
|
+
styleElm.setAttribute("nonce", nonce);
|
274
|
+
}
|
275
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
276
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
277
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
278
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
279
|
+
styleContainerNode.insertBefore(
|
280
|
+
styleElm,
|
281
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
282
|
+
);
|
283
|
+
} else if ("host" in styleContainerNode) {
|
284
|
+
if (supportsConstructableStylesheets) {
|
285
|
+
const stylesheet = new CSSStyleSheet();
|
286
|
+
stylesheet.replaceSync(style);
|
287
|
+
if (supportsMutableAdoptedStyleSheets) {
|
288
|
+
styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
|
289
|
+
} else {
|
290
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
291
|
+
}
|
292
|
+
} else {
|
293
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
294
|
+
if (existingStyleContainer) {
|
295
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
296
|
+
} else {
|
297
|
+
styleContainerNode.prepend(styleElm);
|
298
|
+
}
|
299
|
+
}
|
300
|
+
} else {
|
301
|
+
styleContainerNode.append(styleElm);
|
302
|
+
}
|
303
|
+
}
|
304
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
305
|
+
styleContainerNode.insertBefore(styleElm, null);
|
306
|
+
}
|
307
|
+
}
|
308
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
309
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
310
|
+
}
|
311
|
+
if (appliedStyles) {
|
312
|
+
appliedStyles.add(scopeId2);
|
313
|
+
}
|
314
|
+
}
|
315
|
+
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
316
|
+
if (supportsMutableAdoptedStyleSheets) {
|
317
|
+
styleContainerNode.adoptedStyleSheets.push(style);
|
318
|
+
} else {
|
319
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
320
|
+
}
|
321
|
+
}
|
322
|
+
}
|
323
|
+
return scopeId2;
|
324
|
+
};
|
325
|
+
var attachStyles = (hostRef) => {
|
326
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
327
|
+
const elm = hostRef.$hostElement$;
|
328
|
+
const flags = cmpMeta.$flags$;
|
329
|
+
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
330
|
+
const scopeId2 = addStyle(
|
331
|
+
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
332
|
+
cmpMeta);
|
333
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
334
|
+
elm["s-sc"] = scopeId2;
|
335
|
+
elm.classList.add(scopeId2 + "-h");
|
336
|
+
}
|
337
|
+
endAttachStyles();
|
338
|
+
};
|
339
|
+
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
226
340
|
var h = (nodeName, vnodeData, ...children) => {
|
227
341
|
let child = null;
|
228
342
|
let key = null;
|
@@ -350,102 +464,6 @@ var emitEvent = (elm, name, opts) => {
|
|
350
464
|
elm.dispatchEvent(ev);
|
351
465
|
return ev;
|
352
466
|
};
|
353
|
-
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
354
|
-
var registerStyle = (scopeId2, cssText, allowCS) => {
|
355
|
-
let style = styles.get(scopeId2);
|
356
|
-
if (supportsConstructableStylesheets && allowCS) {
|
357
|
-
style = style || new CSSStyleSheet();
|
358
|
-
if (typeof style === "string") {
|
359
|
-
style = cssText;
|
360
|
-
} else {
|
361
|
-
style.replaceSync(cssText);
|
362
|
-
}
|
363
|
-
} else {
|
364
|
-
style = cssText;
|
365
|
-
}
|
366
|
-
styles.set(scopeId2, style);
|
367
|
-
};
|
368
|
-
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
369
|
-
var _a;
|
370
|
-
const scopeId2 = getScopeId(cmpMeta);
|
371
|
-
const style = styles.get(scopeId2);
|
372
|
-
if (!win.document) {
|
373
|
-
return scopeId2;
|
374
|
-
}
|
375
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
376
|
-
if (style) {
|
377
|
-
if (typeof style === "string") {
|
378
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
379
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
380
|
-
let styleElm;
|
381
|
-
if (!appliedStyles) {
|
382
|
-
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
383
|
-
}
|
384
|
-
if (!appliedStyles.has(scopeId2)) {
|
385
|
-
{
|
386
|
-
styleElm = win.document.createElement("style");
|
387
|
-
styleElm.innerHTML = style;
|
388
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
389
|
-
if (nonce != null) {
|
390
|
-
styleElm.setAttribute("nonce", nonce);
|
391
|
-
}
|
392
|
-
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
393
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
394
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
395
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
396
|
-
styleContainerNode.insertBefore(
|
397
|
-
styleElm,
|
398
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
399
|
-
);
|
400
|
-
} else if ("host" in styleContainerNode) {
|
401
|
-
if (supportsConstructableStylesheets) {
|
402
|
-
const stylesheet = new CSSStyleSheet();
|
403
|
-
stylesheet.replaceSync(style);
|
404
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
405
|
-
} else {
|
406
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
407
|
-
if (existingStyleContainer) {
|
408
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
409
|
-
} else {
|
410
|
-
styleContainerNode.prepend(styleElm);
|
411
|
-
}
|
412
|
-
}
|
413
|
-
} else {
|
414
|
-
styleContainerNode.append(styleElm);
|
415
|
-
}
|
416
|
-
}
|
417
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
418
|
-
styleContainerNode.insertBefore(styleElm, null);
|
419
|
-
}
|
420
|
-
}
|
421
|
-
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
422
|
-
styleElm.innerHTML += SLOT_FB_CSS;
|
423
|
-
}
|
424
|
-
if (appliedStyles) {
|
425
|
-
appliedStyles.add(scopeId2);
|
426
|
-
}
|
427
|
-
}
|
428
|
-
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
429
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
430
|
-
}
|
431
|
-
}
|
432
|
-
return scopeId2;
|
433
|
-
};
|
434
|
-
var attachStyles = (hostRef) => {
|
435
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
436
|
-
const elm = hostRef.$hostElement$;
|
437
|
-
const flags = cmpMeta.$flags$;
|
438
|
-
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
439
|
-
const scopeId2 = addStyle(
|
440
|
-
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
441
|
-
cmpMeta);
|
442
|
-
if (flags & 10 /* needsScopedEncapsulation */) {
|
443
|
-
elm["s-sc"] = scopeId2;
|
444
|
-
elm.classList.add(scopeId2 + "-h");
|
445
|
-
}
|
446
|
-
endAttachStyles();
|
447
|
-
};
|
448
|
-
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
449
467
|
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
450
468
|
if (oldValue === newValue) {
|
451
469
|
return;
|
@@ -758,7 +776,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
758
776
|
!isInitialRender && BUILD.updatable && oldChildren !== null
|
759
777
|
) {
|
760
778
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
761
|
-
}
|
779
|
+
} else ;
|
762
780
|
if (isSvgMode && tag === "svg") {
|
763
781
|
isSvgMode = false;
|
764
782
|
}
|
@@ -814,6 +832,12 @@ var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
814
832
|
}
|
815
833
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
816
834
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
835
|
+
if (isInitialLoad) {
|
836
|
+
queueMicrotask(() => {
|
837
|
+
dispatch();
|
838
|
+
});
|
839
|
+
return;
|
840
|
+
}
|
817
841
|
return writeTask(dispatch) ;
|
818
842
|
};
|
819
843
|
var dispatchHooks = (hostRef, isInitialLoad) => {
|
@@ -931,9 +955,10 @@ var postUpdateComponent = (hostRef) => {
|
|
931
955
|
}
|
932
956
|
};
|
933
957
|
var forceUpdate = (ref) => {
|
958
|
+
var _a;
|
934
959
|
{
|
935
960
|
const hostRef = getHostRef(ref);
|
936
|
-
const isConnected = hostRef.$hostElement
|
961
|
+
const isConnected = (_a = hostRef == null ? void 0 : hostRef.$hostElement$) == null ? void 0 : _a.isConnected;
|
937
962
|
if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
938
963
|
scheduleUpdate(hostRef, false);
|
939
964
|
}
|
@@ -962,6 +987,9 @@ var addHydratedFlag = (elm) => {
|
|
962
987
|
var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
963
988
|
var setValue = (ref, propName, newVal, cmpMeta) => {
|
964
989
|
const hostRef = getHostRef(ref);
|
990
|
+
if (!hostRef) {
|
991
|
+
return;
|
992
|
+
}
|
965
993
|
if (!hostRef) {
|
966
994
|
throw new Error(
|
967
995
|
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
|
@@ -1021,6 +1049,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1021
1049
|
Object.defineProperty(prototype, memberName, {
|
1022
1050
|
set(newValue) {
|
1023
1051
|
const ref = getHostRef(this);
|
1052
|
+
if (!ref) {
|
1053
|
+
return;
|
1054
|
+
}
|
1024
1055
|
if (origSetter) {
|
1025
1056
|
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
1026
1057
|
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
@@ -1084,7 +1115,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1084
1115
|
} else if (propName == null) {
|
1085
1116
|
const hostRef = getHostRef(this);
|
1086
1117
|
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
1087
|
-
if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
1118
|
+
if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
1088
1119
|
const instance = hostRef.$lazyInstance$ ;
|
1089
1120
|
const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
|
1090
1121
|
entry == null ? void 0 : entry.forEach((callbackName) => {
|
@@ -1189,6 +1220,9 @@ var fireConnectedCallback = (instance, elm) => {
|
|
1189
1220
|
var connectedCallback = (elm) => {
|
1190
1221
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
1191
1222
|
const hostRef = getHostRef(elm);
|
1223
|
+
if (!hostRef) {
|
1224
|
+
return;
|
1225
|
+
}
|
1192
1226
|
const cmpMeta = hostRef.$cmpMeta$;
|
1193
1227
|
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
1194
1228
|
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
@@ -1303,7 +1337,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1303
1337
|
}
|
1304
1338
|
}
|
1305
1339
|
connectedCallback() {
|
1306
|
-
getHostRef(this);
|
1340
|
+
const hostRef = getHostRef(this);
|
1341
|
+
if (!hostRef) {
|
1342
|
+
return;
|
1343
|
+
}
|
1307
1344
|
if (!this.hasRegisteredEventListeners) {
|
1308
1345
|
this.hasRegisteredEventListeners = true;
|
1309
1346
|
}
|
@@ -1322,6 +1359,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1322
1359
|
plt.raf(() => {
|
1323
1360
|
var _a3;
|
1324
1361
|
const hostRef = getHostRef(this);
|
1362
|
+
if (!hostRef) {
|
1363
|
+
return;
|
1364
|
+
}
|
1325
1365
|
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
1326
1366
|
if (i2 > -1) {
|
1327
1367
|
deferredConnectedCallbacks.splice(i2, 1);
|
@@ -1332,7 +1372,8 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1332
1372
|
});
|
1333
1373
|
}
|
1334
1374
|
componentOnReady() {
|
1335
|
-
|
1375
|
+
var _a3;
|
1376
|
+
return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
|
1336
1377
|
}
|
1337
1378
|
};
|
1338
1379
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
@@ -1375,4 +1416,4 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1375
1416
|
// src/runtime/nonce.ts
|
1376
1417
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
1377
1418
|
|
1378
|
-
export {
|
1419
|
+
export { bootstrapLazy as b, forceUpdate as f, getRenderingRef as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
package/dist/esm/loader.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
export { s as setNonce } from './index-
|
1
|
+
import { b as bootstrapLazy } from './index-moxqhnZq.js';
|
2
|
+
export { s as setNonce } from './index-moxqhnZq.js';
|
3
|
+
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
3
4
|
|
4
5
|
const defineCustomElements = async (win, options) => {
|
5
6
|
if (typeof window === 'undefined') return undefined;
|
@@ -1,8 +1,9 @@
|
|
1
|
-
import { p as promiseResolve,
|
2
|
-
export { s as setNonce } from './index-
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-moxqhnZq.js';
|
2
|
+
export { s as setNonce } from './index-moxqhnZq.js';
|
3
|
+
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
3
4
|
|
4
5
|
/*
|
5
|
-
Stencil Client Patch Browser v4.
|
6
|
+
Stencil Client Patch Browser v4.36.0 | MIT Licensed | https://stenciljs.com
|
6
7
|
*/
|
7
8
|
|
8
9
|
var patchBrowser = () => {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { h,
|
1
|
+
import { h, g as getRenderingRef, f as forceUpdate, r as registerInstance } from './index-moxqhnZq.js';
|
2
2
|
|
3
3
|
const Alien = props => {
|
4
4
|
const hex = props.hex || 'currentColor';
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{h as t,a as n,f as e,r}from"./p-BJPfPsHf.js";const o=n=>{const e=n.hex||"currentColor",r=n.size||24;return t("svg",{class:n.class,width:r,height:r,viewBox:"0 0 24 24",role:"img","aria-label":"title"},t("title",null,n.label||"alien"),t("g",{fill:e},t("path",{d:"M10.31 10.93C11.33 12.57 11.18 14.5 9.96 15.28C8.74 16.04 6.92 15.33\n 5.89 13.69C4.87 12.05 5.03 10.1 6.25 9.34C7.47 8.58 9.29 9.29 10.31\n 10.93M12 17.75C14 17.75 14.5 17 14.5 17C14.5 17 14 19 12 19C10 19 9.5\n 17.03 9.5 17C9.5 17 10 17.75 12 17.75M17.75 9.34C18.97 10.1 19.13 12.05\n 18.11 13.69C17.08 15.33 15.26 16.04 14.04 15.28C12.82 14.5 12.67 12.57\n 13.69 10.93C14.71 9.29 16.53 8.58 17.75 9.34M12 20C14.5 20 20 14.86 20\n 11C20 7.14 16.41 4 12 4C7.59 4 4 7.14 4 11C4 14.86 9.5 20 12 20M12 2C17.5\n 2 22 6.04 22 11C22 15.08 16.32 22 12 22C7.68 22 2 15.08 2 11C2 6.04 6.5 2\n 12 2Z"})),t("path",{d:"M0 0h24v24H0z",fill:"none"}))},s="proto-sudoku",a=`${s}::data`,i=`${s}::inputs`,l=`${s}::pick`,c=t=>{const n=localStorage.getItem(t);return n?JSON.parse(n):void 0},d=(t,n)=>{const e=JSON.stringify(n);localStorage.setItem(t,e)},f=()=>[...c(i)],h=t=>{d(i,t.join(""))},p=()=>{const t=c(l);return null!==t?t:void 0},u=t=>{d(l,t>=0&&t<81?t:null)},g="Check ?",b="New Puzzle",w=t=>!("isConnected"in t)||t.isConnected,y=(()=>{let t;return(...n)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let n of t.keys())t.set(n,t.get(n).filter(w))})(...n)}),2e3)}})(),m=t=>"function"==typeof t?t():t;class v extends Error{response;request;options;constructor(t,n,e){const r=`${t.status||0===t.status?t.status:""} ${t.statusText||""}`.trim();super(`Request failed with ${r?`status code ${r}`:"an unknown error"}: ${n.method} ${n.url}`),this.name="HTTPError",this.response=t,this.request=n,this.options=e}}class x extends Error{request;constructor(t){super(`Request timed out: ${t.method} ${t.url}`),this.name="TimeoutError",this.request=t}}const C=(()=>{let t=!1,n=!1;const e="function"==typeof globalThis.ReadableStream,r="function"==typeof globalThis.Request;if(e&&r)try{n=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type")}catch(t){if(t instanceof Error&&"unsupported BodyInit type"===t.message)return!1;throw t}return t&&!n})(),k="function"==typeof globalThis.AbortController,T="function"==typeof globalThis.ReadableStream,R="function"==typeof globalThis.FormData,E=["get","post","put","patch","head","delete"],M={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},S=2147483647,z=(new TextEncoder).encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,P=Symbol("stop"),j={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},A={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},B=t=>null!==t&&"object"==typeof t,U=(...t)=>{for(const n of t)if((!B(n)||Array.isArray(n))&&void 0!==n)throw new TypeError("The `options` argument must be an object");return O({},...t)},q=(t={},n={})=>{const e=new globalThis.Headers(t),r=n instanceof globalThis.Headers,o=new globalThis.Headers(n);for(const[t,n]of o.entries())r&&"undefined"===n||void 0===n?e.delete(t):e.set(t,n);return e};function $(t,n,e){return Object.hasOwn(n,e)&&void 0===n[e]?[]:O(t[e]??[],n[e]??[])}const L=(t={},n={})=>({beforeRequest:$(t,n,"beforeRequest"),beforeRetry:$(t,n,"beforeRetry"),afterResponse:$(t,n,"afterResponse"),beforeError:$(t,n,"beforeError")}),O=(...t)=>{let n={},e={},r={};for(const o of t)if(Array.isArray(o))Array.isArray(n)||(n=[]),n=[...n,...o];else if(B(o)){for(let[t,e]of Object.entries(o))B(e)&&t in n&&(e=O(n[t],e)),n={...n,[t]:e};B(o.hooks)&&(r=L(r,o.hooks),n.hooks=r),B(o.headers)&&(e=q(e,o.headers),n.headers=e)}return n},D=t=>E.includes(t)?t.toUpperCase():t,N={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3},H=(t={})=>{if("number"==typeof t)return{...N,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...N,...t}};class _{static create(t,n){const e=new _(t,n),r=async()=>{if("number"==typeof e._options.timeout&&e._options.timeout>S)throw new RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let t=await e._fetch();for(const n of e._options.hooks.afterResponse){const r=await n(e.request,e._options,e._decorateResponse(t.clone()));r instanceof globalThis.Response&&(t=r)}if(e._decorateResponse(t),!t.ok&&e._options.throwHttpErrors){let n=new v(t,e.request,e._options);for(const t of e._options.hooks.beforeError)n=await t(n);throw n}if(e._options.onDownloadProgress){if("function"!=typeof e._options.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!T)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return((t,n)=>{const e=Number(t.headers.get("content-length"))||0;let r=0;return 204===t.status?(n&&n({percent:1,totalBytes:e,transferredBytes:r},new Uint8Array),new Response(null,{status:t.status,statusText:t.statusText,headers:t.headers})):new Response(new ReadableStream({async start(o){const s=t.body.getReader();n&&n({percent:0,transferredBytes:0,totalBytes:e},new Uint8Array),await async function t(){const{done:a,value:i}=await s.read();a?o.close():(n&&(r+=i.byteLength,n({percent:0===e?0:r/e,transferredBytes:r,totalBytes:e},i)),o.enqueue(i),await t())}()}}),{status:t.status,statusText:t.statusText,headers:t.headers})})(t.clone(),e._options.onDownloadProgress)}return t},o=(e._options.retry.methods.includes(e.request.method.toLowerCase())?e._retry(r):r()).finally((async()=>{e.request.bodyUsed||await(e.request.body?.cancel())}));for(const[t,r]of Object.entries(M))o[t]=async()=>{e.request.headers.set("accept",e.request.headers.get("accept")||r);const s=await o;if("json"===t){if(204===s.status)return"";if(0===(await s.clone().arrayBuffer()).byteLength)return"";if(n.parseJson)return n.parseJson(await s.text())}return s[t]()};return o}request;abortController;_retryCount=0;_input;_options;constructor(t,n={}){if(this._input=t,this._options={...n,headers:q(this._input.headers,n.headers),hooks:L({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:D(n.method??this._input.method??"GET"),prefixUrl:String(n.prefixUrl||""),retry:H(n.retry),throwHttpErrors:!1!==n.throwHttpErrors,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis)},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(k){const t=this._options.signal??this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=t?AbortSignal.any([t,this.abortController.signal]):this.abortController.signal}if(C&&(this._options.duplex="half"),void 0!==this._options.json&&(this._options.body=this._options.stringifyJson?.(this._options.json)??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const t="string"==typeof this._options.searchParams?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString(),n=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,"?"+t);!(R&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)||this._options.headers&&this._options.headers["content-type"]||this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(n,{...this.request}),this._options)}if(this._options.onUploadProgress){if("function"!=typeof this._options.onUploadProgress)throw new TypeError("The `onUploadProgress` option must be a function");if(!C)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=((t,n)=>{const e=(t=>{if(!t)return 0;if(t instanceof FormData){let n=0;for(const[e,r]of t)n+=z,n+=(new TextEncoder).encode(`Content-Disposition: form-data; name="${e}"`).length,n+="string"==typeof r?(new TextEncoder).encode(r).length:r.size;return n}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength;if("string"==typeof t)return(new TextEncoder).encode(t).length;if(t instanceof URLSearchParams)return(new TextEncoder).encode(t.toString()).length;if("byteLength"in t)return t.byteLength;if("object"==typeof t&&null!==t)try{const n=JSON.stringify(t);return(new TextEncoder).encode(n).length}catch{return 0}return 0})(t.body);let r=0;return new Request(t,{duplex:"half",body:new ReadableStream({async start(o){const s=t.body instanceof ReadableStream?t.body.getReader():new Response("").body.getReader();await async function t(){const{done:a,value:i}=await s.read();if(a)return n&&n({percent:1,transferredBytes:r,totalBytes:Math.max(e,r)},new Uint8Array),void o.close();r+=i.byteLength;let l=0===e?0:r/e;(e<r||1===l)&&(l=.99),n&&n({percent:Number(l.toFixed(2)),transferredBytes:r,totalBytes:e},i),o.enqueue(i),await t()}()}})})})(this.request,this._options.onUploadProgress))}}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount>this._options.retry.limit||t instanceof x)throw t;if(t instanceof v){if(!this._options.retry.statusCodes.includes(t.response.status))throw t;const n=t.response.headers.get("Retry-After")??t.response.headers.get("RateLimit-Reset")??t.response.headers.get("X-RateLimit-Reset")??t.response.headers.get("X-Rate-Limit-Reset");if(n&&this._options.retry.afterStatusCodes.includes(t.response.status)){let t=1e3*Number(n);Number.isNaN(t)?t=Date.parse(n)-Date.now():t>=Date.parse("2024-01-01")&&(t-=Date.now());const e=this._options.retry.maxRetryAfter??t;return t<e?t:e}if(413===t.response.status)throw t}const n=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,n)}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(n){const e=Math.min(this._calculateRetryDelay(n),S);if(this._retryCount<1)throw n;await async function(t,{signal:n}){return new Promise(((e,r)=>{function o(){clearTimeout(s),r(n.reason)}n&&(n.throwIfAborted(),n.addEventListener("abort",o,{once:!0}));const s=setTimeout((()=>{n?.removeEventListener("abort",o),e()}),t)}))}(e,{signal:this._options.signal});for(const t of this._options.hooks.beforeRetry)if(await t({request:this.request,options:this._options,error:n,retryCount:this._retryCount})===P)return;return this._retry(t)}}async _fetch(){for(const t of this._options.hooks.beforeRequest){const n=await t(this.request,this._options);if(n instanceof Request){this.request=n;break}if(n instanceof Response)return n}const t=((t,n)=>{const e={};for(const r in n)r in A||r in j||r in t||(e[r]=n[r]);return e})(this.request,this._options),n=this.request;return this.request=n.clone(),!1===this._options.timeout?this._options.fetch(n,t):async function(t,n,e,r){return new Promise(((o,s)=>{const a=setTimeout((()=>{e&&e.abort(),s(new x(t))}),r.timeout);r.fetch(t,n).then(o).catch(s).then((()=>{clearTimeout(a)}))}))}(n,t,this.abortController,this._options)}}
|
2
|
-
/*! MIT License © Sindre Sorhus */const J=t=>{const n=(n,e)=>_.create(n,U(t,e));for(const e of E)n[e]=(n,r)=>_.create(n,U(t,r,{method:e}));return n.create=t=>J(U(t)),n.extend=n=>("function"==typeof n&&(n=n(t??{})),J(U(t,n))),n.stop=P,n},I=J(),X={list:[],keys:[],locs:[],loading:!1,solved:!1,error:void 0,pick:void 0,data:void 0},{state:W}=(()=>{const t=((t,n=(t,n)=>t!==n)=>{const e=m(t);let r=new Map(Object.entries(e??{}));const o={dispose:[],get:[],set:[],reset:[]},s=()=>{r=new Map(Object.entries(m(t)??{})),o.reset.forEach((t=>t()))},a=t=>(o.get.forEach((n=>n(t))),r.get(t)),i=(t,e)=>{const s=r.get(t);n(e,s,t)&&(r.set(t,e),o.set.forEach((n=>n(t,e,s))))},l="undefined"==typeof Proxy?{}:new Proxy(e,{get:(t,n)=>a(n),ownKeys:()=>Array.from(r.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,n)=>r.has(n),set:(t,n,e)=>(i(n,e),!0)}),c=(t,n)=>(o[t].push(n),()=>{((t,n)=>{const e=t.indexOf(n);e>=0&&(t[e]=t[t.length-1],t.length--)})(o[t],n)});return{state:l,get:a,set:i,on:c,onChange:(n,e)=>{const r=c("set",((t,r)=>{t===n&&e(r)})),o=c("reset",(()=>e(m(t)[n])));return()=>{r(),o()}},use:(...t)=>{const n=t.reduce(((t,n)=>(n.set&&t.push(c("set",n.set)),n.get&&t.push(c("get",n.get)),n.reset&&t.push(c("reset",n.reset)),n.dispose&&t.push(c("dispose",n.dispose)),t)),[]);return()=>n.forEach((t=>t()))},dispose:()=>{o.dispose.forEach((t=>t())),s()},reset:s,forceUpdate:t=>{const n=r.get(t);o.set.forEach((e=>e(t,n,n)))}}})(X,void 0);return t.use((()=>{if("function"!=typeof n)return{};const t=new Map;return{dispose:()=>t.clear(),get:e=>{const r=n();r&&((t,n,e)=>{const r=t.get(n);r?r.includes(e)||r.push(e):t.set(n,[e])})(t,e,r)},set:n=>{const r=t.get(n);r&&t.set(n,r.filter(e)),y(t)},reset:()=>{t.forEach((t=>t.forEach(e))),y(t)}}})()),t})(),F=new Map([["row",new Map],["column",new Map],["box",new Map]]),K=["1","2","3","4","5","6","7","8","9"],Z=t=>{if(void 0!==t&&t.indx!=W.pick){const{isClue:n,indx:e,row:r,column:o,box:s}=t,a=((t,n,e,r)=>{const o=new Map([["row",n],["column",e],["box",r]]),s=new Set;return o.forEach(((n,e)=>{F.get(e).get(n).forEach((n=>{n!==t&&s.add(n)}))})),Array.from(s)})(e,r,o,s),i=n?[]:(t=>{const{list:n}=W,e=new Set;return t.map((t=>{const{key:r}=n[t];"."!=r&&e.add(r)})),K.filter((t=>!e.has(t)))})(a);W.pick=e,W.keys=i,W.locs=a}else W.pick=void 0,W.keys=[],W.locs=[];Q(W.pick)};let G;const V={local:"http://localhost:8080/api",netlify:"/.netlify/functions",vercel:"https://sudoku-rust-api.vercel.app/api"},Y=t=>{h(t)},Q=t=>{u(t)},tt=(t=!1)=>{W.list=[],W.keys=[],W.locs=[],W.loading=t,W.solved=!1,W.error=void 0,W.pick=void 0,W.data=void 0},nt=(t,n=!0)=>{const{puzzle:e,ref:r}=t;n&&(h([]),d(a,t)),(t=>{if(t){const{puzzle:n,ref:e}=t,r=n?[...n]:[],o=e?atob(e):void 0,s=o?[...o]:[],a=r.map(((t,n)=>{const e=s[n],r=t===e,o=Math.floor(n/9),a=n%9,i=((t,n)=>n<3?t<3?0:t<6?3:6:n<6?t<3?1:t<6?4:7:t<3?2:t<6?5:8)(o,a);return((t,n,e,r)=>{new Map([["row",n],["column",e],["box",r]]).forEach(((n,e)=>{const r=F.get(e);r.has(n)?r.get(n).add(t):r.set(n,new Set([t]))}))})(n,o,a,i),{key:t,isClue:r,value:e,indx:n,row:o,column:a,box:i}}));(t=>{f().forEach(((n,e)=>{const r=t[e],{isClue:o}=r;o||(r.key=n)}))})(a),W.data=t,W.list=a}else W.data=void 0,W.list=[]})({puzzle:e,ref:r})},et=t=>{W.list=[...t],t.length=0},rt={initApp:t=>{(t=>{const n=(t=>{const n=Object.keys(V).includes(t)?t:"vercel";return V[n]})(t);G=I.extend({hooks:{beforeRequest:[t=>{t.headers.set("X-Requested-With","ky"),t.headers.set("X-Custom-Header","foobar")}]},prefixUrl:n,timeout:1e4})})(t),tt();const n=c(a),e=p();if(n&&(nt(n,!1),e>=0)){const{list:t}=W;Z(t[e])}},refresh:async()=>{tt(!0),Y([]),Q(W.pick);try{const t=await G.get("puzzle").json();nt(t)}catch(t){const{message:n}=t;console.log("-- ",n),console.log(t),W.error=n}finally{W.loading=!1}},select:t=>{Z(t)},check:()=>{const{list:t}=W,n=[];let e=0,r=0,o=0;t.forEach((t=>{const{key:s,value:a,isClue:i}=t;i?o+=1:"."!==s&&(s!==a?(e+=1,t.key="."):r+=1),n.push(t.key)}));const s=o+r;Y(r?n:[]),e>0?et(t):81===s&&(W.solved=!0)},input:t=>{const{pick:n,list:e}=W;e[n].key=t,et(e)}},ot=(...t)=>t.filter(Boolean).join(" "),st=n=>{const e=n.hex||"currentColor",r=n.label||"loading...",o=n.size||24;return t("svg",{class:ot(n.class||"","animate-spin"),width:o,height:o,fill:"none",viewBox:"0 0 24 24",role:"img","aria-label":"title"},t("title",null,r),t("g",null,t("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:e,"stroke-width":"4"}),t("path",{class:"opacity-75",fill:e,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})),t("path",{d:"M0 0h24v24H0z",fill:"none"}))},at=n=>{const{message:e,salute:r,spinner:s=!1}=n;return t("div",{class:"mt-5 flex h-24px flex-row items-center"},t(s?st:o,{class:"mr-2"}),r?t("label",{class:"mr-1 font-bold"},r,":"):"",t("label",{class:"italic"},e))},it=()=>{const{solved:n,loading:e,error:r}=W;return t("div",{class:"flex flex-col"},e||r||n?"":t(at,{message:"Welcome, are you ready to play?..."}),e?t(at,{message:"Loading...",spinner:!0}):"",r?t(at,{message:r,salute:"ERROR"}):"",n?t(at,{message:"You solved the puzzle!!"}):"")},lt=n=>{const e=n.hex||"currentColor",r=n.size||24;return t("svg",{class:n.class,width:r,height:r,viewBox:"0 0 24 24",role:"img","aria-label":"title"},t("title",null,n.label||"fingerprint"),t("g",{fill:e},t("path",{d:"M17.81,4.47C17.73,4.47 17.65,4.45 17.58,4.41C15.66,3.42 14,3\n 12,3C10.03,3 8.15,3.47 6.44,4.41C6.2,4.54 5.9,4.45 5.76,4.21C5.63,3.97\n 5.72,3.66 5.96,3.53C7.82,2.5 9.86,2 12,2C14.14,2 16,2.47\n 18.04,3.5C18.29,3.65 18.38,3.95 18.25,4.19C18.16,4.37 18,4.47\n 17.81,4.47M3.5,9.72C3.4,9.72 3.3,9.69 3.21,9.63C3,9.47 2.93,9.16\n 3.09,8.93C4.08,7.53 5.34,6.43 6.84,5.66C10,4.04 14,4.03\n 17.15,5.65C18.65,6.42 19.91,7.5 20.9,8.9C21.06,9.12 21,9.44\n 20.78,9.6C20.55,9.76 20.24,9.71 20.08,9.5C19.18,8.22 18.04,7.23\n 16.69,6.54C13.82,5.07 10.15,5.07 7.29,6.55C5.93,7.25 4.79,8.25\n 3.89,9.5C3.81,9.65 3.66,9.72 3.5,9.72M9.75,21.79C9.62,21.79 9.5,21.74\n 9.4,21.64C8.53,20.77 8.06,20.21 7.39,19C6.7,17.77 6.34,16.27\n 6.34,14.66C6.34,11.69 8.88,9.27 12,9.27C15.12,9.27 17.66,11.69\n 17.66,14.66A0.5,0.5 0 0,1 17.16,15.16A0.5,0.5 0 0,1\n 16.66,14.66C16.66,12.24 14.57,10.27 12,10.27C9.43,10.27 7.34,12.24\n 7.34,14.66C7.34,16.1 7.66,17.43 8.27,18.5C8.91,19.66 9.35,20.15\n 10.12,20.93C10.31,21.13 10.31,21.44 10.12,21.64C10,21.74 9.88,21.79\n 9.75,21.79M16.92,19.94C15.73,19.94 14.68,19.64 13.82,19.05C12.33,18.04\n 11.44,16.4 11.44,14.66A0.5,0.5 0 0,1 11.94,14.16A0.5,0.5 0 0,1\n 12.44,14.66C12.44,16.07 13.16,17.4 14.38,18.22C15.09,18.7 15.92,18.93\n 16.92,18.93C17.16,18.93 17.56,18.9 17.96,18.83C18.23,18.78 18.5,18.96\n 18.54,19.24C18.59,19.5 18.41,19.77 18.13,19.82C17.56,19.93 17.06,19.94\n 16.92,19.94M14.91,22C14.87,22 14.82,22 14.78,22C13.19,21.54 12.15,20.95\n 11.06,19.88C9.66,18.5 8.89,16.64 8.89,14.66C8.89,13.04 10.27,11.72\n 11.97,11.72C13.67,11.72 15.05,13.04 15.05,14.66C15.05,15.73 16,16.6\n 17.13,16.6C18.28,16.6 19.21,15.73 19.21,14.66C19.21,10.89 15.96,7.83\n 11.96,7.83C9.12,7.83 6.5,9.41 5.35,11.86C4.96,12.67 4.76,13.62\n 4.76,14.66C4.76,15.44 4.83,16.67 5.43,18.27C5.53,18.53 5.4,18.82\n 5.14,18.91C4.88,19 4.59,18.87 4.5,18.62C4,17.31 3.77,16\n 3.77,14.66C3.77,13.46 4,12.37 4.45,11.42C5.78,8.63 8.73,6.82\n 11.96,6.82C16.5,6.82 20.21,10.33 20.21,14.65C20.21,16.27 18.83,17.59\n 17.13,17.59C15.43,17.59 14.05,16.27 14.05,14.65C14.05,13.58 13.12,12.71\n 11.97,12.71C10.82,12.71 9.89,13.58 9.89,14.65C9.89,16.36 10.55,17.96\n 11.76,19.16C12.71,20.1 13.62,20.62 15.03,21C15.3,21.08 15.45,21.36\n 15.38,21.62C15.33,21.85 15.12,22 14.91,22Z"})),t("path",{d:"M0 0h24v24H0z",fill:"none"}))},ct="eswat2",dt=()=>t("a",{class:"absolute right-0 top-0 text-clrs-gray hover:text-clrs-navy",href:"https://eswat2.dev","aria-label":ct,target:"blank",title:ct},t(lt,{label:ct})),ft=(n,e)=>t("h1",{class:ot("text-center uppercase text-clrs-red","mb-11 ml-0 mr-0 mt-11","text-6xl font-thin")},e),ht=n=>{const{label:e,callback:r,matched:o=!1}=n;return t("button",{class:ot("rounded-md border border-solid border-clrs-slate4 font-bold",e===g?"mr-2 bg-clrs-yellow px-3 py-2 text-clrs-navy":e===b?"mr-2 bg-clrs-navy px-3 py-2 text-white":"x"===e?"mr-1 bg-clrs-red px-2 py-1 text-white":o?"mr-1 bg-clrs-slate4 px-2 py-1 text-white":"mr-1 bg-gray-50 px-2 py-1 text-clrs-navy"),onClick:r},e)},pt=()=>{const{keys:n,list:e,pick:r,solved:o}=W,s=t=>()=>{rt.input(t)},a=o?[]:n,i=null!=r?e[r]:void 0;return t("div",{class:"mt-2 flex flex-row justify-end"},o||!i||i.isClue||"."==i.key?"":t(ht,{label:"x",callback:s(".")}),a.map((n=>t(ht,{label:n,callback:s(n),matched:i.key===n}))))},ut=[2,5,11,14,20,23,29,32,38,41,47,50,56,59,65,68,74,77],gt=ut.map((t=>t+1)),bt=[18,19,20,21,22,23,24,25,26,45,46,47,48,49,50,51,52,53],wt=bt.map((t=>t+9)),yt=n=>{const{cell:e,focus:r,selected:o,solved:s}=n,{key:a,isClue:i,indx:l}=e,c="."!=a?a:"";return t("label",{class:ot(`cell-${l}`,ut.includes(l)?"border-xbr-clrs-navy":"",gt.includes(l)?"border-xbl-clrs-navy":"",bt.includes(l)?"border-xbb-clrs-navy":"",wt.includes(l)?"border-xbt-clrs-navy":"","h-8 w-8 border border-solid text-center leading-8",o?"border-clrs-red bg-clrs-red-a50 text-clrs-red":r?"border-clrs-gray bg-clrs-green-a50 font-bold":i?"border-clrs-gray bg-clrs-silver":""!==c?"border-clrs-gray text-clrs-red":"border-clrs-gray"),onClick:((t,n)=>()=>{n||rt.select(t)})(e,s)},c)},mt=()=>{const{list:n,pick:e,locs:r,solved:o}=W;return t("div",{class:ot("flex flex-row flex-wrap","border border-solid border-clrs-navy","h-76p5 w-76p5 text-lg")},n.map(((n,s)=>{const a=!o&&s===e,i=!o&&r.includes(s);return t(yt,{cell:n,focus:i,selected:a,solved:o})})))},vt=()=>t("label",{class:"ml-auto align-top text-xs italic text-clrs-slate4"},"Tailwind ","4.1.11"),xt=t=>()=>{t.refresh()},Ct=t=>()=>{t.check()},kt=()=>{const{list:n,solved:e}=W;return t("div",{class:"flex flex-row"},t(ht,{label:b,callback:xt(rt)}),81!==n.length||e?"":t(ht,{label:g,callback:Ct(rt)}),t(vt,null))},Tt=class{constructor(t){r(this,t),this.tag="proto-sudoku",this.platform="vercel"}componentDidLoad(){rt.initApp(this.platform)}render(){return t("div",{key:"9f50eec975c4da5f4984b80380067d5155dda0d1",id:"app",class:"ds1-main relative max-w-min p-0.5"},t(dt,{key:"e7bab7e257022a9920f8b43785d9dc33ab7fed65"}),t(ft,{key:"d8c32e6b9c20b9fe6c8ff2e9fc7a9900057a2679"},"Sudoku"),t(mt,{key:"8a028015ae4380aaa54a406ccf5cc908816ca6a4"}),t(pt,{key:"951b6d20ca7a99ced4c60aa39fe040af6e96dd46"}),t("hr",{key:"35ba2812a3b068b21b5252c5f07d0b5dc2f18527",class:"ml-0 mr-0"}),t(kt,{key:"114e7edd4bf3da82ae344f56cb7e856ce17a6da8"}),t(it,{key:"2c15eb0ba714d1e0c378882c62ce575c428adc2a"}))}};Tt.style="/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root,\n :host {\n --font-sans:\n ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji',\n 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\n --color-gray-50: oklch(98.5% 0.002 247.839);\n --color-white: #fff;\n --spacing: 0.25rem;\n --text-xs: 0.75rem;\n --text-xs--line-height: calc(1 / 0.75);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-6xl: 3.75rem;\n --text-6xl--line-height: 1;\n --font-weight-thin: 100;\n --font-weight-bold: 700;\n --radius-md: 0.375rem;\n --animate-spin: spin 1s linear infinite;\n }\n}\n@layer utilities {\n .absolute {\n position: absolute;\n }\n .relative {\n position: relative;\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .right-0 {\n right: calc(var(--spacing) * 0);\n }\n .m-6 {\n margin: calc(var(--spacing) * 6);\n }\n .mt-2 {\n margin-top: calc(var(--spacing) * 2);\n }\n .mt-5 {\n margin-top: calc(var(--spacing) * 5);\n }\n .mt-11 {\n margin-top: calc(var(--spacing) * 11);\n }\n .mr-0 {\n margin-right: calc(var(--spacing) * 0);\n }\n .mr-1 {\n margin-right: calc(var(--spacing) * 1);\n }\n .mr-2 {\n margin-right: calc(var(--spacing) * 2);\n }\n .mb-11 {\n margin-bottom: calc(var(--spacing) * 11);\n }\n .ml-0 {\n margin-left: calc(var(--spacing) * 0);\n }\n .ml-auto {\n margin-left: auto;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .h-8 {\n height: calc(var(--spacing) * 8);\n }\n .h-24px {\n height: 24px;\n }\n .h-76p5 {\n height: 19.125rem;\n }\n .w-8 {\n width: calc(var(--spacing) * 8);\n }\n .w-76p5 {\n width: 19.125rem;\n }\n .max-w-min {\n max-width: min-content;\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .flex-wrap {\n flex-wrap: wrap;\n }\n .items-center {\n align-items: center;\n }\n .justify-end {\n justify-content: flex-end;\n }\n .rounded-md {\n border-radius: var(--radius-md);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-solid {\n --tw-border-style: solid;\n border-style: solid;\n }\n .border-clrs-gray {\n border-color: var(--clrs-gray, #aaaaaa);\n }\n .border-clrs-navy {\n border-color: var(--clrs-navy, #001f3f);\n }\n .border-clrs-red {\n border-color: var(--clrs-red, #ff4136);\n }\n .border-clrs-slate4 {\n border-color: var(--clrs-slate4, #4e5964);\n }\n .bg-clrs-green-a50 {\n background-color: var(--clrs-green-a50, #2ecc4050);\n }\n .bg-clrs-navy {\n background-color: var(--clrs-navy, #001f3f);\n }\n .bg-clrs-red {\n background-color: var(--clrs-red, #ff4136);\n }\n .bg-clrs-red-a50 {\n background-color: var(--clrs-red-a50, #ff413650);\n }\n .bg-clrs-silver {\n background-color: var(--clrs-silver, #dddddd);\n }\n .bg-clrs-slate4 {\n background-color: var(--clrs-slate4, #4e5964);\n }\n .bg-clrs-yellow {\n background-color: var(--clrs-yellow, #ffdc00);\n }\n .bg-gray-50 {\n background-color: var(--color-gray-50);\n }\n .p-0\\.5 {\n padding: calc(var(--spacing) * 0.5);\n }\n .px-2 {\n padding-inline: calc(var(--spacing) * 2);\n }\n .px-3 {\n padding-inline: calc(var(--spacing) * 3);\n }\n .py-1 {\n padding-block: calc(var(--spacing) * 1);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .text-center {\n text-align: center;\n }\n .align-top {\n vertical-align: top;\n }\n .font-sans {\n font-family: var(--font-sans);\n }\n .text-6xl {\n font-size: var(--text-6xl);\n line-height: var(--tw-leading, var(--text-6xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-xs {\n font-size: var(--text-xs);\n line-height: var(--tw-leading, var(--text-xs--line-height));\n }\n .leading-8 {\n --tw-leading: calc(var(--spacing) * 8);\n line-height: calc(var(--spacing) * 8);\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-thin {\n --tw-font-weight: var(--font-weight-thin);\n font-weight: var(--font-weight-thin);\n }\n .text-clrs-gray {\n color: var(--clrs-gray, #aaaaaa);\n }\n .text-clrs-navy {\n color: var(--clrs-navy, #001f3f);\n }\n .text-clrs-red {\n color: var(--clrs-red, #ff4136);\n }\n .text-clrs-slate4 {\n color: var(--clrs-slate4, #4e5964);\n }\n .text-white {\n color: var(--color-white);\n }\n .uppercase {\n text-transform: uppercase;\n }\n .italic {\n font-style: italic;\n }\n .opacity-25 {\n opacity: 25%;\n }\n .opacity-75 {\n opacity: 75%;\n }\n .shadow {\n --tw-shadow:\n 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)),\n 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow:\n var(--tw-inset-shadow), var(--tw-inset-ring-shadow),\n var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .border-xbb-clrs-navy {\n border-bottom: 1px solid var(--clrs-navy, #001f3f) !important;\n }\n .border-xbl-clrs-navy {\n border-left: 1px solid var(--clrs-navy, #001f3f) !important;\n }\n .border-xbr-clrs-navy {\n border-right: 1px solid var(--clrs-navy, #001f3f) !important;\n }\n .border-xbt-clrs-navy {\n border-top: 1px solid var(--clrs-navy, #001f3f) !important;\n }\n .hover\\:text-clrs-navy {\n &:hover {\n @media (hover: hover) {\n color: var(--clrs-navy, #001f3f);\n }\n }\n }\n}\n@layer components {\n .ds1-main {\n margin: calc(var(--spacing) * 6);\n display: flex;\n flex-direction: column;\n font-family: var(--font-sans);\n color: var(--clrs-navy, #001f3f);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or\n ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {\n *,\n ::before,\n ::after,\n ::backdrop {\n --tw-border-style: solid;\n --tw-leading: initial;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n }\n }\n}\n";export{Tt as proto_sudoku}
|
1
|
+
import{h as t,g as n,f as e,r}from"./p-moxqhnZq.js";const o=n=>{const e=n.hex||"currentColor",r=n.size||24;return t("svg",{class:n.class,width:r,height:r,viewBox:"0 0 24 24",role:"img","aria-label":"title"},t("title",null,n.label||"alien"),t("g",{fill:e},t("path",{d:"M10.31 10.93C11.33 12.57 11.18 14.5 9.96 15.28C8.74 16.04 6.92 15.33\n 5.89 13.69C4.87 12.05 5.03 10.1 6.25 9.34C7.47 8.58 9.29 9.29 10.31\n 10.93M12 17.75C14 17.75 14.5 17 14.5 17C14.5 17 14 19 12 19C10 19 9.5\n 17.03 9.5 17C9.5 17 10 17.75 12 17.75M17.75 9.34C18.97 10.1 19.13 12.05\n 18.11 13.69C17.08 15.33 15.26 16.04 14.04 15.28C12.82 14.5 12.67 12.57\n 13.69 10.93C14.71 9.29 16.53 8.58 17.75 9.34M12 20C14.5 20 20 14.86 20\n 11C20 7.14 16.41 4 12 4C7.59 4 4 7.14 4 11C4 14.86 9.5 20 12 20M12 2C17.5\n 2 22 6.04 22 11C22 15.08 16.32 22 12 22C7.68 22 2 15.08 2 11C2 6.04 6.5 2\n 12 2Z"})),t("path",{d:"M0 0h24v24H0z",fill:"none"}))},s="proto-sudoku",a=`${s}::data`,i=`${s}::inputs`,l=`${s}::pick`,c=t=>{const n=localStorage.getItem(t);return n?JSON.parse(n):void 0},d=(t,n)=>{const e=JSON.stringify(n);localStorage.setItem(t,e)},f=()=>[...c(i)],h=t=>{d(i,t.join(""))},p=()=>{const t=c(l);return null!==t?t:void 0},u=t=>{d(l,t>=0&&t<81?t:null)},g="Check ?",b="New Puzzle",w=t=>!("isConnected"in t)||t.isConnected,y=(()=>{let t;return(...n)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let n of t.keys())t.set(n,t.get(n).filter(w))})(...n)}),2e3)}})(),m=t=>"function"==typeof t?t():t;class v extends Error{response;request;options;constructor(t,n,e){const r=`${t.status||0===t.status?t.status:""} ${t.statusText||""}`.trim();super(`Request failed with ${r?`status code ${r}`:"an unknown error"}: ${n.method} ${n.url}`),this.name="HTTPError",this.response=t,this.request=n,this.options=e}}class x extends Error{request;constructor(t){super(`Request timed out: ${t.method} ${t.url}`),this.name="TimeoutError",this.request=t}}const C=(()=>{let t=!1,n=!1;const e="function"==typeof globalThis.ReadableStream,r="function"==typeof globalThis.Request;if(e&&r)try{n=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type")}catch(t){if(t instanceof Error&&"unsupported BodyInit type"===t.message)return!1;throw t}return t&&!n})(),k="function"==typeof globalThis.AbortController,T="function"==typeof globalThis.ReadableStream,R="function"==typeof globalThis.FormData,E=["get","post","put","patch","head","delete"],M={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},S=2147483647,z=(new TextEncoder).encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,j=Symbol("stop"),A={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},P={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},B=t=>null!==t&&"object"==typeof t,q=(...t)=>{for(const n of t)if((!B(n)||Array.isArray(n))&&void 0!==n)throw new TypeError("The `options` argument must be an object");return O({},...t)},U=(t={},n={})=>{const e=new globalThis.Headers(t),r=n instanceof globalThis.Headers,o=new globalThis.Headers(n);for(const[t,n]of o.entries())r&&"undefined"===n||void 0===n?e.delete(t):e.set(t,n);return e};function $(t,n,e){return Object.hasOwn(n,e)&&void 0===n[e]?[]:O(t[e]??[],n[e]??[])}const L=(t={},n={})=>({beforeRequest:$(t,n,"beforeRequest"),beforeRetry:$(t,n,"beforeRetry"),afterResponse:$(t,n,"afterResponse"),beforeError:$(t,n,"beforeError")}),O=(...t)=>{let n={},e={},r={};for(const o of t)if(Array.isArray(o))Array.isArray(n)||(n=[]),n=[...n,...o];else if(B(o)){for(let[t,e]of Object.entries(o))B(e)&&t in n&&(e=O(n[t],e)),n={...n,[t]:e};B(o.hooks)&&(r=L(r,o.hooks),n.hooks=r),B(o.headers)&&(e=U(e,o.headers),n.headers=e)}return n},D=t=>E.includes(t)?t.toUpperCase():t,N={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3},H=(t={})=>{if("number"==typeof t)return{...N,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...N,...t}};class _{static create(t,n){const e=new _(t,n),r=async()=>{if("number"==typeof e._options.timeout&&e._options.timeout>S)throw new RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let t=await e._fetch();for(const n of e._options.hooks.afterResponse){const r=await n(e.request,e._options,e._decorateResponse(t.clone()));r instanceof globalThis.Response&&(t=r)}if(e._decorateResponse(t),!t.ok&&e._options.throwHttpErrors){let n=new v(t,e.request,e._options);for(const t of e._options.hooks.beforeError)n=await t(n);throw n}if(e._options.onDownloadProgress){if("function"!=typeof e._options.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!T)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return((t,n)=>{const e=Number(t.headers.get("content-length"))||0;let r=0;return 204===t.status?(n&&n({percent:1,totalBytes:e,transferredBytes:r},new Uint8Array),new Response(null,{status:t.status,statusText:t.statusText,headers:t.headers})):new Response(new ReadableStream({async start(o){const s=t.body.getReader();n&&n({percent:0,transferredBytes:0,totalBytes:e},new Uint8Array),await async function t(){const{done:a,value:i}=await s.read();a?o.close():(n&&(r+=i.byteLength,n({percent:0===e?0:r/e,transferredBytes:r,totalBytes:e},i)),o.enqueue(i),await t())}()}}),{status:t.status,statusText:t.statusText,headers:t.headers})})(t.clone(),e._options.onDownloadProgress)}return t},o=(e._options.retry.methods.includes(e.request.method.toLowerCase())?e._retry(r):r()).finally((async()=>{e.request.bodyUsed||await(e.request.body?.cancel())}));for(const[t,r]of Object.entries(M))o[t]=async()=>{e.request.headers.set("accept",e.request.headers.get("accept")||r);const s=await o;if("json"===t){if(204===s.status)return"";if(0===(await s.clone().arrayBuffer()).byteLength)return"";if(n.parseJson)return n.parseJson(await s.text())}return s[t]()};return o}request;abortController;_retryCount=0;_input;_options;constructor(t,n={}){if(this._input=t,this._options={...n,headers:U(this._input.headers,n.headers),hooks:L({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:D(n.method??this._input.method??"GET"),prefixUrl:String(n.prefixUrl||""),retry:H(n.retry),throwHttpErrors:!1!==n.throwHttpErrors,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis)},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(k){const t=this._options.signal??this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=t?AbortSignal.any([t,this.abortController.signal]):this.abortController.signal}if(C&&(this._options.duplex="half"),void 0!==this._options.json&&(this._options.body=this._options.stringifyJson?.(this._options.json)??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const t="string"==typeof this._options.searchParams?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString(),n=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,"?"+t);!(R&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)||this._options.headers&&this._options.headers["content-type"]||this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(n,{...this.request}),this._options)}if(this._options.onUploadProgress){if("function"!=typeof this._options.onUploadProgress)throw new TypeError("The `onUploadProgress` option must be a function");if(!C)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=((t,n)=>{const e=(t=>{if(!t)return 0;if(t instanceof FormData){let n=0;for(const[e,r]of t)n+=z,n+=(new TextEncoder).encode(`Content-Disposition: form-data; name="${e}"`).length,n+="string"==typeof r?(new TextEncoder).encode(r).length:r.size;return n}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength;if("string"==typeof t)return(new TextEncoder).encode(t).length;if(t instanceof URLSearchParams)return(new TextEncoder).encode(t.toString()).length;if("byteLength"in t)return t.byteLength;if("object"==typeof t&&null!==t)try{const n=JSON.stringify(t);return(new TextEncoder).encode(n).length}catch{return 0}return 0})(t.body);let r=0;return new Request(t,{duplex:"half",body:new ReadableStream({async start(o){const s=t.body instanceof ReadableStream?t.body.getReader():new Response("").body.getReader();await async function t(){const{done:a,value:i}=await s.read();if(a)return n&&n({percent:1,transferredBytes:r,totalBytes:Math.max(e,r)},new Uint8Array),void o.close();r+=i.byteLength;let l=0===e?0:r/e;(e<r||1===l)&&(l=.99),n&&n({percent:Number(l.toFixed(2)),transferredBytes:r,totalBytes:e},i),o.enqueue(i),await t()}()}})})})(this.request,this._options.onUploadProgress))}}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount>this._options.retry.limit||t instanceof x)throw t;if(t instanceof v){if(!this._options.retry.statusCodes.includes(t.response.status))throw t;const n=t.response.headers.get("Retry-After")??t.response.headers.get("RateLimit-Reset")??t.response.headers.get("X-RateLimit-Reset")??t.response.headers.get("X-Rate-Limit-Reset");if(n&&this._options.retry.afterStatusCodes.includes(t.response.status)){let t=1e3*Number(n);Number.isNaN(t)?t=Date.parse(n)-Date.now():t>=Date.parse("2024-01-01")&&(t-=Date.now());const e=this._options.retry.maxRetryAfter??t;return t<e?t:e}if(413===t.response.status)throw t}const n=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,n)}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(n){const e=Math.min(this._calculateRetryDelay(n),S);if(this._retryCount<1)throw n;await async function(t,{signal:n}){return new Promise(((e,r)=>{function o(){clearTimeout(s),r(n.reason)}n&&(n.throwIfAborted(),n.addEventListener("abort",o,{once:!0}));const s=setTimeout((()=>{n?.removeEventListener("abort",o),e()}),t)}))}(e,{signal:this._options.signal});for(const t of this._options.hooks.beforeRetry)if(await t({request:this.request,options:this._options,error:n,retryCount:this._retryCount})===j)return;return this._retry(t)}}async _fetch(){for(const t of this._options.hooks.beforeRequest){const n=await t(this.request,this._options);if(n instanceof Request){this.request=n;break}if(n instanceof Response)return n}const t=((t,n)=>{const e={};for(const r in n)r in P||r in A||r in t||(e[r]=n[r]);return e})(this.request,this._options),n=this.request;return this.request=n.clone(),!1===this._options.timeout?this._options.fetch(n,t):async function(t,n,e,r){return new Promise(((o,s)=>{const a=setTimeout((()=>{e&&e.abort(),s(new x(t))}),r.timeout);r.fetch(t,n).then(o).catch(s).then((()=>{clearTimeout(a)}))}))}(n,t,this.abortController,this._options)}}
|
2
|
+
/*! MIT License © Sindre Sorhus */const J=t=>{const n=(n,e)=>_.create(n,q(t,e));for(const e of E)n[e]=(n,r)=>_.create(n,q(t,r,{method:e}));return n.create=t=>J(q(t)),n.extend=n=>("function"==typeof n&&(n=n(t??{})),J(q(t,n))),n.stop=j,n},I=J(),X={list:[],keys:[],locs:[],loading:!1,solved:!1,error:void 0,pick:void 0,data:void 0},{state:W}=(()=>{const t=((t,n=(t,n)=>t!==n)=>{const e=m(t);let r=new Map(Object.entries(e??{}));const o={dispose:[],get:[],set:[],reset:[]},s=()=>{r=new Map(Object.entries(m(t)??{})),o.reset.forEach((t=>t()))},a=t=>(o.get.forEach((n=>n(t))),r.get(t)),i=(t,e)=>{const s=r.get(t);n(e,s,t)&&(r.set(t,e),o.set.forEach((n=>n(t,e,s))))},l="undefined"==typeof Proxy?{}:new Proxy(e,{get:(t,n)=>a(n),ownKeys:()=>Array.from(r.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,n)=>r.has(n),set:(t,n,e)=>(i(n,e),!0)}),c=(t,n)=>(o[t].push(n),()=>{((t,n)=>{const e=t.indexOf(n);e>=0&&(t[e]=t[t.length-1],t.length--)})(o[t],n)});return{state:l,get:a,set:i,on:c,onChange:(n,e)=>{const r=c("set",((t,r)=>{t===n&&e(r)})),o=c("reset",(()=>e(m(t)[n])));return()=>{r(),o()}},use:(...t)=>{const n=t.reduce(((t,n)=>(n.set&&t.push(c("set",n.set)),n.get&&t.push(c("get",n.get)),n.reset&&t.push(c("reset",n.reset)),n.dispose&&t.push(c("dispose",n.dispose)),t)),[]);return()=>n.forEach((t=>t()))},dispose:()=>{o.dispose.forEach((t=>t())),s()},reset:s,forceUpdate:t=>{const n=r.get(t);o.set.forEach((e=>e(t,n,n)))}}})(X,void 0);return t.use((()=>{if("function"!=typeof n)return{};const t=new Map;return{dispose:()=>t.clear(),get:e=>{const r=n();r&&((t,n,e)=>{const r=t.get(n);r?r.includes(e)||r.push(e):t.set(n,[e])})(t,e,r)},set:n=>{const r=t.get(n);r&&t.set(n,r.filter(e)),y(t)},reset:()=>{t.forEach((t=>t.forEach(e))),y(t)}}})()),t})(),Z=new Map([["row",new Map],["column",new Map],["box",new Map]]),F=["1","2","3","4","5","6","7","8","9"],K=t=>{if(void 0!==t&&t.indx!=W.pick){const{isClue:n,indx:e,row:r,column:o,box:s}=t,a=((t,n,e,r)=>{const o=new Map([["row",n],["column",e],["box",r]]),s=new Set;return o.forEach(((n,e)=>{Z.get(e).get(n).forEach((n=>{n!==t&&s.add(n)}))})),Array.from(s)})(e,r,o,s),i=n?[]:(t=>{const{list:n}=W,e=new Set;return t.map((t=>{const{key:r}=n[t];"."!=r&&e.add(r)})),F.filter((t=>!e.has(t)))})(a);W.pick=e,W.keys=i,W.locs=a}else W.pick=void 0,W.keys=[],W.locs=[];Q(W.pick)};let G;const V={local:"http://localhost:8080/api",netlify:"/.netlify/functions",vercel:"https://sudoku-rust-api.vercel.app/api"},Y=t=>{h(t)},Q=t=>{u(t)},tt=(t=!1)=>{W.list=[],W.keys=[],W.locs=[],W.loading=t,W.solved=!1,W.error=void 0,W.pick=void 0,W.data=void 0},nt=(t,n=!0)=>{const{puzzle:e,ref:r}=t;n&&(h([]),d(a,t)),(t=>{if(t){const{puzzle:n,ref:e}=t,r=n?[...n]:[],o=e?atob(e):void 0,s=o?[...o]:[],a=r.map(((t,n)=>{const e=s[n],r=t===e,o=Math.floor(n/9),a=n%9,i=((t,n)=>n<3?t<3?0:t<6?3:6:n<6?t<3?1:t<6?4:7:t<3?2:t<6?5:8)(o,a);return((t,n,e,r)=>{new Map([["row",n],["column",e],["box",r]]).forEach(((n,e)=>{const r=Z.get(e);r.has(n)?r.get(n).add(t):r.set(n,new Set([t]))}))})(n,o,a,i),{key:t,isClue:r,value:e,indx:n,row:o,column:a,box:i}}));(t=>{f().forEach(((n,e)=>{const r=t[e],{isClue:o}=r;o||(r.key=n)}))})(a),W.data=t,W.list=a}else W.data=void 0,W.list=[]})({puzzle:e,ref:r})},et=t=>{W.list=[...t],t.length=0},rt={initApp:t=>{(t=>{const n=(t=>{const n=Object.keys(V).includes(t)?t:"vercel";return V[n]})(t);G=I.extend({hooks:{beforeRequest:[t=>{t.headers.set("X-Requested-With","ky"),t.headers.set("X-Custom-Header","foobar")}]},prefixUrl:n,timeout:1e4})})(t),tt();const n=c(a),e=p();if(n&&(nt(n,!1),e>=0)){const{list:t}=W;K(t[e])}},refresh:async()=>{tt(!0),Y([]),Q(W.pick);try{const t=await G.get("puzzle").json();nt(t)}catch(t){const{message:n}=t;console.log("-- ",n),console.log(t),W.error=n}finally{W.loading=!1}},select:t=>{K(t)},check:()=>{const{list:t}=W,n=[];let e=0,r=0,o=0;t.forEach((t=>{const{key:s,value:a,isClue:i}=t;i?o+=1:"."!==s&&(s!==a?(e+=1,t.key="."):r+=1),n.push(t.key)}));const s=o+r;Y(r?n:[]),e>0?et(t):81===s&&(W.solved=!0)},input:t=>{const{pick:n,list:e}=W;e[n].key=t,et(e)}},ot=(...t)=>t.filter(Boolean).join(" "),st=n=>{const e=n.hex||"currentColor",r=n.label||"loading...",o=n.size||24;return t("svg",{class:ot(n.class||"","animate-spin"),width:o,height:o,fill:"none",viewBox:"0 0 24 24",role:"img","aria-label":"title"},t("title",null,r),t("g",null,t("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:e,"stroke-width":"4"}),t("path",{class:"opacity-75",fill:e,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})),t("path",{d:"M0 0h24v24H0z",fill:"none"}))},at=n=>{const{message:e,salute:r,spinner:s=!1}=n;return t("div",{class:"mt-5 flex h-24px flex-row items-center"},t(s?st:o,{class:"mr-2"}),r?t("label",{class:"mr-1 font-bold"},r,":"):"",t("label",{class:"italic"},e))},it=()=>{const{solved:n,loading:e,error:r}=W;return t("div",{class:"flex flex-col"},e||r||n?"":t(at,{message:"Welcome, are you ready to play?..."}),e?t(at,{message:"Loading...",spinner:!0}):"",r?t(at,{message:r,salute:"ERROR"}):"",n?t(at,{message:"You solved the puzzle!!"}):"")},lt=n=>{const e=n.hex||"currentColor",r=n.size||24;return t("svg",{class:n.class,width:r,height:r,viewBox:"0 0 24 24",role:"img","aria-label":"title"},t("title",null,n.label||"fingerprint"),t("g",{fill:e},t("path",{d:"M17.81,4.47C17.73,4.47 17.65,4.45 17.58,4.41C15.66,3.42 14,3\n 12,3C10.03,3 8.15,3.47 6.44,4.41C6.2,4.54 5.9,4.45 5.76,4.21C5.63,3.97\n 5.72,3.66 5.96,3.53C7.82,2.5 9.86,2 12,2C14.14,2 16,2.47\n 18.04,3.5C18.29,3.65 18.38,3.95 18.25,4.19C18.16,4.37 18,4.47\n 17.81,4.47M3.5,9.72C3.4,9.72 3.3,9.69 3.21,9.63C3,9.47 2.93,9.16\n 3.09,8.93C4.08,7.53 5.34,6.43 6.84,5.66C10,4.04 14,4.03\n 17.15,5.65C18.65,6.42 19.91,7.5 20.9,8.9C21.06,9.12 21,9.44\n 20.78,9.6C20.55,9.76 20.24,9.71 20.08,9.5C19.18,8.22 18.04,7.23\n 16.69,6.54C13.82,5.07 10.15,5.07 7.29,6.55C5.93,7.25 4.79,8.25\n 3.89,9.5C3.81,9.65 3.66,9.72 3.5,9.72M9.75,21.79C9.62,21.79 9.5,21.74\n 9.4,21.64C8.53,20.77 8.06,20.21 7.39,19C6.7,17.77 6.34,16.27\n 6.34,14.66C6.34,11.69 8.88,9.27 12,9.27C15.12,9.27 17.66,11.69\n 17.66,14.66A0.5,0.5 0 0,1 17.16,15.16A0.5,0.5 0 0,1\n 16.66,14.66C16.66,12.24 14.57,10.27 12,10.27C9.43,10.27 7.34,12.24\n 7.34,14.66C7.34,16.1 7.66,17.43 8.27,18.5C8.91,19.66 9.35,20.15\n 10.12,20.93C10.31,21.13 10.31,21.44 10.12,21.64C10,21.74 9.88,21.79\n 9.75,21.79M16.92,19.94C15.73,19.94 14.68,19.64 13.82,19.05C12.33,18.04\n 11.44,16.4 11.44,14.66A0.5,0.5 0 0,1 11.94,14.16A0.5,0.5 0 0,1\n 12.44,14.66C12.44,16.07 13.16,17.4 14.38,18.22C15.09,18.7 15.92,18.93\n 16.92,18.93C17.16,18.93 17.56,18.9 17.96,18.83C18.23,18.78 18.5,18.96\n 18.54,19.24C18.59,19.5 18.41,19.77 18.13,19.82C17.56,19.93 17.06,19.94\n 16.92,19.94M14.91,22C14.87,22 14.82,22 14.78,22C13.19,21.54 12.15,20.95\n 11.06,19.88C9.66,18.5 8.89,16.64 8.89,14.66C8.89,13.04 10.27,11.72\n 11.97,11.72C13.67,11.72 15.05,13.04 15.05,14.66C15.05,15.73 16,16.6\n 17.13,16.6C18.28,16.6 19.21,15.73 19.21,14.66C19.21,10.89 15.96,7.83\n 11.96,7.83C9.12,7.83 6.5,9.41 5.35,11.86C4.96,12.67 4.76,13.62\n 4.76,14.66C4.76,15.44 4.83,16.67 5.43,18.27C5.53,18.53 5.4,18.82\n 5.14,18.91C4.88,19 4.59,18.87 4.5,18.62C4,17.31 3.77,16\n 3.77,14.66C3.77,13.46 4,12.37 4.45,11.42C5.78,8.63 8.73,6.82\n 11.96,6.82C16.5,6.82 20.21,10.33 20.21,14.65C20.21,16.27 18.83,17.59\n 17.13,17.59C15.43,17.59 14.05,16.27 14.05,14.65C14.05,13.58 13.12,12.71\n 11.97,12.71C10.82,12.71 9.89,13.58 9.89,14.65C9.89,16.36 10.55,17.96\n 11.76,19.16C12.71,20.1 13.62,20.62 15.03,21C15.3,21.08 15.45,21.36\n 15.38,21.62C15.33,21.85 15.12,22 14.91,22Z"})),t("path",{d:"M0 0h24v24H0z",fill:"none"}))},ct="eswat2",dt=()=>t("a",{class:"absolute right-0 top-0 text-clrs-gray hover:text-clrs-navy",href:"https://eswat2.dev","aria-label":ct,target:"blank",title:ct},t(lt,{label:ct})),ft=(n,e)=>t("h1",{class:ot("text-center uppercase text-clrs-red","mb-11 ml-0 mr-0 mt-11","text-6xl font-thin")},e),ht=n=>{const{label:e,callback:r,matched:o=!1}=n;return t("button",{class:ot("rounded-md border border-solid border-clrs-slate4 font-bold",e===g?"mr-2 bg-clrs-yellow px-3 py-2 text-clrs-navy":e===b?"mr-2 bg-clrs-navy px-3 py-2 text-white":"x"===e?"mr-1 bg-clrs-red px-2 py-1 text-white":o?"mr-1 bg-clrs-slate4 px-2 py-1 text-white":"mr-1 bg-gray-50 px-2 py-1 text-clrs-navy"),onClick:r},e)},pt=()=>{const{keys:n,list:e,pick:r,solved:o}=W,s=t=>()=>{rt.input(t)},a=o?[]:n,i=null!=r?e[r]:void 0;return t("div",{class:"mt-2 flex flex-row justify-end"},o||!i||i.isClue||"."==i.key?"":t(ht,{label:"x",callback:s(".")}),a.map((n=>t(ht,{label:n,callback:s(n),matched:i.key===n}))))},ut=[2,5,11,14,20,23,29,32,38,41,47,50,56,59,65,68,74,77],gt=ut.map((t=>t+1)),bt=[18,19,20,21,22,23,24,25,26,45,46,47,48,49,50,51,52,53],wt=bt.map((t=>t+9)),yt=n=>{const{cell:e,focus:r,selected:o,solved:s}=n,{key:a,isClue:i,indx:l}=e,c="."!=a?a:"";return t("label",{class:ot(`cell-${l}`,ut.includes(l)?"border-xbr-clrs-navy":"",gt.includes(l)?"border-xbl-clrs-navy":"",bt.includes(l)?"border-xbb-clrs-navy":"",wt.includes(l)?"border-xbt-clrs-navy":"","h-8 w-8 border border-solid text-center leading-8",o?"border-clrs-red bg-clrs-red-a50 text-clrs-red":r?"border-clrs-gray bg-clrs-green-a50 font-bold":i?"border-clrs-gray bg-clrs-silver":""!==c?"border-clrs-gray text-clrs-red":"border-clrs-gray"),onClick:((t,n)=>()=>{n||rt.select(t)})(e,s)},c)},mt=()=>{const{list:n,pick:e,locs:r,solved:o}=W;return t("div",{class:ot("flex flex-row flex-wrap","border border-solid border-clrs-navy","h-76p5 w-76p5 text-lg")},n.map(((n,s)=>{const a=!o&&s===e,i=!o&&r.includes(s);return t(yt,{cell:n,focus:i,selected:a,solved:o})})))},vt=()=>t("label",{class:"ml-auto align-top text-xs italic text-clrs-slate4"},"Tailwind ","4.1.11"),xt=t=>()=>{t.refresh()},Ct=t=>()=>{t.check()},kt=()=>{const{list:n,solved:e}=W;return t("div",{class:"flex flex-row"},t(ht,{label:b,callback:xt(rt)}),81!==n.length||e?"":t(ht,{label:g,callback:Ct(rt)}),t(vt,null))},Tt=class{constructor(t){r(this,t),this.tag="proto-sudoku",this.platform="vercel"}componentDidLoad(){rt.initApp(this.platform)}render(){return t("div",{key:"9f50eec975c4da5f4984b80380067d5155dda0d1",id:"app",class:"ds1-main relative max-w-min p-0.5"},t(dt,{key:"e7bab7e257022a9920f8b43785d9dc33ab7fed65"}),t(ft,{key:"d8c32e6b9c20b9fe6c8ff2e9fc7a9900057a2679"},"Sudoku"),t(mt,{key:"8a028015ae4380aaa54a406ccf5cc908816ca6a4"}),t(pt,{key:"951b6d20ca7a99ced4c60aa39fe040af6e96dd46"}),t("hr",{key:"35ba2812a3b068b21b5252c5f07d0b5dc2f18527",class:"ml-0 mr-0"}),t(kt,{key:"114e7edd4bf3da82ae344f56cb7e856ce17a6da8"}),t(it,{key:"2c15eb0ba714d1e0c378882c62ce575c428adc2a"}))}};Tt.style="/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root,\n :host {\n --font-sans:\n ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji',\n 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\n --color-gray-50: oklch(98.5% 0.002 247.839);\n --color-white: #fff;\n --spacing: 0.25rem;\n --text-xs: 0.75rem;\n --text-xs--line-height: calc(1 / 0.75);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-6xl: 3.75rem;\n --text-6xl--line-height: 1;\n --font-weight-thin: 100;\n --font-weight-bold: 700;\n --radius-md: 0.375rem;\n --animate-spin: spin 1s linear infinite;\n }\n}\n@layer utilities {\n .absolute {\n position: absolute;\n }\n .relative {\n position: relative;\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .right-0 {\n right: calc(var(--spacing) * 0);\n }\n .m-6 {\n margin: calc(var(--spacing) * 6);\n }\n .mt-2 {\n margin-top: calc(var(--spacing) * 2);\n }\n .mt-5 {\n margin-top: calc(var(--spacing) * 5);\n }\n .mt-11 {\n margin-top: calc(var(--spacing) * 11);\n }\n .mr-0 {\n margin-right: calc(var(--spacing) * 0);\n }\n .mr-1 {\n margin-right: calc(var(--spacing) * 1);\n }\n .mr-2 {\n margin-right: calc(var(--spacing) * 2);\n }\n .mb-11 {\n margin-bottom: calc(var(--spacing) * 11);\n }\n .ml-0 {\n margin-left: calc(var(--spacing) * 0);\n }\n .ml-auto {\n margin-left: auto;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .h-8 {\n height: calc(var(--spacing) * 8);\n }\n .h-24px {\n height: 24px;\n }\n .h-76p5 {\n height: 19.125rem;\n }\n .w-8 {\n width: calc(var(--spacing) * 8);\n }\n .w-76p5 {\n width: 19.125rem;\n }\n .max-w-min {\n max-width: min-content;\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .flex-wrap {\n flex-wrap: wrap;\n }\n .items-center {\n align-items: center;\n }\n .justify-end {\n justify-content: flex-end;\n }\n .rounded-md {\n border-radius: var(--radius-md);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-solid {\n --tw-border-style: solid;\n border-style: solid;\n }\n .border-clrs-gray {\n border-color: var(--clrs-gray, #aaaaaa);\n }\n .border-clrs-navy {\n border-color: var(--clrs-navy, #001f3f);\n }\n .border-clrs-red {\n border-color: var(--clrs-red, #ff4136);\n }\n .border-clrs-slate4 {\n border-color: var(--clrs-slate4, #4e5964);\n }\n .bg-clrs-green-a50 {\n background-color: var(--clrs-green-a50, #2ecc4050);\n }\n .bg-clrs-navy {\n background-color: var(--clrs-navy, #001f3f);\n }\n .bg-clrs-red {\n background-color: var(--clrs-red, #ff4136);\n }\n .bg-clrs-red-a50 {\n background-color: var(--clrs-red-a50, #ff413650);\n }\n .bg-clrs-silver {\n background-color: var(--clrs-silver, #dddddd);\n }\n .bg-clrs-slate4 {\n background-color: var(--clrs-slate4, #4e5964);\n }\n .bg-clrs-yellow {\n background-color: var(--clrs-yellow, #ffdc00);\n }\n .bg-gray-50 {\n background-color: var(--color-gray-50);\n }\n .p-0\\.5 {\n padding: calc(var(--spacing) * 0.5);\n }\n .px-2 {\n padding-inline: calc(var(--spacing) * 2);\n }\n .px-3 {\n padding-inline: calc(var(--spacing) * 3);\n }\n .py-1 {\n padding-block: calc(var(--spacing) * 1);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .text-center {\n text-align: center;\n }\n .align-top {\n vertical-align: top;\n }\n .font-sans {\n font-family: var(--font-sans);\n }\n .text-6xl {\n font-size: var(--text-6xl);\n line-height: var(--tw-leading, var(--text-6xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-xs {\n font-size: var(--text-xs);\n line-height: var(--tw-leading, var(--text-xs--line-height));\n }\n .leading-8 {\n --tw-leading: calc(var(--spacing) * 8);\n line-height: calc(var(--spacing) * 8);\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-thin {\n --tw-font-weight: var(--font-weight-thin);\n font-weight: var(--font-weight-thin);\n }\n .text-clrs-gray {\n color: var(--clrs-gray, #aaaaaa);\n }\n .text-clrs-navy {\n color: var(--clrs-navy, #001f3f);\n }\n .text-clrs-red {\n color: var(--clrs-red, #ff4136);\n }\n .text-clrs-slate4 {\n color: var(--clrs-slate4, #4e5964);\n }\n .text-white {\n color: var(--color-white);\n }\n .uppercase {\n text-transform: uppercase;\n }\n .italic {\n font-style: italic;\n }\n .opacity-25 {\n opacity: 25%;\n }\n .opacity-75 {\n opacity: 75%;\n }\n .shadow {\n --tw-shadow:\n 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)),\n 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow:\n var(--tw-inset-shadow), var(--tw-inset-ring-shadow),\n var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .border-xbb-clrs-navy {\n border-bottom: 1px solid var(--clrs-navy, #001f3f) !important;\n }\n .border-xbl-clrs-navy {\n border-left: 1px solid var(--clrs-navy, #001f3f) !important;\n }\n .border-xbr-clrs-navy {\n border-right: 1px solid var(--clrs-navy, #001f3f) !important;\n }\n .border-xbt-clrs-navy {\n border-top: 1px solid var(--clrs-navy, #001f3f) !important;\n }\n .hover\\:text-clrs-navy {\n &:hover {\n @media (hover: hover) {\n color: var(--clrs-navy, #001f3f);\n }\n }\n }\n}\n@layer components {\n .ds1-main {\n margin: calc(var(--spacing) * 6);\n display: flex;\n flex-direction: column;\n font-family: var(--font-sans);\n color: var(--clrs-navy, #001f3f);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or\n ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {\n *,\n ::before,\n ::after,\n ::backdrop {\n --tw-border-style: solid;\n --tw-leading: initial;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n }\n }\n}\n";export{Tt as proto_sudoku}
|
@@ -0,0 +1 @@
|
|
1
|
+
const o=()=>{};export{o as g}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
var t=Object.defineProperty,e=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},n=(t,e)=>{t.__stencil__getHostRef=()=>e,e.t=t},o=(t,e)=>e in t,l=(t,e)=>(0,console.error)(t,e),i=new Map,s=new Map,r="slot-fb{display:contents}slot-fb[hidden]{display:none}",c="undefined"!=typeof window?window:{},u={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},f=t=>Promise.resolve(t),a=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),d=!!a&&(()=>!!c.document&&Object.getOwnPropertyDescriptor(c.document.adoptedStyleSheets,"length").writable)(),h=!1,p=[],m=[],v=(t,e)=>n=>{t.push(n),h||(h=!0,e&&4&u.o?b(w):u.raf(w))},y=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){l(t)}t.length=0},w=()=>{y(p),y(m),(h=p.length>0)&&u.raf(w)},b=t=>f().then(t),$=v(m,!0),g=t=>"object"==(t=typeof t)||"function"===t;function S(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>k,map:()=>O,ok:()=>j,unwrap:()=>C,unwrapErr:()=>M});var j=t=>({isOk:!0,isErr:!1,value:t}),k=t=>({isOk:!1,isErr:!0,value:t});function O(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>j(t))):j(n)}if(t.isErr)return k(t.value);throw"should never get here"}var E,C=t=>{if(t.isOk)return t.value;throw t.value},M=t=>{if(t.isErr)return t.value;throw t.value};function x(){const t=this.attachShadow({mode:"open"});void 0===E&&(E=null),E&&(d?t.adoptedStyleSheets.push(E):t.adoptedStyleSheets=[...t.adoptedStyleSheets,E])}var P=new WeakMap,R=t=>"sc-"+t.i,D=(t,e,...n)=>{let o=null,l=null,i=!1,s=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!g(o))&&(o+=""),i&&s?r[r.length-1].u+=o:r.push(i?U(null,o):o),s=i)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,r,A);const u=U(t,null);return u.h=e,r.length>0&&(u.p=r),u.m=l,u},U=(t,e)=>({o:0,v:t,u:e,$:null,p:null,h:null,m:null}),W={},A={forEach:(t,e)=>t.map(N).forEach(e),map:(t,e)=>t.map(N).map(e).map(L)},N=t=>({vattrs:t.h,vchildren:t.p,vkey:t.m,vname:t.S,vtag:t.v,vtext:t.u}),L=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),D(t.vtag,e,...t.vchildren||[])}const e=U(t.vtag,t.vtext);return e.h=t.vattrs,e.p=t.vchildren,e.m=t.vkey,e.S=t.vname,e},T=t=>{const e=(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};T("::slotted"),T(":host"),T(":host-context");var H,q=(t,e)=>null==t||g(t)?t:1&e?t+"":t,z=(t,e,n,l,i,s)=>{if(n===l)return;let r=o(t,e),f=e.toLowerCase();if("class"===e){const e=t.classList,o=V(n);let i=V(l);e.remove(...o.filter((t=>t&&!i.includes(t)))),e.add(...i.filter((t=>t&&!o.includes(t))))}else if("key"===e);else if(r||"o"!==e[0]||"n"!==e[1]){const o=g(l);if((r||o&&null!==l)&&!i)try{if(t.tagName.includes("-"))t[e]!==l&&(t[e]=l);else{const o=null==l?"":l;"list"===e?r=!1:null!=n&&t[e]==o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&s||i)&&!o&&1===t.nodeType&&t.setAttribute(e,l=!0===l?"":l)}else if(e="-"===e[2]?e.slice(3):o(c,f)?f.slice(2):f[2]+e.slice(3),n||l){const o=e.endsWith(G);e=e.replace(I,""),n&&u.rel(t,e,n,o),l&&u.ael(t,e,l,o)}},F=/\s/,V=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(F):[]),G="Capture",I=RegExp(G+"$"),Y=(t,e,n)=>{const o=11===e.$.nodeType&&e.$.host?e.$.host:e.$,l=t&&t.h||{},i=e.h||{};for(const t of _(Object.keys(l)))t in i||z(o,t,l[t],void 0,n,e.o);for(const t of _(Object.keys(i)))z(o,t,l[t],i[t],n,e.o)};function _(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var B=!1,J=(t,e,n)=>{const o=e.p[n];let l,i,s=0;if(null!==o.u)l=o.$=c.document.createTextNode(o.u);else{if(B||(B="svg"===o.v),!c.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(l=o.$=c.document.createElementNS(B?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.v),B&&"foreignObject"===o.v&&(B=!1),Y(null,o,B),o.p)for(s=0;s<o.p.length;++s)i=J(t,o,s),i&&l.appendChild(i);"svg"===o.v?B=!1:"foreignObject"===l.tagName&&(B=!0)}return l["s-hn"]=H,l},K=(t,e,n,o,l,i)=>{let s,r=t;for(r.shadowRoot&&r.tagName===H&&(r=r.shadowRoot);l<=i;++l)o[l]&&(s=J(null,n,l),s&&(o[l].$=s,tt(r,s,e)))},Q=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.$;t&&t.remove()}}},X=(t,e,n=!1)=>t.v===e.v&&(n?(n&&!t.m&&e.m&&(t.m=e.m),!0):t.m===e.m),Z=(t,e,n=!1)=>{const o=e.$=t.$,l=t.p,i=e.p,s=e.v,r=e.u;null===r?(Y(t,e,B="svg"===s||"foreignObject"!==s&&B),null!==l&&null!==i?((t,e,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],h=e[a],p=o.length-1,m=o[0],v=o[p];for(;r<=a&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--a];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(X(d,m,l))Z(d,m,l),d=e[++r],m=o[++c];else if(X(h,v,l))Z(h,v,l),h=e[--a],v=o[--p];else if(X(d,v,l))Z(d,v,l),tt(t,d.$,h.$.nextSibling),d=e[++r],v=o[--p];else if(X(h,m,l))Z(h,m,l),tt(t,h.$,d.$),h=e[--a],m=o[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].m&&e[f].m===m.m){u=f;break}u>=0?(s=e[u],s.v!==m.v?i=J(e&&e[c],n,u):(Z(s,m,l),e[u]=void 0,i=s.$),m=o[++c]):(i=J(e&&e[c],n,c),m=o[++c]),i&&tt(d.$.parentNode,i,d.$)}r>a?K(t,null==o[p+1]?null:o[p+1].$,n,o,c,p):c>p&&Q(e,r,a)})(o,l,e,i,n):null!==i?(null!==t.u&&(o.textContent=""),K(o,null,e,i,0,i.length-1)):!n&&null!==l&&Q(l,0,l.length-1),B&&"svg"===s&&(B=!1)):t.u!==r&&(o.data=r)},tt=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),et=(t,e)=>{if(e&&!t.j&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.j=()=>{e["s-p"].splice(n-1,1),o()})))}},nt=(t,e)=>{if(t.o|=16,4&t.o)return void(t.o|=512);et(t,t.k);const n=()=>ot(t,e);if(!e)return $(n);queueMicrotask((()=>{n()}))},ot=(t,e)=>{const n=t.$hostElement$,o=t.t;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return l=ht(o,e?"componentWillLoad":"componentWillUpdate",void 0,n),l=lt(l,(()=>ht(o,"componentWillRender",void 0,n))),lt(l,(()=>st(t,o,e)))},lt=(t,e)=>it(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),it=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,st=async(t,e,n)=>{var o;const l=t.$hostElement$,i=l["s-rc"];n&&(t=>{const e=t.O,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=R(e),l=s.get(o);if(!c.document)return o;if(t=11===t.nodeType?t:c.document,l)if("string"==typeof l){let i,s=P.get(t=t.head||t);if(s||P.set(t,s=new Set),!s.has(o)){{i=c.document.createElement("style"),i.innerHTML=l;const o=null!=(n=u.C)?n:S(c.document);if(null!=o&&i.setAttribute("nonce",o),!(1&e.o))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(i,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(a){const e=new CSSStyleSheet;e.replaceSync(l),d?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=l+e.innerHTML:t.prepend(i)}else t.append(i);1&e.o&&t.insertBefore(i,null)}4&e.o&&(i.innerHTML+=r),s&&s.add(o)}}else t.adoptedStyleSheets.includes(l)||(d?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);ct(t,e,l,n),i&&(i.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>ft(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},rt=null,ct=(t,e,n,o)=>{try{rt=e,e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.M||U(null,null),i=(t=>t&&t.v===W)(e)?e:D(null,null,e);if(H=o.tagName,n&&i.h)for(const t of Object.keys(i.h))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.h[t]=o[t]);i.v=null,i.o|=4,t.M=i,i.$=l.$=o.shadowRoot||o,Z(l,i,n)})(t,e,o)}catch(e){l(e,t.$hostElement$)}return rt=null,null},ut=()=>rt,ft=t=>{const e=t.$hostElement$,n=t.t,o=t.k;ht(n,"componentDidRender",void 0,e),64&t.o?ht(n,"componentDidUpdate",void 0,e):(t.o|=64,pt(e),ht(n,"componentDidLoad",void 0,e),t.P(e),o||dt()),t.j&&(t.j(),t.j=void 0),512&t.o&&b((()=>nt(t,!1))),t.o&=-517},at=t=>{var n;{const o=e(t),l=null==(n=null==o?void 0:o.$hostElement$)?void 0:n.isConnected;return l&&2==(18&o.o)&&nt(o,!1),l}},dt=()=>{b((()=>(t=>{const e=u.ce("appload",{detail:{namespace:"proto-sudoku-wc"}});return t.dispatchEvent(e),e})(c)))},ht=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){l(t,o)}},pt=t=>t.classList.add("hydrated"),mt=(t,n,o,l)=>{const i=e(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${l.i}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const s=i.R.get(n),r=i.o,c=i.t;if(o=q(o,l.D[n][0]),(!(8&r)||void 0===s)&&o!==s&&(!Number.isNaN(s)||!Number.isNaN(o))&&(i.R.set(n,o),c&&2==(18&r))){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(o,s,n))return;nt(i,!1)}},vt=(t,n,o)=>{var l,i;const s=t.prototype;if(n.D){const r=Object.entries(null!=(l=n.D)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:i,set:r}=Object.getOwnPropertyDescriptor(s,t)||{};i&&(n.D[t][0]|=2048),r&&(n.D[t][0]|=4096),(1&o||!i)&&Object.defineProperty(s,t,{get(){{if(!(2048&n.D[t][0]))return((t,n)=>e(this).R.get(n))(0,t);const o=e(this),l=o?o.t:s;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(i){const s=e(this);if(s){if(r){const e=32&l?this[t]:s.$hostElement$[t];return void 0===e&&s.R.get(t)?i=s.R.get(t):!s.R.get(t)&&e&&s.R.set(t,e),r.call(this,q(i,l)),void mt(this,t,i=32&l?this[t]:s.$hostElement$[t],n)}{if(!(1&o&&4096&n.D[t][0]))return mt(this,t,i,n),void(1&o&&!s.t&&s.U.then((()=>{4096&n.D[t][0]&&s.t[t]!==s.R.get(t)&&(s.t[t]=i)})));const e=()=>{const e=s.t[t];!s.R.get(t)&&e&&s.R.set(t,e),s.t[t]=q(i,l),mt(this,t,s.t[t],n)};s.t?e():s.U.then((()=>e()))}}}})}})),1&o){const o=new Map;s.attributeChangedCallback=function(t,l,i){u.jmp((()=>{var r;const c=o.get(t);if(this.hasOwnProperty(c))i=this[c],delete this[c];else{if(s.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==i)return;if(null==c){const o=e(this),s=null==o?void 0:o.o;if(o&&s&&!(8&s)&&128&s&&i!==l){const e=o.t,s=null==(r=n.W)?void 0:r[t];null==s||s.forEach((n=>{null!=e[n]&&e[n].call(e,i,l,t)}))}return}}const u=Object.getOwnPropertyDescriptor(s,c);(i=(null!==i||"boolean"!=typeof this[c])&&i)===this[c]||u.get&&!u.set||(this[c]=i)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=n.W)?i:{}),...r.filter((([t,e])=>15&e[0])).map((([t,e])=>{const n=e[1]||t;return o.set(n,t),n}))]))}}return t},yt=(t,e)=>{ht(t,"connectedCallback",void 0,e)},wt=(t,e)=>{ht(t,"disconnectedCallback",void 0,e||t)},bt=(t,n={})=>{var o;if(!c.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const f=[],d=n.exclude||[],h=c.customElements,p=c.document.head,m=p.querySelector("meta[charset]"),v=c.document.createElement("style"),y=[];let w,b=!0;Object.assign(u,n),u.l=new URL(n.resourcesUrl||"./",c.document.baseURI).href;let $=!1;if(t.map((t=>{t[1].map((n=>{const o={o:n[0],i:n[1],D:n[2],A:n[3]};4&o.o&&($=!0),o.D=n[2];const r=o.i,c=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,e)=>{const n={o:0,$hostElement$:t,O:e,R:new Map};n.U=new Promise((t=>n.P=t)),t["s-p"]=[],t["s-rc"]=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,o),1&o.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${o.i}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else x.call(t,o)}connectedCallback(){e(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),w&&(clearTimeout(w),w=null),b?y.push(this):u.jmp((()=>(t=>{if(!(1&u.o)){const n=e(t);if(!n)return;const o=n.O,r=()=>{};if(1&n.o)(null==n?void 0:n.t)?yt(n.t,t):(null==n?void 0:n.U)&&n.U.then((()=>yt(n.t,t)));else{n.o|=1;{let e=t;for(;e=e.parentNode||e.host;)if(e["s-p"]){et(n,n.k=e);break}}o.D&&Object.entries(o.D).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){if(e.o|=32,n.N){const s=((t,e)=>{const n=t.i.replace(/-/g,"_"),o=t.N;if(!o)return;const s=i.get(o);return s?s[n]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[n])),(t=>{l(t,e.$hostElement$)}))
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(s&&"then"in s){const t=()=>{};o=await s,t()}else o=s;if(!o)throw Error(`Constructor for "${n.i}#${e.L}" was not found`);o.isProxied||(vt(o,n,2),o.isProxied=!0);const r=()=>{};e.o|=8;try{new o(e)}catch(e){l(e,t)}e.o&=-9,r(),yt(e.t,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=R(n);if(!s.has(e)){const o=()=>{};((t,e,n)=>{let o=s.get(t);a&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,s.set(t,o)})(e,t,!!(1&n.o)),o()}}}const r=e.k,c=()=>nt(e,!0);r&&r["s-rc"]?r["s-rc"].push(c):c()})(t,n,o)}r()}})(this))))}disconnectedCallback(){u.jmp((()=>(async t=>{if(!(1&u.o)){const n=e(t);(null==n?void 0:n.t)?wt(n.t,t):(null==n?void 0:n.U)&&n.U.then((()=>wt(n.t,t)))}P.has(t)&&P.delete(t),t.shadowRoot&&P.has(t.shadowRoot)&&P.delete(t.shadowRoot)})(this))),u.raf((()=>{var t;const n=e(this);if(!n)return;const o=y.findIndex((t=>t===this));o>-1&&y.splice(o,1),(null==(t=null==n?void 0:n.M)?void 0:t.$)instanceof Node&&!n.M.$.isConnected&&delete n.M.$}))}componentOnReady(){var t;return null==(t=e(this))?void 0:t.U}};o.N=t[0],d.includes(r)||h.get(r)||(f.push(r),h.define(r,vt(c,o,1)))}))})),f.length>0&&($&&(v.textContent+=r),v.textContent+=f.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",v.innerHTML.length)){v.setAttribute("data-styles","");const t=null!=(o=u.C)?o:S(c.document);null!=t&&v.setAttribute("nonce",t),p.insertBefore(v,m?m.nextSibling:p.firstChild)}b=!1,y.length?y.map((t=>t.connectedCallback())):u.jmp((()=>w=setTimeout(dt,30)))},$t=t=>u.C=t;export{bt as b,at as f,ut as g,D as h,f as p,n as r,$t as s}
|
@@ -1 +1 @@
|
|
1
|
-
import{p as o,
|
1
|
+
import{p as o,b as t}from"./p-moxqhnZq.js";export{s as setNonce}from"./p-moxqhnZq.js";import{g as p}from"./p-DQuL1Twl.js";(()=>{const s=import.meta.url,t={};return""!==s&&(t.resourcesUrl=new URL(".",s).href),o(t)})().then((async o=>(await p(),t([["p-416bc43f",[[1,"proto-sudoku",{tag:[1],platform:[1]}]]]],o))));
|
@@ -846,7 +846,7 @@ export declare namespace JSXBase {
|
|
846
846
|
interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
|
847
847
|
open?: boolean;
|
848
848
|
name?: string;
|
849
|
-
onToggle?: (event:
|
849
|
+
onToggle?: (event: ToggleEvent) => void;
|
850
850
|
}
|
851
851
|
interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
|
852
852
|
cite?: string;
|
@@ -1552,6 +1552,13 @@ export declare namespace JSXBase {
|
|
1552
1552
|
z?: number | string;
|
1553
1553
|
zoomAndPan?: string;
|
1554
1554
|
}
|
1555
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent) */
|
1556
|
+
interface ToggleEvent extends Event {
|
1557
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/newState) */
|
1558
|
+
readonly newState: string;
|
1559
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/oldState) */
|
1560
|
+
readonly oldState: string;
|
1561
|
+
}
|
1555
1562
|
interface DOMAttributes<T> extends JSXAttributes<T> {
|
1556
1563
|
slot?: string;
|
1557
1564
|
part?: string;
|
@@ -1568,6 +1575,10 @@ export declare namespace JSXBase {
|
|
1568
1575
|
onCompositionstartCapture?: (event: CompositionEvent) => void;
|
1569
1576
|
onCompositionupdate?: (event: CompositionEvent) => void;
|
1570
1577
|
onCompositionupdateCapture?: (event: CompositionEvent) => void;
|
1578
|
+
onBeforeToggle?: (event: ToggleEvent) => void;
|
1579
|
+
onBeforeToggleCapture?: (event: ToggleEvent) => void;
|
1580
|
+
onToggle?: (event: ToggleEvent) => void;
|
1581
|
+
onToggleCapture?: (event: ToggleEvent) => void;
|
1571
1582
|
onFocus?: (event: FocusEvent) => void;
|
1572
1583
|
onFocusCapture?: (event: FocusEvent) => void;
|
1573
1584
|
onFocusin?: (event: FocusEvent) => void;
|
@@ -1586,10 +1597,6 @@ export declare namespace JSXBase {
|
|
1586
1597
|
onSubmitCapture?: (event: Event) => void;
|
1587
1598
|
onInvalid?: (event: Event) => void;
|
1588
1599
|
onInvalidCapture?: (event: Event) => void;
|
1589
|
-
onBeforeToggle?: (event: Event) => void;
|
1590
|
-
onBeforeToggleCapture?: (event: Event) => void;
|
1591
|
-
onToggle?: (event: Event) => void;
|
1592
|
-
onToggleCapture?: (event: Event) => void;
|
1593
1600
|
onLoad?: (event: Event) => void;
|
1594
1601
|
onLoadCapture?: (event: Event) => void;
|
1595
1602
|
onError?: (event: Event) => void;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "proto-sudoku-wc",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.68",
|
4
4
|
"description": "prototype - a simple Sudoku app rendered in Stencil and Tailwind",
|
5
5
|
"main": "dist/index.cjs.js",
|
6
6
|
"module": "dist/index.js",
|
@@ -27,20 +27,20 @@
|
|
27
27
|
"format": "prettier --write src"
|
28
28
|
},
|
29
29
|
"dependencies": {
|
30
|
-
"@stencil/core": "4.
|
30
|
+
"@stencil/core": "4.36.0",
|
31
31
|
"@stencil/store": "2.1.3",
|
32
32
|
"ky": "1.8.1"
|
33
33
|
},
|
34
34
|
"devDependencies": {
|
35
35
|
"autoprefixer": "10.4.21",
|
36
36
|
"concurrently": "9.2.0",
|
37
|
-
"cspell": "9.1.
|
38
|
-
"cssnano": "7.0
|
39
|
-
"eslint": "9.
|
37
|
+
"cspell": "9.1.5",
|
38
|
+
"cssnano": "7.1.0",
|
39
|
+
"eslint": "9.31.0",
|
40
40
|
"postcss": "8.5.6",
|
41
41
|
"prettier": "3.6.2",
|
42
|
-
"prettier-plugin-tailwindcss": "0.6.
|
43
|
-
"proto-tailwindcss-clrs": "0.0.
|
42
|
+
"prettier-plugin-tailwindcss": "0.6.14",
|
43
|
+
"proto-tailwindcss-clrs": "0.0.426",
|
44
44
|
"tailwindcss": "4.1.11",
|
45
45
|
"typescript": "5.8.3",
|
46
46
|
"workbox-build": "7.3.0"
|
@@ -1,2 +0,0 @@
|
|
1
|
-
const t=()=>{};var e=Object.defineProperty,n=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,e)=>{t.__stencil__getHostRef=()=>e,e.t=t},l=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},f=t=>Promise.resolve(t),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),h=!1,p=[],m=[],v=(t,e)=>n=>{t.push(n),h||(h=!0,e&&4&a.o?b(w):a.raf(w))},y=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},w=()=>{y(p),y(m),(h=p.length>0)&&a.raf(w)},b=t=>f().then(t),$=v(m,!0),g=t=>"object"==(t=typeof t)||"function"===t;function S(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((t,n)=>{for(var o in n)e(t,o,{get:n[o],enumerable:!0})})({},{err:()=>k,map:()=>O,ok:()=>j,unwrap:()=>E,unwrapErr:()=>C});var j=t=>({isOk:!0,isErr:!1,value:t}),k=t=>({isOk:!1,isErr:!0,value:t});function O(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>j(t))):j(n)}if(t.isErr)return k(t.value);throw"should never get here"}var E=t=>{if(t.isOk)return t.value;throw t.value},C=t=>{if(t.isErr)return t.value;throw t.value};function x(){const t=this.attachShadow({mode:"open"});if(d){const e=new CSSStyleSheet;e.replaceSync(""),t.adoptedStyleSheets.push(e)}}var M=(t,e,...n)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof t&&!g(o))&&(o+=""),s&&i?r[r.length-1].i+=o:r.push(s?P(null,o):o),i=s)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,r,D);const u=P(t,null);return u.u=e,r.length>0&&(u.h=r),u.p=l,u},P=(t,e)=>({o:0,m:t,i:e,v:null,h:null,u:null,p:null}),R={},D={forEach:(t,e)=>t.map(U).forEach(e),map:(t,e)=>t.map(U).map(e).map(W)},U=t=>({vattrs:t.u,vchildren:t.h,vkey:t.p,vname:t.$,vtag:t.m,vtext:t.i}),W=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),M(t.vtag,e,...t.vchildren||[])}const e=P(t.vtag,t.vtext);return e.u=t.vattrs,e.h=t.vchildren,e.p=t.vkey,e.$=t.vname,e},A=t=>{const e=(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};A("::slotted"),A(":host"),A(":host-context");var N,L=(t,e)=>null==t||g(t)?t:1&e?t+"":t,T=new WeakMap,H=t=>"sc-"+t.S,z=(t,e,n,o,s,i)=>{if(n===o)return;let r=l(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=V(n);let s=V(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("key"===e);else if(r||"o"!==e[0]||"n"!==e[1]){const l=g(o);if((r||l&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]==l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&i||s)&&!l&&1===t.nodeType&&t.setAttribute(e,o=!0===o?"":o)}else if(e="-"===e[2]?e.slice(3):l(u,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(q);e=e.replace(G,""),n&&a.rel(t,e,n,l),o&&a.ael(t,e,o,l)}},F=/\s/,V=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(F):[]),q="Capture",G=RegExp(q+"$"),I=(t,e,n)=>{const o=11===e.v.nodeType&&e.v.host?e.v.host:e.v,l=t&&t.u||{},s=e.u||{};for(const t of Y(Object.keys(l)))t in s||z(o,t,l[t],void 0,n,e.o);for(const t of Y(Object.keys(s)))z(o,t,l[t],s[t],n,e.o)};function Y(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var _=!1,B=(t,e,n)=>{const o=e.h[n];let l,s,i=0;if(null!==o.i)l=o.v=u.document.createTextNode(o.i);else{if(_||(_="svg"===o.m),!u.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(l=o.v=u.document.createElementNS(_?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.m),_&&"foreignObject"===o.m&&(_=!1),I(null,o,_),o.h)for(i=0;i<o.h.length;++i)s=B(t,o,i),s&&l.appendChild(s);"svg"===o.m?_=!1:"foreignObject"===l.tagName&&(_=!0)}return l["s-hn"]=N,l},J=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===N&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=B(null,n,l),i&&(o[l].v=i,Z(r,i,e)))},K=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.v;t&&t.remove()}}},Q=(t,e,n=!1)=>t.m===e.m&&(n?(n&&!t.p&&e.p&&(t.p=e.p),!0):t.p===e.p),X=(t,e,n=!1)=>{const o=e.v=t.v,l=t.h,s=e.h,i=e.m,r=e.i;null===r?(I(t,e,_="svg"===i||"foreignObject"!==i&&_),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=e.length-1,d=e[0],h=e[f],p=o.length-1,m=o[0],v=o[p];for(;r<=f&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--f];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(Q(d,m,l))X(d,m,l),d=e[++r],m=o[++c];else if(Q(h,v,l))X(h,v,l),h=e[--f],v=o[--p];else if(Q(d,v,l))X(d,v,l),Z(t,d.v,h.v.nextSibling),d=e[++r],v=o[--p];else if(Q(h,m,l))X(h,m,l),Z(t,h.v,d.v),h=e[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].p&&e[a].p===m.p){u=a;break}u>=0?(i=e[u],i.m!==m.m?s=B(e&&e[c],n,u):(X(i,m,l),e[u]=void 0,s=i.v),m=o[++c]):(s=B(e&&e[c],n,c),m=o[++c]),s&&Z(d.v.parentNode,s,d.v)}r>f?J(t,null==o[p+1]?null:o[p+1].v,n,o,c,p):c>p&&K(e,r,f)})(o,l,e,s,n):null!==s?(null!==t.i&&(o.textContent=""),J(o,null,e,s,0,s.length-1)):!n&&null!==l&&K(l,0,l.length-1),_&&"svg"===i&&(_=!1)):t.i!==r&&(o.data=r)},Z=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),tt=(t,e)=>{if(e&&!t.j&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.j=()=>{e["s-p"].splice(n-1,1),o()})))}},et=(t,e)=>{if(t.o|=16,!(4&t.o))return tt(t,t.k),$((()=>nt(t,e)));t.o|=512},nt=(t,e)=>{const n=t.$hostElement$,o=t.t;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return l=dt(o,e?"componentWillLoad":"componentWillUpdate",void 0,n),l=ot(l,(()=>dt(o,"componentWillRender",void 0,n))),ot(l,(()=>st(t,o,e)))},ot=(t,e)=>lt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),lt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,st=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.O,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=H(e),l=r.get(o);if(!u.document)return o;if(t=11===t.nodeType?t:u.document,l)if("string"==typeof l){let s,i=T.get(t=t.head||t);if(i||T.set(t,i=new Set),!i.has(o)){{s=u.document.createElement("style"),s.innerHTML=l;const o=null!=(n=a.C)?n:S(u.document);if(null!=o&&s.setAttribute("nonce",o),!(1&e.o))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(d){const e=new CSSStyleSheet;e.replaceSync(l),t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=l+e.innerHTML:t.prepend(s)}else t.append(s);1&e.o&&t.insertBefore(s,null)}4&e.o&&(s.innerHTML+=c),i&&i.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);rt(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>ut(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},it=null,rt=(t,e,n,o)=>{try{it=e,e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.M||P(null,null),s=(t=>t&&t.m===R)(e)?e:M(null,null,e);if(N=o.tagName,n&&s.u)for(const t of Object.keys(s.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.u[t]=o[t]);s.m=null,s.o|=4,t.M=s,s.v=l.v=o.shadowRoot||o,X(l,s,n)})(t,e,o)}catch(e){s(e,t.$hostElement$)}return it=null,null},ct=()=>it,ut=t=>{const e=t.$hostElement$,n=t.t,o=t.k;dt(n,"componentDidRender",void 0,e),64&t.o?dt(n,"componentDidUpdate",void 0,e):(t.o|=64,ht(e),dt(n,"componentDidLoad",void 0,e),t.P(e),o||ft()),t.j&&(t.j(),t.j=void 0),512&t.o&&b((()=>et(t,!1))),t.o&=-517},at=t=>{{const e=n(t),o=e.$hostElement$.isConnected;return o&&2==(18&e.o)&&et(e,!1),o}},ft=()=>{b((()=>(t=>{const e=a.ce("appload",{detail:{namespace:"proto-sudoku-wc"}});return t.dispatchEvent(e),e})(u)))},dt=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},ht=t=>t.classList.add("hydrated"),pt=(t,e,o,l)=>{const s=n(t);if(!s)throw Error(`Couldn't find host element for "${l.S}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const i=s.R.get(e),r=s.o,c=s.t;if(o=L(o,l.D[e][0]),(!(8&r)||void 0===i)&&o!==i&&(!Number.isNaN(i)||!Number.isNaN(o))&&(s.R.set(e,o),c&&2==(18&r))){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(o,i,e))return;et(s,!1)}},mt=(t,e,o)=>{var l,s;const i=t.prototype;if(e.D){const r=Object.entries(null!=(l=e.D)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.D[t][0]|=2048),r&&(e.D[t][0]|=4096),(1&o||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.D[t][0]))return((t,e)=>n(this).R.get(e))(0,t);const o=n(this),l=o?o.t:i;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=n(this);if(r){const n=32&l?this[t]:i.$hostElement$[t];return void 0===n&&i.R.get(t)?s=i.R.get(t):!i.R.get(t)&&n&&i.R.set(t,n),r.call(this,L(s,l)),void pt(this,t,s=32&l?this[t]:i.$hostElement$[t],e)}{if(!(1&o&&4096&e.D[t][0]))return pt(this,t,s,e),void(1&o&&!i.t&&i.U.then((()=>{4096&e.D[t][0]&&i.t[t]!==i.R.get(t)&&(i.t[t]=s)})));const n=()=>{const n=i.t[t];!i.R.get(t)&&n&&i.R.set(t,n),i.t[t]=L(s,l),pt(this,t,i.t[t],e)};i.t?n():i.U.then((()=>n()))}}})}})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,s){a.jmp((()=>{var r;const c=o.get(t);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=e.W)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,l,t)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.W)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,e])=>{const n=e[1]||t;return o.set(n,t),n}))]))}}return t},vt=(t,e)=>{dt(t,"connectedCallback",void 0,e)},yt=(t,e)=>{dt(t,"disconnectedCallback",void 0,e||t)},wt=(t,e={})=>{var o;if(!u.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],f=e.exclude||[],h=u.customElements,p=u.document.head,m=p.querySelector("meta[charset]"),v=u.document.createElement("style"),y=[];let w,b=!0;Object.assign(a,e),a.l=new URL(e.resourcesUrl||"./",u.document.baseURI).href;let $=!1;if(t.map((t=>{t[1].map((e=>{const o={o:e[0],S:e[1],D:e[2],A:e[3]};4&o.o&&($=!0),o.D=e[2];const c=o.S,u=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,e)=>{const n={o:0,$hostElement$:t,O:e,R:new Map};n.U=new Promise((t=>n.P=t)),t["s-p"]=[],t["s-rc"]=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,o),1&o.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${o.S}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else x.call(t,o)}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),w&&(clearTimeout(w),w=null),b?y.push(this):a.jmp((()=>(t=>{if(!(1&a.o)){const e=n(t),o=e.O,l=()=>{};if(1&e.o)(null==e?void 0:e.t)?vt(e.t,t):(null==e?void 0:e.U)&&e.U.then((()=>vt(e.t,t)));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){tt(e,e.k=n);break}}o.D&&Object.entries(o.D).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){if(e.o|=32,n.N){const l=((t,e)=>{const n=t.S.replace(/-/g,"_"),o=t.N;if(!o)return;const l=i.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[n])),(t=>{s(t,e.$hostElement$)}))
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.S}#${e.L}" was not found`);o.isProxied||(mt(o,n,2),o.isProxied=!0);const r=()=>{};e.o|=8;try{new o(e)}catch(e){s(e,t)}e.o&=-9,r(),vt(e.t,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=H(n);if(!r.has(e)){const o=()=>{};((t,e,n)=>{let o=r.get(t);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,r.set(t,o)})(e,t,!!(1&n.o)),o()}}}const l=e.k,c=()=>et(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(t,e,o)}l()}})(this)))}disconnectedCallback(){a.jmp((()=>(async t=>{if(!(1&a.o)){const e=n(t);(null==e?void 0:e.t)?yt(e.t,t):(null==e?void 0:e.U)&&e.U.then((()=>yt(e.t,t)))}T.has(t)&&T.delete(t),t.shadowRoot&&T.has(t.shadowRoot)&&T.delete(t.shadowRoot)})(this))),a.raf((()=>{var t;const e=n(this),o=y.findIndex((t=>t===this));o>-1&&y.splice(o,1),(null==(t=null==e?void 0:e.M)?void 0:t.v)instanceof Node&&!e.M.v.isConnected&&delete e.M.v}))}componentOnReady(){return n(this).U}};o.N=t[0],f.includes(c)||h.get(c)||(l.push(c),h.define(c,mt(u,o,1)))}))})),l.length>0&&($&&(v.textContent+=c),v.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",v.innerHTML.length)){v.setAttribute("data-styles","");const t=null!=(o=a.C)?o:S(u.document);null!=t&&v.setAttribute("nonce",t),p.insertBefore(v,m?m.nextSibling:p.firstChild)}b=!1,y.length?y.map((t=>t.connectedCallback())):a.jmp((()=>w=setTimeout(ft,30)))},bt=t=>a.C=t;export{ct as a,wt as b,at as f,t as g,M as h,f as p,o as r,bt as s}
|