@gataca/qr 2.0.6 → 2.0.8
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/gataca-autoqr.cjs.entry.js +1 -1
- package/dist/cjs/gataca-qr_2.cjs.entry.js +3 -3
- package/dist/cjs/gataca-qrws.cjs.entry.js +2 -2
- package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +1 -1
- package/dist/cjs/gatacaqr.cjs.js +6 -2
- package/dist/cjs/{index-4be0cdca.js → index-a49c526c.js} +88 -2
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/{logo_gataca-f3dc6840.js → logo_gataca-2d5c8a85.js} +1 -1
- package/dist/collection/assets/images/logo_gataca.svg +7 -26
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/gataca-qr/gataca-qr.js +1 -1
- package/dist/components/gataca-qr2.js +1 -1
- package/dist/components/gataca-qrdisplay2.js +1 -1
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.js +1 -1
- package/dist/esm/gataca-autoqr.entry.js +1 -1
- package/dist/esm/gataca-qr_2.entry.js +3 -3
- package/dist/esm/gataca-qrws.entry.js +2 -2
- package/dist/esm/gataca-ssibutton_2.entry.js +1 -1
- package/dist/esm/gatacaqr.js +3 -2
- package/dist/esm/{index-80311733.js → index-6929cc53.js} +88 -3
- package/dist/esm/loader.js +3 -2
- package/dist/esm/{logo_gataca-57ad0363.js → logo_gataca-273fcfb8.js} +1 -1
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/gatacaqr/gatacaqr.esm.js +1 -1
- package/dist/gatacaqr/p-0be4566d.js +1 -1
- package/dist/gatacaqr/p-1d72ef98.entry.js +1 -0
- package/dist/gatacaqr/{p-b834ef88.entry.js → p-49c7cbac.entry.js} +1 -1
- package/dist/gatacaqr/p-554598aa.js +2 -0
- package/dist/gatacaqr/p-aa580c47.entry.js +1 -0
- package/dist/gatacaqr/p-e6f1b2b6.js +1 -0
- package/dist/gatacaqr/{p-66ad21ac.entry.js → p-e715b443.entry.js} +1 -1
- package/dist/types/stencil-public-runtime.d.ts +59 -3
- package/dist/types/utils/utils.d.ts +8 -8
- package/loader/index.d.ts +9 -0
- package/package.json +6 -4
- package/dist/gatacaqr/p-5eb106c0.entry.js +0 -1
- package/dist/gatacaqr/p-6adc6933.js +0 -1
- package/dist/gatacaqr/p-96ca90e8.entry.js +0 -1
- package/dist/gatacaqr/p-a5648391.js +0 -2
|
@@ -41,6 +41,18 @@ const isComplexType = (o) => {
|
|
|
41
41
|
o = typeof o;
|
|
42
42
|
return o === 'object' || o === 'function';
|
|
43
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* Helper method for querying a `meta` tag that contains a nonce value
|
|
46
|
+
* out of a DOM's head.
|
|
47
|
+
*
|
|
48
|
+
* @param doc The DOM containing the `head` to query against
|
|
49
|
+
* @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
|
|
50
|
+
* exists or the tag has no content.
|
|
51
|
+
*/
|
|
52
|
+
function queryNonceMetaTagContent(doc) {
|
|
53
|
+
var _a, _b, _c;
|
|
54
|
+
return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
|
|
55
|
+
}
|
|
44
56
|
/**
|
|
45
57
|
* Production h() function based on Preact by
|
|
46
58
|
* Jason Miller (@developit)
|
|
@@ -49,7 +61,6 @@ const isComplexType = (o) => {
|
|
|
49
61
|
*
|
|
50
62
|
* Modified for Stencil's compiler and vdom
|
|
51
63
|
*/
|
|
52
|
-
// const stack: any[] = [];
|
|
53
64
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
|
|
54
65
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
55
66
|
const h = (nodeName, vnodeData, ...children) => {
|
|
@@ -100,6 +111,14 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
100
111
|
}
|
|
101
112
|
return vnode;
|
|
102
113
|
};
|
|
114
|
+
/**
|
|
115
|
+
* A utility function for creating a virtual DOM node from a tag and some
|
|
116
|
+
* possible text content.
|
|
117
|
+
*
|
|
118
|
+
* @param tag the tag for this element
|
|
119
|
+
* @param text possible text content for the node
|
|
120
|
+
* @returns a newly-minted virtual DOM node
|
|
121
|
+
*/
|
|
103
122
|
const newVNode = (tag, text) => {
|
|
104
123
|
const vnode = {
|
|
105
124
|
$flags$: 0,
|
|
@@ -114,6 +133,12 @@ const newVNode = (tag, text) => {
|
|
|
114
133
|
return vnode;
|
|
115
134
|
};
|
|
116
135
|
const Host = {};
|
|
136
|
+
/**
|
|
137
|
+
* Check whether a given node is a Host node or not
|
|
138
|
+
*
|
|
139
|
+
* @param node the virtual DOM node to check
|
|
140
|
+
* @returns whether it's a Host node or not
|
|
141
|
+
*/
|
|
117
142
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
118
143
|
/**
|
|
119
144
|
* Parse a new property value for a given property type.
|
|
@@ -206,6 +231,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
206
231
|
styles.set(scopeId, style);
|
|
207
232
|
};
|
|
208
233
|
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
234
|
+
var _a;
|
|
209
235
|
let scopeId = getScopeId(cmpMeta);
|
|
210
236
|
const style = styles.get(scopeId);
|
|
211
237
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
@@ -225,6 +251,11 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
225
251
|
styleElm = doc.createElement('style');
|
|
226
252
|
styleElm.innerHTML = style;
|
|
227
253
|
}
|
|
254
|
+
// Apply CSP nonce to the style tag if it exists
|
|
255
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
256
|
+
if (nonce != null) {
|
|
257
|
+
styleElm.setAttribute('nonce', nonce);
|
|
258
|
+
}
|
|
228
259
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
229
260
|
}
|
|
230
261
|
if (appliedStyles) {
|
|
@@ -454,6 +485,21 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
454
485
|
}
|
|
455
486
|
return elm;
|
|
456
487
|
};
|
|
488
|
+
/**
|
|
489
|
+
* Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
|
|
490
|
+
* add them to the DOM in the appropriate place.
|
|
491
|
+
*
|
|
492
|
+
* @param parentElm the DOM node which should be used as a parent for the new
|
|
493
|
+
* DOM nodes
|
|
494
|
+
* @param before a child of the `parentElm` which the new children should be
|
|
495
|
+
* inserted before (optional)
|
|
496
|
+
* @param parentVNode the parent virtual DOM node
|
|
497
|
+
* @param vnodes the new child virtual DOM nodes to produce DOM nodes for
|
|
498
|
+
* @param startIdx the index in the child virtual DOM nodes at which to start
|
|
499
|
+
* creating DOM nodes (inclusive)
|
|
500
|
+
* @param endIdx the index in the child virtual DOM nodes at which to stop
|
|
501
|
+
* creating DOM nodes (inclusive)
|
|
502
|
+
*/
|
|
457
503
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
458
504
|
let containerElm = (parentElm);
|
|
459
505
|
let childNode;
|
|
@@ -470,6 +516,19 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
|
470
516
|
}
|
|
471
517
|
}
|
|
472
518
|
};
|
|
519
|
+
/**
|
|
520
|
+
* Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
|
|
521
|
+
* This can be used to, for instance, clean up after a list of children which
|
|
522
|
+
* should no longer be shown.
|
|
523
|
+
*
|
|
524
|
+
* This function also handles some of Stencil's slot relocation logic.
|
|
525
|
+
*
|
|
526
|
+
* @param vnodes a list of virtual DOM nodes to remove
|
|
527
|
+
* @param startIdx the index at which to start removing nodes (inclusive)
|
|
528
|
+
* @param endIdx the index at which to stop removing nodes (inclusive)
|
|
529
|
+
* @param vnode a VNode
|
|
530
|
+
* @param elm an element
|
|
531
|
+
*/
|
|
473
532
|
const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
474
533
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
475
534
|
if ((vnode = vnodes[startIdx])) {
|
|
@@ -662,7 +721,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
662
721
|
*
|
|
663
722
|
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
664
723
|
* changing order within a `children` array or something along those lines then
|
|
665
|
-
* we could obtain a false
|
|
724
|
+
* we could obtain a false negative and then have to do needless re-rendering
|
|
725
|
+
* (i.e. we'd say two VNodes aren't equal when in fact they should be).
|
|
666
726
|
*
|
|
667
727
|
* @param leftVNode the first VNode to check
|
|
668
728
|
* @param rightVNode the second VNode to check
|
|
@@ -729,6 +789,18 @@ const callNodeRefs = (vNode) => {
|
|
|
729
789
|
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
730
790
|
}
|
|
731
791
|
};
|
|
792
|
+
/**
|
|
793
|
+
* The main entry point for Stencil's virtual DOM-based rendering engine
|
|
794
|
+
*
|
|
795
|
+
* Given a {@link d.HostRef} container and some virtual DOM nodes, this
|
|
796
|
+
* function will handle creating a virtual DOM tree with a single root, patching
|
|
797
|
+
* the current virtual DOM tree onto an old one (if any), dealing with slot
|
|
798
|
+
* relocation, and reflecting attributes.
|
|
799
|
+
*
|
|
800
|
+
* @param hostRef data needed to root and render the virtual DOM tree, such as
|
|
801
|
+
* the DOM node into which it should be rendered.
|
|
802
|
+
* @param renderFnResults the virtual DOM nodes to be rendered
|
|
803
|
+
*/
|
|
732
804
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
733
805
|
const hostElm = hostRef.$hostElement$;
|
|
734
806
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -1176,6 +1248,7 @@ const disconnectedCallback = (elm) => {
|
|
|
1176
1248
|
}
|
|
1177
1249
|
};
|
|
1178
1250
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1251
|
+
var _a;
|
|
1179
1252
|
const endBootstrap = createTime();
|
|
1180
1253
|
const cmpTags = [];
|
|
1181
1254
|
const exclude = options.exclude || [];
|
|
@@ -1252,6 +1325,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1252
1325
|
{
|
|
1253
1326
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
1254
1327
|
visibilityStyle.setAttribute('data-styles', '');
|
|
1328
|
+
// Apply CSP nonce to the style tag if it exists
|
|
1329
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
1330
|
+
if (nonce != null) {
|
|
1331
|
+
visibilityStyle.setAttribute('nonce', nonce);
|
|
1332
|
+
}
|
|
1255
1333
|
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1256
1334
|
}
|
|
1257
1335
|
// Process deferred connectedCallbacks now all components have been registered
|
|
@@ -1296,6 +1374,13 @@ const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1296
1374
|
};
|
|
1297
1375
|
// prettier-ignore
|
|
1298
1376
|
const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
|
|
1377
|
+
/**
|
|
1378
|
+
* Assigns the given value to the nonce property on the runtime platform object.
|
|
1379
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
|
|
1380
|
+
* @param nonce The value to be assigned to the platform nonce property.
|
|
1381
|
+
* @returns void
|
|
1382
|
+
*/
|
|
1383
|
+
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
1299
1384
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1300
1385
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1301
1386
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
@@ -1406,4 +1491,4 @@ const flush = () => {
|
|
|
1406
1491
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1407
1492
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1408
1493
|
|
|
1409
|
-
export { bootstrapLazy as b, createEvent as c, h, promiseResolve as p, registerInstance as r };
|
|
1494
|
+
export { bootstrapLazy as b, createEvent as c, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-6929cc53.js';
|
|
2
|
+
export { s as setNonce } from './index-6929cc53.js';
|
|
2
3
|
|
|
3
4
|
/*
|
|
4
|
-
Stencil Client Patch Esm v2.
|
|
5
|
+
Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
|
|
5
6
|
*/
|
|
6
7
|
const patchEsm = () => {
|
|
7
8
|
return promiseResolve();
|
|
@@ -4,6 +4,6 @@ const gatIconCheckSvg = 'data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjUyIiBoZWlna
|
|
|
4
4
|
|
|
5
5
|
const gatIconRefreshSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIzIDRWMTBIMTciIHN0cm9rZT0iIzhCOEI4QiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTIwLjQ4OTkgMTVDMTkuODM5OSAxNi44Mzk5IDE4LjYwOTQgMTguNDE4NyAxNi45ODQgMTkuNDk4NUMxNS4zNTg2IDIwLjU3ODMgMTMuNDI2MyAyMS4xMDA2IDExLjQ3ODMgMjAuOTg2NkM5LjUzMDI2IDIwLjg3MjYgNy42NzIwMyAyMC4xMjg2IDYuMTgzNjMgMTguODY2N0M0LjY5NTI0IDE3LjYwNDcgMy42NTczIDE1Ljg5MzIgMy4yMjYyNSAxMy45OTAxQzIuNzk1MTkgMTIuMDg2OSAyLjk5NDM2IDEwLjA5NTIgMy43OTM3NCA4LjMxNTA4QzQuNTkzMTMgNi41MzQ5NiA1Ljk0OTQyIDUuMDYyODggNy42NTgyMyA0LjEyMDY1QzkuMzY3MDUgMy4xNzg0MyAxMS4zMzU4IDIuODE3MTEgMTMuMjY3OCAzLjA5MTE2QzE1LjE5OTkgMy4zNjUyIDE2Ljk5MDUgNC4yNTk3NSAxOC4zNjk5IDUuNjQwMDFMMjIuOTk5OSAxMCIgc3Ryb2tlPSIjOEI4QjhCIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K';
|
|
6
6
|
|
|
7
|
-
const logoGatacaSvg = 'data:image/svg+xml;base64,
|
|
7
|
+
const logoGatacaSvg = 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDc2IDcxIiB3aWR0aD0iNzEiIGhlaWdodD0iNjYiPgoJPHRpdGxlPlZlY3RvciAoMyktc3ZnPC90aXRsZT4KCTxzdHlsZT4KCQkuczAgeyBmaWxsOiAjNDc0NWI3IH0gCgk8L3N0eWxlPgoJPHBhdGggaWQ9IkxheWVyIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsYXNzPSJzMCIgZD0ibTcyLjIgMzguNGMyLjIgMy4zIDMuNSA3LjIgMy41IDExLjQgMCAxMS4yLTguOCAyMC4yLTE5LjkgMjAuN3EtMC40IDAtMC44IDBjLTMgMC01LjgtMC42LTguNC0xLjdxLTIuMS0xLTMuOC0yLjMtMS4xLTAuOC0yLjEtMS43LTEuMy0xLjItMi4zLTIuNi0wLjUgMC42LTEgMS4yYy0zLjggNC40LTkuNCA3LjEtMTUuNyA3LjEtNi43IDAtMTIuNi0zLjItMTYuNC04LjEtMi43LTMuNS00LjMtNy44LTQuMy0xMi42IDAtMTAuNiA4LTE5LjMgMTguMy0yMC41LTEuMS0yLjUtMS43LTUuMi0xLjctOC4xIDAtMTEuNSA5LjMtMjAuNyAyMC44LTIwLjcgMTAuMiAwIDE4LjcgNy40IDIwLjQgMTcuMnEwLjMgMS43IDAuMyAzLjVjMCAyLjktMC42IDUuNi0xLjcgOC4xIDYuMiAwLjcgMTEuNiA0LjIgMTQuOCA5LjF6bS00NC43LTIzLjVjLTMuNCA2LTEuNCAxMy41IDQuNSAxN3EwLjEgMCAwLjIgMC4xYzIuNCAxLjMgNS4xIDEuOCA3LjcgMS41IDEuNS0wLjIgMy4xLTAuNyA0LjUtMS40cTAuMi0wLjIgMC40LTAuM2MxLjgtMSAzLjMtMi41IDQuNC00LjRxMC43LTEuMyAxLjEtMi42YzEuNy01LjQtMC42LTExLjUtNS43LTE0LjQtNi0zLjQtMTMuNi0xLjQtMTcuMSA0LjV6bTM4LjUgNDAuOGMyLTMuOSAxLjktOC40LTAuMi0xMi0xLTEuOC0yLjYtMy41LTQuNi00LjYtMy45LTIuMy04LjUtMi4yLTEyLjMtMC4ycS0wLjIgMC4yLTAuNCAwLjMtMC45IDAuNS0xLjcgMS4ybDEzLjYgNy44djAuMWwtNi43IDUuNi0xMS02LjQtMC40LTAuMi03LTQtNC4yLTIuNS0yLjYtMS40cS0wLjItMC4yLTAuNC0wLjMtMC4xIDAtMC4yLTAuMWMtNS45LTMuNC0xMy41LTEuMy0xNyA0LjYtMi41IDQuNC0yLjEgOS43IDAuNyAxMy41IDEgMS40IDIuMyAyLjYgMy45IDMuNSA0LjggMi43IDEwLjYgMiAxNC41LTEuNGwtMTIuNC03LjEgNi44LTUuNiA5LjYgNS41IDAuNCAwLjIgNyA0LjEgNS42IDMuMiAxLjggMWMzLjMgMS45IDcuMyAyLjMgMTAuOSAwLjkgMi42LTEuMSA0LjgtMyA2LjMtNS43eiIvPgo8L3N2Zz4=';
|
|
8
8
|
|
|
9
9
|
export { gatIconRefreshSvg as a, gatIconAlertSvg as b, gatIconCheckSvg as g, logoGatacaSvg as l };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
|
|
1
|
+
var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},__assign.apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as a}from"./p-
|
|
1
|
+
import{p as e,b as a}from"./p-554598aa.js";export{s as setNonce}from"./p-554598aa.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-aa580c47",[[1,"gataca-qr",{checkStatus:[16],createSession:[16],successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],autostart:[4],autorefresh:[4],v2:[4,"v-2"],qrModalTitle:[1,"qr-modal-title"],modalTitleColor:[1,"modal-title-color"],qrModalDescription:[1,"qr-modal-description"],hideModalTexts:[4,"hide-modal-texts"],hideModalBoxShadow:[4,"hide-modal-box-shadow"],hideBrandTitle:[4,"hide-brand-title"],logoSize:[2,"logo-size"],logoSrc:[1,"logo-src"],qrSize:[2,"qr-size"],modalWidth:[2,"modal-width"],modalHeight:[2,"modal-height"],qrCodeExpiredLabel:[1,"qr-code-expired-label"],credentialsNotValidatedLabel:[1,"credentials-not-validated-label"],clickInsideBoxLabel:[1,"click-inside-box-label"],refreshQrLabel:[1,"refresh-qr-label"],scanQrLabel:[1,"scan-qr-label"],userNotScanInTimeErrorLabel:[1,"user-not-scan-in-time-error-label"],credsNotValidatedErrorLabel:[1,"creds-not-validated-error-label"],failedLoginErrorLabel:[1,"failed-login-error-label"],successLoginLabel:[1,"success-login-label"],byBrandLabel:[1,"by-brand-label"],waitingStartSessionLabel:[1,"waiting-start-session-label"],hideQrModalDescription:[4,"hide-qr-modal-description"],sessionTimeout:[2,"session-timeout"],pollingFrequency:[2,"polling-frequency"],dynamicLink:[4,"dynamic-link"],sessionId:[32],authenticationRequest:[32],sessionData:[32],result:[32],display:[64],stop:[64],getSessionData:[64]}],[0,"gataca-qrdisplay",{qrData:[1,"qr-data"],size:[2],logoSize:[2,"logo-size"],logoSrc:[1,"logo-src"],qrColor:[1,"qr-color"],rounded:[4]}]]],["p-1d72ef98",[[1,"gataca-qrws",{successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],socketEndpoint:[1,"socket-endpoint"],sessionTimeout:[2,"session-timeout"],wsOnOpen:[16],wsOnMessage:[16],autostart:[4],autorefresh:[4],v2:[4,"v-2"],qrModalTitle:[1,"qr-modal-title"],qrModalDescription:[1,"qr-modal-description"],hideBrandTitle:[4,"hide-brand-title"],dynamicLink:[4,"dynamic-link"],sessionId:[32],authenticationRequest:[32],sessionData:[32],result:[32],display:[64],stop:[64],getSessionData:[64]},[[2,"sessionMsg","sessionMsgReceived"]]]]],["p-e715b443",[[1,"gataca-ssibutton",{buttonText:[1,"button-text"],checkStatus:[16],createSession:[16],successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],sessionTimeout:[2,"session-timeout"],pollingFrequency:[2,"polling-frequency"],autorefresh:[4],v2:[4,"v-2"],qrModalTitle:[1,"qr-modal-title"],modalTitleColor:[1,"modal-title-color"],qrModalDescription:[1,"qr-modal-description"],hideBrandTitle:[4,"hide-brand-title"],dynamicLink:[4,"dynamic-link"],logoSize:[2,"logo-size"],logoSrc:[1,"logo-src"],qrCodeExpiredLabel:[1,"qr-code-expired-label"],credentialsNotValidatedLabel:[1,"credentials-not-validated-label"],clickInsideBoxLabel:[1,"click-inside-box-label"],refreshQrLabel:[1,"refresh-qr-label"],scanQrLabel:[1,"scan-qr-label"],userNotScanInTimeErrorLabel:[1,"user-not-scan-in-time-error-label"],credsNotValidatedErrorLabel:[1,"creds-not-validated-error-label"],failedLoginErrorLabel:[1,"failed-login-error-label"],successLoginLabel:[1,"success-login-label"],byBrandLabel:[1,"by-brand-label"],waitingStartSessionLabel:[1,"waiting-start-session-label"],hideQrModalDescription:[4,"hide-qr-modal-description"],open:[32],getSessionData:[64]}],[1,"gataca-ssibuttonws",{buttonText:[1,"button-text"],successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],socketEndpoint:[1,"socket-endpoint"],sessionTimeout:[2,"session-timeout"],wsOnOpen:[16],wsOnMessage:[16],autostart:[4],autorefresh:[4],v2:[4,"v-2"],qrModalTitle:[1,"qr-modal-title"],qrModalDescription:[1,"qr-modal-description"],hideBrandTitle:[4,"hide-brand-title"],dynamicLink:[4,"dynamic-link"],open:[32],getSessionData:[64]}]]],["p-49c7cbac",[[1,"gataca-autoqr",{configId:[1,"config-id"],configRepository:[1,"config-repository"],successCallback:[16],errorCallback:[16],checkStatus:[16],createSession:[16],wsOnOpen:[16],wsOnMessage:[16],config:[32],loading:[32],getSessionData:[64]}]]]],e)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r;const n=t((function(t){self,t.exports=(()=>{var t={192:(t,r)=>{var n,i,o=function(){var t=function(t,r){var n=t,i=a[r],o=null,e=0,f=null,g=[],p={},m=function(t,r){o=function(t){for(var r=new Array(t),n=0;n<t;n+=1){r[n]=new Array(t);for(var i=0;i<t;i+=1)r[n][i]=null}return r}(e=4*n+17),M(0,0),M(e-7,0),M(0,e-7),x(),b(),k(t,r),n>=7&&S(t),null==f&&(f=A(n,i,g)),z(f,r)},M=function(t,r){for(var n=-1;n<=7;n+=1)if(!(t+n<=-1||e<=t+n))for(var i=-1;i<=7;i+=1)r+i<=-1||e<=r+i||(o[t+n][r+i]=0<=n&&n<=6&&(0==i||6==i)||0<=i&&i<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=i&&i<=4)},b=function(){for(var t=8;t<e-8;t+=1)null==o[t][6]&&(o[t][6]=t%2==0);for(var r=8;r<e-8;r+=1)null==o[6][r]&&(o[6][r]=r%2==0)},x=function(){for(var t=u.getPatternPosition(n),r=0;r<t.length;r+=1)for(var i=0;i<t.length;i+=1){var e=t[r],a=t[i];if(null==o[e][a])for(var f=-2;f<=2;f+=1)for(var c=-2;c<=2;c+=1)o[e+f][a+c]=-2==f||2==f||-2==c||2==c||0==f&&0==c}},S=function(t){for(var r=u.getBCHTypeNumber(n),i=0;i<18;i+=1){var a=!t&&1==(r>>i&1);o[Math.floor(i/3)][i%3+e-8-3]=a}for(i=0;i<18;i+=1)a=!t&&1==(r>>i&1),o[i%3+e-8-3][Math.floor(i/3)]=a},k=function(t,r){for(var n=u.getBCHTypeInfo(i<<3|r),a=0;a<15;a+=1){var f=!t&&1==(n>>a&1);a<6?o[a][8]=f:a<8?o[a+1][8]=f:o[e-15+a][8]=f}for(a=0;a<15;a+=1)f=!t&&1==(n>>a&1),a<8?o[8][e-a-1]=f:a<9?o[8][15-a-1+1]=f:o[8][15-a-1]=f;o[e-8][8]=!t},z=function(t,r){for(var n=-1,i=e-1,a=7,f=0,c=u.getMaskFunction(r),s=e-1;s>0;s-=2)for(6==s&&(s-=1);;){for(var h=0;h<2;h+=1)if(null==o[i][s-h]){var v=!1;f<t.length&&(v=1==(t[f]>>>a&1)),c(i,s-h)&&(v=!v),o[i][s-h]=v,-1==(a-=1)&&(f+=1,a=7)}if((i+=n)<0||e<=i){i-=n,n=-n;break}}},A=function(t,r,n){for(var i=s.getRSBlocks(t,r),o=h(),e=0;e<n.length;e+=1){var a=n[e];o.put(a.getMode(),4),o.put(a.getLength(),u.getLengthInBits(a.getMode(),t)),a.write(o)}var f=0;for(e=0;e<i.length;e+=1)f+=i[e].dataCount;if(o.getLengthInBits()>8*f)throw"code length overflow. ("+o.getLengthInBits()+">"+8*f+")";for(o.getLengthInBits()+4<=8*f&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*f||(o.put(236,8),o.getLengthInBits()>=8*f));)o.put(17,8);return function(t,r){for(var n=0,i=0,o=0,e=new Array(r.length),a=new Array(r.length),f=0;f<r.length;f+=1){var s=r[f].dataCount,h=r[f].totalCount-s;i=Math.max(i,s),o=Math.max(o,h),e[f]=new Array(s);for(var v=0;v<e[f].length;v+=1)e[f][v]=255&t.getBuffer()[v+n];n+=s;var d=u.getErrorCorrectPolynomial(h),l=c(e[f],d.getLength()-1).mod(d);for(a[f]=new Array(d.getLength()-1),v=0;v<a[f].length;v+=1){var w=v+l.getLength()-a[f].length;a[f][v]=w>=0?l.getAt(w):0}}var g=0;for(v=0;v<r.length;v+=1)g+=r[v].totalCount;var p=new Array(g),y=0;for(v=0;v<i;v+=1)for(f=0;f<r.length;f+=1)v<e[f].length&&(p[y]=e[f][v],y+=1);for(v=0;v<o;v+=1)for(f=0;f<r.length;f+=1)v<a[f].length&&(p[y]=a[f][v],y+=1);return p}(o,i)};p.addData=function(t,r){var n=null;switch(r=r||"Byte"){case"Numeric":n=v(t);break;case"Alphanumeric":n=d(t);break;case"Byte":n=l(t);break;case"Kanji":n=w(t);break;default:throw"mode:"+r}g.push(n),f=null},p.isDark=function(t,r){if(t<0||e<=t||r<0||e<=r)throw t+","+r;return o[t][r]},p.getModuleCount=function(){return e},p.make=function(){if(n<1){for(var t=1;t<40;t++){for(var r=s.getRSBlocks(t,i),o=h(),e=0;e<g.length;e++){var a=g[e];o.put(a.getMode(),4),o.put(a.getLength(),u.getLengthInBits(a.getMode(),t)),a.write(o)}var f=0;for(e=0;e<r.length;e++)f+=r[e].dataCount;if(o.getLengthInBits()<=8*f)break}n=t}m(!1,function(){for(var t=0,r=0,n=0;n<8;n+=1){m(!0,n);var i=u.getLostPoint(p);(0==n||t>i)&&(t=i,r=n)}return r}())},p.createTableTag=function(t,r){t=t||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(r=void 0===r?4*t:r)+"px;",n+='">',n+="<tbody>";for(var i=0;i<p.getModuleCount();i+=1){n+="<tr>";for(var o=0;o<p.getModuleCount();o+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+t+"px;",n+=" height: "+t+"px;",n+=" background-color: ",n+=p.isDark(i,o)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return(n+="</tbody>")+"</table>"},p.createSvgTag=function(t,r,n,i){var o={};"object"==typeof arguments[0]&&(t=(o=arguments[0]).cellSize,r=o.margin,n=o.alt,i=o.title),t=t||2,r=void 0===r?4*t:r,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-description":null,(i="string"==typeof i?{text:i}:i||{}).text=i.text||null,i.id=i.text?i.id||"qrcode-title":null;var e,a,u,f,c=p.getModuleCount()*t+2*r,s="";for(f="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",s+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',s+=o.scalable?"":' width="'+c+'px" height="'+c+'px"',s+=' viewBox="0 0 '+c+" "+c+'" ',s+=' preserveAspectRatio="xMinYMin meet"',s+=i.text||n.text?' role="img" aria-labelledby="'+O([i.id,n.id].join(" ").trim())+'"':"",s+=">",s+=i.text?'<title id="'+O(i.id)+'">'+O(i.text)+"</title>":"",s+=n.text?'<description id="'+O(n.id)+'">'+O(n.text)+"</description>":"",s+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',s+='<path d="',a=0;a<p.getModuleCount();a+=1)for(u=a*t+r,e=0;e<p.getModuleCount();e+=1)p.isDark(a,e)&&(s+="M"+(e*t+r)+","+u+f);return(s+='" stroke="transparent" fill="black"/>')+"</svg>"},p.createDataURL=function(t,r){t=t||2,r=void 0===r?4*t:r;var n=p.getModuleCount()*t+2*r,i=r,o=n-r;return y(n,n,(function(r,n){if(i<=r&&r<o&&i<=n&&n<o){var e=Math.floor((r-i)/t),a=Math.floor((n-i)/t);return p.isDark(a,e)?0:1}return 1}))},p.createImgTag=function(t,r,n){t=t||2,r=void 0===r?4*t:r;var i=p.getModuleCount()*t+2*r,o="";return o+="<img",o+=' src="',o+=p.createDataURL(t,r),o+='"',o+=' width="',o+=i,o+='"',o+=' height="',o+=i,o+='"',n&&(o+=' alt="',o+=O(n),o+='"'),o+"/>"};var O=function(t){for(var r="",n=0;n<t.length;n+=1){var i=t.charAt(n);switch(i){case"<":r+="<";break;case">":r+=">";break;case"&":r+="&";break;case'"':r+=""";break;default:r+=i}}return r};return p.createASCII=function(t,r){if((t=t||1)<2)return function(t){t=void 0===t?2:t;var r,n,i,o,e,a=1*p.getModuleCount()+2*t,u=t,f=a-t,c={"██":"█","█ ":"▀"," █":"▄"," ":" "},s={"██":"▀","█ ":"▀"," █":" "," ":" "},h="";for(r=0;r<a;r+=2){for(i=Math.floor((r-u)/1),o=Math.floor((r+1-u)/1),n=0;n<a;n+=1)e="█",u<=n&&n<f&&u<=r&&r<f&&p.isDark(i,Math.floor((n-u)/1))&&(e=" "),u<=n&&n<f&&u<=r+1&&r+1<f&&p.isDark(o,Math.floor((n-u)/1))?e+=" ":e+="█",h+=t<1&&r+1>=f?s[e]:c[e];h+="\n"}return a%2&&t>0?h.substring(0,h.length-a-1)+Array(a+1).join("▀"):h.substring(0,h.length-1)}(r);t-=1,r=void 0===r?2*t:r;var n,i,o,e,a=p.getModuleCount()*t+2*r,u=r,f=a-r,c=Array(t+1).join("██"),s=Array(t+1).join(" "),h="",v="";for(n=0;n<a;n+=1){for(o=Math.floor((n-u)/t),v="",i=0;i<a;i+=1)e=1,u<=i&&i<f&&u<=n&&n<f&&p.isDark(o,Math.floor((i-u)/t))&&(e=0),v+=e?c:s;for(o=0;o<t;o+=1)h+=v+"\n"}return h.substring(0,h.length-1)},p.renderTo2dContext=function(t,r){r=r||2;for(var n=p.getModuleCount(),i=0;i<n;i++)for(var o=0;o<n;o++)t.fillStyle=p.isDark(i,o)?"black":"white",t.fillRect(i*r,o*r,r,r)},p};t.stringToBytes=(t.stringToBytesFuncs={default:function(t){for(var r=[],n=0;n<t.length;n+=1){var i=t.charCodeAt(n);r.push(255&i)}return r}}).default,t.createStringToBytes=function(t,r){var n=function(){for(var n=p(t),i=function(){var t=n.read();if(-1==t)throw"eof";return t},o=0,e={};;){var a=n.read();if(-1==a)break;var u=i(),f=i()<<8|i();e[String.fromCharCode(a<<8|u)]=f,o+=1}if(o!=r)throw o+" != "+r;return e}(),i="?".charCodeAt(0);return function(t){for(var r=[],o=0;o<t.length;o+=1){var e=t.charCodeAt(o);if(e<128)r.push(e);else{var a=n[t.charAt(o)];"number"==typeof a?(255&a)==a?r.push(a):(r.push(a>>>8),r.push(255&a)):r.push(i)}}return r}};var r,n,i,o,e,a={L:1,M:0,Q:3,H:2},u=(r=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,i=7973,e=function(t){for(var r=0;0!=t;)r+=1,t>>>=1;return r},(o={}).getBCHTypeInfo=function(t){for(var r=t<<10;e(r)-e(n)>=0;)r^=n<<e(r)-e(n);return 21522^(t<<10|r)},o.getBCHTypeNumber=function(t){for(var r=t<<12;e(r)-e(i)>=0;)r^=i<<e(r)-e(i);return t<<12|r},o.getPatternPosition=function(t){return r[t-1]},o.getMaskFunction=function(t){switch(t){case 0:return function(t,r){return(t+r)%2==0};case 1:return function(t){return t%2==0};case 2:return function(t,r){return r%3==0};case 3:return function(t,r){return(t+r)%3==0};case 4:return function(t,r){return(Math.floor(t/2)+Math.floor(r/3))%2==0};case 5:return function(t,r){return t*r%2+t*r%3==0};case 6:return function(t,r){return(t*r%2+t*r%3)%2==0};case 7:return function(t,r){return(t*r%3+(t+r)%2)%2==0};default:throw"bad maskPattern:"+t}},o.getErrorCorrectPolynomial=function(t){for(var r=c([1],0),n=0;n<t;n+=1)r=r.multiply(c([1,f.gexp(n)],0));return r},o.getLengthInBits=function(t,r){if(1<=r&&r<10)switch(t){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+t}else if(r<27)switch(t){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+t}else{if(!(r<41))throw"type:"+r;switch(t){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+t}}},o.getLostPoint=function(t){for(var r=t.getModuleCount(),n=0,i=0;i<r;i+=1)for(var o=0;o<r;o+=1){for(var e=0,a=t.isDark(i,o),u=-1;u<=1;u+=1)if(!(i+u<0||r<=i+u))for(var f=-1;f<=1;f+=1)o+f<0||r<=o+f||0==u&&0==f||a==t.isDark(i+u,o+f)&&(e+=1);e>5&&(n+=3+e-5)}for(i=0;i<r-1;i+=1)for(o=0;o<r-1;o+=1){var c=0;t.isDark(i,o)&&(c+=1),t.isDark(i+1,o)&&(c+=1),t.isDark(i,o+1)&&(c+=1),t.isDark(i+1,o+1)&&(c+=1),0!=c&&4!=c||(n+=3)}for(i=0;i<r;i+=1)for(o=0;o<r-6;o+=1)t.isDark(i,o)&&!t.isDark(i,o+1)&&t.isDark(i,o+2)&&t.isDark(i,o+3)&&t.isDark(i,o+4)&&!t.isDark(i,o+5)&&t.isDark(i,o+6)&&(n+=40);for(o=0;o<r;o+=1)for(i=0;i<r-6;i+=1)t.isDark(i,o)&&!t.isDark(i+1,o)&&t.isDark(i+2,o)&&t.isDark(i+3,o)&&t.isDark(i+4,o)&&!t.isDark(i+5,o)&&t.isDark(i+6,o)&&(n+=40);var s=0;for(o=0;o<r;o+=1)for(i=0;i<r;i+=1)t.isDark(i,o)&&(s+=1);return n+Math.abs(100*s/r/r-50)/5*10},o),f=function(){for(var t=new Array(256),r=new Array(256),n=0;n<8;n+=1)t[n]=1<<n;for(n=8;n<256;n+=1)t[n]=t[n-4]^t[n-5]^t[n-6]^t[n-8];for(n=0;n<255;n+=1)r[t[n]]=n;return{glog:function(t){if(t<1)throw"glog("+t+")";return r[t]},gexp:function(r){for(;r<0;)r+=255;for(;r>=256;)r-=255;return t[r]}}}();function c(t,r){if(void 0===t.length)throw t.length+"/"+r;var n=function(){for(var n=0;n<t.length&&0==t[n];)n+=1;for(var i=new Array(t.length-n+r),o=0;o<t.length-n;o+=1)i[o]=t[o+n];return i}(),i={getAt:function(t){return n[t]},getLength:function(){return n.length},multiply:function(t){for(var r=new Array(i.getLength()+t.getLength()-1),n=0;n<i.getLength();n+=1)for(var o=0;o<t.getLength();o+=1)r[n+o]^=f.gexp(f.glog(i.getAt(n))+f.glog(t.getAt(o)));return c(r,0)},mod:function(t){if(i.getLength()-t.getLength()<0)return i;for(var r=f.glog(i.getAt(0))-f.glog(t.getAt(0)),n=new Array(i.getLength()),o=0;o<i.getLength();o+=1)n[o]=i.getAt(o);for(o=0;o<t.getLength();o+=1)n[o]^=f.gexp(f.glog(t.getAt(o))+r);return c(n,0).mod(t)}};return i}var s=function(){var t=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],r=function(t,r){var n={};return n.totalCount=t,n.dataCount=r,n};return{getRSBlocks:function(n,i){var o=function(r,n){switch(n){case a.L:return t[4*(r-1)+0];case a.M:return t[4*(r-1)+1];case a.Q:return t[4*(r-1)+2];case a.H:return t[4*(r-1)+3];default:return}}(n,i);if(void 0===o)throw"bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+i;for(var e=o.length/3,u=[],f=0;f<e;f+=1)for(var c=o[3*f+0],s=o[3*f+1],h=o[3*f+2],v=0;v<c;v+=1)u.push(r(s,h));return u}}}(),h=function(){var t=[],r=0,n={getBuffer:function(){return t},getAt:function(r){var n=Math.floor(r/8);return 1==(t[n]>>>7-r%8&1)},put:function(t,r){for(var i=0;i<r;i+=1)n.putBit(1==(t>>>r-i-1&1))},getLengthInBits:function(){return r},putBit:function(n){var i=Math.floor(r/8);t.length<=i&&t.push(0),n&&(t[i]|=128>>>r%8),r+=1}};return n},v=function(t){var r=t,n={getMode:function(){return 1},getLength:function(){return r.length},write:function(t){for(var n=r,o=0;o+2<n.length;)t.put(i(n.substring(o,o+3)),10),o+=3;o<n.length&&(n.length-o==1?t.put(i(n.substring(o,o+1)),4):n.length-o==2&&t.put(i(n.substring(o,o+2)),7))}},i=function(t){for(var r=0,n=0;n<t.length;n+=1)r=10*r+o(t.charAt(n));return r},o=function(t){if("0"<=t&&t<="9")return t.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+t};return n},d=function(t){var r=t,n={getMode:function(){return 2},getLength:function(){return r.length},write:function(t){for(var n=r,o=0;o+1<n.length;)t.put(45*i(n.charAt(o))+i(n.charAt(o+1)),11),o+=2;o<n.length&&t.put(i(n.charAt(o)),6)}},i=function(t){if("0"<=t&&t<="9")return t.charCodeAt(0)-"0".charCodeAt(0);if("A"<=t&&t<="Z")return t.charCodeAt(0)-"A".charCodeAt(0)+10;switch(t){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+t}};return n},l=function(r){var n=t.stringToBytes(r);return{getMode:function(){return 4},getLength:function(){return n.length},write:function(t){for(var r=0;r<n.length;r+=1)t.put(n[r],8)}}},w=function(r){var n=t.stringToBytesFuncs.SJIS;if(!n)throw"sjis not supported.";!function(){var t=n("友");if(2!=t.length||38726!=(t[0]<<8|t[1]))throw"sjis not supported."}();var i=n(r);return{getMode:function(){return 8},getLength:function(){return~~(i.length/2)},write:function(t){for(var r=i,n=0;n+1<r.length;){var o=(255&r[n])<<8|255&r[n+1];if(33088<=o&&o<=40956)o-=33088;else{if(!(57408<=o&&o<=60351))throw"illegal char at "+(n+1)+"/"+o;o-=49472}t.put(o=192*(o>>>8&255)+(255&o),13),n+=2}if(n<r.length)throw"illegal char at "+(n+1)}}},g=function(){var t=[],r={writeByte:function(r){t.push(255&r)},writeShort:function(t){r.writeByte(t),r.writeByte(t>>>8)},writeBytes:function(t,n,i){n=n||0,i=i||t.length;for(var o=0;o<i;o+=1)r.writeByte(t[o+n])},writeString:function(t){for(var n=0;n<t.length;n+=1)r.writeByte(t.charCodeAt(n))},toByteArray:function(){return t},toString:function(){var r="";r+="[";for(var n=0;n<t.length;n+=1)n>0&&(r+=","),r+=t[n];return r+"]"}};return r},p=function(t){var r=t,n=0,i=0,o=0,e={read:function(){for(;o<8;){if(n>=r.length){if(0==o)return-1;throw"unexpected end of file./"+o}var t=r.charAt(n);if(n+=1,"="==t)return o=0,-1;t.match(/^\s$/)||(i=i<<6|a(t.charCodeAt(0)),o+=6)}var e=i>>>o-8&255;return o-=8,e}},a=function(t){if(65<=t&&t<=90)return t-65;if(97<=t&&t<=122)return t-97+26;if(48<=t&&t<=57)return t-48+52;if(43==t)return 62;if(47==t)return 63;throw"c:"+t};return e},y=function(t,r,n){for(var i=function(t,r){var n=t,i=r,o=new Array(t*r),e={setPixel:function(t,r,i){o[r*n+t]=i},write:function(t){t.writeString("GIF87a"),t.writeShort(n),t.writeShort(i),t.writeByte(128),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(255),t.writeByte(255),t.writeByte(255),t.writeString(","),t.writeShort(0),t.writeShort(0),t.writeShort(n),t.writeShort(i),t.writeByte(0);var r=a(2);t.writeByte(2);for(var o=0;r.length-o>255;)t.writeByte(255),t.writeBytes(r,o,255),o+=255;t.writeByte(r.length-o),t.writeBytes(r,o,r.length-o),t.writeByte(0),t.writeString(";")}},a=function(t){for(var r=1<<t,n=1+(1<<t),i=t+1,e=u(),a=0;a<r;a+=1)e.add(String.fromCharCode(a));e.add(String.fromCharCode(r)),e.add(String.fromCharCode(n));var f,c,s,h=g(),v=(f=h,c=0,s=0,{write:function(t,r){if(t>>>r!=0)throw"length over";for(;c+r>=8;)f.writeByte(255&(t<<c|s)),r-=8-c,t>>>=8-c,s=0,c=0;s|=t<<c,c+=r},flush:function(){c>0&&f.writeByte(s)}});v.write(r,i);var d=0,l=String.fromCharCode(o[d]);for(d+=1;d<o.length;){var w=String.fromCharCode(o[d]);d+=1,e.contains(l+w)?l+=w:(v.write(e.indexOf(l),i),e.size()<4095&&(e.size()==1<<i&&(i+=1),e.add(l+w)),l=w)}return v.write(e.indexOf(l),i),v.write(n,i),v.flush(),h.toByteArray()},u=function(){var t={},r=0,n={add:function(i){if(n.contains(i))throw"dup key:"+i;t[i]=r,r+=1},size:function(){return r},indexOf:function(r){return t[r]},contains:function(r){return void 0!==t[r]}};return n};return e}(t,r),o=0;o<r;o+=1)for(var e=0;e<t;e+=1)i.setPixel(e,o,n(e,o));var a=g();i.write(a);for(var u=function(){var t=0,r=0,n=0,i="",o={},e=function(t){i+=String.fromCharCode(a(63&t))},a=function(t){if(t<0);else{if(t<26)return 65+t;if(t<52)return t-26+97;if(t<62)return t-52+48;if(62==t)return 43;if(63==t)return 47}throw"n:"+t};return o.writeByte=function(i){for(t=t<<8|255&i,r+=8,n+=1;r>=6;)e(t>>>r-6),r-=6},o.flush=function(){if(r>0&&(e(t<<6-r),t=0,r=0),n%3!=0)for(var o=3-n%3,a=0;a<o;a+=1)i+="="},o.toString=function(){return i},o}(),f=a.toByteArray(),c=0;c<f.length;c+=1)u.writeByte(f[c]);return u.flush(),"data:image/gif;base64,"+u};return t}();o.stringToBytesFuncs["UTF-8"]=function(t){return function(t){for(var r=[],n=0;n<t.length;n++){var i=t.charCodeAt(n);i<128?r.push(i):i<2048?r.push(192|i>>6,128|63&i):i<55296||i>=57344?r.push(224|i>>12,128|i>>6&63,128|63&i):(n++,i=65536+((1023&i)<<10|1023&t.charCodeAt(n)),r.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|63&i))}return r}(t)},void 0===(i="function"==typeof(n=function(){return o})?n.apply(r,[]):n)||(t.exports=i)},676:(t,r,n)=>{n.d(r,{default:()=>P});var i=function(){return(i=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},o=function(){for(var t=0,r=0,n=arguments.length;r<n;r++)t+=arguments[r].length;var i=Array(t),o=0;for(r=0;r<n;r++)for(var e=arguments[r],a=0,u=e.length;a<u;a++,o++)i[o]=e[a];return i},e=function(t){return!!t&&"object"==typeof t&&!Array.isArray(t)};function a(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!r.length)return t;var u=r.shift();return void 0!==u&&e(t)&&e(u)?(t=i({},t),Object.keys(u).forEach((function(r){var n=t[r],i=u[r];t[r]=Array.isArray(n)&&Array.isArray(i)?i:e(n)&&e(i)?a(Object.assign({},n),i):i})),a.apply(void 0,o([t],r))):t}function u(t,r){var n=document.createElement("a");n.download=r,n.href=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function f(t){return r=this,void 0,i=function(){return function(t,r){var n,i,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(u){return function(e){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&e[0]?i.return:e[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,e[1])).done)return o;switch(i=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(t,a)}catch(t){e=[6,t],i=0}finally{n=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,u])}}}(this,(function(){return[2,new Promise((function(r){var n=new XMLHttpRequest;n.onload=function(){var t=new FileReader;t.onloadend=function(){r(t.result)},t.readAsDataURL(n.response)},n.open("GET",t),n.responseType="blob",n.send()}))]}))},new((n=void 0)||(n=Promise))((function(t,o){function e(t){try{u(i.next(t))}catch(t){o(t)}}function a(t){try{u(i.throw(t))}catch(t){o(t)}}function u(r){var i;r.done?t(r.value):(i=r.value,i instanceof n?i:new n((function(t){t(i)}))).then(e,a)}u((i=i.apply(r,[])).next())}));var r,n,i}const c={L:.07,M:.15,Q:.25,H:.3};var s=function(){return(s=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};const h=function(){function t(t){var r=t.type;this._svg=t.svg,this._type=r}return t.prototype.draw=function(t,r,n,i){var o;switch(this._type){case"dots":o=this._drawDot;break;case"classy":o=this._drawClassy;break;case"classy-rounded":o=this._drawClassyRounded;break;case"rounded":o=this._drawRounded;break;case"extra-rounded":o=this._drawExtraRounded;break;case"square":default:o=this._drawSquare}o.call(this,{x:t,y:r,size:n,getNeighbor:i})},t.prototype._rotateFigure=function(t){var r,n=t.size,i=t.rotation,o=void 0===i?0:i,e=t.x+n/2,a=t.y+n/2;(0,t.draw)(),null===(r=this._element)||void 0===r||r.setAttribute("transform","rotate("+180*o/Math.PI+","+e+","+a+")")},t.prototype._basicDot=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),r._element.setAttribute("cx",String(i+n/2)),r._element.setAttribute("cy",String(o+n/2)),r._element.setAttribute("r",String(n/2))}}))},t.prototype._basicSquare=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),r._element.setAttribute("x",String(i)),r._element.setAttribute("y",String(o)),r._element.setAttribute("width",String(n)),r._element.setAttribute("height",String(n))}}))},t.prototype._basicSideRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, 0 "+-n)}}))},t.prototype._basicCornerRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},t.prototype._basicCornerExtraRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n+"a "+n+" "+n+", 0, 0, 0, "+-n+" "+-n)}}))},t.prototype._basicCornersRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+n/2+" "+n/2+"h "+n/2+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},t.prototype._drawDot=function(t){this._basicDot({x:t.x,y:t.y,size:t.size,rotation:0})},t.prototype._drawSquare=function(t){this._basicSquare({x:t.x,y:t.y,size:t.size,rotation:0})},t.prototype._drawRounded=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0,c=e+a+u+f;if(0!==c)if(c>2||e&&a||u&&f)this._basicSquare({x:r,y:n,size:i,rotation:0});else{if(2===c){var s=0;return e&&u?s=Math.PI/2:u&&a?s=Math.PI:a&&f&&(s=-Math.PI/2),void this._basicCornerRounded({x:r,y:n,size:i,rotation:s})}if(1===c)return s=0,u?s=Math.PI/2:a?s=Math.PI:f&&(s=-Math.PI/2),void this._basicSideRounded({x:r,y:n,size:i,rotation:s})}else this._basicDot({x:r,y:n,size:i,rotation:0})},t.prototype._drawExtraRounded=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0,c=e+a+u+f;if(0!==c)if(c>2||e&&a||u&&f)this._basicSquare({x:r,y:n,size:i,rotation:0});else{if(2===c){var s=0;return e&&u?s=Math.PI/2:u&&a?s=Math.PI:a&&f&&(s=-Math.PI/2),void this._basicCornerExtraRounded({x:r,y:n,size:i,rotation:s})}if(1===c)return s=0,u?s=Math.PI/2:a?s=Math.PI:f&&(s=-Math.PI/2),void this._basicSideRounded({x:r,y:n,size:i,rotation:s})}else this._basicDot({x:r,y:n,size:i,rotation:0})},t.prototype._drawClassy=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0;0!==e+a+u+f?e||u?a||f?this._basicSquare({x:r,y:n,size:i,rotation:0}):this._basicCornerRounded({x:r,y:n,size:i,rotation:Math.PI/2}):this._basicCornerRounded({x:r,y:n,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:r,y:n,size:i,rotation:Math.PI/2})},t.prototype._drawClassyRounded=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0;0!==e+a+u+f?e||u?a||f?this._basicSquare({x:r,y:n,size:i,rotation:0}):this._basicCornerExtraRounded({x:r,y:n,size:i,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:r,y:n,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:r,y:n,size:i,rotation:Math.PI/2})},t}();var v=function(){return(v=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};const d=function(){function t(t){var r=t.type;this._svg=t.svg,this._type=r}return t.prototype.draw=function(t,r,n,i){var o;switch(this._type){case"square":o=this._drawSquare;break;case"extra-rounded":o=this._drawExtraRounded;break;case"dot":default:o=this._drawDot}o.call(this,{x:t,y:r,size:n,rotation:i})},t.prototype._rotateFigure=function(t){var r,n=t.size,i=t.rotation,o=void 0===i?0:i,e=t.x+n/2,a=t.y+n/2;(0,t.draw)(),null===(r=this._element)||void 0===r||r.setAttribute("transform","rotate("+180*o/Math.PI+","+e+","+a+")")},t.prototype._basicDot=function(t){var r=this,n=t.size,i=t.x,o=t.y,e=n/7;this._rotateFigure(v(v({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M "+(i+n/2)+" "+o+"a "+n/2+" "+n/2+" 0 1 0 0.1 0zm 0 "+e+"a "+(n/2-e)+" "+(n/2-e)+" 0 1 1 -0.1 0Z")}}))},t.prototype._basicSquare=function(t){var r=this,n=t.size,i=t.x,o=t.y,e=n/7;this._rotateFigure(v(v({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n+"v "+-n+"zM "+(i+e)+" "+(o+e)+"h "+(n-2*e)+"v "+(n-2*e)+"h "+(2*e-n)+"z")}}))},t.prototype._basicExtraRounded=function(t){var r=this,n=t.x,i=t.y,o=t.size/7;this._rotateFigure(v(v({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M "+n+" "+(i+2.5*o)+"v "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*o+"h "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*-o+"v "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*-o+"h "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*o+"M "+(n+2.5*o)+" "+(i+o)+"h "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*o+"v "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*o+"h "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*-o+"v "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*-o)}}))},t.prototype._drawDot=function(t){this._basicDot({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t.prototype._drawSquare=function(t){this._basicSquare({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t.prototype._drawExtraRounded=function(t){this._basicExtraRounded({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t}();var l=function(){return(l=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};const w=function(){function t(t){var r=t.type;this._svg=t.svg,this._type=r}return t.prototype.draw=function(t,r,n,i){var o;switch(this._type){case"square":o=this._drawSquare;break;case"dot":default:o=this._drawDot}o.call(this,{x:t,y:r,size:n,rotation:i})},t.prototype._rotateFigure=function(t){var r,n=t.size,i=t.rotation,o=void 0===i?0:i,e=t.x+n/2,a=t.y+n/2;(0,t.draw)(),null===(r=this._element)||void 0===r||r.setAttribute("transform","rotate("+180*o/Math.PI+","+e+","+a+")")},t.prototype._basicDot=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(l(l({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),r._element.setAttribute("cx",String(i+n/2)),r._element.setAttribute("cy",String(o+n/2)),r._element.setAttribute("r",String(n/2))}}))},t.prototype._basicSquare=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(l(l({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),r._element.setAttribute("x",String(i)),r._element.setAttribute("y",String(o)),r._element.setAttribute("width",String(n)),r._element.setAttribute("height",String(n))}}))},t.prototype._drawDot=function(t){this._basicDot({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t.prototype._drawSquare=function(t){this._basicSquare({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t}(),g="circle";var p=function(t,r,n,i){return new(n||(n=Promise))((function(o,e){function a(t){try{f(i.next(t))}catch(t){e(t)}}function u(t){try{f(i.throw(t))}catch(t){e(t)}}function f(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(a,u)}f((i=i.apply(t,r||[])).next())}))},y=function(t,r){var n,i,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(u){return function(e){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&e[0]?i.return:e[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,e[1])).done)return o;switch(i=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(t,a)}catch(t){e=[6,t],i=0}finally{n=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,u])}}},m=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],M=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];const b=function(){function t(t){this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(t.width)),this._element.setAttribute("height",String(t.height)),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._options=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this._options.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._options.height},enumerable:!1,configurable:!0}),t.prototype.getElement=function(){return this._element},t.prototype.drawQR=function(t){return p(this,void 0,void 0,(function(){var r,n,i,o,e,a,u,f=this;return y(this,(function(s){switch(s.label){case 0:return r=t.getModuleCount(),n=Math.min(this._options.width,this._options.height)-2*this._options.margin,i=this._options.shape===g?n/Math.sqrt(2):n,o=Math.floor(i/r),e={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=t,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(s.sent(),!this._image)return[2];a=this._options,u=Math.floor(a.imageOptions.imageSize*c[a.qrOptions.errorCorrectionLevel]*r*r),e=function(t){var r=t.originalHeight,n=t.originalWidth,i=t.maxHiddenDots,o=t.maxHiddenAxisDots,e=t.dotSize,a={x:0,y:0},u={x:0,y:0};if(r<=0||n<=0||i<=0||e<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var f=r/n;return a.x=Math.floor(Math.sqrt(i/f)),a.x<=0&&(a.x=1),o&&o<a.x&&(a.x=o),a.x%2==0&&a.x--,u.x=a.x*e,a.y=1+2*Math.ceil((a.x*f-1)/2),u.y=Math.round(u.x*f),(a.y*a.x>i||o&&o<a.y)&&(o&&o<a.y?(a.y=o,a.y%2==0&&a.x--):a.y-=2,u.y=a.y*e,a.x=1+2*Math.ceil((a.y/f-1)/2),u.x=Math.round(u.y/f)),{height:u.y,width:u.x,hideYDots:a.y,hideXDots:a.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:u,maxHiddenAxisDots:r-14,dotSize:o}),s.label=2;case 2:return this.drawBackground(),this.drawDots((function(t,n){var i,o,a,u,c,s;return!(f._options.imageOptions.hideBackgroundDots&&t>=(r-e.hideXDots)/2&&t<(r+e.hideXDots)/2&&n>=(r-e.hideYDots)/2&&n<(r+e.hideYDots)/2||(null===(i=m[t])||void 0===i?void 0:i[n])||(null===(o=m[t-r+7])||void 0===o?void 0:o[n])||(null===(a=m[t])||void 0===a?void 0:a[n-r+7])||(null===(u=M[t])||void 0===u?void 0:u[n])||(null===(c=M[t-r+7])||void 0===c?void 0:c[n])||(null===(s=M[t])||void 0===s?void 0:s[n-r+7]))})),this.drawCorners(),this._options.image?[4,this.drawImage({width:e.width,height:e.height,count:r,dotSize:o})]:[3,4];case 3:s.sent(),s.label=4;case 4:return[2]}}))}))},t.prototype.drawBackground=function(){var t,r,n,i=this._options;if(this._element){var o=null===(t=i.backgroundOptions)||void 0===t?void 0:t.gradient,e=null===(r=i.backgroundOptions)||void 0===r?void 0:r.color;if((o||e)&&this._createColor({options:o,color:e,additionalRotation:0,x:0,y:0,height:i.height,width:i.width,name:"background-color"}),null===(n=i.backgroundOptions)||void 0===n?void 0:n.round){var a=Math.min(i.width,i.height),u=document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id","clip-path-background-color"),this._defs.appendChild(this._backgroundClipPath),u.setAttribute("x",String((i.width-a)/2)),u.setAttribute("y",String((i.height-a)/2)),u.setAttribute("width",String(a)),u.setAttribute("height",String(a)),u.setAttribute("rx",String(a/2*i.backgroundOptions.round)),this._backgroundClipPath.appendChild(u)}}},t.prototype.drawDots=function(t){var r,n,i=this;if(!this._qr)throw"QR code is not defined";var o=this._options,e=this._qr.getModuleCount();if(e>o.width||e>o.height)throw"The canvas is too small.";var a=Math.min(o.width,o.height)-2*o.margin,u=o.shape===g?a/Math.sqrt(2):a,f=Math.floor(u/e),c=Math.floor((o.width-e*f)/2),s=Math.floor((o.height-e*f)/2),v=new h({svg:this._element,type:o.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color"),this._defs.appendChild(this._dotsClipPath),this._createColor({options:null===(r=o.dotsOptions)||void 0===r?void 0:r.gradient,color:o.dotsOptions.color,additionalRotation:0,x:0,y:0,height:o.height,width:o.width,name:"dot-color"});for(var d=function(r){for(var o=function(o){return t&&!t(r,o)?"continue":(null===(n=l._qr)||void 0===n?void 0:n.isDark(r,o))?(v.draw(c+r*f,s+o*f,f,(function(n,a){return!(r+n<0||o+a<0||r+n>=e||o+a>=e)&&!(t&&!t(r+n,o+a))&&!!i._qr&&i._qr.isDark(r+n,o+a)})),void(v._element&&l._dotsClipPath&&l._dotsClipPath.appendChild(v._element))):"continue"},a=0;a<e;a++)o(a)},l=this,w=0;w<e;w++)d(w);if(o.shape===g){var p=Math.floor((a/f-e)/2),y=e+2*p,m=c-p*f,M=s-p*f,b=[],x=Math.floor(y/2);for(w=0;w<y;w++){b[w]=[];for(var S=0;S<y;S++)b[w][S]=w>=p-1&&w<=y-p&&S>=p-1&&S<=y-p||Math.sqrt((w-x)*(w-x)+(S-x)*(S-x))>x?0:this._qr.isDark(S-2*p<0?S:S>=e?S-2*p:S-p,w-2*p<0?w:w>=e?w-2*p:w-p)?1:0}var k=function(t){for(var r=function(r){if(!b[t][r])return"continue";v.draw(m+t*f,M+r*f,f,(function(n,i){var o;return!!(null===(o=b[t+n])||void 0===o?void 0:o[r+i])})),v._element&&z._dotsClipPath&&z._dotsClipPath.appendChild(v._element)},n=0;n<y;n++)r(n)},z=this;for(w=0;w<y;w++)k(w)}},t.prototype.drawCorners=function(){var t=this;if(!this._qr)throw"QR code is not defined";var r=this._options;if(!this._element)throw"Element code is not defined";var n=this._qr.getModuleCount(),i=Math.min(r.width,r.height)-2*r.margin,o=r.shape===g?i/Math.sqrt(2):i,e=Math.floor(o/n),a=7*e,u=3*e,f=Math.floor((r.width-n*e)/2),c=Math.floor((r.height-n*e)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach((function(i){var o,s,v,l,g,p,y,b,x,S,k,z,A=i[0],O=i[1],j=i[2],q=f+A*e*(n-7),B=c+O*e*(n-7),L=t._dotsClipPath,R=t._dotsClipPath;if(((null===(o=r.cornersSquareOptions)||void 0===o?void 0:o.gradient)||(null===(s=r.cornersSquareOptions)||void 0===s?void 0:s.color))&&((L=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-"+A+"-"+O),t._defs.appendChild(L),t._cornersSquareClipPath=t._cornersDotClipPath=R=L,t._createColor({options:null===(v=r.cornersSquareOptions)||void 0===v?void 0:v.gradient,color:null===(l=r.cornersSquareOptions)||void 0===l?void 0:l.color,additionalRotation:j,x:q,y:B,height:a,width:a,name:"corners-square-color-"+A+"-"+O})),null===(g=r.cornersSquareOptions)||void 0===g?void 0:g.type){var P=new d({svg:t._element,type:r.cornersSquareOptions.type});P.draw(q,B,a,j),P._element&&L&&L.appendChild(P._element)}else for(var D=new h({svg:t._element,type:r.dotsOptions.type}),N=function(t){for(var r=function(r){if(!(null===(p=m[t])||void 0===p?void 0:p[r]))return"continue";D.draw(q+t*e,B+r*e,e,(function(n,i){var o;return!!(null===(o=m[t+n])||void 0===o?void 0:o[r+i])})),D._element&&L&&L.appendChild(D._element)},n=0;n<m[t].length;n++)r(n)},Q=0;Q<m.length;Q++)N(Q);if(((null===(y=r.cornersDotOptions)||void 0===y?void 0:y.gradient)||(null===(b=r.cornersDotOptions)||void 0===b?void 0:b.color))&&((R=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-"+A+"-"+O),t._defs.appendChild(R),t._cornersDotClipPath=R,t._createColor({options:null===(x=r.cornersDotOptions)||void 0===x?void 0:x.gradient,color:null===(S=r.cornersDotOptions)||void 0===S?void 0:S.color,additionalRotation:j,x:q+2*e,y:B+2*e,height:u,width:u,name:"corners-dot-color-"+A+"-"+O})),null===(k=r.cornersDotOptions)||void 0===k?void 0:k.type){var E=new w({svg:t._element,type:r.cornersDotOptions.type});E.draw(q+2*e,B+2*e,u,j),E._element&&R&&R.appendChild(E._element)}else{D=new h({svg:t._element,type:r.dotsOptions.type});var G=function(t){for(var r=function(r){if(!(null===(z=M[t])||void 0===z?void 0:z[r]))return"continue";D.draw(q+t*e,B+r*e,e,(function(n,i){var o;return!!(null===(o=M[t+n])||void 0===o?void 0:o[r+i])})),D._element&&R&&R.appendChild(D._element)},n=0;n<M[t].length;n++)r(n)};for(Q=0;Q<M.length;Q++)G(Q)}}))},t.prototype.loadImage=function(){var t=this;return new Promise((function(r,n){var i=t._options,o=new Image;if(!i.image)return n("Image is not defined");"string"==typeof i.imageOptions.crossOrigin&&(o.crossOrigin=i.imageOptions.crossOrigin),t._image=o,o.onload=function(){r()},o.src=i.image}))},t.prototype.drawImage=function(t){var r=t.width,n=t.height,i=t.count,o=t.dotSize;return p(this,void 0,void 0,(function(){var t,e,a,u,c,s,h,v,d;return y(this,(function(l){switch(l.label){case 0:return t=this._options,e=Math.floor((t.width-i*o)/2),a=Math.floor((t.height-i*o)/2),u=e+t.imageOptions.margin+(i*o-r)/2,c=a+t.imageOptions.margin+(i*o-n)/2,s=r-2*t.imageOptions.margin,h=n-2*t.imageOptions.margin,(v=document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("x",String(u)),v.setAttribute("y",String(c)),v.setAttribute("width",s+"px"),v.setAttribute("height",h+"px"),[4,f(t.image||"")];case 1:return d=l.sent(),v.setAttribute("href",d||""),this._element.appendChild(v),[2]}}))}))},t.prototype._createColor=function(t){var r=t.options,n=t.color,i=t.additionalRotation,o=t.x,e=t.y,a=t.height,u=t.width,f=t.name,c=u>a?u:a,s=document.createElementNS("http://www.w3.org/2000/svg","rect");if(s.setAttribute("x",String(o)),s.setAttribute("y",String(e)),s.setAttribute("height",String(a)),s.setAttribute("width",String(u)),s.setAttribute("clip-path","url('#clip-path-"+f+"')"),r){var h;if("radial"===r.type)(h=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",f),h.setAttribute("gradientUnits","userSpaceOnUse"),h.setAttribute("fx",String(o+u/2)),h.setAttribute("fy",String(e+a/2)),h.setAttribute("cx",String(o+u/2)),h.setAttribute("cy",String(e+a/2)),h.setAttribute("r",String(c/2));else{var v=((r.rotation||0)+i)%(2*Math.PI),d=(v+2*Math.PI)%(2*Math.PI),l=o+u/2,w=e+a/2,g=o+u/2,p=e+a/2;d>=0&&d<=.25*Math.PI||d>1.75*Math.PI&&d<=2*Math.PI?(l-=u/2,w-=a/2*Math.tan(v),g+=u/2,p+=a/2*Math.tan(v)):d>.25*Math.PI&&d<=.75*Math.PI?(w-=a/2,l-=u/2/Math.tan(v),p+=a/2,g+=u/2/Math.tan(v)):d>.75*Math.PI&&d<=1.25*Math.PI?(l+=u/2,w+=a/2*Math.tan(v),g-=u/2,p-=a/2*Math.tan(v)):d>1.25*Math.PI&&d<=1.75*Math.PI&&(w+=a/2,l+=u/2/Math.tan(v),p-=a/2,g-=u/2/Math.tan(v)),(h=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",f),h.setAttribute("gradientUnits","userSpaceOnUse"),h.setAttribute("x1",String(Math.round(l))),h.setAttribute("y1",String(Math.round(w))),h.setAttribute("x2",String(Math.round(g))),h.setAttribute("y2",String(Math.round(p)))}r.colorStops.forEach((function(t){var r=t.offset,n=t.color,i=document.createElementNS("http://www.w3.org/2000/svg","stop");i.setAttribute("offset",100*r+"%"),i.setAttribute("stop-color",n),h.appendChild(i)})),s.setAttribute("fill","url('#"+f+"')"),this._defs.appendChild(h)}else n&&s.setAttribute("fill",n);this._element.appendChild(s)},t}(),x="canvas";for(var S={},k=0;k<=40;k++)S[k]=k;const z={type:x,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:S[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{round:0,color:"#fff"}};var A=function(){return(A=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};function O(t){var r=A({},t);if(!r.colorStops||!r.colorStops.length)throw"Field 'colorStops' is required in gradient";return r.rotation=r.rotation?Number(r.rotation):0,r.colorStops=r.colorStops.map((function(t){return A(A({},t),{offset:Number(t.offset)})})),r}function j(t){var r=A({},t);return r.width=Number(r.width),r.height=Number(r.height),r.margin=Number(r.margin),r.imageOptions=A(A({},r.imageOptions),{hideBackgroundDots:Boolean(r.imageOptions.hideBackgroundDots),imageSize:Number(r.imageOptions.imageSize),margin:Number(r.imageOptions.margin)}),r.margin>Math.min(r.width,r.height)&&(r.margin=Math.min(r.width,r.height)),r.dotsOptions=A({},r.dotsOptions),r.dotsOptions.gradient&&(r.dotsOptions.gradient=O(r.dotsOptions.gradient)),r.cornersSquareOptions&&(r.cornersSquareOptions=A({},r.cornersSquareOptions),r.cornersSquareOptions.gradient&&(r.cornersSquareOptions.gradient=O(r.cornersSquareOptions.gradient))),r.cornersDotOptions&&(r.cornersDotOptions=A({},r.cornersDotOptions),r.cornersDotOptions.gradient&&(r.cornersDotOptions.gradient=O(r.cornersDotOptions.gradient))),r.backgroundOptions&&(r.backgroundOptions=A({},r.backgroundOptions),r.backgroundOptions.gradient&&(r.backgroundOptions.gradient=O(r.backgroundOptions.gradient))),r}var q=n(192),B=n.n(q),L=function(t,r,n,i){return new(n||(n=Promise))((function(o,e){function a(t){try{f(i.next(t))}catch(t){e(t)}}function u(t){try{f(i.throw(t))}catch(t){e(t)}}function f(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(a,u)}f((i=i.apply(t,r||[])).next())}))},R=function(t,r){var n,i,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(u){return function(e){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&e[0]?i.return:e[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,e[1])).done)return o;switch(i=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(t,a)}catch(t){e=[6,t],i=0}finally{n=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,u])}}};const P=function(){function t(t){this._options=t?j(a(z,t)):z,this.update()}return t._clearContainer=function(t){t&&(t.innerHTML="")},t.prototype._setupSvg=function(){var t=this;if(this._qr){var r=new b(this._options);this._svg=r.getElement(),this._svgDrawingPromise=r.drawQR(this._qr).then((function(){var n;t._svg&&(null===(n=t._extension)||void 0===n||n.call(t,r.getElement(),t._options))}))}},t.prototype._setupCanvas=function(){var t,r=this;this._qr&&(this._canvas=document.createElement("canvas"),this._canvas.width=this._options.width,this._canvas.height=this._options.height,this._setupSvg(),this._canvasDrawingPromise=null===(t=this._svgDrawingPromise)||void 0===t?void 0:t.then((function(){if(r._svg){var t=r._svg,n=(new XMLSerializer).serializeToString(t),i="data:image/svg+xml;base64,"+btoa(n),o=new Image;return new Promise((function(t){o.onload=function(){var n,i;null===(i=null===(n=r._canvas)||void 0===n?void 0:n.getContext("2d"))||void 0===i||i.drawImage(o,0,0),t()},o.src=i}))}})))},t.prototype._getElement=function(t){return void 0===t&&(t="png"),L(this,void 0,void 0,(function(){return R(this,(function(r){switch(r.label){case 0:if(!this._qr)throw"QR code is empty";return"svg"!==t.toLowerCase()?[3,2]:(this._svg&&this._svgDrawingPromise||this._setupSvg(),[4,this._svgDrawingPromise]);case 1:return r.sent(),[2,this._svg];case 2:return this._canvas&&this._canvasDrawingPromise||this._setupCanvas(),[4,this._canvasDrawingPromise];case 3:return r.sent(),[2,this._canvas]}}))}))},t.prototype.update=function(r){t._clearContainer(this._container),this._options=r?j(a(this._options,r)):this._options,this._options.data&&(this._qr=B()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(t){switch(!0){case/^[0-9]*$/.test(t):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(t):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===x?this._setupCanvas():this._setupSvg(),this.append(this._container))},t.prototype.append=function(t){if(t){if("function"!=typeof t.appendChild)throw"Container should be a single DOM node";this._options.type===x?this._canvas&&t.appendChild(this._canvas):this._svg&&t.appendChild(this._svg),this._container=t}},t.prototype.applyExtension=function(t){if(!t)throw"Extension function should be defined.";this._extension=t,this.update()},t.prototype.deleteExtension=function(){this._extension=void 0,this.update()},t.prototype.getRawData=function(t){return void 0===t&&(t="png"),L(this,void 0,void 0,(function(){var r,n,i;return R(this,(function(o){switch(o.label){case 0:if(!this._qr)throw"QR code is empty";return[4,this._getElement(t)];case 1:return(r=o.sent())?"svg"===t.toLowerCase()?(n=new XMLSerializer,i=n.serializeToString(r),[2,new Blob(['<?xml version="1.0" standalone="no"?>\r\n'+i],{type:"image/svg+xml"})]):[2,new Promise((function(n){return r.toBlob(n,"image/"+t,1)}))]:[2,null]}}))}))},t.prototype.download=function(t){return L(this,void 0,void 0,(function(){var r,n,i,o,e;return R(this,(function(a){switch(a.label){case 0:if(!this._qr)throw"QR code is empty";return r="png",n="qr","string"==typeof t?(r=t,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof t&&null!==t&&(t.name&&(n=t.name),t.extension&&(r=t.extension)),[4,this._getElement(r)];case 1:return(i=a.sent())?("svg"===r.toLowerCase()?(o=new XMLSerializer,e='<?xml version="1.0" standalone="no"?>\r\n'+(e=o.serializeToString(i)),u("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(e),n+".svg")):u(i.toDataURL("image/"+r),n+"."+r),[2]):[2]}}))}))},t}()}},r={};function n(i){if(r[i])return r[i].exports;var o=r[i]={exports:{}};return t[i](o,o.exports,n),o.exports}return n.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return n.d(r,{a:r}),r},n.d=(t,r)=>{for(var i in r)n.o(r,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},n.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),n(676)})().default}(r={path:undefined,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),r.exports));export{n as Q}
|
|
1
|
+
function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r,n,i=(r=function(t){self,t.exports=(()=>{var t={192:(t,r)=>{var n,i,o=function(){var t=function(t,r){var n=t,i=a[r],o=null,e=0,f=null,g=[],p={},m=function(t,r){o=function(t){for(var r=new Array(t),n=0;n<t;n+=1){r[n]=new Array(t);for(var i=0;i<t;i+=1)r[n][i]=null}return r}(e=4*n+17),M(0,0),M(e-7,0),M(0,e-7),x(),b(),k(t,r),n>=7&&S(t),null==f&&(f=A(n,i,g)),z(f,r)},M=function(t,r){for(var n=-1;n<=7;n+=1)if(!(t+n<=-1||e<=t+n))for(var i=-1;i<=7;i+=1)r+i<=-1||e<=r+i||(o[t+n][r+i]=0<=n&&n<=6&&(0==i||6==i)||0<=i&&i<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=i&&i<=4)},b=function(){for(var t=8;t<e-8;t+=1)null==o[t][6]&&(o[t][6]=t%2==0);for(var r=8;r<e-8;r+=1)null==o[6][r]&&(o[6][r]=r%2==0)},x=function(){for(var t=u.getPatternPosition(n),r=0;r<t.length;r+=1)for(var i=0;i<t.length;i+=1){var e=t[r],a=t[i];if(null==o[e][a])for(var f=-2;f<=2;f+=1)for(var c=-2;c<=2;c+=1)o[e+f][a+c]=-2==f||2==f||-2==c||2==c||0==f&&0==c}},S=function(t){for(var r=u.getBCHTypeNumber(n),i=0;i<18;i+=1){var a=!t&&1==(r>>i&1);o[Math.floor(i/3)][i%3+e-8-3]=a}for(i=0;i<18;i+=1)a=!t&&1==(r>>i&1),o[i%3+e-8-3][Math.floor(i/3)]=a},k=function(t,r){for(var n=u.getBCHTypeInfo(i<<3|r),a=0;a<15;a+=1){var f=!t&&1==(n>>a&1);a<6?o[a][8]=f:a<8?o[a+1][8]=f:o[e-15+a][8]=f}for(a=0;a<15;a+=1)f=!t&&1==(n>>a&1),a<8?o[8][e-a-1]=f:a<9?o[8][15-a-1+1]=f:o[8][15-a-1]=f;o[e-8][8]=!t},z=function(t,r){for(var n=-1,i=e-1,a=7,f=0,c=u.getMaskFunction(r),s=e-1;s>0;s-=2)for(6==s&&(s-=1);;){for(var h=0;h<2;h+=1)if(null==o[i][s-h]){var v=!1;f<t.length&&(v=1==(t[f]>>>a&1)),c(i,s-h)&&(v=!v),o[i][s-h]=v,-1==(a-=1)&&(f+=1,a=7)}if((i+=n)<0||e<=i){i-=n,n=-n;break}}},A=function(t,r,n){for(var i=s.getRSBlocks(t,r),o=h(),e=0;e<n.length;e+=1){var a=n[e];o.put(a.getMode(),4),o.put(a.getLength(),u.getLengthInBits(a.getMode(),t)),a.write(o)}var f=0;for(e=0;e<i.length;e+=1)f+=i[e].dataCount;if(o.getLengthInBits()>8*f)throw"code length overflow. ("+o.getLengthInBits()+">"+8*f+")";for(o.getLengthInBits()+4<=8*f&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*f||(o.put(236,8),o.getLengthInBits()>=8*f));)o.put(17,8);return function(t,r){for(var n=0,i=0,o=0,e=new Array(r.length),a=new Array(r.length),f=0;f<r.length;f+=1){var s=r[f].dataCount,h=r[f].totalCount-s;i=Math.max(i,s),o=Math.max(o,h),e[f]=new Array(s);for(var v=0;v<e[f].length;v+=1)e[f][v]=255&t.getBuffer()[v+n];n+=s;var d=u.getErrorCorrectPolynomial(h),l=c(e[f],d.getLength()-1).mod(d);for(a[f]=new Array(d.getLength()-1),v=0;v<a[f].length;v+=1){var w=v+l.getLength()-a[f].length;a[f][v]=w>=0?l.getAt(w):0}}var g=0;for(v=0;v<r.length;v+=1)g+=r[v].totalCount;var p=new Array(g),y=0;for(v=0;v<i;v+=1)for(f=0;f<r.length;f+=1)v<e[f].length&&(p[y]=e[f][v],y+=1);for(v=0;v<o;v+=1)for(f=0;f<r.length;f+=1)v<a[f].length&&(p[y]=a[f][v],y+=1);return p}(o,i)};p.addData=function(t,r){var n=null;switch(r=r||"Byte"){case"Numeric":n=v(t);break;case"Alphanumeric":n=d(t);break;case"Byte":n=l(t);break;case"Kanji":n=w(t);break;default:throw"mode:"+r}g.push(n),f=null},p.isDark=function(t,r){if(t<0||e<=t||r<0||e<=r)throw t+","+r;return o[t][r]},p.getModuleCount=function(){return e},p.make=function(){if(n<1){for(var t=1;t<40;t++){for(var r=s.getRSBlocks(t,i),o=h(),e=0;e<g.length;e++){var a=g[e];o.put(a.getMode(),4),o.put(a.getLength(),u.getLengthInBits(a.getMode(),t)),a.write(o)}var f=0;for(e=0;e<r.length;e++)f+=r[e].dataCount;if(o.getLengthInBits()<=8*f)break}n=t}m(!1,function(){for(var t=0,r=0,n=0;n<8;n+=1){m(!0,n);var i=u.getLostPoint(p);(0==n||t>i)&&(t=i,r=n)}return r}())},p.createTableTag=function(t,r){t=t||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(r=void 0===r?4*t:r)+"px;",n+='">',n+="<tbody>";for(var i=0;i<p.getModuleCount();i+=1){n+="<tr>";for(var o=0;o<p.getModuleCount();o+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+t+"px;",n+=" height: "+t+"px;",n+=" background-color: ",n+=p.isDark(i,o)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return(n+="</tbody>")+"</table>"},p.createSvgTag=function(t,r,n,i){var o={};"object"==typeof arguments[0]&&(t=(o=arguments[0]).cellSize,r=o.margin,n=o.alt,i=o.title),t=t||2,r=void 0===r?4*t:r,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-description":null,(i="string"==typeof i?{text:i}:i||{}).text=i.text||null,i.id=i.text?i.id||"qrcode-title":null;var e,a,u,f,c=p.getModuleCount()*t+2*r,s="";for(f="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",s+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',s+=o.scalable?"":' width="'+c+'px" height="'+c+'px"',s+=' viewBox="0 0 '+c+" "+c+'" ',s+=' preserveAspectRatio="xMinYMin meet"',s+=i.text||n.text?' role="img" aria-labelledby="'+O([i.id,n.id].join(" ").trim())+'"':"",s+=">",s+=i.text?'<title id="'+O(i.id)+'">'+O(i.text)+"</title>":"",s+=n.text?'<description id="'+O(n.id)+'">'+O(n.text)+"</description>":"",s+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',s+='<path d="',a=0;a<p.getModuleCount();a+=1)for(u=a*t+r,e=0;e<p.getModuleCount();e+=1)p.isDark(a,e)&&(s+="M"+(e*t+r)+","+u+f);return(s+='" stroke="transparent" fill="black"/>')+"</svg>"},p.createDataURL=function(t,r){t=t||2,r=void 0===r?4*t:r;var n=p.getModuleCount()*t+2*r,i=r,o=n-r;return y(n,n,(function(r,n){if(i<=r&&r<o&&i<=n&&n<o){var e=Math.floor((r-i)/t),a=Math.floor((n-i)/t);return p.isDark(a,e)?0:1}return 1}))},p.createImgTag=function(t,r,n){t=t||2,r=void 0===r?4*t:r;var i=p.getModuleCount()*t+2*r,o="";return o+="<img",o+=' src="',o+=p.createDataURL(t,r),o+='"',o+=' width="',o+=i,o+='"',o+=' height="',o+=i,o+='"',n&&(o+=' alt="',o+=O(n),o+='"'),o+"/>"};var O=function(t){for(var r="",n=0;n<t.length;n+=1){var i=t.charAt(n);switch(i){case"<":r+="<";break;case">":r+=">";break;case"&":r+="&";break;case'"':r+=""";break;default:r+=i}}return r};return p.createASCII=function(t,r){if((t=t||1)<2)return function(t){t=void 0===t?2:t;var r,n,i,o,e,a=1*p.getModuleCount()+2*t,u=t,f=a-t,c={"██":"█","█ ":"▀"," █":"▄"," ":" "},s={"██":"▀","█ ":"▀"," █":" "," ":" "},h="";for(r=0;r<a;r+=2){for(i=Math.floor((r-u)/1),o=Math.floor((r+1-u)/1),n=0;n<a;n+=1)e="█",u<=n&&n<f&&u<=r&&r<f&&p.isDark(i,Math.floor((n-u)/1))&&(e=" "),u<=n&&n<f&&u<=r+1&&r+1<f&&p.isDark(o,Math.floor((n-u)/1))?e+=" ":e+="█",h+=t<1&&r+1>=f?s[e]:c[e];h+="\n"}return a%2&&t>0?h.substring(0,h.length-a-1)+Array(a+1).join("▀"):h.substring(0,h.length-1)}(r);t-=1,r=void 0===r?2*t:r;var n,i,o,e,a=p.getModuleCount()*t+2*r,u=r,f=a-r,c=Array(t+1).join("██"),s=Array(t+1).join(" "),h="",v="";for(n=0;n<a;n+=1){for(o=Math.floor((n-u)/t),v="",i=0;i<a;i+=1)e=1,u<=i&&i<f&&u<=n&&n<f&&p.isDark(o,Math.floor((i-u)/t))&&(e=0),v+=e?c:s;for(o=0;o<t;o+=1)h+=v+"\n"}return h.substring(0,h.length-1)},p.renderTo2dContext=function(t,r){r=r||2;for(var n=p.getModuleCount(),i=0;i<n;i++)for(var o=0;o<n;o++)t.fillStyle=p.isDark(i,o)?"black":"white",t.fillRect(i*r,o*r,r,r)},p};t.stringToBytes=(t.stringToBytesFuncs={default:function(t){for(var r=[],n=0;n<t.length;n+=1){var i=t.charCodeAt(n);r.push(255&i)}return r}}).default,t.createStringToBytes=function(t,r){var n=function(){for(var n=p(t),i=function(){var t=n.read();if(-1==t)throw"eof";return t},o=0,e={};;){var a=n.read();if(-1==a)break;var u=i(),f=i()<<8|i();e[String.fromCharCode(a<<8|u)]=f,o+=1}if(o!=r)throw o+" != "+r;return e}(),i="?".charCodeAt(0);return function(t){for(var r=[],o=0;o<t.length;o+=1){var e=t.charCodeAt(o);if(e<128)r.push(e);else{var a=n[t.charAt(o)];"number"==typeof a?(255&a)==a?r.push(a):(r.push(a>>>8),r.push(255&a)):r.push(i)}}return r}};var r,n,i,o,e,a={L:1,M:0,Q:3,H:2},u=(r=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,i=7973,e=function(t){for(var r=0;0!=t;)r+=1,t>>>=1;return r},(o={}).getBCHTypeInfo=function(t){for(var r=t<<10;e(r)-e(n)>=0;)r^=n<<e(r)-e(n);return 21522^(t<<10|r)},o.getBCHTypeNumber=function(t){for(var r=t<<12;e(r)-e(i)>=0;)r^=i<<e(r)-e(i);return t<<12|r},o.getPatternPosition=function(t){return r[t-1]},o.getMaskFunction=function(t){switch(t){case 0:return function(t,r){return(t+r)%2==0};case 1:return function(t){return t%2==0};case 2:return function(t,r){return r%3==0};case 3:return function(t,r){return(t+r)%3==0};case 4:return function(t,r){return(Math.floor(t/2)+Math.floor(r/3))%2==0};case 5:return function(t,r){return t*r%2+t*r%3==0};case 6:return function(t,r){return(t*r%2+t*r%3)%2==0};case 7:return function(t,r){return(t*r%3+(t+r)%2)%2==0};default:throw"bad maskPattern:"+t}},o.getErrorCorrectPolynomial=function(t){for(var r=c([1],0),n=0;n<t;n+=1)r=r.multiply(c([1,f.gexp(n)],0));return r},o.getLengthInBits=function(t,r){if(1<=r&&r<10)switch(t){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+t}else if(r<27)switch(t){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+t}else{if(!(r<41))throw"type:"+r;switch(t){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+t}}},o.getLostPoint=function(t){for(var r=t.getModuleCount(),n=0,i=0;i<r;i+=1)for(var o=0;o<r;o+=1){for(var e=0,a=t.isDark(i,o),u=-1;u<=1;u+=1)if(!(i+u<0||r<=i+u))for(var f=-1;f<=1;f+=1)o+f<0||r<=o+f||0==u&&0==f||a==t.isDark(i+u,o+f)&&(e+=1);e>5&&(n+=3+e-5)}for(i=0;i<r-1;i+=1)for(o=0;o<r-1;o+=1){var c=0;t.isDark(i,o)&&(c+=1),t.isDark(i+1,o)&&(c+=1),t.isDark(i,o+1)&&(c+=1),t.isDark(i+1,o+1)&&(c+=1),0!=c&&4!=c||(n+=3)}for(i=0;i<r;i+=1)for(o=0;o<r-6;o+=1)t.isDark(i,o)&&!t.isDark(i,o+1)&&t.isDark(i,o+2)&&t.isDark(i,o+3)&&t.isDark(i,o+4)&&!t.isDark(i,o+5)&&t.isDark(i,o+6)&&(n+=40);for(o=0;o<r;o+=1)for(i=0;i<r-6;i+=1)t.isDark(i,o)&&!t.isDark(i+1,o)&&t.isDark(i+2,o)&&t.isDark(i+3,o)&&t.isDark(i+4,o)&&!t.isDark(i+5,o)&&t.isDark(i+6,o)&&(n+=40);var s=0;for(o=0;o<r;o+=1)for(i=0;i<r;i+=1)t.isDark(i,o)&&(s+=1);return n+Math.abs(100*s/r/r-50)/5*10},o),f=function(){for(var t=new Array(256),r=new Array(256),n=0;n<8;n+=1)t[n]=1<<n;for(n=8;n<256;n+=1)t[n]=t[n-4]^t[n-5]^t[n-6]^t[n-8];for(n=0;n<255;n+=1)r[t[n]]=n;return{glog:function(t){if(t<1)throw"glog("+t+")";return r[t]},gexp:function(r){for(;r<0;)r+=255;for(;r>=256;)r-=255;return t[r]}}}();function c(t,r){if(void 0===t.length)throw t.length+"/"+r;var n=function(){for(var n=0;n<t.length&&0==t[n];)n+=1;for(var i=new Array(t.length-n+r),o=0;o<t.length-n;o+=1)i[o]=t[o+n];return i}(),i={getAt:function(t){return n[t]},getLength:function(){return n.length},multiply:function(t){for(var r=new Array(i.getLength()+t.getLength()-1),n=0;n<i.getLength();n+=1)for(var o=0;o<t.getLength();o+=1)r[n+o]^=f.gexp(f.glog(i.getAt(n))+f.glog(t.getAt(o)));return c(r,0)},mod:function(t){if(i.getLength()-t.getLength()<0)return i;for(var r=f.glog(i.getAt(0))-f.glog(t.getAt(0)),n=new Array(i.getLength()),o=0;o<i.getLength();o+=1)n[o]=i.getAt(o);for(o=0;o<t.getLength();o+=1)n[o]^=f.gexp(f.glog(t.getAt(o))+r);return c(n,0).mod(t)}};return i}var s=function(){var t=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],r=function(t,r){var n={};return n.totalCount=t,n.dataCount=r,n},n={getRSBlocks:function(n,i){var o=function(r,n){switch(n){case a.L:return t[4*(r-1)+0];case a.M:return t[4*(r-1)+1];case a.Q:return t[4*(r-1)+2];case a.H:return t[4*(r-1)+3];default:return}}(n,i);if(void 0===o)throw"bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+i;for(var e=o.length/3,u=[],f=0;f<e;f+=1)for(var c=o[3*f+0],s=o[3*f+1],h=o[3*f+2],v=0;v<c;v+=1)u.push(r(s,h));return u}};return n}(),h=function(){var t=[],r=0,n={getBuffer:function(){return t},getAt:function(r){var n=Math.floor(r/8);return 1==(t[n]>>>7-r%8&1)},put:function(t,r){for(var i=0;i<r;i+=1)n.putBit(1==(t>>>r-i-1&1))},getLengthInBits:function(){return r},putBit:function(n){var i=Math.floor(r/8);t.length<=i&&t.push(0),n&&(t[i]|=128>>>r%8),r+=1}};return n},v=function(t){var r=t,n={getMode:function(){return 1},getLength:function(){return r.length},write:function(t){for(var n=r,o=0;o+2<n.length;)t.put(i(n.substring(o,o+3)),10),o+=3;o<n.length&&(n.length-o==1?t.put(i(n.substring(o,o+1)),4):n.length-o==2&&t.put(i(n.substring(o,o+2)),7))}},i=function(t){for(var r=0,n=0;n<t.length;n+=1)r=10*r+o(t.charAt(n));return r},o=function(t){if("0"<=t&&t<="9")return t.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+t};return n},d=function(t){var r=t,n={getMode:function(){return 2},getLength:function(){return r.length},write:function(t){for(var n=r,o=0;o+1<n.length;)t.put(45*i(n.charAt(o))+i(n.charAt(o+1)),11),o+=2;o<n.length&&t.put(i(n.charAt(o)),6)}},i=function(t){if("0"<=t&&t<="9")return t.charCodeAt(0)-"0".charCodeAt(0);if("A"<=t&&t<="Z")return t.charCodeAt(0)-"A".charCodeAt(0)+10;switch(t){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+t}};return n},l=function(r){var n=t.stringToBytes(r);return{getMode:function(){return 4},getLength:function(){return n.length},write:function(t){for(var r=0;r<n.length;r+=1)t.put(n[r],8)}}},w=function(r){var n=t.stringToBytesFuncs.SJIS;if(!n)throw"sjis not supported.";!function(){var t=n("友");if(2!=t.length||38726!=(t[0]<<8|t[1]))throw"sjis not supported."}();var i=n(r);return{getMode:function(){return 8},getLength:function(){return~~(i.length/2)},write:function(t){for(var r=i,n=0;n+1<r.length;){var o=(255&r[n])<<8|255&r[n+1];if(33088<=o&&o<=40956)o-=33088;else{if(!(57408<=o&&o<=60351))throw"illegal char at "+(n+1)+"/"+o;o-=49472}t.put(o=192*(o>>>8&255)+(255&o),13),n+=2}if(n<r.length)throw"illegal char at "+(n+1)}}},g=function(){var t=[],r={writeByte:function(r){t.push(255&r)},writeShort:function(t){r.writeByte(t),r.writeByte(t>>>8)},writeBytes:function(t,n,i){n=n||0,i=i||t.length;for(var o=0;o<i;o+=1)r.writeByte(t[o+n])},writeString:function(t){for(var n=0;n<t.length;n+=1)r.writeByte(t.charCodeAt(n))},toByteArray:function(){return t},toString:function(){var r="";r+="[";for(var n=0;n<t.length;n+=1)n>0&&(r+=","),r+=t[n];return r+"]"}};return r},p=function(t){var r=t,n=0,i=0,o=0,e={read:function(){for(;o<8;){if(n>=r.length){if(0==o)return-1;throw"unexpected end of file./"+o}var t=r.charAt(n);if(n+=1,"="==t)return o=0,-1;t.match(/^\s$/)||(i=i<<6|a(t.charCodeAt(0)),o+=6)}var e=i>>>o-8&255;return o-=8,e}},a=function(t){if(65<=t&&t<=90)return t-65;if(97<=t&&t<=122)return t-97+26;if(48<=t&&t<=57)return t-48+52;if(43==t)return 62;if(47==t)return 63;throw"c:"+t};return e},y=function(t,r,n){for(var i=function(t,r){var n=t,i=r,o=new Array(t*r),e={setPixel:function(t,r,i){o[r*n+t]=i},write:function(t){t.writeString("GIF87a"),t.writeShort(n),t.writeShort(i),t.writeByte(128),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(255),t.writeByte(255),t.writeByte(255),t.writeString(","),t.writeShort(0),t.writeShort(0),t.writeShort(n),t.writeShort(i),t.writeByte(0);var r=a(2);t.writeByte(2);for(var o=0;r.length-o>255;)t.writeByte(255),t.writeBytes(r,o,255),o+=255;t.writeByte(r.length-o),t.writeBytes(r,o,r.length-o),t.writeByte(0),t.writeString(";")}},a=function(t){for(var r=1<<t,n=1+(1<<t),i=t+1,e=u(),a=0;a<r;a+=1)e.add(String.fromCharCode(a));e.add(String.fromCharCode(r)),e.add(String.fromCharCode(n));var f,c,s,h=g(),v=(f=h,c=0,s=0,{write:function(t,r){if(t>>>r!=0)throw"length over";for(;c+r>=8;)f.writeByte(255&(t<<c|s)),r-=8-c,t>>>=8-c,s=0,c=0;s|=t<<c,c+=r},flush:function(){c>0&&f.writeByte(s)}});v.write(r,i);var d=0,l=String.fromCharCode(o[d]);for(d+=1;d<o.length;){var w=String.fromCharCode(o[d]);d+=1,e.contains(l+w)?l+=w:(v.write(e.indexOf(l),i),e.size()<4095&&(e.size()==1<<i&&(i+=1),e.add(l+w)),l=w)}return v.write(e.indexOf(l),i),v.write(n,i),v.flush(),h.toByteArray()},u=function(){var t={},r=0,n={add:function(i){if(n.contains(i))throw"dup key:"+i;t[i]=r,r+=1},size:function(){return r},indexOf:function(r){return t[r]},contains:function(r){return void 0!==t[r]}};return n};return e}(t,r),o=0;o<r;o+=1)for(var e=0;e<t;e+=1)i.setPixel(e,o,n(e,o));var a=g();i.write(a);for(var u=function(){var t=0,r=0,n=0,i="",o={},e=function(t){i+=String.fromCharCode(a(63&t))},a=function(t){if(t<0);else{if(t<26)return 65+t;if(t<52)return t-26+97;if(t<62)return t-52+48;if(62==t)return 43;if(63==t)return 47}throw"n:"+t};return o.writeByte=function(i){for(t=t<<8|255&i,r+=8,n+=1;r>=6;)e(t>>>r-6),r-=6},o.flush=function(){if(r>0&&(e(t<<6-r),t=0,r=0),n%3!=0)for(var o=3-n%3,a=0;a<o;a+=1)i+="="},o.toString=function(){return i},o}(),f=a.toByteArray(),c=0;c<f.length;c+=1)u.writeByte(f[c]);return u.flush(),"data:image/gif;base64,"+u};return t}();o.stringToBytesFuncs["UTF-8"]=function(t){return function(t){for(var r=[],n=0;n<t.length;n++){var i=t.charCodeAt(n);i<128?r.push(i):i<2048?r.push(192|i>>6,128|63&i):i<55296||i>=57344?r.push(224|i>>12,128|i>>6&63,128|63&i):(n++,i=65536+((1023&i)<<10|1023&t.charCodeAt(n)),r.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|63&i))}return r}(t)},void 0===(i="function"==typeof(n=function(){return o})?n.apply(r,[]):n)||(t.exports=i)},676:(t,r,n)=>{n.d(r,{default:()=>P});var i=function(){return(i=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},o=function(){for(var t=0,r=0,n=arguments.length;r<n;r++)t+=arguments[r].length;var i=Array(t),o=0;for(r=0;r<n;r++)for(var e=arguments[r],a=0,u=e.length;a<u;a++,o++)i[o]=e[a];return i},e=function(t){return!!t&&"object"==typeof t&&!Array.isArray(t)};function a(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!r.length)return t;var u=r.shift();return void 0!==u&&e(t)&&e(u)?(t=i({},t),Object.keys(u).forEach((function(r){var n=t[r],i=u[r];t[r]=Array.isArray(n)&&Array.isArray(i)?i:e(n)&&e(i)?a(Object.assign({},n),i):i})),a.apply(void 0,o([t],r))):t}function u(t,r){var n=document.createElement("a");n.download=r,n.href=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function f(t){return r=this,void 0,i=function(){return function(t,r){var n,i,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(u){return function(e){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&e[0]?i.return:e[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,e[1])).done)return o;switch(i=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(t,a)}catch(t){e=[6,t],i=0}finally{n=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,u])}}}(this,(function(){return[2,new Promise((function(r){var n=new XMLHttpRequest;n.onload=function(){var t=new FileReader;t.onloadend=function(){r(t.result)},t.readAsDataURL(n.response)},n.open("GET",t),n.responseType="blob",n.send()}))]}))},new((n=void 0)||(n=Promise))((function(t,o){function e(t){try{u(i.next(t))}catch(t){o(t)}}function a(t){try{u(i.throw(t))}catch(t){o(t)}}function u(r){var i;r.done?t(r.value):(i=r.value,i instanceof n?i:new n((function(t){t(i)}))).then(e,a)}u((i=i.apply(r,[])).next())}));var r,n,i}const c={L:.07,M:.15,Q:.25,H:.3};var s=function(){return(s=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};const h=function(){function t(t){var r=t.type;this._svg=t.svg,this._type=r}return t.prototype.draw=function(t,r,n,i){var o;switch(this._type){case"dots":o=this._drawDot;break;case"classy":o=this._drawClassy;break;case"classy-rounded":o=this._drawClassyRounded;break;case"rounded":o=this._drawRounded;break;case"extra-rounded":o=this._drawExtraRounded;break;default:o=this._drawSquare}o.call(this,{x:t,y:r,size:n,getNeighbor:i})},t.prototype._rotateFigure=function(t){var r,n=t.size,i=t.rotation,o=void 0===i?0:i,e=t.x+n/2,a=t.y+n/2;(0,t.draw)(),null===(r=this._element)||void 0===r||r.setAttribute("transform","rotate("+180*o/Math.PI+","+e+","+a+")")},t.prototype._basicDot=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),r._element.setAttribute("cx",String(i+n/2)),r._element.setAttribute("cy",String(o+n/2)),r._element.setAttribute("r",String(n/2))}}))},t.prototype._basicSquare=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),r._element.setAttribute("x",String(i)),r._element.setAttribute("y",String(o)),r._element.setAttribute("width",String(n)),r._element.setAttribute("height",String(n))}}))},t.prototype._basicSideRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, 0 "+-n)}}))},t.prototype._basicCornerRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},t.prototype._basicCornerExtraRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n+"a "+n+" "+n+", 0, 0, 0, "+-n+" "+-n)}}))},t.prototype._basicCornersRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+n/2+" "+n/2+"h "+n/2+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},t.prototype._drawDot=function(t){this._basicDot({x:t.x,y:t.y,size:t.size,rotation:0})},t.prototype._drawSquare=function(t){this._basicSquare({x:t.x,y:t.y,size:t.size,rotation:0})},t.prototype._drawRounded=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0,c=e+a+u+f;if(0!==c)if(c>2||e&&a||u&&f)this._basicSquare({x:r,y:n,size:i,rotation:0});else{if(2===c){var s=0;return e&&u?s=Math.PI/2:u&&a?s=Math.PI:a&&f&&(s=-Math.PI/2),void this._basicCornerRounded({x:r,y:n,size:i,rotation:s})}if(1===c)return s=0,u?s=Math.PI/2:a?s=Math.PI:f&&(s=-Math.PI/2),void this._basicSideRounded({x:r,y:n,size:i,rotation:s})}else this._basicDot({x:r,y:n,size:i,rotation:0})},t.prototype._drawExtraRounded=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0,c=e+a+u+f;if(0!==c)if(c>2||e&&a||u&&f)this._basicSquare({x:r,y:n,size:i,rotation:0});else{if(2===c){var s=0;return e&&u?s=Math.PI/2:u&&a?s=Math.PI:a&&f&&(s=-Math.PI/2),void this._basicCornerExtraRounded({x:r,y:n,size:i,rotation:s})}if(1===c)return s=0,u?s=Math.PI/2:a?s=Math.PI:f&&(s=-Math.PI/2),void this._basicSideRounded({x:r,y:n,size:i,rotation:s})}else this._basicDot({x:r,y:n,size:i,rotation:0})},t.prototype._drawClassy=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0;0!==e+a+u+f?e||u?a||f?this._basicSquare({x:r,y:n,size:i,rotation:0}):this._basicCornerRounded({x:r,y:n,size:i,rotation:Math.PI/2}):this._basicCornerRounded({x:r,y:n,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:r,y:n,size:i,rotation:Math.PI/2})},t.prototype._drawClassyRounded=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0;0!==e+a+u+f?e||u?a||f?this._basicSquare({x:r,y:n,size:i,rotation:0}):this._basicCornerExtraRounded({x:r,y:n,size:i,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:r,y:n,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:r,y:n,size:i,rotation:Math.PI/2})},t}();var v=function(){return(v=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};const d=function(){function t(t){var r=t.type;this._svg=t.svg,this._type=r}return t.prototype.draw=function(t,r,n,i){var o;switch(this._type){case"square":o=this._drawSquare;break;case"extra-rounded":o=this._drawExtraRounded;break;default:o=this._drawDot}o.call(this,{x:t,y:r,size:n,rotation:i})},t.prototype._rotateFigure=function(t){var r,n=t.size,i=t.rotation,o=void 0===i?0:i,e=t.x+n/2,a=t.y+n/2;(0,t.draw)(),null===(r=this._element)||void 0===r||r.setAttribute("transform","rotate("+180*o/Math.PI+","+e+","+a+")")},t.prototype._basicDot=function(t){var r=this,n=t.size,i=t.x,o=t.y,e=n/7;this._rotateFigure(v(v({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M "+(i+n/2)+" "+o+"a "+n/2+" "+n/2+" 0 1 0 0.1 0zm 0 "+e+"a "+(n/2-e)+" "+(n/2-e)+" 0 1 1 -0.1 0Z")}}))},t.prototype._basicSquare=function(t){var r=this,n=t.size,i=t.x,o=t.y,e=n/7;this._rotateFigure(v(v({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n+"v "+-n+"zM "+(i+e)+" "+(o+e)+"h "+(n-2*e)+"v "+(n-2*e)+"h "+(2*e-n)+"z")}}))},t.prototype._basicExtraRounded=function(t){var r=this,n=t.x,i=t.y,o=t.size/7;this._rotateFigure(v(v({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M "+n+" "+(i+2.5*o)+"v "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*o+"h "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*-o+"v "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*-o+"h "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*o+"M "+(n+2.5*o)+" "+(i+o)+"h "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*o+"v "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*o+"h "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*-o+"v "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*-o)}}))},t.prototype._drawDot=function(t){this._basicDot({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t.prototype._drawSquare=function(t){this._basicSquare({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t.prototype._drawExtraRounded=function(t){this._basicExtraRounded({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t}();var l=function(){return(l=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};const w=function(){function t(t){var r=t.type;this._svg=t.svg,this._type=r}return t.prototype.draw=function(t,r,n,i){("square"===this._type?this._drawSquare:this._drawDot).call(this,{x:t,y:r,size:n,rotation:i})},t.prototype._rotateFigure=function(t){var r,n=t.size,i=t.rotation,o=void 0===i?0:i,e=t.x+n/2,a=t.y+n/2;(0,t.draw)(),null===(r=this._element)||void 0===r||r.setAttribute("transform","rotate("+180*o/Math.PI+","+e+","+a+")")},t.prototype._basicDot=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(l(l({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),r._element.setAttribute("cx",String(i+n/2)),r._element.setAttribute("cy",String(o+n/2)),r._element.setAttribute("r",String(n/2))}}))},t.prototype._basicSquare=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(l(l({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),r._element.setAttribute("x",String(i)),r._element.setAttribute("y",String(o)),r._element.setAttribute("width",String(n)),r._element.setAttribute("height",String(n))}}))},t.prototype._drawDot=function(t){this._basicDot({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t.prototype._drawSquare=function(t){this._basicSquare({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t}(),g="circle";var p=function(t,r,n,i){return new(n||(n=Promise))((function(o,e){function a(t){try{f(i.next(t))}catch(t){e(t)}}function u(t){try{f(i.throw(t))}catch(t){e(t)}}function f(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(a,u)}f((i=i.apply(t,r||[])).next())}))},y=function(t,r){var n,i,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(u){return function(e){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&e[0]?i.return:e[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,e[1])).done)return o;switch(i=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(t,a)}catch(t){e=[6,t],i=0}finally{n=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,u])}}},m=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],M=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];const b=function(){function t(t){this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(t.width)),this._element.setAttribute("height",String(t.height)),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._options=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this._options.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._options.height},enumerable:!1,configurable:!0}),t.prototype.getElement=function(){return this._element},t.prototype.drawQR=function(t){return p(this,void 0,void 0,(function(){var r,n,i,o,e,a,u,f=this;return y(this,(function(s){switch(s.label){case 0:return r=t.getModuleCount(),n=Math.min(this._options.width,this._options.height)-2*this._options.margin,i=this._options.shape===g?n/Math.sqrt(2):n,o=Math.floor(i/r),e={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=t,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(s.sent(),!this._image)return[2];a=this._options,u=Math.floor(a.imageOptions.imageSize*c[a.qrOptions.errorCorrectionLevel]*r*r),e=function(t){var r=t.originalHeight,n=t.originalWidth,i=t.maxHiddenDots,o=t.maxHiddenAxisDots,e=t.dotSize,a={x:0,y:0},u={x:0,y:0};if(r<=0||n<=0||i<=0||e<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var f=r/n;return a.x=Math.floor(Math.sqrt(i/f)),a.x<=0&&(a.x=1),o&&o<a.x&&(a.x=o),a.x%2==0&&a.x--,u.x=a.x*e,a.y=1+2*Math.ceil((a.x*f-1)/2),u.y=Math.round(u.x*f),(a.y*a.x>i||o&&o<a.y)&&(o&&o<a.y?(a.y=o,a.y%2==0&&a.x--):a.y-=2,u.y=a.y*e,a.x=1+2*Math.ceil((a.y/f-1)/2),u.x=Math.round(u.y/f)),{height:u.y,width:u.x,hideYDots:a.y,hideXDots:a.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:u,maxHiddenAxisDots:r-14,dotSize:o}),s.label=2;case 2:return this.drawBackground(),this.drawDots((function(t,n){var i,o,a,u,c,s;return!(f._options.imageOptions.hideBackgroundDots&&t>=(r-e.hideXDots)/2&&t<(r+e.hideXDots)/2&&n>=(r-e.hideYDots)/2&&n<(r+e.hideYDots)/2||(null===(i=m[t])||void 0===i?void 0:i[n])||(null===(o=m[t-r+7])||void 0===o?void 0:o[n])||(null===(a=m[t])||void 0===a?void 0:a[n-r+7])||(null===(u=M[t])||void 0===u?void 0:u[n])||(null===(c=M[t-r+7])||void 0===c?void 0:c[n])||(null===(s=M[t])||void 0===s?void 0:s[n-r+7]))})),this.drawCorners(),this._options.image?[4,this.drawImage({width:e.width,height:e.height,count:r,dotSize:o})]:[3,4];case 3:s.sent(),s.label=4;case 4:return[2]}}))}))},t.prototype.drawBackground=function(){var t,r,n,i=this._options;if(this._element){var o=null===(t=i.backgroundOptions)||void 0===t?void 0:t.gradient,e=null===(r=i.backgroundOptions)||void 0===r?void 0:r.color;if((o||e)&&this._createColor({options:o,color:e,additionalRotation:0,x:0,y:0,height:i.height,width:i.width,name:"background-color"}),null===(n=i.backgroundOptions)||void 0===n?void 0:n.round){var a=Math.min(i.width,i.height),u=document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id","clip-path-background-color"),this._defs.appendChild(this._backgroundClipPath),u.setAttribute("x",String((i.width-a)/2)),u.setAttribute("y",String((i.height-a)/2)),u.setAttribute("width",String(a)),u.setAttribute("height",String(a)),u.setAttribute("rx",String(a/2*i.backgroundOptions.round)),this._backgroundClipPath.appendChild(u)}}},t.prototype.drawDots=function(t){var r,n,i=this;if(!this._qr)throw"QR code is not defined";var o=this._options,e=this._qr.getModuleCount();if(e>o.width||e>o.height)throw"The canvas is too small.";var a=Math.min(o.width,o.height)-2*o.margin,u=o.shape===g?a/Math.sqrt(2):a,f=Math.floor(u/e),c=Math.floor((o.width-e*f)/2),s=Math.floor((o.height-e*f)/2),v=new h({svg:this._element,type:o.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color"),this._defs.appendChild(this._dotsClipPath),this._createColor({options:null===(r=o.dotsOptions)||void 0===r?void 0:r.gradient,color:o.dotsOptions.color,additionalRotation:0,x:0,y:0,height:o.height,width:o.width,name:"dot-color"});for(var d=function(r){for(var o=function(o){return t&&!t(r,o)?"continue":(null===(n=l._qr)||void 0===n?void 0:n.isDark(r,o))?(v.draw(c+r*f,s+o*f,f,(function(n,a){return!(r+n<0||o+a<0||r+n>=e||o+a>=e)&&!(t&&!t(r+n,o+a))&&!!i._qr&&i._qr.isDark(r+n,o+a)})),void(v._element&&l._dotsClipPath&&l._dotsClipPath.appendChild(v._element))):"continue"},a=0;a<e;a++)o(a)},l=this,w=0;w<e;w++)d(w);if(o.shape===g){var p=Math.floor((a/f-e)/2),y=e+2*p,m=c-p*f,M=s-p*f,b=[],x=Math.floor(y/2);for(w=0;w<y;w++){b[w]=[];for(var S=0;S<y;S++)b[w][S]=w>=p-1&&w<=y-p&&S>=p-1&&S<=y-p||Math.sqrt((w-x)*(w-x)+(S-x)*(S-x))>x?0:this._qr.isDark(S-2*p<0?S:S>=e?S-2*p:S-p,w-2*p<0?w:w>=e?w-2*p:w-p)?1:0}var k=function(t){for(var r=function(r){if(!b[t][r])return"continue";v.draw(m+t*f,M+r*f,f,(function(n,i){var o;return!!(null===(o=b[t+n])||void 0===o?void 0:o[r+i])})),v._element&&z._dotsClipPath&&z._dotsClipPath.appendChild(v._element)},n=0;n<y;n++)r(n)},z=this;for(w=0;w<y;w++)k(w)}},t.prototype.drawCorners=function(){var t=this;if(!this._qr)throw"QR code is not defined";var r=this._options;if(!this._element)throw"Element code is not defined";var n=this._qr.getModuleCount(),i=Math.min(r.width,r.height)-2*r.margin,o=r.shape===g?i/Math.sqrt(2):i,e=Math.floor(o/n),a=7*e,u=3*e,f=Math.floor((r.width-n*e)/2),c=Math.floor((r.height-n*e)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach((function(i){var o,s,v,l,g,p,y,b,x,S,k,z,A=i[0],O=i[1],j=i[2],q=f+A*e*(n-7),B=c+O*e*(n-7),L=t._dotsClipPath,R=t._dotsClipPath;if(((null===(o=r.cornersSquareOptions)||void 0===o?void 0:o.gradient)||(null===(s=r.cornersSquareOptions)||void 0===s?void 0:s.color))&&((L=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-"+A+"-"+O),t._defs.appendChild(L),t._cornersSquareClipPath=t._cornersDotClipPath=R=L,t._createColor({options:null===(v=r.cornersSquareOptions)||void 0===v?void 0:v.gradient,color:null===(l=r.cornersSquareOptions)||void 0===l?void 0:l.color,additionalRotation:j,x:q,y:B,height:a,width:a,name:"corners-square-color-"+A+"-"+O})),null===(g=r.cornersSquareOptions)||void 0===g?void 0:g.type){var P=new d({svg:t._element,type:r.cornersSquareOptions.type});P.draw(q,B,a,j),P._element&&L&&L.appendChild(P._element)}else for(var D=new h({svg:t._element,type:r.dotsOptions.type}),N=function(t){for(var r=function(r){if(!(null===(p=m[t])||void 0===p?void 0:p[r]))return"continue";D.draw(q+t*e,B+r*e,e,(function(n,i){var o;return!!(null===(o=m[t+n])||void 0===o?void 0:o[r+i])})),D._element&&L&&L.appendChild(D._element)},n=0;n<m[t].length;n++)r(n)},Q=0;Q<m.length;Q++)N(Q);if(((null===(y=r.cornersDotOptions)||void 0===y?void 0:y.gradient)||(null===(b=r.cornersDotOptions)||void 0===b?void 0:b.color))&&((R=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-"+A+"-"+O),t._defs.appendChild(R),t._cornersDotClipPath=R,t._createColor({options:null===(x=r.cornersDotOptions)||void 0===x?void 0:x.gradient,color:null===(S=r.cornersDotOptions)||void 0===S?void 0:S.color,additionalRotation:j,x:q+2*e,y:B+2*e,height:u,width:u,name:"corners-dot-color-"+A+"-"+O})),null===(k=r.cornersDotOptions)||void 0===k?void 0:k.type){var E=new w({svg:t._element,type:r.cornersDotOptions.type});E.draw(q+2*e,B+2*e,u,j),E._element&&R&&R.appendChild(E._element)}else{D=new h({svg:t._element,type:r.dotsOptions.type});var G=function(t){for(var r=function(r){if(!(null===(z=M[t])||void 0===z?void 0:z[r]))return"continue";D.draw(q+t*e,B+r*e,e,(function(n,i){var o;return!!(null===(o=M[t+n])||void 0===o?void 0:o[r+i])})),D._element&&R&&R.appendChild(D._element)},n=0;n<M[t].length;n++)r(n)};for(Q=0;Q<M.length;Q++)G(Q)}}))},t.prototype.loadImage=function(){var t=this;return new Promise((function(r,n){var i=t._options,o=new Image;if(!i.image)return n("Image is not defined");"string"==typeof i.imageOptions.crossOrigin&&(o.crossOrigin=i.imageOptions.crossOrigin),t._image=o,o.onload=function(){r()},o.src=i.image}))},t.prototype.drawImage=function(t){var r=t.width,n=t.height,i=t.count,o=t.dotSize;return p(this,void 0,void 0,(function(){var t,e,a,u,c,s,h,v,d;return y(this,(function(l){switch(l.label){case 0:return t=this._options,e=Math.floor((t.width-i*o)/2),a=Math.floor((t.height-i*o)/2),u=e+t.imageOptions.margin+(i*o-r)/2,c=a+t.imageOptions.margin+(i*o-n)/2,s=r-2*t.imageOptions.margin,h=n-2*t.imageOptions.margin,(v=document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("x",String(u)),v.setAttribute("y",String(c)),v.setAttribute("width",s+"px"),v.setAttribute("height",h+"px"),[4,f(t.image||"")];case 1:return d=l.sent(),v.setAttribute("href",d||""),this._element.appendChild(v),[2]}}))}))},t.prototype._createColor=function(t){var r=t.options,n=t.color,i=t.additionalRotation,o=t.x,e=t.y,a=t.height,u=t.width,f=t.name,c=u>a?u:a,s=document.createElementNS("http://www.w3.org/2000/svg","rect");if(s.setAttribute("x",String(o)),s.setAttribute("y",String(e)),s.setAttribute("height",String(a)),s.setAttribute("width",String(u)),s.setAttribute("clip-path","url('#clip-path-"+f+"')"),r){var h;if("radial"===r.type)(h=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",f),h.setAttribute("gradientUnits","userSpaceOnUse"),h.setAttribute("fx",String(o+u/2)),h.setAttribute("fy",String(e+a/2)),h.setAttribute("cx",String(o+u/2)),h.setAttribute("cy",String(e+a/2)),h.setAttribute("r",String(c/2));else{var v=((r.rotation||0)+i)%(2*Math.PI),d=(v+2*Math.PI)%(2*Math.PI),l=o+u/2,w=e+a/2,g=o+u/2,p=e+a/2;d>=0&&d<=.25*Math.PI||d>1.75*Math.PI&&d<=2*Math.PI?(l-=u/2,w-=a/2*Math.tan(v),g+=u/2,p+=a/2*Math.tan(v)):d>.25*Math.PI&&d<=.75*Math.PI?(w-=a/2,l-=u/2/Math.tan(v),p+=a/2,g+=u/2/Math.tan(v)):d>.75*Math.PI&&d<=1.25*Math.PI?(l+=u/2,w+=a/2*Math.tan(v),g-=u/2,p-=a/2*Math.tan(v)):d>1.25*Math.PI&&d<=1.75*Math.PI&&(w+=a/2,l+=u/2/Math.tan(v),p-=a/2,g-=u/2/Math.tan(v)),(h=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",f),h.setAttribute("gradientUnits","userSpaceOnUse"),h.setAttribute("x1",String(Math.round(l))),h.setAttribute("y1",String(Math.round(w))),h.setAttribute("x2",String(Math.round(g))),h.setAttribute("y2",String(Math.round(p)))}r.colorStops.forEach((function(t){var r=t.offset,n=t.color,i=document.createElementNS("http://www.w3.org/2000/svg","stop");i.setAttribute("offset",100*r+"%"),i.setAttribute("stop-color",n),h.appendChild(i)})),s.setAttribute("fill","url('#"+f+"')"),this._defs.appendChild(h)}else n&&s.setAttribute("fill",n);this._element.appendChild(s)},t}(),x="canvas";for(var S={},k=0;k<=40;k++)S[k]=k;const z={type:x,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:S[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{round:0,color:"#fff"}};var A=function(){return(A=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};function O(t){var r=A({},t);if(!r.colorStops||!r.colorStops.length)throw"Field 'colorStops' is required in gradient";return r.rotation=r.rotation?Number(r.rotation):0,r.colorStops=r.colorStops.map((function(t){return A(A({},t),{offset:Number(t.offset)})})),r}function j(t){var r=A({},t);return r.width=Number(r.width),r.height=Number(r.height),r.margin=Number(r.margin),r.imageOptions=A(A({},r.imageOptions),{hideBackgroundDots:Boolean(r.imageOptions.hideBackgroundDots),imageSize:Number(r.imageOptions.imageSize),margin:Number(r.imageOptions.margin)}),r.margin>Math.min(r.width,r.height)&&(r.margin=Math.min(r.width,r.height)),r.dotsOptions=A({},r.dotsOptions),r.dotsOptions.gradient&&(r.dotsOptions.gradient=O(r.dotsOptions.gradient)),r.cornersSquareOptions&&(r.cornersSquareOptions=A({},r.cornersSquareOptions),r.cornersSquareOptions.gradient&&(r.cornersSquareOptions.gradient=O(r.cornersSquareOptions.gradient))),r.cornersDotOptions&&(r.cornersDotOptions=A({},r.cornersDotOptions),r.cornersDotOptions.gradient&&(r.cornersDotOptions.gradient=O(r.cornersDotOptions.gradient))),r.backgroundOptions&&(r.backgroundOptions=A({},r.backgroundOptions),r.backgroundOptions.gradient&&(r.backgroundOptions.gradient=O(r.backgroundOptions.gradient))),r}var q=n(192),B=n.n(q),L=function(t,r,n,i){return new(n||(n=Promise))((function(o,e){function a(t){try{f(i.next(t))}catch(t){e(t)}}function u(t){try{f(i.throw(t))}catch(t){e(t)}}function f(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(a,u)}f((i=i.apply(t,r||[])).next())}))},R=function(t,r){var n,i,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(u){return function(e){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&e[0]?i.return:e[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,e[1])).done)return o;switch(i=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(t,a)}catch(t){e=[6,t],i=0}finally{n=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,u])}}};const P=function(){function t(t){this._options=t?j(a(z,t)):z,this.update()}return t._clearContainer=function(t){t&&(t.innerHTML="")},t.prototype._setupSvg=function(){var t=this;if(this._qr){var r=new b(this._options);this._svg=r.getElement(),this._svgDrawingPromise=r.drawQR(this._qr).then((function(){var n;t._svg&&(null===(n=t._extension)||void 0===n||n.call(t,r.getElement(),t._options))}))}},t.prototype._setupCanvas=function(){var t,r=this;this._qr&&(this._canvas=document.createElement("canvas"),this._canvas.width=this._options.width,this._canvas.height=this._options.height,this._setupSvg(),this._canvasDrawingPromise=null===(t=this._svgDrawingPromise)||void 0===t?void 0:t.then((function(){if(r._svg){var t=r._svg,n=(new XMLSerializer).serializeToString(t),i="data:image/svg+xml;base64,"+btoa(n),o=new Image;return new Promise((function(t){o.onload=function(){var n,i;null===(i=null===(n=r._canvas)||void 0===n?void 0:n.getContext("2d"))||void 0===i||i.drawImage(o,0,0),t()},o.src=i}))}})))},t.prototype._getElement=function(t){return void 0===t&&(t="png"),L(this,void 0,void 0,(function(){return R(this,(function(r){switch(r.label){case 0:if(!this._qr)throw"QR code is empty";return"svg"!==t.toLowerCase()?[3,2]:(this._svg&&this._svgDrawingPromise||this._setupSvg(),[4,this._svgDrawingPromise]);case 1:return r.sent(),[2,this._svg];case 2:return this._canvas&&this._canvasDrawingPromise||this._setupCanvas(),[4,this._canvasDrawingPromise];case 3:return r.sent(),[2,this._canvas]}}))}))},t.prototype.update=function(r){t._clearContainer(this._container),this._options=r?j(a(this._options,r)):this._options,this._options.data&&(this._qr=B()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(t){switch(!0){case/^[0-9]*$/.test(t):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(t):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===x?this._setupCanvas():this._setupSvg(),this.append(this._container))},t.prototype.append=function(t){if(t){if("function"!=typeof t.appendChild)throw"Container should be a single DOM node";this._options.type===x?this._canvas&&t.appendChild(this._canvas):this._svg&&t.appendChild(this._svg),this._container=t}},t.prototype.applyExtension=function(t){if(!t)throw"Extension function should be defined.";this._extension=t,this.update()},t.prototype.deleteExtension=function(){this._extension=void 0,this.update()},t.prototype.getRawData=function(t){return void 0===t&&(t="png"),L(this,void 0,void 0,(function(){var r,n,i;return R(this,(function(o){switch(o.label){case 0:if(!this._qr)throw"QR code is empty";return[4,this._getElement(t)];case 1:return(r=o.sent())?"svg"===t.toLowerCase()?(n=new XMLSerializer,i=n.serializeToString(r),[2,new Blob(['<?xml version="1.0" standalone="no"?>\r\n'+i],{type:"image/svg+xml"})]):[2,new Promise((function(n){return r.toBlob(n,"image/"+t,1)}))]:[2,null]}}))}))},t.prototype.download=function(t){return L(this,void 0,void 0,(function(){var r,n,i,o,e;return R(this,(function(a){switch(a.label){case 0:if(!this._qr)throw"QR code is empty";return r="png",n="qr","string"==typeof t?(r=t,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof t&&null!==t&&(t.name&&(n=t.name),t.extension&&(r=t.extension)),[4,this._getElement(r)];case 1:return(i=a.sent())?("svg"===r.toLowerCase()?(o=new XMLSerializer,e='<?xml version="1.0" standalone="no"?>\r\n'+(e=o.serializeToString(i)),u("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(e),n+".svg")):u(i.toDataURL("image/"+r),n+"."+r),[2]):[2]}}))}))},t}()}},r={};function n(i){if(r[i])return r[i].exports;var o=r[i]={exports:{}};return t[i](o,o.exports,n),o.exports}return n.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return n.d(r,{a:r}),r},n.d=(t,r)=>{for(var i in r)n.o(r,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},n.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),n(676)})().default},r(n={path:undefined,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),n.exports);const o=t(i);export{o as Q}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as t,h as e}from"./p-554598aa.js";import{g as s,a as n,b as o,l as a}from"./p-e6f1b2b6.js";import"./p-0be4566d.js";import{R as r,c as p,b as l}from"./p-b8ba109f.js";const d="connect",c={connect:"scan",certify:"credential"},h=class{constructor(e){i(this,e),this.gatacaLoginCompleted=t(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=t(this,"gatacaLoginFailed",7),this.successCallback=void 0,this.errorCallback=void 0,this.qrRole=void 0,this.callbackServer=void 0,this.socketEndpoint=void 0,this.sessionTimeout=300,this.wsOnOpen=void 0,this.wsOnMessage=void 0,this.autostart=!0,this.autorefresh=!1,this.v2=!1,this.qrModalTitle="Quick Access",this.qrModalDescription="Sign up or sign in by scanning the QR Code with the Gataca Wallet",this.hideBrandTitle=!1,this.dynamicLink=!0,this.sessionId=void 0,this.authenticationRequest=void 0,this.sessionData=void 0,this.result=r.NOT_STARTED}disconnectedCallback(){this.stop()}async componentDidLoad(){this.autostart&&await this.display()}async display(){let i=new WebSocket(this.socketEndpoint);setTimeout((()=>{this.socket.close(1e3,"")}),1e3*this.sessionTimeout),this.socket=i,i.onopen=()=>{this.wsOnOpen&&this.wsOnOpen(this.socket)},i.onmessage=i=>{if(this.wsOnMessage)this.wsOnMessage(this.socket,i);else{let t=JSON.parse(i.data);t.sessionId&&this.handleWSResponse(t)}},i.onerror=()=>{let t=new Error("Error connecting with server");this.result=r.FAILED,this.gatacaLoginFailed.emit(t),this.errorCallback(t),i.close(1e3,"")},i.onclose=()=>{if(this.result===r.ONGOING&&(this.result=r.EXPIRED),this.result===r.EXPIRED)if(this.autorefresh)this.display();else{let i=new Error("User did not scan the QR in the alloted time");this.gatacaLoginFailed.emit(i),this.errorCallback(i)}},p()&&this.dynamicLink&&(window.location.href=this.getLink())}sessionMsgReceived(i){this.handleWSResponse(i.detail)}handleWSResponse(i){switch(this.result=i.result,i.result){case r.ONGOING:this.sessionId=i.sessionId,this.authenticationRequest=i.authenticationRequest;break;case r.SUCCESS:this.sessionData=i.authenticatedUserData,this.gatacaLoginCompleted.emit(i.authenticatedUserData),this.successCallback(i.authenticatedUserData),this.socket.close(1e3,"");break;case r.FAILED:this.socket.close();let t=new Error("Provided user credentials couldn't be validated");this.gatacaLoginFailed.emit(t),this.errorCallback(t);break;case r.EXPIRED:if(this.socket.close(),this.autorefresh)this.display();else{let i=new Error("User did not scan the QR in the alloted time");this.gatacaLoginFailed.emit(i),this.errorCallback(i)}}}async stop(){this.sessionData=void 0,this.sessionId=void 0,this.socket.close(1e3,"Client stopped the connection")}async getSessionData(){return this.sessionData?Promise.resolve(this.sessionData):Promise.reject(new Error("No successful login"))}getLink(){if(this.v2&&this.qrRole==d)return this.authenticationRequest;let i="https://gataca.page.link/"+c[this.qrRole]+"?";return i+=this.qrRole===d?"session="+this.sessionId:"process="+this.sessionId,i+="&callback="+l(encodeURIComponent(this.callbackServer)),i=encodeURIComponent(i),this.dynamicLink?"https://gataca.page.link/?apn=com.gatacaapp&ibi=com.gataca.wallet&link="+i:i}renderQRSection(){switch(this.result){case r.NOT_STARTED:return this.renderRetryButton();case r.ONGOING:return this.renderQR(this.getLink(),300,!0);case r.EXPIRED:return this.renderRetryButton("QR Code expired");case r.FAILED:return this.renderRetryButton("User credentials not validated");case r.SUCCESS:return this.renderSuccess()}}renderSuccess(){return e("div",{class:"success"},e("img",{src:s,height:52,width:52}),e("p",{class:"successMsg"},"Successful Connection!"))}renderRetryButton(i){return e("div",{class:"reload"},e("div",{id:"notify",onClick:()=>this.display()},e("img",{src:n,height:24,width:24}),e("p",{class:"qrDescription"},"Click inside the box to "),e("p",{class:"qrDescription bold"},i?"Refresh QR Code":"Scan QR Code"),i&&e("div",{class:"alert"},e("img",{src:o,height:24,width:24}),e("p",null,i))),e("div",{id:"qrwait"},this.renderQR("waiting to start a session",250)))}renderQR(i,t,s){return e("gataca-qrdisplay",{qrData:i,rounded:!0,size:t,"logo-size":s?.33:0})}render(){return e("div",{class:"popUpContainer"},e("div",{class:"modal-window is-visible",onClick:i=>{i.stopPropagation()}},e("div",{class:"modal-window__content"},e("div",{class:"qrTitleContainer"},e("p",{class:"qrTitle"},this.qrModalTitle),!this.hideBrandTitle&&e("p",{class:"qrBrand"},"by Gataca"," ",e("span",null,e("img",{src:a}))),this.result!==r.SUCCESS&&e("p",{class:"qrDescription"},this.qrModalDescription)),e("div",{class:"qrSection"},this.renderQRSection()))))}};h.style='@import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.brandSection{padding-top:5px;display:flex;align-items:center}.brandSection .gatacaImgSmall{height:13px;width:13px;margin:0;margin-right:10px}.popUpContainer .modal-window{position:relative;border-radius:6px;color:rgba(24, 27, 94, 0.8);box-shadow:0px 3px 10px rgba(48, 48, 48, 0.1);display:flex;flex-direction:column;justify-content:space-between;align-items:center;display:flex;z-index:1001;width:300px;min-height:408px;padding:1px;background-color:white;border-radius:12px;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;visibility:hidden;opacity:0}.popUpContainer .modal-window__content{width:100%;height:100%;text-align:left}.popUpContainer .modal-window p{font-family:"Work Sans", "Helvetica Neue", sans-serif;font-weight:normal;font-size:12px;letter-spacing:1px;color:#1e1e20}.popUpContainer .modal-window .qrTitleContainer{padding:14px 24px;padding-bottom:0px}.popUpContainer .modal-window .qrTitle{font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .modal-window .qrDescription{font-weight:400;font-size:14px;line-height:16.5px;padding-top:12px;padding-bottom:5px;color:#A1A1A1}.popUpContainer .modal-window .bold{font-weight:600}.popUpContainer .modal-window .qrBrand{margin-top:4px;font-size:14px;font-weight:400;line-height:16.5px;display:flex;align-items:center}.popUpContainer .modal-window .qrBrand img{margin-left:5px;height:12px}.popUpContainer .modal-window .qr-section{width:252px;height:252px}.popUpContainer .reload{height:252px;width:252px;border:1px dashed #A1A1A1;border-radius:12px;position:relative;margin:24px;display:flex;justify-content:center;align-items:center}.popUpContainer #qrwait{display:flex;justify-content:center}.popUpContainer #qrwait,.popUpContainer #notify{width:100%;height:100%;top:0;left:0;border-radius:20px}.popUpContainer #notify{z-index:10;background-color:gray;position:absolute;justify-self:center;justify-items:center;justify-content:center;align-items:center;align-content:center;align-self:center;display:flex;flex-direction:column;padding:24px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;background:rgba(255, 255, 255, 0.9);}.popUpContainer .notify-text{font-family:"Work Sans";font-style:normal;font-weight:400;font-size:14px;line-height:16px;text-align:center;font-feature-settings:"salt" on;color:#8B8B8B;flex:none;order:1;align-self:stretch;flex-grow:0}.popUpContainer .alert{display:flex;flex-direction:row;align-items:center;justify-content:start;width:252px;position:absolute;bottom:0;background:#FFE5E5;border-radius:12px}.popUpContainer .alert img{margin:12px}.popUpContainer .alert p{font-weight:400;font-size:14px;line-height:16px;color:black}.popUpContainer .success{display:flex;height:300px;flex-direction:column;justify-content:center;align-items:center;padding:0px}.popUpContainer .success .successMsg{margin-top:20px;font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .is-visible{opacity:1;visibility:visible}.is-transparent{opacity:0}';export{h as gataca_qrws}
|