smoothly 0.3.60 → 0.3.61
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/{Listenable-fcea5136.js → Listenable-e157f34c.js} +6 -5
- package/dist/cjs/{index-8352a4e0.js → index-48630c3c.js} +3 -0
- package/dist/cjs/{index-679a68de.js → index-5c256daf.js} +1 -1
- package/dist/cjs/index.cjs.js +11 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/smoothly-accordion_53.cjs.entry.js +3 -3
- package/dist/cjs/smoothly-country.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-google-font.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-reorder.cjs.entry.js +4 -4
- package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-trigger-source.cjs.entry.js +2 -2
- package/dist/cjs/smoothly.cjs.js +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/collection/model/Listenable.js +6 -5
- package/dist/collection/model/StateBase.js +7 -0
- package/dist/collection/model/index.js +1 -0
- package/dist/custom-elements/index.js +14 -6
- package/dist/esm/{Listenable-10f48463.js → Listenable-afd6cd7e.js} +6 -5
- package/dist/esm/{index-990cc22d.js → index-62de77e7.js} +1 -1
- package/dist/esm/{index-7b57a52c.js → index-e9e4cadb.js} +3 -1
- package/dist/esm/index.js +12 -5
- package/dist/esm/loader.js +2 -2
- package/dist/esm/smoothly-accordion_53.entry.js +3 -3
- package/dist/esm/smoothly-country.entry.js +1 -1
- package/dist/esm/smoothly-google-font.entry.js +1 -1
- package/dist/esm/smoothly-radio-group.entry.js +1 -1
- package/dist/esm/smoothly-reorder.entry.js +2 -2
- package/dist/esm/smoothly-trigger-sink.entry.js +2 -2
- package/dist/esm/smoothly-trigger-source.entry.js +2 -2
- package/dist/esm/smoothly.js +2 -2
- package/dist/smoothly/index.esm.js +1 -1
- package/dist/smoothly/{p-bb57ff51.js → p-05154935.js} +1 -1
- package/dist/smoothly/{p-c5509d64.entry.js → p-46dcb025.entry.js} +1 -1
- package/dist/smoothly/p-4f3b0e6d.entry.js +1 -0
- package/dist/smoothly/{p-43eb7034.entry.js → p-6e017bc2.entry.js} +1 -1
- package/dist/smoothly/{p-675a8d09.js → p-73bcae40.js} +1 -1
- package/dist/smoothly/{p-0ed63b7b.entry.js → p-b3d699d2.entry.js} +1 -1
- package/dist/smoothly/{p-a19a824a.entry.js → p-cab954af.entry.js} +1 -1
- package/dist/smoothly/{p-ab11639c.entry.js → p-ccd08c26.entry.js} +1 -1
- package/dist/smoothly/{p-c88ae468.js → p-e5d867e5.js} +2 -2
- package/dist/smoothly/{p-5fb08944.entry.js → p-fe4520be.entry.js} +1 -1
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/model/Listenable.d.ts +10 -3
- package/dist/types/model/StateBase.d.ts +6 -0
- package/dist/types/model/index.d.ts +2 -1
- package/package.json +1 -1
- package/dist/smoothly/p-607abd83.entry.js +0 -1
|
@@ -784,18 +784,19 @@ class Listenable {
|
|
|
784
784
|
constructor() {
|
|
785
785
|
_Listenable_listeners.set(this, {});
|
|
786
786
|
}
|
|
787
|
-
listen(property, listener) {
|
|
787
|
+
listen(property, listener, options) {
|
|
788
788
|
var _a, _b;
|
|
789
789
|
(_b = (_a = __classPrivateFieldGet(this, _Listenable_listeners, "f")[property]) === null || _a === void 0 ? void 0 : _a.push(listener)) !== null && _b !== void 0 ? _b : (__classPrivateFieldGet(this, _Listenable_listeners, "f")[property] = [listener]);
|
|
790
|
-
|
|
790
|
+
if (!(options === null || options === void 0 ? void 0 : options.lazy))
|
|
791
|
+
listener(this[property]);
|
|
791
792
|
}
|
|
792
793
|
unlisten(property, listener) {
|
|
793
794
|
var _a, _b;
|
|
794
795
|
const index = (_a = __classPrivateFieldGet(this, _Listenable_listeners, "f")[property]) === null || _a === void 0 ? void 0 : _a.indexOf(listener);
|
|
795
796
|
index != undefined && index >= 0 && ((_b = __classPrivateFieldGet(this, _Listenable_listeners, "f")[property]) === null || _b === void 0 ? void 0 : _b.splice(index, 1));
|
|
796
797
|
}
|
|
797
|
-
static load(backend
|
|
798
|
-
const result = listenable
|
|
798
|
+
static load(backend) {
|
|
799
|
+
const result = backend.listenable;
|
|
799
800
|
return Object.defineProperties(result, getProperties(backend));
|
|
800
801
|
function getProperties(backend) {
|
|
801
802
|
return Object.fromEntries(Object.entries(Object.assign(Object.assign({}, Object.getOwnPropertyDescriptors(backend)), Object.getOwnPropertyDescriptors(Object.getPrototypeOf(backend)))).map(([name, descriptor]) => [
|
|
@@ -819,7 +820,7 @@ class Listenable {
|
|
|
819
820
|
}
|
|
820
821
|
: {
|
|
821
822
|
get() {
|
|
822
|
-
return backend[name]
|
|
823
|
+
return backend[name];
|
|
823
824
|
},
|
|
824
825
|
},
|
|
825
826
|
]));
|
|
@@ -2060,6 +2060,8 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
2060
2060
|
const styles = /*@__PURE__*/ new Map();
|
|
2061
2061
|
const win = typeof window !== 'undefined' ? window : {};
|
|
2062
2062
|
const doc = win.document || { head: {} };
|
|
2063
|
+
const H = (win.HTMLElement || class {
|
|
2064
|
+
});
|
|
2063
2065
|
const plt = {
|
|
2064
2066
|
$flags$: 0,
|
|
2065
2067
|
$resourcesUrl$: '',
|
|
@@ -2122,6 +2124,7 @@ const flush = () => {
|
|
|
2122
2124
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
2123
2125
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
2124
2126
|
|
|
2127
|
+
exports.H = H;
|
|
2125
2128
|
exports.Host = Host;
|
|
2126
2129
|
exports.bootstrapLazy = bootstrapLazy;
|
|
2127
2130
|
exports.createEvent = createEvent;
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const Listenable = require('./Listenable-
|
|
5
|
+
const index = require('./index-5c256daf.js');
|
|
6
|
+
const Listenable = require('./Listenable-e157f34c.js');
|
|
7
7
|
const GoogleFont = require('./GoogleFont-6c4f0da1.js');
|
|
8
|
-
require('./index-
|
|
8
|
+
require('./index-48630c3c.js');
|
|
9
9
|
|
|
10
10
|
class ClientIdentifier {
|
|
11
11
|
constructor() { }
|
|
@@ -19,6 +19,13 @@ class ClientIdentifier {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
class StateBase {
|
|
23
|
+
constructor(...parameters) {
|
|
24
|
+
this.listenable = new Listenable.Listenable();
|
|
25
|
+
this.client = parameters.length == 1 ? parameters[0] : undefined;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
22
29
|
exports.App = index.App;
|
|
23
30
|
Object.defineProperty(exports, 'Cosmetic', {
|
|
24
31
|
enumerable: true,
|
|
@@ -44,3 +51,4 @@ Object.defineProperty(exports, 'GoogleFont', {
|
|
|
44
51
|
}
|
|
45
52
|
});
|
|
46
53
|
exports.ClientIdentifier = ClientIdentifier;
|
|
54
|
+
exports.StateBase = StateBase;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const index$1 = require('./index-
|
|
7
|
-
const Listenable = require('./Listenable-
|
|
5
|
+
const index = require('./index-48630c3c.js');
|
|
6
|
+
const index$1 = require('./index-5c256daf.js');
|
|
7
|
+
const Listenable = require('./Listenable-e157f34c.js');
|
|
8
8
|
require('./GoogleFont-6c4f0da1.js');
|
|
9
9
|
const getLanguage = require('./getLanguage-7991c46a.js');
|
|
10
10
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-48630c3c.js');
|
|
6
6
|
|
|
7
7
|
const styleCss = "smoothly-radio-group{display:flex;position:relative;color:none !important;background:none !important;margin:0.5em 0}smoothly-radio-group[hidden]{display:none}smoothly-radio-group[orientation=vertical] *:not(:first-of-type)>input[type=radio]~label{border-top:none}smoothly-radio-group:not([orientation=vertical]) *:not(:first-of-type)>input[type=radio]~label{border-left:none}smoothly-radio-group[orientation=vertical]{flex-direction:column}smoothly-radio-group[orientation=vertical] :first-of-type>input[type=radio]~label{border-radius:4px 4px 0 0}smoothly-radio-group[orientation=vertical] :last-of-type>input[type=radio]~label{border-radius:0 0 4px 4px}smoothly-radio-group:not([orientation=vertical]){flex-direction:row}smoothly-radio-group:not([orientation=vertical]) :first-of-type>input[type=radio]~label{border-radius:4px 0 0 4px}smoothly-radio-group:not([orientation=vertical]) :last-of-type>input[type=radio]~label{border-radius:0 4px 4px 0}";
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-48630c3c.js');
|
|
6
6
|
|
|
7
7
|
const styleCss = "smoothly-reorder>*{cursor:move;transition:transform 0.3s}smoothly-reorder>*.dragging{transition:none;box-shadow:0 0 10px rgba(var(--smoothly-dark-color));z-index:1;user-select:none}";
|
|
8
8
|
|
|
@@ -16,9 +16,9 @@ const SmoothlyReorder = class {
|
|
|
16
16
|
if (this.childrenCache)
|
|
17
17
|
result = this.childrenCache;
|
|
18
18
|
else {
|
|
19
|
-
for (let index = 0; index < this.element.children.length; index++) {
|
|
20
|
-
const element = this.element.children[index];
|
|
21
|
-
if (element instanceof
|
|
19
|
+
for (let index$1 = 0; index$1 < this.element.children.length; index$1++) {
|
|
20
|
+
const element = this.element.children[index$1];
|
|
21
|
+
if (element instanceof index.H) {
|
|
22
22
|
const bounds = element.getBoundingClientRect();
|
|
23
23
|
result.push({
|
|
24
24
|
top: bounds.top,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const Listenable = require('./Listenable-
|
|
5
|
+
const index = require('./index-48630c3c.js');
|
|
6
|
+
const Listenable = require('./Listenable-e157f34c.js');
|
|
7
7
|
require('./GoogleFont-6c4f0da1.js');
|
|
8
8
|
|
|
9
9
|
const styleCss = ".sc-smoothly-trigger-sink-h{display:block}[hidden].sc-smoothly-trigger-sink-h{display:none}";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const Listenable = require('./Listenable-
|
|
5
|
+
const index = require('./index-48630c3c.js');
|
|
6
|
+
const Listenable = require('./Listenable-e157f34c.js');
|
|
7
7
|
require('./GoogleFont-6c4f0da1.js');
|
|
8
8
|
|
|
9
9
|
const styleCss = ".sc-smoothly-trigger-source-h{display:block}[hidden].sc-smoothly-trigger-source-h{display:none}";
|
package/dist/cjs/smoothly.cjs.js
CHANGED
package/dist/collection/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { App, redirect } from "./components/App";
|
|
2
|
-
export { ClientIdentifier, GoogleFont, Icon, Message, Notice, Trigger, Listenable, } from "./model";
|
|
2
|
+
export { ClientIdentifier, GoogleFont, Icon, Message, Notice, Trigger, StateBase, Listenable, } from "./model";
|
|
3
3
|
export { Cosmetic } from "./utilities";
|
|
@@ -10,18 +10,19 @@ export class Listenable {
|
|
|
10
10
|
constructor() {
|
|
11
11
|
_Listenable_listeners.set(this, {});
|
|
12
12
|
}
|
|
13
|
-
listen(property, listener) {
|
|
13
|
+
listen(property, listener, options) {
|
|
14
14
|
var _a, _b;
|
|
15
15
|
(_b = (_a = __classPrivateFieldGet(this, _Listenable_listeners, "f")[property]) === null || _a === void 0 ? void 0 : _a.push(listener)) !== null && _b !== void 0 ? _b : (__classPrivateFieldGet(this, _Listenable_listeners, "f")[property] = [listener]);
|
|
16
|
-
|
|
16
|
+
if (!(options === null || options === void 0 ? void 0 : options.lazy))
|
|
17
|
+
listener(this[property]);
|
|
17
18
|
}
|
|
18
19
|
unlisten(property, listener) {
|
|
19
20
|
var _a, _b;
|
|
20
21
|
const index = (_a = __classPrivateFieldGet(this, _Listenable_listeners, "f")[property]) === null || _a === void 0 ? void 0 : _a.indexOf(listener);
|
|
21
22
|
index != undefined && index >= 0 && ((_b = __classPrivateFieldGet(this, _Listenable_listeners, "f")[property]) === null || _b === void 0 ? void 0 : _b.splice(index, 1));
|
|
22
23
|
}
|
|
23
|
-
static load(backend
|
|
24
|
-
const result = listenable
|
|
24
|
+
static load(backend) {
|
|
25
|
+
const result = backend.listenable;
|
|
25
26
|
return Object.defineProperties(result, getProperties(backend));
|
|
26
27
|
function getProperties(backend) {
|
|
27
28
|
return Object.fromEntries(Object.entries(Object.assign(Object.assign({}, Object.getOwnPropertyDescriptors(backend)), Object.getOwnPropertyDescriptors(Object.getPrototypeOf(backend)))).map(([name, descriptor]) => [
|
|
@@ -45,7 +46,7 @@ export class Listenable {
|
|
|
45
46
|
}
|
|
46
47
|
: {
|
|
47
48
|
get() {
|
|
48
|
-
return backend[name]
|
|
49
|
+
return backend[name];
|
|
49
50
|
},
|
|
50
51
|
},
|
|
51
52
|
]));
|
|
@@ -1309,18 +1309,19 @@ class Listenable {
|
|
|
1309
1309
|
constructor() {
|
|
1310
1310
|
_Listenable_listeners.set(this, {});
|
|
1311
1311
|
}
|
|
1312
|
-
listen(property, listener) {
|
|
1312
|
+
listen(property, listener, options) {
|
|
1313
1313
|
var _a, _b;
|
|
1314
1314
|
(_b = (_a = __classPrivateFieldGet(this, _Listenable_listeners, "f")[property]) === null || _a === void 0 ? void 0 : _a.push(listener)) !== null && _b !== void 0 ? _b : (__classPrivateFieldGet(this, _Listenable_listeners, "f")[property] = [listener]);
|
|
1315
|
-
|
|
1315
|
+
if (!(options === null || options === void 0 ? void 0 : options.lazy))
|
|
1316
|
+
listener(this[property]);
|
|
1316
1317
|
}
|
|
1317
1318
|
unlisten(property, listener) {
|
|
1318
1319
|
var _a, _b;
|
|
1319
1320
|
const index = (_a = __classPrivateFieldGet(this, _Listenable_listeners, "f")[property]) === null || _a === void 0 ? void 0 : _a.indexOf(listener);
|
|
1320
1321
|
index != undefined && index >= 0 && ((_b = __classPrivateFieldGet(this, _Listenable_listeners, "f")[property]) === null || _b === void 0 ? void 0 : _b.splice(index, 1));
|
|
1321
1322
|
}
|
|
1322
|
-
static load(backend
|
|
1323
|
-
const result = listenable
|
|
1323
|
+
static load(backend) {
|
|
1324
|
+
const result = backend.listenable;
|
|
1324
1325
|
return Object.defineProperties(result, getProperties(backend));
|
|
1325
1326
|
function getProperties(backend) {
|
|
1326
1327
|
return Object.fromEntries(Object.entries(Object.assign(Object.assign({}, Object.getOwnPropertyDescriptors(backend)), Object.getOwnPropertyDescriptors(Object.getPrototypeOf(backend)))).map(([name, descriptor]) => [
|
|
@@ -1344,7 +1345,7 @@ class Listenable {
|
|
|
1344
1345
|
}
|
|
1345
1346
|
: {
|
|
1346
1347
|
get() {
|
|
1347
|
-
return backend[name]
|
|
1348
|
+
return backend[name];
|
|
1348
1349
|
},
|
|
1349
1350
|
},
|
|
1350
1351
|
]));
|
|
@@ -1353,6 +1354,13 @@ class Listenable {
|
|
|
1353
1354
|
}
|
|
1354
1355
|
_Listenable_listeners = new WeakMap();
|
|
1355
1356
|
|
|
1357
|
+
class StateBase {
|
|
1358
|
+
constructor(...parameters) {
|
|
1359
|
+
this.listenable = new Listenable();
|
|
1360
|
+
this.client = parameters.length == 1 ? parameters[0] : undefined;
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1356
1364
|
var Hex;
|
|
1357
1365
|
(function (Hex) {
|
|
1358
1366
|
function is(value) {
|
|
@@ -24393,4 +24401,4 @@ const defineCustomElements = (opts) => {
|
|
|
24393
24401
|
}
|
|
24394
24402
|
};
|
|
24395
24403
|
|
|
24396
|
-
export { App, ClientIdentifier, Cosmetic, GoogleFont, Icon, Listenable, Message, Notice, SmoothlyAccordion, SmoothlyAccordionItem, SmoothlyApp, SmoothlyAppDemo, SmoothlyBacktotop, SmoothlyButton, SmoothlyCalendar, SmoothlyCheckbox, SmoothlyCountry, SmoothlyDialog, SmoothlyDialogDemo, SmoothlyDisplay, SmoothlyDisplayAmount, SmoothlyDisplayDateTime, SmoothlyDisplayDemo, SmoothlyFrame, SmoothlyGoogleFont, SmoothlyIcon, SmoothlyIconDemo, SmoothlyInput, SmoothlyInputDate, SmoothlyInputDateRange, SmoothlyInputDemo, SmoothlyInputMonth, SmoothlyItem, SmoothlyMenuOptions, SmoothlyNotification, SmoothlyNotifier, SmoothlyOption, SmoothlyPicker, SmoothlyPopup, SmoothlyQuiet, SmoothlyRadio, SmoothlyRadioButton, SmoothlyRadioButtonItem, SmoothlyRadioGroup, SmoothlyReorder, SmoothlyRoom, SmoothlySelect, SmoothlySelectDemo, SmoothlySelector, SmoothlySkeleton, SmoothlySpinner, SmoothlySubmit, SmoothlySvg, SmoothlyTab, SmoothlyTabSwitch, SmoothlyTable, SmoothlyTableCell, SmoothlyTableDemo, SmoothlyTableExpandableCell, SmoothlyTableExpandableRow, SmoothlyTableHeader, SmoothlyTableRow, SmoothlyTrigger, SmoothlyTriggerSink, SmoothlyTriggerSource, SmoothlyTuple, SmoothlyUrlencoded, Trigger, defineCustomElements, redirect };
|
|
24404
|
+
export { App, ClientIdentifier, Cosmetic, GoogleFont, Icon, Listenable, Message, Notice, SmoothlyAccordion, SmoothlyAccordionItem, SmoothlyApp, SmoothlyAppDemo, SmoothlyBacktotop, SmoothlyButton, SmoothlyCalendar, SmoothlyCheckbox, SmoothlyCountry, SmoothlyDialog, SmoothlyDialogDemo, SmoothlyDisplay, SmoothlyDisplayAmount, SmoothlyDisplayDateTime, SmoothlyDisplayDemo, SmoothlyFrame, SmoothlyGoogleFont, SmoothlyIcon, SmoothlyIconDemo, SmoothlyInput, SmoothlyInputDate, SmoothlyInputDateRange, SmoothlyInputDemo, SmoothlyInputMonth, SmoothlyItem, SmoothlyMenuOptions, SmoothlyNotification, SmoothlyNotifier, SmoothlyOption, SmoothlyPicker, SmoothlyPopup, SmoothlyQuiet, SmoothlyRadio, SmoothlyRadioButton, SmoothlyRadioButtonItem, SmoothlyRadioGroup, SmoothlyReorder, SmoothlyRoom, SmoothlySelect, SmoothlySelectDemo, SmoothlySelector, SmoothlySkeleton, SmoothlySpinner, SmoothlySubmit, SmoothlySvg, SmoothlyTab, SmoothlyTabSwitch, SmoothlyTable, SmoothlyTableCell, SmoothlyTableDemo, SmoothlyTableExpandableCell, SmoothlyTableExpandableRow, SmoothlyTableHeader, SmoothlyTableRow, SmoothlyTrigger, SmoothlyTriggerSink, SmoothlyTriggerSource, SmoothlyTuple, SmoothlyUrlencoded, StateBase, Trigger, defineCustomElements, redirect };
|
|
@@ -782,18 +782,19 @@ class Listenable {
|
|
|
782
782
|
constructor() {
|
|
783
783
|
_Listenable_listeners.set(this, {});
|
|
784
784
|
}
|
|
785
|
-
listen(property, listener) {
|
|
785
|
+
listen(property, listener, options) {
|
|
786
786
|
var _a, _b;
|
|
787
787
|
(_b = (_a = __classPrivateFieldGet(this, _Listenable_listeners, "f")[property]) === null || _a === void 0 ? void 0 : _a.push(listener)) !== null && _b !== void 0 ? _b : (__classPrivateFieldGet(this, _Listenable_listeners, "f")[property] = [listener]);
|
|
788
|
-
|
|
788
|
+
if (!(options === null || options === void 0 ? void 0 : options.lazy))
|
|
789
|
+
listener(this[property]);
|
|
789
790
|
}
|
|
790
791
|
unlisten(property, listener) {
|
|
791
792
|
var _a, _b;
|
|
792
793
|
const index = (_a = __classPrivateFieldGet(this, _Listenable_listeners, "f")[property]) === null || _a === void 0 ? void 0 : _a.indexOf(listener);
|
|
793
794
|
index != undefined && index >= 0 && ((_b = __classPrivateFieldGet(this, _Listenable_listeners, "f")[property]) === null || _b === void 0 ? void 0 : _b.splice(index, 1));
|
|
794
795
|
}
|
|
795
|
-
static load(backend
|
|
796
|
-
const result = listenable
|
|
796
|
+
static load(backend) {
|
|
797
|
+
const result = backend.listenable;
|
|
797
798
|
return Object.defineProperties(result, getProperties(backend));
|
|
798
799
|
function getProperties(backend) {
|
|
799
800
|
return Object.fromEntries(Object.entries(Object.assign(Object.assign({}, Object.getOwnPropertyDescriptors(backend)), Object.getOwnPropertyDescriptors(Object.getPrototypeOf(backend)))).map(([name, descriptor]) => [
|
|
@@ -817,7 +818,7 @@ class Listenable {
|
|
|
817
818
|
}
|
|
818
819
|
: {
|
|
819
820
|
get() {
|
|
820
|
-
return backend[name]
|
|
821
|
+
return backend[name];
|
|
821
822
|
},
|
|
822
823
|
},
|
|
823
824
|
]));
|
|
@@ -2038,6 +2038,8 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
2038
2038
|
const styles = /*@__PURE__*/ new Map();
|
|
2039
2039
|
const win = typeof window !== 'undefined' ? window : {};
|
|
2040
2040
|
const doc = win.document || { head: {} };
|
|
2041
|
+
const H = (win.HTMLElement || class {
|
|
2042
|
+
});
|
|
2041
2043
|
const plt = {
|
|
2042
2044
|
$flags$: 0,
|
|
2043
2045
|
$resourcesUrl$: '',
|
|
@@ -2100,4 +2102,4 @@ const flush = () => {
|
|
|
2100
2102
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
2101
2103
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
2102
2104
|
|
|
2103
|
-
export { Host as H, getElement as a, bootstrapLazy as b, createEvent as c, forceUpdate as f, getRenderingRef as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
2105
|
+
export { Host as H, getElement as a, bootstrapLazy as b, createEvent as c, H as d, forceUpdate as f, getRenderingRef as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
package/dist/esm/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { A as App, C as Cosmetic, N as Notice, r as redirect } from './index-
|
|
2
|
-
import { I as Identifier } from './Listenable-
|
|
3
|
-
export { a as Icon, L as Listenable, M as Message, T as Trigger } from './Listenable-
|
|
1
|
+
export { A as App, C as Cosmetic, N as Notice, r as redirect } from './index-62de77e7.js';
|
|
2
|
+
import { I as Identifier, L as Listenable } from './Listenable-afd6cd7e.js';
|
|
3
|
+
export { a as Icon, L as Listenable, M as Message, T as Trigger } from './Listenable-afd6cd7e.js';
|
|
4
4
|
export { G as GoogleFont } from './GoogleFont-8474516b.js';
|
|
5
|
-
import './index-
|
|
5
|
+
import './index-e9e4cadb.js';
|
|
6
6
|
|
|
7
7
|
class ClientIdentifier {
|
|
8
8
|
constructor() { }
|
|
@@ -16,4 +16,11 @@ class ClientIdentifier {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
class StateBase {
|
|
20
|
+
constructor(...parameters) {
|
|
21
|
+
this.listenable = new Listenable();
|
|
22
|
+
this.client = parameters.length == 1 ? parameters[0] : undefined;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { ClientIdentifier, StateBase };
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-e9e4cadb.js';
|
|
2
|
+
export { s as setNonce } from './index-e9e4cadb.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as getElement, c as createEvent, H as Host } from './index-
|
|
2
|
-
import { r as redirect, A as App, N as Notice } from './index-
|
|
3
|
-
import { T as Trigger, M as Message, a as Icon } from './Listenable-
|
|
1
|
+
import { r as registerInstance, h, a as getElement, c as createEvent, H as Host } from './index-e9e4cadb.js';
|
|
2
|
+
import { r as redirect, A as App, N as Notice } from './index-62de77e7.js';
|
|
3
|
+
import { T as Trigger, M as Message, a as Icon } from './Listenable-afd6cd7e.js';
|
|
4
4
|
import './GoogleFont-8474516b.js';
|
|
5
5
|
import { D as Date$1, L as Language, g as getLanguage, a as DateTime, C as Currency, b as Locale, c as DateRange } from './getLanguage-225b37b0.js';
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-e9e4cadb.js';
|
|
2
2
|
import { A as Alpha2, g as getLanguage } from './getLanguage-225b37b0.js';
|
|
3
3
|
|
|
4
4
|
function from$K(country) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-e9e4cadb.js';
|
|
2
2
|
|
|
3
3
|
const styleCss = "smoothly-radio-group{display:flex;position:relative;color:none !important;background:none !important;margin:0.5em 0}smoothly-radio-group[hidden]{display:none}smoothly-radio-group[orientation=vertical] *:not(:first-of-type)>input[type=radio]~label{border-top:none}smoothly-radio-group:not([orientation=vertical]) *:not(:first-of-type)>input[type=radio]~label{border-left:none}smoothly-radio-group[orientation=vertical]{flex-direction:column}smoothly-radio-group[orientation=vertical] :first-of-type>input[type=radio]~label{border-radius:4px 4px 0 0}smoothly-radio-group[orientation=vertical] :last-of-type>input[type=radio]~label{border-radius:0 0 4px 4px}smoothly-radio-group:not([orientation=vertical]){flex-direction:row}smoothly-radio-group:not([orientation=vertical]) :first-of-type>input[type=radio]~label{border-radius:4px 0 0 4px}smoothly-radio-group:not([orientation=vertical]) :last-of-type>input[type=radio]~label{border-radius:0 4px 4px 0}";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, d as H, a as getElement } from './index-e9e4cadb.js';
|
|
2
2
|
|
|
3
3
|
const styleCss = "smoothly-reorder>*{cursor:move;transition:transform 0.3s}smoothly-reorder>*.dragging{transition:none;box-shadow:0 0 10px rgba(var(--smoothly-dark-color));z-index:1;user-select:none}";
|
|
4
4
|
|
|
@@ -14,7 +14,7 @@ const SmoothlyReorder = class {
|
|
|
14
14
|
else {
|
|
15
15
|
for (let index = 0; index < this.element.children.length; index++) {
|
|
16
16
|
const element = this.element.children[index];
|
|
17
|
-
if (element instanceof
|
|
17
|
+
if (element instanceof H) {
|
|
18
18
|
const bounds = element.getBoundingClientRect();
|
|
19
19
|
result.push({
|
|
20
20
|
top: bounds.top,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
2
|
-
import { T as Trigger, M as Message } from './Listenable-
|
|
1
|
+
import { r as registerInstance, h } from './index-e9e4cadb.js';
|
|
2
|
+
import { T as Trigger, M as Message } from './Listenable-afd6cd7e.js';
|
|
3
3
|
import './GoogleFont-8474516b.js';
|
|
4
4
|
|
|
5
5
|
const styleCss = ".sc-smoothly-trigger-sink-h{display:block}[hidden].sc-smoothly-trigger-sink-h{display:none}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-
|
|
2
|
-
import { M as Message, T as Trigger } from './Listenable-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-e9e4cadb.js';
|
|
2
|
+
import { M as Message, T as Trigger } from './Listenable-afd6cd7e.js';
|
|
3
3
|
import './GoogleFont-8474516b.js';
|
|
4
4
|
|
|
5
5
|
const styleCss = ".sc-smoothly-trigger-source-h{display:block}[hidden].sc-smoothly-trigger-source-h{display:none}";
|
package/dist/esm/smoothly.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-e9e4cadb.js';
|
|
2
|
+
export { s as setNonce } from './index-e9e4cadb.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Patch Browser v2.22.3 | MIT Licensed | https://stenciljs.com
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as App,C as Cosmetic,N as Notice,r as redirect}from"./p-
|
|
1
|
+
export{A as App,C as Cosmetic,N as Notice,r as redirect}from"./p-73bcae40.js";import{I as e,L as s}from"./p-05154935.js";export{a as Icon,L as Listenable,M as Message,T as Trigger}from"./p-05154935.js";export{G as GoogleFont}from"./p-bd478a53.js";import"./p-e5d867e5.js";class t{constructor(){}static get value(){return t.valueCache=localStorage.getItem("clientIdentifier")||void 0,t.valueCache||(t.valueCache=e.generate(12),localStorage.setItem("clientIdentifier",t.valueCache)),t.valueCache}}class o{constructor(...e){this.listenable=new s,this.client=1==e.length?e[0]:void 0}}export{t as ClientIdentifier,o as StateBase}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
class t{constructor(){this.encoding="utf-8"}encode(t){return Uint8Array.from(unescape(encodeURIComponent(t)).split(""),(t=>t.charCodeAt(0)))}}const n={standard:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",url:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",ordered:"-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",reversed:"zyxwvutsrqponmlkjihgfedcba_ZYXWVUTSRQPONMLKJIHGFEDCBA9876543210-"};function e(e,r="standard",i=""){let s;const a=t=>"ordered"==r||"reversed"==r?t.reverse():t;switch(typeof e){case"string":s=(new t).encode(e);break;case"number":s=a(new Uint8Array(new BigUint64Array([BigInt(e)]).buffer));break;case"bigint":s=a(new Uint8Array(new BigUint64Array([e]).buffer));break;default:s=e instanceof Uint8Array?e:new Uint8Array(e)}const o=n[r],c=[];for(let t=0;t<s.length;t+=3){const n=s[t],e=t+1<s.length?s[t+1]:0,r=t+2<s.length?s[t+2]:0;c.push(o[n>>>2]),c.push(o[(3&n)<<4|e>>>4]),c.push(o[(15&e)<<2|r>>>6]),c.push(o[63&r])}const u=Math.ceil(s.length/3*4);return c.join("").substring(0,u)+i.repeat(c.length-u)}function r(t,e="standard"){for(;t.endsWith("=")&&t.length>0;)t=t.substring(0,t.length-1);const r=n[e],i=[...t].map((t=>r.indexOf(t))),s=new Uint8Array(Math.floor(i.length/4*3));for(let t=0;t<s.length;t+=3){const n=i.shift()||0,e=i.shift()||0,r=i.shift()||0,a=i.shift()||0;s[t]=n<<2|e>>>4,s[t+1]=(15&e)<<4|r>>>2,s[t+2]=(3&r)<<6|a}return"ordered"==e||"reversed"==e?s.reverse():s}function i(t,e=1,r="standard"){const a=n[r],o=t.length>1?t.substring(0,t.length-1):e>0?"":a[63],c=(0==t.length?0:a.indexOf(t[t.length-1]))+e;return(c>63||c<0?i(o,Math.floor(c/63),r):o)+a[s(c,64)]}function s(t,n){return t>=0?t%n:s(t+n,n)}const a="undefined"!=typeof window?window.crypto||window.msCrypto:self.crypto||self.msCrypto;var o,c,u,f,S,y,l,w,p,A,h,d,b,g,v,H;!function(t){t.create=function(t,n,...e){const[r,...i]=(s=e,Array.isArray(s)&&s.length>0&&"string"==typeof s[0]?e.map((t=>Object.fromEntries(t.split(",").map((t=>t.split(":",2).map((t=>t.trim()))))))):e);var s;const a=Object.assign({},...Object.entries(r).map((([t,n])=>[t,[n,...i.map((n=>n[t])).filter((t=>t))]])).map((([n,e])=>({get[n](){return Object.assign(t(e),{name:n})}}))));return{current:a[n],...a}}}(o||(o={})),function(t){t.is=function(t){return"object"==typeof t&&(null==t.key||"string"==typeof t.key)&&"string"==typeof t.value&&"string"==typeof t.salt},t.stringify=function(t){return t.key=t.key&&4!=t.key.length?t.key.slice(-2):t.key,[t.key,t.salt,t.value].join(".")},t.parse=function(n){const e=n.split("."),r={key:e[0],salt:e[1],value:e[2]};return t.is(r)?r:void 0}}(c||(c={})),function(t){function n(t,n="url"){return e(t,n)}function s(t){t.length%2==1&&(t+="0");const e=new Uint8Array(t.length/2);for(let n=0;n<e.length;n++)e[n]=16*Number.parseInt(t[2*n],16)+Number.parseInt(t[2*n+1],16);return n(e)}function o(t,n){const e=r(t,"url");let i=[];for(const t of e)i.push(Math.floor(t/16).toString(16),(t%16).toString(16));return n&&(i=i.slice(0,n)),i.join("")}function c(t,n=1){const e=i(t,n,"ordered");return e.length==t.length?e:e.substring(e.length-t.length)}t.is=function(t,n){return"string"==typeof t&&(null==n||t.length==n)&&Array.from(t).every((t=>t>="0"&&t<="9"||t>="A"&&t<="Z"||t>="a"&&t<="z"||"-"==t||"_"==t))},t.fromUint24=function(t){return s(t.toString(16).padStart(6,"0"))},t.toUint24=function(t){return Number.parseInt(o(t,6),16)},t.fromUint48=function(t){return s(t.toString(16).padStart(12,"0"))},t.toUint48=function(t){return Number.parseInt(o(t,12),16)},t.fromBinary=n,t.toBinary=function(t){return r(t,"url")},t.generate=function(t,r,i){let s;return(i||0==i||""==i)&&(s=e(i,r).substring(0,t)),(null!=s?s:"")+n(a.getRandomValues(new Uint8Array(t/4*3)),r).substring(0,t-(s?s.length:0))},t.fromHexadecimal=s,t.toHexadecimal=o,t.min=function(t){return"".padStart(t,"-")},t.max=function(t){return"".padStart(t,"z")},t.next=c,t.previous=function(t,n=1){return c(t,-n)},t.length=[4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128],(t.Length||(t.Length={})).is=function(t){return"number"==typeof t&&t>=4&&t<=128&&(252&t)==t}}(u||(u={})),function(t){t.is=function(t){return"string"==typeof t||"object"==typeof t&&"string"==typeof t.hash&&"string"==typeof t.salt},t.hash=async function(t,n,r){return r||(r=e(a.getRandomValues(new Uint8Array(64)))),{hash:await t.sign(r+n),salt:r}},t.verify=async function(n,e,r){return(await t.hash(n,r,e.salt)).hash==e.hash},(t.Hashed||(t.Hashed={})).is=function(t){return"object"==typeof t&&"string"==typeof t.hash&&"string"==typeof t.salt}}(f||(f={})),function(t){t.generate=function(t){return a.getRandomValues(t)}}(S||(S={})),(y||(y={})).is=function(t){return"HMAC"==t||"RSA"==t||"ECDSA"==t||"RSA-PSS"==t};class m{async sign(n){return"string"==typeof n?e(await this.signBinary((new t).encode(n)),"url"):this.signBinary(n)}verify(n,e){return"string"==typeof e&&(e=r(e,"url")),this.verifyBinary("string"==typeof n?(new t).encode(n):n,e)}}class P extends m{constructor(t,n,e){super(),this.hash=t,n&&("string"==typeof n&&(n=r(n)),this.publicKey=a.subtle.importKey("spki",n,{name:"ECDSA",namedCurve:"P-512"==t.replace("SHA","P")?"P-521":t.replace("SHA","P")},!1,["verify"])),e&&("string"==typeof e&&(e=r(e)),this.privateKey=a.subtle.importKey("pkcs8",e,{name:"ECDSA",namedCurve:"P-512"==t.replace("SHA","P")?"P-521":t.replace("SHA","P")},!0,["sign","verify"]))}async signBinary(t){return new Uint8Array(await a.subtle.sign({name:"ECDSA",hash:{name:this.hash}},await this.privateKey,t))}async verifyBinary(t,n){return a.subtle.verify({name:"ECDSA",hash:{name:this.hash}},await this.publicKey,n,t)}}!function(t){t.is=function(t){return"SHA-1"==t||"SHA-256"==t||"SHA-384"==t||"SHA-512"==t}}(l||(l={}));class k extends m{async verifyBinary(t,n){return e(await this.signBinary(t),"url")==e(n,"url")}}class E extends k{constructor(t,n){super(),this.hash=t,"string"==typeof n&&(n=r(n,"url")),this.key=a.subtle.importKey("raw",n,{name:"HMAC",hash:{name:t}},!1,["sign","verify"])}async signBinary(t){return new Uint8Array(await a.subtle.sign("HMAC",await this.key,t))}}class j extends k{signBinary(t){return Promise.resolve(new Uint8Array(0))}}class R extends m{get parameters(){return C(this.variant)}constructor(t,n,e){super(),this.variant=t,this.publicKey=n,this.privateKey=e}async signBinary(t){return this.privateKey?new Uint8Array(await a.subtle.sign(this.parameters,await this.privateKey,t)):new Uint8Array(0)}async verifyBinary(t,n){return!!this.publicKey&&a.subtle.verify(this.parameters,await this.publicKey,n,t)}async export(t,n="base64"){const r=await("private"==t?this.privateKey:this.publicKey);let i;if(r)switch(n){case"jwk":i=await a.subtle.exportKey("jwk",r);break;case"buffer":i=await a.subtle.exportKey("private"==t?"pkcs8":"spki",r);break;case"base64":{const n=await this.export(t,"buffer");i=n&&e(new Uint8Array(n),"standard","=")}break;case"pem":{const n=await this.export(t,"base64");i=n&&[`-----BEGIN ${t.toUpperCase()} KEY-----`,...U(n,64),`-----END ${t.toUpperCase()} KEY-----`].join("\n")}}return i}static import(t,n,e,r){return new R(t,R.importHelper(t,n,"public",e),R.importHelper(t,n,"private",r))}static importHelper(t,n,e,i){return"string"==typeof i&&(i=r(i)),i&&a.subtle.importKey("private"==e?"pkcs8":"spki",i,{name:C(t).name,hash:{name:n}},!0,["private"==e?"sign":"verify"])}static generate(t,n,e){const r=a.subtle.generateKey({name:C(t).name,modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:n},!0,["sign","verify"]);return new R(t,r.then((t=>t.publicKey)),r.then((t=>t.privateKey)))}}function*U(t,n){let e=0;for(;e<t.length;)yield t.slice(e,e+=n)}function C(t){return"PSS"==t?{name:"RSA-PSS",saltLength:128}:{name:"RSASSA-PKCS1-v1_5"}}!function(t){!function(t){t.is=y.is}(t.Algorithm||(t.Algorithm={})),(t.Hash||(t.Hash={})).is=l.is,t.generate=function(t,n,e){let r;switch(t){case"RSA":r=R.generate("SSA",n,e);break;case"RSA-PSS":r=R.generate("PSS",n,e)}return r},t.create=function(t,n,...e){let r;if(null!=n)switch(t){case"HMAC":r=new E(n,e[0]);break;case"RSA":r=R.import("SSA",n,e[0],e[1]);break;case"RSA-PSS":r=R.import("PSS",n,e[0],e[1]);break;case"ECDSA":r=new P(n,e[0],e[1])}else"None"==t&&(r=new j);return r}}(w||(w={})),Uint8Array.__proto__.from||(Uint8Array.__proto__.from=function(t,n,e){const r=Uint8Array.__proto__;if("function"!=typeof this)throw new TypeError("# is not a constructor");if(this.__proto__!==r)throw new TypeError("this is not a typed array.");if("function"!=typeof(n=n||(t=>t)))throw new TypeError("specified argument is not a function");if(!(t=Object(t)).length)return new this(0);let i=[];for(const t of i)i.push(t);i=i.map(n,e);const s=new this(i.length);for(let t=0;t<s.length;t++)s[t]=i[t];return s}),function(t){t.is=function(t){return"object"==typeof t&&Object.values(t).every((t=>t&&"object"==typeof t&&"forward"in t&&"function"==typeof t.forward&&"backward"in t&&"function"==typeof t.backward))}}(p||(p={})),function(t){t.is=function(t){return Array.isArray(t)&&t.every((t=>"string"==typeof t))}}(A||(A={})),function(t){t.is=function(t){return"object"==typeof t&&Object.entries(t).every((t=>"string"==typeof t[1]))}}(h||(h={})),function(t){t.is=function(t){return A.is(t)||p.is(t)||h.is(t)},(t.Converter||(t.Converter={})).is=p.is,(t.Crypto||(t.Crypto={})).is=A.is,(t.Renamer||(t.Renamer={})).is=h.is}(d||(d={})),function(t){t.is=function(t){return"object"==typeof t&&"function"==typeof t.apply&&"function"==typeof t.reverse},t.create=function(t){return{apply:t.apply?t.apply:t=>t,reverse:t.reverse?t.reverse:t=>t}}}(b||(b={})),function(t){t.is=function(t){return"RS256"==t||"RS384"==t||"RS512"==t||"ES256"==t||"ES384"==t||"ES512"==t||"PS256"==t||"PS384"==t||"PS512"==t}}(g||(g={})),function(t){t.is=function(t){return"HS256"==t||"HS384"==t||"HS512"==t}}(v||(v={})),function(t){t.is=function(t){return"none"==t||v.is(t)||g.is(t)},function(t){t.is=v.is}(t.Symmetric||(t.Symmetric={})),(t.Asymmetric||(t.Asymmetric={})).is=g.is}(H||(H={}));var O,M;class B{constructor(t,n){this.name=t,this.signer=n}sign(t){return n=this,e=void 0,i=function*(){return this.signer.sign(t)},new((r=void 0)||(r=Promise))((function(t,s){function a(t){try{c(i.next(t))}catch(t){s(t)}}function o(t){try{c(i.throw(t))}catch(t){s(t)}}function c(n){var e;n.done?t(n.value):(e=n.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,o)}c((i=i.apply(n,e||[])).next())}));var n,e,r,i}verify(t,n){return this.signer.verify(t,n)}static create(t,...n){let e;switch(t){case"ES256":e=w.create("ECDSA","SHA-256",n[0],n[1]);break;case"ES384":e=w.create("ECDSA","SHA-384",n[0],n[1]);break;case"ES512":e=w.create("ECDSA","SHA-512",n[0],n[1]);break;case"PS256":e=w.create("RSA-PSS","SHA-256",n[0],n[1]);break;case"PS384":e=w.create("RSA-PSS","SHA-384",n[0],n[1]);break;case"PS512":e=w.create("RSA-PSS","SHA-512",n[0],n[1]);break;case"HS256":e=w.create("HMAC","SHA-256",n[0]);break;case"HS384":e=w.create("HMAC","SHA-384",n[0]);break;case"HS512":e=w.create("HMAC","SHA-512",n[0]);break;case"RS256":e=w.create("RSA","SHA-256",n[0],n[1]);break;case"RS384":e=w.create("RSA","SHA-384",n[0],n[1]);break;case"RS512":e=w.create("RSA","SHA-512",n[0],n[1]);break;case"none":e=w.create("None")}return e&&new B(t,e)}static none(){return B.create("none")}static HS256(t){return B.create("HS256",t)}static HS384(t){return B.create("HS384",t)}static HS512(t){return B.create("HS512",t)}static RS256(t,n){return B.create("RS256",t,n)}static RS384(t,n){return B.create("RS384",t,n)}static RS512(t,n){return B.create("RS512",t,n)}static ES256(t,n){return B.create("ES256",t,n)}static ES384(t,n){return B.create("ES384",t,n)}static ES512(t,n){return B.create("ES512",t,n)}static PS256(t,n){return B.create("PS256",t,n)}static PS384(t,n){return B.create("PS384",t,n)}static PS512(t,n){return B.create("PS512",t,n)}}!function(t){var n;(n=t.Name||(t.Name={})).is=H.is,function(t){t.is=H.Symmetric.is}(n.Symmetric||(n.Symmetric={})),function(t){t.is=H.Asymmetric.is}(n.Asymmetric||(n.Asymmetric={}))}(B||(B={})),function(t){t.is=function(t){return"string"==typeof t&&/^[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*$/.test(t)}}(O||(O={})),function(t){const n={"*":"https://site-icons.pages.dev/ionicons@5.0.0/dist/svg/${name}.svg"},e={};t.load=async function(t){var r,i;const s=(null!==(r=n[t])&&void 0!==r?r:n["*"]).replace("${name}",t);return null!==(i=e[s])&&void 0!==i?i:e[s]=async function(t){const n=await globalThis.fetch(t);return n.ok?n.text():void 0}(s)},t.add=function(t,...e){for(const r of e)n[r]=t}}(M||(M={}));class D{static is(t){return"object"==typeof t&&"string"==typeof t.destination&&null!=t.content}static send(t,n,e){if(D.is(t)&&null==e){(e=n)||(e=window);const r=t.destination.split("#",2);e.postMessage(t={destination:r[1],content:t.content},r[0])}else"string"!=typeof e&&(e||(e=window),"string"==typeof t&&D.send({destination:t,content:n},e))}static listen(t,n,e){const r=t.split("#",2);let i="";2==r.length&&(t=r[0],i=r[1]),(e||window).addEventListener("message",(e=>{const r=e.data;!D.is(r)||"*"!=t&&e.origin!=t||""!=i&&r.destination!=i||n(r.destination,r.content)}))}}class x{static is(t){return"object"==typeof t&&"string"==typeof t.name}}var N,T=function(t,n,e,r){if("a"===e&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?t!==n||!r:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?r:"a"===e?r.call(t):r?r.value:n.get(t)};class z{constructor(){N.set(this,{})}listen(t,n){var e,r;null!==(r=null===(e=T(this,N,"f")[t])||void 0===e?void 0:e.push(n))&&void 0!==r||(T(this,N,"f")[t]=[n]),n(this[t])}unlisten(t,n){var e,r;const i=null===(e=T(this,N,"f")[t])||void 0===e?void 0:e.indexOf(n);null!=i&&i>=0&&(null===(r=T(this,N,"f")[t])||void 0===r||r.splice(i,1))}static load(t,n){const e=null!=n?n:new z;return Object.defineProperties(e,function(t){return Object.fromEntries(Object.entries(Object.assign(Object.assign({},Object.getOwnPropertyDescriptors(t)),Object.getOwnPropertyDescriptors(Object.getPrototypeOf(t)))).map((([n,r])=>[n,"function"==typeof r.value?{get:()=>t[n].bind(t)}:r.writable||r.set?{get:()=>t[n],set(r){var i;t[n]=r,null===(i=T(e,N,"f")[n])||void 0===i||i.forEach((e=>e(t[n])))}}:{get:()=>t[n].bind(t)}])))}(t))}}N=new WeakMap;export{u as I,z as L,D as M,x as T,M as a}
|
|
1
|
+
class t{constructor(){this.encoding="utf-8"}encode(t){return Uint8Array.from(unescape(encodeURIComponent(t)).split(""),(t=>t.charCodeAt(0)))}}const n={standard:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",url:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",ordered:"-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",reversed:"zyxwvutsrqponmlkjihgfedcba_ZYXWVUTSRQPONMLKJIHGFEDCBA9876543210-"};function e(e,r="standard",i=""){let s;const a=t=>"ordered"==r||"reversed"==r?t.reverse():t;switch(typeof e){case"string":s=(new t).encode(e);break;case"number":s=a(new Uint8Array(new BigUint64Array([BigInt(e)]).buffer));break;case"bigint":s=a(new Uint8Array(new BigUint64Array([e]).buffer));break;default:s=e instanceof Uint8Array?e:new Uint8Array(e)}const o=n[r],c=[];for(let t=0;t<s.length;t+=3){const n=s[t],e=t+1<s.length?s[t+1]:0,r=t+2<s.length?s[t+2]:0;c.push(o[n>>>2]),c.push(o[(3&n)<<4|e>>>4]),c.push(o[(15&e)<<2|r>>>6]),c.push(o[63&r])}const u=Math.ceil(s.length/3*4);return c.join("").substring(0,u)+i.repeat(c.length-u)}function r(t,e="standard"){for(;t.endsWith("=")&&t.length>0;)t=t.substring(0,t.length-1);const r=n[e],i=[...t].map((t=>r.indexOf(t))),s=new Uint8Array(Math.floor(i.length/4*3));for(let t=0;t<s.length;t+=3){const n=i.shift()||0,e=i.shift()||0,r=i.shift()||0,a=i.shift()||0;s[t]=n<<2|e>>>4,s[t+1]=(15&e)<<4|r>>>2,s[t+2]=(3&r)<<6|a}return"ordered"==e||"reversed"==e?s.reverse():s}function i(t,e=1,r="standard"){const a=n[r],o=t.length>1?t.substring(0,t.length-1):e>0?"":a[63],c=(0==t.length?0:a.indexOf(t[t.length-1]))+e;return(c>63||c<0?i(o,Math.floor(c/63),r):o)+a[s(c,64)]}function s(t,n){return t>=0?t%n:s(t+n,n)}const a="undefined"!=typeof window?window.crypto||window.msCrypto:self.crypto||self.msCrypto;var o,c,u,f,S,y,l,p,w,A,h,d,b,g,v,H;!function(t){t.create=function(t,n,...e){const[r,...i]=(s=e,Array.isArray(s)&&s.length>0&&"string"==typeof s[0]?e.map((t=>Object.fromEntries(t.split(",").map((t=>t.split(":",2).map((t=>t.trim()))))))):e);var s;const a=Object.assign({},...Object.entries(r).map((([t,n])=>[t,[n,...i.map((n=>n[t])).filter((t=>t))]])).map((([n,e])=>({get[n](){return Object.assign(t(e),{name:n})}}))));return{current:a[n],...a}}}(o||(o={})),function(t){t.is=function(t){return"object"==typeof t&&(null==t.key||"string"==typeof t.key)&&"string"==typeof t.value&&"string"==typeof t.salt},t.stringify=function(t){return t.key=t.key&&4!=t.key.length?t.key.slice(-2):t.key,[t.key,t.salt,t.value].join(".")},t.parse=function(n){const e=n.split("."),r={key:e[0],salt:e[1],value:e[2]};return t.is(r)?r:void 0}}(c||(c={})),function(t){function n(t,n="url"){return e(t,n)}function s(t){t.length%2==1&&(t+="0");const e=new Uint8Array(t.length/2);for(let n=0;n<e.length;n++)e[n]=16*Number.parseInt(t[2*n],16)+Number.parseInt(t[2*n+1],16);return n(e)}function o(t,n){const e=r(t,"url");let i=[];for(const t of e)i.push(Math.floor(t/16).toString(16),(t%16).toString(16));return n&&(i=i.slice(0,n)),i.join("")}function c(t,n=1){const e=i(t,n,"ordered");return e.length==t.length?e:e.substring(e.length-t.length)}t.is=function(t,n){return"string"==typeof t&&(null==n||t.length==n)&&Array.from(t).every((t=>t>="0"&&t<="9"||t>="A"&&t<="Z"||t>="a"&&t<="z"||"-"==t||"_"==t))},t.fromUint24=function(t){return s(t.toString(16).padStart(6,"0"))},t.toUint24=function(t){return Number.parseInt(o(t,6),16)},t.fromUint48=function(t){return s(t.toString(16).padStart(12,"0"))},t.toUint48=function(t){return Number.parseInt(o(t,12),16)},t.fromBinary=n,t.toBinary=function(t){return r(t,"url")},t.generate=function(t,r,i){let s;return(i||0==i||""==i)&&(s=e(i,r).substring(0,t)),(null!=s?s:"")+n(a.getRandomValues(new Uint8Array(t/4*3)),r).substring(0,t-(s?s.length:0))},t.fromHexadecimal=s,t.toHexadecimal=o,t.min=function(t){return"".padStart(t,"-")},t.max=function(t){return"".padStart(t,"z")},t.next=c,t.previous=function(t,n=1){return c(t,-n)},t.length=[4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128],(t.Length||(t.Length={})).is=function(t){return"number"==typeof t&&t>=4&&t<=128&&(252&t)==t}}(u||(u={})),function(t){t.is=function(t){return"string"==typeof t||"object"==typeof t&&"string"==typeof t.hash&&"string"==typeof t.salt},t.hash=async function(t,n,r){return r||(r=e(a.getRandomValues(new Uint8Array(64)))),{hash:await t.sign(r+n),salt:r}},t.verify=async function(n,e,r){return(await t.hash(n,r,e.salt)).hash==e.hash},(t.Hashed||(t.Hashed={})).is=function(t){return"object"==typeof t&&"string"==typeof t.hash&&"string"==typeof t.salt}}(f||(f={})),function(t){t.generate=function(t){return a.getRandomValues(t)}}(S||(S={})),(y||(y={})).is=function(t){return"HMAC"==t||"RSA"==t||"ECDSA"==t||"RSA-PSS"==t};class m{async sign(n){return"string"==typeof n?e(await this.signBinary((new t).encode(n)),"url"):this.signBinary(n)}verify(n,e){return"string"==typeof e&&(e=r(e,"url")),this.verifyBinary("string"==typeof n?(new t).encode(n):n,e)}}class P extends m{constructor(t,n,e){super(),this.hash=t,n&&("string"==typeof n&&(n=r(n)),this.publicKey=a.subtle.importKey("spki",n,{name:"ECDSA",namedCurve:"P-512"==t.replace("SHA","P")?"P-521":t.replace("SHA","P")},!1,["verify"])),e&&("string"==typeof e&&(e=r(e)),this.privateKey=a.subtle.importKey("pkcs8",e,{name:"ECDSA",namedCurve:"P-512"==t.replace("SHA","P")?"P-521":t.replace("SHA","P")},!0,["sign","verify"]))}async signBinary(t){return new Uint8Array(await a.subtle.sign({name:"ECDSA",hash:{name:this.hash}},await this.privateKey,t))}async verifyBinary(t,n){return a.subtle.verify({name:"ECDSA",hash:{name:this.hash}},await this.publicKey,n,t)}}!function(t){t.is=function(t){return"SHA-1"==t||"SHA-256"==t||"SHA-384"==t||"SHA-512"==t}}(l||(l={}));class k extends m{async verifyBinary(t,n){return e(await this.signBinary(t),"url")==e(n,"url")}}class E extends k{constructor(t,n){super(),this.hash=t,"string"==typeof n&&(n=r(n,"url")),this.key=a.subtle.importKey("raw",n,{name:"HMAC",hash:{name:t}},!1,["sign","verify"])}async signBinary(t){return new Uint8Array(await a.subtle.sign("HMAC",await this.key,t))}}class j extends k{signBinary(t){return Promise.resolve(new Uint8Array(0))}}class R extends m{get parameters(){return C(this.variant)}constructor(t,n,e){super(),this.variant=t,this.publicKey=n,this.privateKey=e}async signBinary(t){return this.privateKey?new Uint8Array(await a.subtle.sign(this.parameters,await this.privateKey,t)):new Uint8Array(0)}async verifyBinary(t,n){return!!this.publicKey&&a.subtle.verify(this.parameters,await this.publicKey,n,t)}async export(t,n="base64"){const r=await("private"==t?this.privateKey:this.publicKey);let i;if(r)switch(n){case"jwk":i=await a.subtle.exportKey("jwk",r);break;case"buffer":i=await a.subtle.exportKey("private"==t?"pkcs8":"spki",r);break;case"base64":{const n=await this.export(t,"buffer");i=n&&e(new Uint8Array(n),"standard","=")}break;case"pem":{const n=await this.export(t,"base64");i=n&&[`-----BEGIN ${t.toUpperCase()} KEY-----`,...U(n,64),`-----END ${t.toUpperCase()} KEY-----`].join("\n")}}return i}static import(t,n,e,r){return new R(t,R.importHelper(t,n,"public",e),R.importHelper(t,n,"private",r))}static importHelper(t,n,e,i){return"string"==typeof i&&(i=r(i)),i&&a.subtle.importKey("private"==e?"pkcs8":"spki",i,{name:C(t).name,hash:{name:n}},!0,["private"==e?"sign":"verify"])}static generate(t,n,e){const r=a.subtle.generateKey({name:C(t).name,modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:n},!0,["sign","verify"]);return new R(t,r.then((t=>t.publicKey)),r.then((t=>t.privateKey)))}}function*U(t,n){let e=0;for(;e<t.length;)yield t.slice(e,e+=n)}function C(t){return"PSS"==t?{name:"RSA-PSS",saltLength:128}:{name:"RSASSA-PKCS1-v1_5"}}!function(t){!function(t){t.is=y.is}(t.Algorithm||(t.Algorithm={})),(t.Hash||(t.Hash={})).is=l.is,t.generate=function(t,n,e){let r;switch(t){case"RSA":r=R.generate("SSA",n,e);break;case"RSA-PSS":r=R.generate("PSS",n,e)}return r},t.create=function(t,n,...e){let r;if(null!=n)switch(t){case"HMAC":r=new E(n,e[0]);break;case"RSA":r=R.import("SSA",n,e[0],e[1]);break;case"RSA-PSS":r=R.import("PSS",n,e[0],e[1]);break;case"ECDSA":r=new P(n,e[0],e[1])}else"None"==t&&(r=new j);return r}}(p||(p={})),Uint8Array.__proto__.from||(Uint8Array.__proto__.from=function(t,n,e){const r=Uint8Array.__proto__;if("function"!=typeof this)throw new TypeError("# is not a constructor");if(this.__proto__!==r)throw new TypeError("this is not a typed array.");if("function"!=typeof(n=n||(t=>t)))throw new TypeError("specified argument is not a function");if(!(t=Object(t)).length)return new this(0);let i=[];for(const t of i)i.push(t);i=i.map(n,e);const s=new this(i.length);for(let t=0;t<s.length;t++)s[t]=i[t];return s}),function(t){t.is=function(t){return"object"==typeof t&&Object.values(t).every((t=>t&&"object"==typeof t&&"forward"in t&&"function"==typeof t.forward&&"backward"in t&&"function"==typeof t.backward))}}(w||(w={})),function(t){t.is=function(t){return Array.isArray(t)&&t.every((t=>"string"==typeof t))}}(A||(A={})),function(t){t.is=function(t){return"object"==typeof t&&Object.entries(t).every((t=>"string"==typeof t[1]))}}(h||(h={})),function(t){t.is=function(t){return A.is(t)||w.is(t)||h.is(t)},(t.Converter||(t.Converter={})).is=w.is,(t.Crypto||(t.Crypto={})).is=A.is,(t.Renamer||(t.Renamer={})).is=h.is}(d||(d={})),function(t){t.is=function(t){return"object"==typeof t&&"function"==typeof t.apply&&"function"==typeof t.reverse},t.create=function(t){return{apply:t.apply?t.apply:t=>t,reverse:t.reverse?t.reverse:t=>t}}}(b||(b={})),function(t){t.is=function(t){return"RS256"==t||"RS384"==t||"RS512"==t||"ES256"==t||"ES384"==t||"ES512"==t||"PS256"==t||"PS384"==t||"PS512"==t}}(g||(g={})),function(t){t.is=function(t){return"HS256"==t||"HS384"==t||"HS512"==t}}(v||(v={})),function(t){t.is=function(t){return"none"==t||v.is(t)||g.is(t)},function(t){t.is=v.is}(t.Symmetric||(t.Symmetric={})),(t.Asymmetric||(t.Asymmetric={})).is=g.is}(H||(H={}));var O,M;class B{constructor(t,n){this.name=t,this.signer=n}sign(t){return n=this,e=void 0,i=function*(){return this.signer.sign(t)},new((r=void 0)||(r=Promise))((function(t,s){function a(t){try{c(i.next(t))}catch(t){s(t)}}function o(t){try{c(i.throw(t))}catch(t){s(t)}}function c(n){var e;n.done?t(n.value):(e=n.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,o)}c((i=i.apply(n,e||[])).next())}));var n,e,r,i}verify(t,n){return this.signer.verify(t,n)}static create(t,...n){let e;switch(t){case"ES256":e=p.create("ECDSA","SHA-256",n[0],n[1]);break;case"ES384":e=p.create("ECDSA","SHA-384",n[0],n[1]);break;case"ES512":e=p.create("ECDSA","SHA-512",n[0],n[1]);break;case"PS256":e=p.create("RSA-PSS","SHA-256",n[0],n[1]);break;case"PS384":e=p.create("RSA-PSS","SHA-384",n[0],n[1]);break;case"PS512":e=p.create("RSA-PSS","SHA-512",n[0],n[1]);break;case"HS256":e=p.create("HMAC","SHA-256",n[0]);break;case"HS384":e=p.create("HMAC","SHA-384",n[0]);break;case"HS512":e=p.create("HMAC","SHA-512",n[0]);break;case"RS256":e=p.create("RSA","SHA-256",n[0],n[1]);break;case"RS384":e=p.create("RSA","SHA-384",n[0],n[1]);break;case"RS512":e=p.create("RSA","SHA-512",n[0],n[1]);break;case"none":e=p.create("None")}return e&&new B(t,e)}static none(){return B.create("none")}static HS256(t){return B.create("HS256",t)}static HS384(t){return B.create("HS384",t)}static HS512(t){return B.create("HS512",t)}static RS256(t,n){return B.create("RS256",t,n)}static RS384(t,n){return B.create("RS384",t,n)}static RS512(t,n){return B.create("RS512",t,n)}static ES256(t,n){return B.create("ES256",t,n)}static ES384(t,n){return B.create("ES384",t,n)}static ES512(t,n){return B.create("ES512",t,n)}static PS256(t,n){return B.create("PS256",t,n)}static PS384(t,n){return B.create("PS384",t,n)}static PS512(t,n){return B.create("PS512",t,n)}}!function(t){var n;(n=t.Name||(t.Name={})).is=H.is,function(t){t.is=H.Symmetric.is}(n.Symmetric||(n.Symmetric={})),function(t){t.is=H.Asymmetric.is}(n.Asymmetric||(n.Asymmetric={}))}(B||(B={})),function(t){t.is=function(t){return"string"==typeof t&&/^[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*$/.test(t)}}(O||(O={})),function(t){const n={"*":"https://site-icons.pages.dev/ionicons@5.0.0/dist/svg/${name}.svg"},e={};t.load=async function(t){var r,i;const s=(null!==(r=n[t])&&void 0!==r?r:n["*"]).replace("${name}",t);return null!==(i=e[s])&&void 0!==i?i:e[s]=async function(t){const n=await globalThis.fetch(t);return n.ok?n.text():void 0}(s)},t.add=function(t,...e){for(const r of e)n[r]=t}}(M||(M={}));class D{static is(t){return"object"==typeof t&&"string"==typeof t.destination&&null!=t.content}static send(t,n,e){if(D.is(t)&&null==e){(e=n)||(e=window);const r=t.destination.split("#",2);e.postMessage(t={destination:r[1],content:t.content},r[0])}else"string"!=typeof e&&(e||(e=window),"string"==typeof t&&D.send({destination:t,content:n},e))}static listen(t,n,e){const r=t.split("#",2);let i="";2==r.length&&(t=r[0],i=r[1]),(e||window).addEventListener("message",(e=>{const r=e.data;!D.is(r)||"*"!=t&&e.origin!=t||""!=i&&r.destination!=i||n(r.destination,r.content)}))}}class x{static is(t){return"object"==typeof t&&"string"==typeof t.name}}var N,T=function(t,n,e,r){if("a"===e&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?t!==n||!r:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?r:"a"===e?r.call(t):r?r.value:n.get(t)};class z{constructor(){N.set(this,{})}listen(t,n,e){var r,i;null!==(i=null===(r=T(this,N,"f")[t])||void 0===r?void 0:r.push(n))&&void 0!==i||(T(this,N,"f")[t]=[n]),(null==e?void 0:e.lazy)||n(this[t])}unlisten(t,n){var e,r;const i=null===(e=T(this,N,"f")[t])||void 0===e?void 0:e.indexOf(n);null!=i&&i>=0&&(null===(r=T(this,N,"f")[t])||void 0===r||r.splice(i,1))}static load(t){const n=t.listenable;return Object.defineProperties(n,function(t){return Object.fromEntries(Object.entries(Object.assign(Object.assign({},Object.getOwnPropertyDescriptors(t)),Object.getOwnPropertyDescriptors(Object.getPrototypeOf(t)))).map((([e,r])=>[e,"function"==typeof r.value?{get:()=>t[e].bind(t)}:r.writable||r.set?{get:()=>t[e],set(r){var i;t[e]=r,null===(i=T(n,N,"f")[e])||void 0===i||i.forEach((n=>n(t[e])))}}:{get:()=>t[e]}])))}(t))}}N=new WeakMap;export{u as I,z as L,D as M,x as T,M as a}
|