@maggioli-design-system/mds-modal 4.4.1 → 4.4.2
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/{index-2ef62850.js → index-7b67ecdb.js} +73 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mds-modal.cjs.entry.js +3 -3
- package/dist/cjs/mds-modal.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/common/keyboard-manager.js +2 -2
- package/dist/components/mds-modal.js +2 -2
- package/dist/documentation.json +3 -3
- package/dist/esm/{index-822a7c21.js → index-5f4fd73d.js} +73 -8
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-modal.entry.js +3 -3
- package/dist/esm/mds-modal.js +3 -3
- package/dist/esm-es5/index-5f4fd73d.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-modal.entry.js +1 -1
- package/dist/esm-es5/mds-modal.js +1 -1
- package/dist/mds-modal/mds-modal.esm.js +1 -1
- package/dist/mds-modal/mds-modal.js +1 -1
- package/dist/mds-modal/p-3289100c.system.js +1 -0
- package/dist/mds-modal/p-b327d4c0.js +2 -0
- package/dist/mds-modal/p-bc48f1e8.system.js +2 -0
- package/dist/mds-modal/p-e441efd8.entry.js +1 -0
- package/dist/mds-modal/p-ff89867f.system.entry.js +1 -0
- package/dist/stats.json +31 -29
- package/dist/types/stencil-public-runtime.d.ts +19 -0
- package/documentation.json +3 -3
- package/package.json +1 -1
- package/src/common/keyboard-manager.ts +2 -2
- package/www/build/mds-modal.esm.js +1 -1
- package/www/build/mds-modal.js +1 -1
- package/www/build/p-3289100c.system.js +1 -0
- package/www/build/p-b327d4c0.js +2 -0
- package/www/build/p-bc48f1e8.system.js +2 -0
- package/www/build/p-e441efd8.entry.js +1 -0
- package/www/build/p-ff89867f.system.entry.js +1 -0
- package/dist/esm-es5/index-822a7c21.js +0 -2
- package/dist/mds-modal/p-0e1a634c.system.js +0 -1
- package/dist/mds-modal/p-62ef7bee.system.entry.js +0 -1
- package/dist/mds-modal/p-6acd79b6.system.js +0 -2
- package/dist/mds-modal/p-cc1354fb.js +0 -2
- package/dist/mds-modal/p-f67f79a7.entry.js +0 -1
- package/www/build/p-0e1a634c.system.js +0 -1
- package/www/build/p-62ef7bee.system.entry.js +0 -1
- package/www/build/p-6acd79b6.system.js +0 -2
- package/www/build/p-cc1354fb.js +0 -2
- package/www/build/p-f67f79a7.entry.js +0 -1
|
@@ -1010,6 +1010,10 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1010
1010
|
*/
|
|
1011
1011
|
const callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
1012
1012
|
try {
|
|
1013
|
+
/**
|
|
1014
|
+
* minification optimization: `allRenderFn` is `true` if all components have a `render`
|
|
1015
|
+
* method, so we can call the method immediately. If not, check before calling it.
|
|
1016
|
+
*/
|
|
1013
1017
|
instance = instance.render() ;
|
|
1014
1018
|
{
|
|
1015
1019
|
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
@@ -1083,6 +1087,16 @@ const appDidLoad = (who) => {
|
|
|
1083
1087
|
}
|
|
1084
1088
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
|
1085
1089
|
};
|
|
1090
|
+
/**
|
|
1091
|
+
* Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
|
|
1092
|
+
* e.g. custom element node. If a build figures out that e.g. no component
|
|
1093
|
+
* has a `componentDidLoad` method, the instance method gets removed from the
|
|
1094
|
+
* output bundle and this function returns `undefined`.
|
|
1095
|
+
* @param instance any object that may or may not contain methods
|
|
1096
|
+
* @param method method name
|
|
1097
|
+
* @param arg single arbitrary argument
|
|
1098
|
+
* @returns result of method call if it exists, otherwise `undefined`
|
|
1099
|
+
*/
|
|
1086
1100
|
const safeCall = (instance, method, arg) => {
|
|
1087
1101
|
if (instance && instance[method]) {
|
|
1088
1102
|
try {
|
|
@@ -1273,7 +1287,18 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1273
1287
|
}
|
|
1274
1288
|
return Cstr;
|
|
1275
1289
|
};
|
|
1276
|
-
|
|
1290
|
+
/**
|
|
1291
|
+
* Initialize a Stencil component given a reference to its host element, its
|
|
1292
|
+
* runtime bookkeeping data structure, runtime metadata about the component,
|
|
1293
|
+
* and (optionally) an HMR version ID.
|
|
1294
|
+
*
|
|
1295
|
+
* @param elm a host element
|
|
1296
|
+
* @param hostRef the element's runtime bookkeeping object
|
|
1297
|
+
* @param cmpMeta runtime metadata for the Stencil component
|
|
1298
|
+
* @param hmrVersionId an (optional) HMR version ID
|
|
1299
|
+
*/
|
|
1300
|
+
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1301
|
+
let Cstr;
|
|
1277
1302
|
// initializeComponent
|
|
1278
1303
|
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
1279
1304
|
// Let the runtime know that the component has been initialized
|
|
@@ -1573,23 +1598,50 @@ const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !==
|
|
|
1573
1598
|
* @returns void
|
|
1574
1599
|
*/
|
|
1575
1600
|
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
1601
|
+
/**
|
|
1602
|
+
* A WeakMap mapping runtime component references to their corresponding host reference
|
|
1603
|
+
* instances.
|
|
1604
|
+
*/
|
|
1576
1605
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1606
|
+
/**
|
|
1607
|
+
* Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
|
|
1608
|
+
*
|
|
1609
|
+
* @param ref the runtime ref of interest
|
|
1610
|
+
* @returns the Host reference (if found) or undefined
|
|
1611
|
+
*/
|
|
1577
1612
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1613
|
+
/**
|
|
1614
|
+
* Register a lazy instance with the {@link hostRefs} object so it's
|
|
1615
|
+
* corresponding {@link d.HostRef} can be retrieved later.
|
|
1616
|
+
*
|
|
1617
|
+
* @param lazyInstance the lazy instance of interest
|
|
1618
|
+
* @param hostRef that instances `HostRef` object
|
|
1619
|
+
* @returns a reference to the host ref WeakMap
|
|
1620
|
+
*/
|
|
1578
1621
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
1579
|
-
|
|
1622
|
+
/**
|
|
1623
|
+
* Register a host element for a Stencil component, setting up various metadata
|
|
1624
|
+
* and callbacks based on {@link BUILD} flags as well as the component's runtime
|
|
1625
|
+
* metadata.
|
|
1626
|
+
*
|
|
1627
|
+
* @param hostElement the host element to register
|
|
1628
|
+
* @param cmpMeta runtime metadata for that component
|
|
1629
|
+
* @returns a reference to the host ref WeakMap
|
|
1630
|
+
*/
|
|
1631
|
+
const registerHost = (hostElement, cmpMeta) => {
|
|
1580
1632
|
const hostRef = {
|
|
1581
1633
|
$flags$: 0,
|
|
1582
|
-
$hostElement$:
|
|
1634
|
+
$hostElement$: hostElement,
|
|
1583
1635
|
$cmpMeta$: cmpMeta,
|
|
1584
1636
|
$instanceValues$: new Map(),
|
|
1585
1637
|
};
|
|
1586
1638
|
{
|
|
1587
1639
|
hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
|
|
1588
|
-
|
|
1589
|
-
|
|
1640
|
+
hostElement['s-p'] = [];
|
|
1641
|
+
hostElement['s-rc'] = [];
|
|
1590
1642
|
}
|
|
1591
|
-
addHostEventListeners(
|
|
1592
|
-
return hostRefs.set(
|
|
1643
|
+
addHostEventListeners(hostElement, hostRef, cmpMeta.$listeners$);
|
|
1644
|
+
return hostRefs.set(hostElement, hostRef);
|
|
1593
1645
|
};
|
|
1594
1646
|
const isMemberInElement = (elm, memberName) => memberName in elm;
|
|
1595
1647
|
const consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -1602,7 +1654,20 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1602
1654
|
if (module) {
|
|
1603
1655
|
return module[exportName];
|
|
1604
1656
|
}
|
|
1605
|
-
|
|
1657
|
+
|
|
1658
|
+
if (!hmrVersionId || !BUILD.hotModuleReplacement) {
|
|
1659
|
+
const processMod = importedModule => {
|
|
1660
|
+
cmpModules.set(bundleId, importedModule);
|
|
1661
|
+
return importedModule[exportName];
|
|
1662
|
+
}
|
|
1663
|
+
switch(bundleId) {
|
|
1664
|
+
|
|
1665
|
+
case 'mds-modal.cjs':
|
|
1666
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1667
|
+
/* webpackMode: "lazy" */
|
|
1668
|
+
'./mds-modal.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1606
1671
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1607
1672
|
/* @vite-ignore */
|
|
1608
1673
|
/* webpackInclude: /\.entry\.js$/ */
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -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-7b67ecdb.js');
|
|
6
6
|
|
|
7
7
|
const defineCustomElements = (win, options) => {
|
|
8
8
|
if (typeof window === 'undefined') return undefined;
|
|
@@ -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-7b67ecdb.js');
|
|
6
6
|
|
|
7
7
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
8
8
|
|
|
@@ -36,13 +36,13 @@ class KeyboardManager {
|
|
|
36
36
|
};
|
|
37
37
|
this.attachEscapeBehavior = (callBack) => {
|
|
38
38
|
this.escapeCallback = callBack;
|
|
39
|
-
if (
|
|
39
|
+
if (window !== undefined) {
|
|
40
40
|
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
this.detachEscapeBehavior = () => {
|
|
44
44
|
this.escapeCallback = () => { return; };
|
|
45
|
-
if (
|
|
45
|
+
if (window !== undefined) {
|
|
46
46
|
window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
47
47
|
}
|
|
48
48
|
};
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-7b67ecdb.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Browser v4.
|
|
8
|
+
Stencil Client Patch Browser v4.5.0 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchBrowser = () => {
|
|
11
11
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mds-modal.cjs.js', document.baseURI).href));
|
|
@@ -26,13 +26,13 @@ export class KeyboardManager {
|
|
|
26
26
|
};
|
|
27
27
|
this.attachEscapeBehavior = (callBack) => {
|
|
28
28
|
this.escapeCallback = callBack;
|
|
29
|
-
if (
|
|
29
|
+
if (window !== undefined) {
|
|
30
30
|
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
this.detachEscapeBehavior = () => {
|
|
34
34
|
this.escapeCallback = () => { return; };
|
|
35
|
-
if (
|
|
35
|
+
if (window !== undefined) {
|
|
36
36
|
window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
37
37
|
}
|
|
38
38
|
};
|
|
@@ -32,13 +32,13 @@ class KeyboardManager {
|
|
|
32
32
|
};
|
|
33
33
|
this.attachEscapeBehavior = (callBack) => {
|
|
34
34
|
this.escapeCallback = callBack;
|
|
35
|
-
if (
|
|
35
|
+
if (window !== undefined) {
|
|
36
36
|
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
this.detachEscapeBehavior = () => {
|
|
40
40
|
this.escapeCallback = () => { return; };
|
|
41
|
-
if (
|
|
41
|
+
if (window !== undefined) {
|
|
42
42
|
window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
43
43
|
}
|
|
44
44
|
};
|
package/dist/documentation.json
CHANGED
|
@@ -988,6 +988,10 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
988
988
|
*/
|
|
989
989
|
const callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
990
990
|
try {
|
|
991
|
+
/**
|
|
992
|
+
* minification optimization: `allRenderFn` is `true` if all components have a `render`
|
|
993
|
+
* method, so we can call the method immediately. If not, check before calling it.
|
|
994
|
+
*/
|
|
991
995
|
instance = instance.render() ;
|
|
992
996
|
{
|
|
993
997
|
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
@@ -1061,6 +1065,16 @@ const appDidLoad = (who) => {
|
|
|
1061
1065
|
}
|
|
1062
1066
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
|
1063
1067
|
};
|
|
1068
|
+
/**
|
|
1069
|
+
* Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
|
|
1070
|
+
* e.g. custom element node. If a build figures out that e.g. no component
|
|
1071
|
+
* has a `componentDidLoad` method, the instance method gets removed from the
|
|
1072
|
+
* output bundle and this function returns `undefined`.
|
|
1073
|
+
* @param instance any object that may or may not contain methods
|
|
1074
|
+
* @param method method name
|
|
1075
|
+
* @param arg single arbitrary argument
|
|
1076
|
+
* @returns result of method call if it exists, otherwise `undefined`
|
|
1077
|
+
*/
|
|
1064
1078
|
const safeCall = (instance, method, arg) => {
|
|
1065
1079
|
if (instance && instance[method]) {
|
|
1066
1080
|
try {
|
|
@@ -1251,7 +1265,18 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1251
1265
|
}
|
|
1252
1266
|
return Cstr;
|
|
1253
1267
|
};
|
|
1254
|
-
|
|
1268
|
+
/**
|
|
1269
|
+
* Initialize a Stencil component given a reference to its host element, its
|
|
1270
|
+
* runtime bookkeeping data structure, runtime metadata about the component,
|
|
1271
|
+
* and (optionally) an HMR version ID.
|
|
1272
|
+
*
|
|
1273
|
+
* @param elm a host element
|
|
1274
|
+
* @param hostRef the element's runtime bookkeeping object
|
|
1275
|
+
* @param cmpMeta runtime metadata for the Stencil component
|
|
1276
|
+
* @param hmrVersionId an (optional) HMR version ID
|
|
1277
|
+
*/
|
|
1278
|
+
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1279
|
+
let Cstr;
|
|
1255
1280
|
// initializeComponent
|
|
1256
1281
|
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
1257
1282
|
// Let the runtime know that the component has been initialized
|
|
@@ -1551,23 +1576,50 @@ const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !==
|
|
|
1551
1576
|
* @returns void
|
|
1552
1577
|
*/
|
|
1553
1578
|
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
1579
|
+
/**
|
|
1580
|
+
* A WeakMap mapping runtime component references to their corresponding host reference
|
|
1581
|
+
* instances.
|
|
1582
|
+
*/
|
|
1554
1583
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1584
|
+
/**
|
|
1585
|
+
* Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
|
|
1586
|
+
*
|
|
1587
|
+
* @param ref the runtime ref of interest
|
|
1588
|
+
* @returns the Host reference (if found) or undefined
|
|
1589
|
+
*/
|
|
1555
1590
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1591
|
+
/**
|
|
1592
|
+
* Register a lazy instance with the {@link hostRefs} object so it's
|
|
1593
|
+
* corresponding {@link d.HostRef} can be retrieved later.
|
|
1594
|
+
*
|
|
1595
|
+
* @param lazyInstance the lazy instance of interest
|
|
1596
|
+
* @param hostRef that instances `HostRef` object
|
|
1597
|
+
* @returns a reference to the host ref WeakMap
|
|
1598
|
+
*/
|
|
1556
1599
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
1557
|
-
|
|
1600
|
+
/**
|
|
1601
|
+
* Register a host element for a Stencil component, setting up various metadata
|
|
1602
|
+
* and callbacks based on {@link BUILD} flags as well as the component's runtime
|
|
1603
|
+
* metadata.
|
|
1604
|
+
*
|
|
1605
|
+
* @param hostElement the host element to register
|
|
1606
|
+
* @param cmpMeta runtime metadata for that component
|
|
1607
|
+
* @returns a reference to the host ref WeakMap
|
|
1608
|
+
*/
|
|
1609
|
+
const registerHost = (hostElement, cmpMeta) => {
|
|
1558
1610
|
const hostRef = {
|
|
1559
1611
|
$flags$: 0,
|
|
1560
|
-
$hostElement$:
|
|
1612
|
+
$hostElement$: hostElement,
|
|
1561
1613
|
$cmpMeta$: cmpMeta,
|
|
1562
1614
|
$instanceValues$: new Map(),
|
|
1563
1615
|
};
|
|
1564
1616
|
{
|
|
1565
1617
|
hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
|
|
1566
|
-
|
|
1567
|
-
|
|
1618
|
+
hostElement['s-p'] = [];
|
|
1619
|
+
hostElement['s-rc'] = [];
|
|
1568
1620
|
}
|
|
1569
|
-
addHostEventListeners(
|
|
1570
|
-
return hostRefs.set(
|
|
1621
|
+
addHostEventListeners(hostElement, hostRef, cmpMeta.$listeners$);
|
|
1622
|
+
return hostRefs.set(hostElement, hostRef);
|
|
1571
1623
|
};
|
|
1572
1624
|
const isMemberInElement = (elm, memberName) => memberName in elm;
|
|
1573
1625
|
const consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -1580,7 +1632,20 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1580
1632
|
if (module) {
|
|
1581
1633
|
return module[exportName];
|
|
1582
1634
|
}
|
|
1583
|
-
|
|
1635
|
+
|
|
1636
|
+
if (!hmrVersionId || !BUILD.hotModuleReplacement) {
|
|
1637
|
+
const processMod = importedModule => {
|
|
1638
|
+
cmpModules.set(bundleId, importedModule);
|
|
1639
|
+
return importedModule[exportName];
|
|
1640
|
+
}
|
|
1641
|
+
switch(bundleId) {
|
|
1642
|
+
|
|
1643
|
+
case 'mds-modal':
|
|
1644
|
+
return import(
|
|
1645
|
+
/* webpackMode: "lazy" */
|
|
1646
|
+
'./mds-modal.entry.js').then(processMod, consoleError);
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1584
1649
|
return import(
|
|
1585
1650
|
/* @vite-ignore */
|
|
1586
1651
|
/* webpackInclude: /\.entry\.js$/ */
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-5f4fd73d.js';
|
|
2
|
+
export { s as setNonce } from './index-5f4fd73d.js';
|
|
3
3
|
|
|
4
4
|
const defineCustomElements = (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5f4fd73d.js';
|
|
2
2
|
|
|
3
3
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
4
4
|
|
|
@@ -32,13 +32,13 @@ class KeyboardManager {
|
|
|
32
32
|
};
|
|
33
33
|
this.attachEscapeBehavior = (callBack) => {
|
|
34
34
|
this.escapeCallback = callBack;
|
|
35
|
-
if (
|
|
35
|
+
if (window !== undefined) {
|
|
36
36
|
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
this.detachEscapeBehavior = () => {
|
|
40
40
|
this.escapeCallback = () => { return; };
|
|
41
|
-
if (
|
|
41
|
+
if (window !== undefined) {
|
|
42
42
|
window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
43
43
|
}
|
|
44
44
|
};
|
package/dist/esm/mds-modal.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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-5f4fd73d.js';
|
|
2
|
+
export { s as setNonce } from './index-5f4fd73d.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Patch Browser v4.
|
|
5
|
+
Stencil Client Patch Browser v4.5.0 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
const patchBrowser = () => {
|
|
8
8
|
const importMeta = import.meta.url;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(n,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))e[r]=n[r]};return e(n,r)};return function(n,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(n,r);function t(){this.constructor=n}n.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var __awaiter=this&&this.__awaiter||function(e,n,r,t){function a(e){return e instanceof r?e:new r((function(n){n(e)}))}return new(r||(r=Promise))((function(r,i){function o(e){try{s(t.next(e))}catch(e){i(e)}}function u(e){try{s(t["throw"](e))}catch(e){i(e)}}function s(e){e.done?r(e.value):a(e.value).then(o,u)}s((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,a,i,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(e){return function(n){return s([e,n])}}function s(u){if(t)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(r=0)),r)try{if(t=1,a&&(i=u[0]&2?a["return"]:u[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;if(a=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:r.label++;return{value:u[1],done:false};case 5:r.label++;a=u[1];u=[0];continue;case 7:u=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1];i=u;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(u);break}if(i[2])r.ops.pop();r.trys.pop();continue}u=n.call(e,r)}catch(e){u=[6,e];a=0}finally{t=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,r){if(r||arguments.length===2)for(var t=0,a=n.length,i;t<a;t++){if(i||!(t in n)){if(!i)i=Array.prototype.slice.call(n,0,t);i[t]=n[t]}}return e.concat(i||Array.prototype.slice.call(n))};var NAMESPACE="mds-modal";var scopeId;var hostTagName;var isSvgMode=false;var queuePending=false;var createTime=function(e,n){if(n===void 0){n=""}{return function(){return}}};var uniqueTime=function(e,n){{return function(){return}}};var HYDRATED_CSS="{visibility:hidden}[hydrated]{visibility:inherit}";var EMPTY_OBJ={};var isDef=function(e){return e!=null};var isComplexType=function(e){e=typeof e;return e==="object"||e==="function"};function queryNonceMetaTagContent(e){var n,r,t;return(t=(r=(n=e.head)===null||n===void 0?void 0:n.querySelector('meta[name="csp-nonce"]'))===null||r===void 0?void 0:r.getAttribute("content"))!==null&&t!==void 0?t:undefined}var h=function(e,n){var r=[];for(var t=2;t<arguments.length;t++){r[t-2]=arguments[t]}var a=null;var i=false;var o=false;var u=[];var s=function(n){for(var r=0;r<n.length;r++){a=n[r];if(Array.isArray(a)){s(a)}else if(a!=null&&typeof a!=="boolean"){if(i=typeof e!=="function"&&!isComplexType(a)){a=String(a)}if(i&&o){u[u.length-1].t+=a}else{u.push(i?newVNode(null,a):a)}o=i}}};s(r);if(n){{var f=n.className||n.class;if(f){n.class=typeof f!=="object"?f:Object.keys(f).filter((function(e){return f[e]})).join(" ")}}}var l=newVNode(e,null);l.i=n;if(u.length>0){l.o=u}return l};var newVNode=function(e,n){var r={u:0,l:e,t:n,v:null,o:null};{r.i=null}return r};var Host={};var isHost=function(e){return e&&e.l===Host};var parsePropertyValue=function(e,n){if(e!=null&&!isComplexType(e)){if(n&4){return e==="false"?false:e===""||!!e}if(n&1){return String(e)}return e}return e};var getElement=function(e){return getHostRef(e).$hostElement$};var createEvent=function(e,n,r){var t=getElement(e);return{emit:function(e){return emitEvent(t,n,{bubbles:!!(r&4),composed:!!(r&2),cancelable:!!(r&1),detail:e})}}};var emitEvent=function(e,n,r){var t=plt.ce(n,r);e.dispatchEvent(t);return t};var rootAppliedStyles=new WeakMap;var registerStyle=function(e,n,r){var t=styles.get(e);if(supportsConstructableStylesheets&&r){t=t||new CSSStyleSheet;if(typeof t==="string"){t=n}else{t.replaceSync(n)}}else{t=n}styles.set(e,t)};var addStyle=function(e,n,r){var t;var a=getScopeId(n);var i=styles.get(a);e=e.nodeType===11?e:doc;if(i){if(typeof i==="string"){e=e.head||e;var o=rootAppliedStyles.get(e);var u=void 0;if(!o){rootAppliedStyles.set(e,o=new Set)}if(!o.has(a)){{u=doc.createElement("style");u.innerHTML=i;var s=(t=plt.p)!==null&&t!==void 0?t:queryNonceMetaTagContent(doc);if(s!=null){u.setAttribute("nonce",s)}e.insertBefore(u,e.querySelector("link"))}if(o){o.add(a)}}}else if(!e.adoptedStyleSheets.includes(i)){e.adoptedStyleSheets=__spreadArray(__spreadArray([],e.adoptedStyleSheets,true),[i],false)}}return a};var attachStyles=function(e){var n=e.m;var r=e.$hostElement$;var t=n.u;var a=createTime("attachStyles",n.h);var i=addStyle(r.shadowRoot?r.shadowRoot:r.getRootNode(),n);if(t&10){r["s-sc"]=i;r.classList.add(i+"-h")}a()};var getScopeId=function(e,n){return"sc-"+e.h};var setAccessor=function(e,n,r,t,a,i){if(r!==t){var o=isMemberInElement(e,n);var u=n.toLowerCase();if(n==="class"){var s=e.classList;var f=parseClassList(r);var l=parseClassList(t);s.remove.apply(s,f.filter((function(e){return e&&!l.includes(e)})));s.add.apply(s,l.filter((function(e){return e&&!f.includes(e)})))}else if(!o&&n[0]==="o"&&n[1]==="n"){if(n[2]==="-"){n=n.slice(3)}else if(isMemberInElement(win,u)){n=u.slice(2)}else{n=u[2]+n.slice(3)}if(r){plt.rel(e,n,r,false)}if(t){plt.ael(e,n,t,false)}}else{var c=isComplexType(t);if((o||c&&t!==null)&&!a){try{if(!e.tagName.includes("-")){var v=t==null?"":t;if(n==="list"){o=false}else if(r==null||e[n]!=v){e[n]=v}}else{e[n]=t}}catch(e){}}if(t==null||t===false){if(t!==false||e.getAttribute(n)===""){{e.removeAttribute(n)}}}else if((!o||i&4||a)&&!c){t=t===true?"":t;{e.setAttribute(n,t)}}}}};var parseClassListRegex=/\s/;var parseClassList=function(e){return!e?[]:e.split(parseClassListRegex)};var updateElement=function(e,n,r,t){var a=n.v.nodeType===11&&n.v.host?n.v.host:n.v;var i=e&&e.i||EMPTY_OBJ;var o=n.i||EMPTY_OBJ;{for(t in i){if(!(t in o)){setAccessor(a,t,i[t],undefined,r,n.u)}}}for(t in o){setAccessor(a,t,i[t],o[t],r,n.u)}};var createElm=function(e,n,r,t){var a=n.o[r];var i=0;var o;var u;if(a.t!==null){o=a.v=doc.createTextNode(a.t)}else{o=a.v=doc.createElement(a.l);{updateElement(null,a,isSvgMode)}if(isDef(scopeId)&&o["s-si"]!==scopeId){o.classList.add(o["s-si"]=scopeId)}if(a.o){for(i=0;i<a.o.length;++i){u=createElm(e,a,i);if(u){o.appendChild(u)}}}}return o};var addVnodes=function(e,n,r,t,a,i){var o=e;var u;if(o.shadowRoot&&o.tagName===hostTagName){o=o.shadowRoot}for(;a<=i;++a){if(t[a]){u=createElm(null,r,a);if(u){t[a].v=u;o.insertBefore(u,n)}}}};var removeVnodes=function(e,n,r){for(var t=n;t<=r;++t){var a=e[t];if(a){var i=a.v;if(i){i.remove()}}}};var updateChildren=function(e,n,r,t){var a=0;var i=0;var o=n.length-1;var u=n[0];var s=n[o];var f=t.length-1;var l=t[0];var c=t[f];var v;while(a<=o&&i<=f){if(u==null){u=n[++a]}else if(s==null){s=n[--o]}else if(l==null){l=t[++i]}else if(c==null){c=t[--f]}else if(isSameVnode(u,l)){patch(u,l);u=n[++a];l=t[++i]}else if(isSameVnode(s,c)){patch(s,c);s=n[--o];c=t[--f]}else if(isSameVnode(u,c)){patch(u,c);e.insertBefore(u.v,s.v.nextSibling);u=n[++a];c=t[--f]}else if(isSameVnode(s,l)){patch(s,l);e.insertBefore(s.v,u.v);s=n[--o];l=t[++i]}else{{v=createElm(n&&n[i],r,i);l=t[++i]}if(v){{u.v.parentNode.insertBefore(v,u.v)}}}}if(a>o){addVnodes(e,t[f+1]==null?null:t[f+1].v,r,t,i,f)}else if(i>f){removeVnodes(n,a,o)}};var isSameVnode=function(e,n){if(e.l===n.l){return true}return false};var patch=function(e,n){var r=n.v=e.v;var t=e.o;var a=n.o;var i=n.l;var o=n.t;if(o===null){{if(i==="slot");else{updateElement(e,n,isSvgMode)}}if(t!==null&&a!==null){updateChildren(r,t,n,a)}else if(a!==null){if(e.t!==null){r.textContent=""}addVnodes(r,null,n,a,0,a.length-1)}else if(t!==null){removeVnodes(t,0,t.length-1)}}else if(e.t!==o){r.data=o}};var renderVdom=function(e,n,r){if(r===void 0){r=false}var t=e.$hostElement$;var a=e.m;var i=e.C||newVNode(null,null);var o=isHost(n)?n:h(null,null,n);hostTagName=t.tagName;if(a.S){o.i=o.i||{};a.S.map((function(e){var n=e[0],r=e[1];return o.i[r]=t[n]}))}if(r&&o.i){for(var u=0,s=Object.keys(o.i);u<s.length;u++){var f=s[u];if(t.hasAttribute(f)&&!["key","ref","style","class"].includes(f)){o.i[f]=t[f]}}}o.l=null;o.u|=4;e.C=o;o.v=i.v=t.shadowRoot||t;{scopeId=t["s-sc"]}patch(i,o)};var attachToAncestor=function(e,n){if(n&&!e.T&&n["s-p"]){n["s-p"].push(new Promise((function(n){return e.T=n})))}};var scheduleUpdate=function(e,n){{e.u|=16}if(e.u&4){e.u|=512;return}attachToAncestor(e,e._);var r=function(){return dispatchHooks(e,n)};return writeTask(r)};var dispatchHooks=function(e,n){var r=createTime("scheduleUpdate",e.m.h);var t=e.$;var a;if(n){{e.u|=256;if(e.H){e.H.map((function(e){var n=e[0],r=e[1];return safeCall(t,n,r)}));e.H=undefined}}{a=safeCall(t,"componentWillLoad")}}{a=enqueue(a,(function(){return safeCall(t,"componentWillRender")}))}r();return enqueue(a,(function(){return updateComponent(e,t,n)}))};var enqueue=function(e,n){return isPromisey(e)?e.then(n):n()};var isPromisey=function(e){return e instanceof Promise||e&&e.then&&typeof e.then==="function"};var updateComponent=function(e,n,r){return __awaiter(void 0,void 0,void 0,(function(){var t,a,i,o,u,s,f;return __generator(this,(function(l){a=e.$hostElement$;i=createTime("update",e.m.h);o=a["s-rc"];if(r){attachStyles(e)}u=createTime("render",e.m.h);{callRender(e,n,a,r)}if(o){o.map((function(e){return e()}));a["s-rc"]=undefined}u();i();{s=(t=a["s-p"])!==null&&t!==void 0?t:[];f=function(){return postUpdateComponent(e)};if(s.length===0){f()}else{Promise.all(s).then(f);e.u|=4;s.length=0}}return[2]}))}))};var callRender=function(e,n,r,t){try{n=n.render();{e.u&=~16}{e.u|=2}{{{renderVdom(e,n,t)}}}}catch(n){consoleError(n,e.$hostElement$)}return null};var postUpdateComponent=function(e){var n=e.m.h;var r=e.$hostElement$;var t=createTime("postUpdate",n);var a=e.$;var i=e._;{safeCall(a,"componentDidRender")}if(!(e.u&64)){e.u|=64;{addHydratedFlag(r)}t();{e.M(r);if(!i){appDidLoad()}}}else{t()}{if(e.T){e.T();e.T=undefined}if(e.u&512){nextTick((function(){return scheduleUpdate(e,false)}))}e.u&=~(4|512)}};var appDidLoad=function(e){{addHydratedFlag(doc.documentElement)}nextTick((function(){return emitEvent(win,"appload",{detail:{namespace:NAMESPACE}})}))};var safeCall=function(e,n,r){if(e&&e[n]){try{return e[n](r)}catch(e){consoleError(e)}}return undefined};var addHydratedFlag=function(e){return e.setAttribute("hydrated","")};var getValue=function(e,n){return getHostRef(e).k.get(n)};var setValue=function(e,n,r,t){var a=getHostRef(e);var i=a.$hostElement$;var o=a.k.get(n);var u=a.u;var s=a.$;r=parsePropertyValue(r,t.R[n][0]);var f=Number.isNaN(o)&&Number.isNaN(r);var l=r!==o&&!f;if((!(u&8)||o===undefined)&&l){a.k.set(n,r);if(s){if(t.A&&u&128){var c=t.A[n];if(c){c.map((function(e){try{s[e](r,o,n)}catch(e){consoleError(e,i)}}))}}if((u&(2|16))===2){scheduleUpdate(a,false)}}}};var proxyComponent=function(e,n,r){var t;if(n.R){if(e.watchers){n.A=e.watchers}var a=Object.entries(n.R);var i=e.prototype;a.map((function(e){var t=e[0],a=e[1][0];if(a&31||r&2&&a&32){Object.defineProperty(i,t,{get:function(){return getValue(this,t)},set:function(e){setValue(this,t,e,n)},configurable:true,enumerable:true})}}));if(r&1){var o=new Map;i.attributeChangedCallback=function(e,r,t){var a=this;plt.jmp((function(){var u=o.get(e);if(a.hasOwnProperty(u)){t=a[u];delete a[u]}else if(i.hasOwnProperty(u)&&typeof a[u]==="number"&&a[u]==t){return}else if(u==null){var s=getHostRef(a);var f=s===null||s===void 0?void 0:s.u;if(!(f&8)&&f&128&&t!==r){var l=s.$;var c=n.A[e];c===null||c===void 0?void 0:c.forEach((function(n){if(l[n]!=null){l[n].call(l,t,r,e)}}))}return}a[u]=t===null&&typeof a[u]==="boolean"?false:t}))};e.observedAttributes=Array.from(new Set(__spreadArray(__spreadArray([],Object.keys((t=n.A)!==null&&t!==void 0?t:{}),true),a.filter((function(e){var n=e[0],r=e[1];return r[0]&15})).map((function(e){var r=e[0],t=e[1];var a=t[1]||r;o.set(a,r);if(t[0]&512){n.S.push([r,a])}return a})),true)))}}return e};var initializeComponent=function(e,n,r,t){return __awaiter(void 0,void 0,void 0,(function(){var e,t,a,i,o,u,s,f;return __generator(this,(function(l){switch(l.label){case 0:if(!((n.u&32)===0))return[3,3];n.u|=32;e=loadModule(r);if(!e.then)return[3,2];t=uniqueTime();return[4,e];case 1:e=l.sent();t();l.label=2;case 2:if(!e.isProxied){{r.A=e.watchers}proxyComponent(e,r,2);e.isProxied=true}a=createTime("createInstance",r.h);{n.u|=8}try{new e(n)}catch(e){consoleError(e)}{n.u&=~8}{n.u|=128}a();if(e.style){i=e.style;o=getScopeId(r);if(!styles.has(o)){u=createTime("registerStyles",r.h);registerStyle(o,i,!!(r.u&1));u()}}l.label=3;case 3:s=n._;f=function(){return scheduleUpdate(n,true)};if(s&&s["s-rc"]){s["s-rc"].push(f)}else{f()}return[2]}}))}))};var fireConnectedCallback=function(e){};var connectedCallback=function(e){if((plt.u&1)===0){var n=getHostRef(e);var r=n.m;var t=createTime("connectedCallback",r.h);if(!(n.u&1)){n.u|=1;{var a=e;while(a=a.parentNode||a.host){if(a["s-p"]){attachToAncestor(n,n._=a);break}}}if(r.R){Object.entries(r.R).map((function(n){var r=n[0],t=n[1][0];if(t&31&&e.hasOwnProperty(r)){var a=e[r];delete e[r];e[r]=a}}))}{initializeComponent(e,n,r)}}else{addHostEventListeners(e,n,r.V);if(n===null||n===void 0?void 0:n.$);else if(n===null||n===void 0?void 0:n.L){n.L.then((function(){return fireConnectedCallback()}))}}t()}};var disconnectInstance=function(e){{safeCall(e,"disconnectedCallback")}};var disconnectedCallback=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n;return __generator(this,(function(r){if((plt.u&1)===0){n=getHostRef(e);{if(n.q){n.q.map((function(e){return e()}));n.q=undefined}}if(n===null||n===void 0?void 0:n.$){disconnectInstance(n.$)}else if(n===null||n===void 0?void 0:n.L){n.L.then((function(){return disconnectInstance(n.$)}))}}return[2]}))}))};var bootstrapLazy=function(e,n){if(n===void 0){n={}}var r;var t=createTime();var a=[];var i=n.exclude||[];var o=win.customElements;var u=doc.head;var s=u.querySelector("meta[charset]");var f=doc.createElement("style");var l=[];var c;var v=true;Object.assign(plt,n);plt.P=new URL(n.resourcesUrl||"./",doc.baseURI).href;e.map((function(e){e[1].map((function(n){var r;var t={u:n[0],h:n[1],R:n[2],V:n[3]};{t.R=n[2]}{t.V=n[3]}{t.S=[]}{t.A=(r=n[4])!==null&&r!==void 0?r:{}}var u=t.h;var s=function(e){__extends(n,e);function n(n){var r=e.call(this,n)||this;n=r;registerHost(n,t);if(t.u&1){{{n.attachShadow({mode:"open"})}}}return r}n.prototype.connectedCallback=function(){var e=this;if(c){clearTimeout(c);c=null}if(v){l.push(this)}else{plt.jmp((function(){return connectedCallback(e)}))}};n.prototype.disconnectedCallback=function(){var e=this;plt.jmp((function(){return disconnectedCallback(e)}))};n.prototype.componentOnReady=function(){return getHostRef(this).L};return n}(HTMLElement);t.I=e[0];if(!i.includes(u)&&!o.get(u)){a.push(u);o.define(u,proxyComponent(s,t,1))}}))}));{f.innerHTML=a+HYDRATED_CSS;f.setAttribute("data-styles","");var d=(r=plt.p)!==null&&r!==void 0?r:queryNonceMetaTagContent(doc);if(d!=null){f.setAttribute("nonce",d)}u.insertBefore(f,s?s.nextSibling:u.firstChild)}v=false;if(l.length){l.map((function(e){return e.connectedCallback()}))}else{{plt.jmp((function(){return c=setTimeout(appDidLoad,30)}))}}t()};var addHostEventListeners=function(e,n,r,t){if(r){r.map((function(r){var t=r[0],a=r[1],i=r[2];var o=getHostListenerTarget(e,t);var u=hostListenerProxy(n,i);var s=hostListenerOpts(t);plt.ael(o,a,u,s);(n.q=n.q||[]).push((function(){return plt.rel(o,a,u,s)}))}))}};var hostListenerProxy=function(e,n){return function(r){try{{if(e.u&256){e.$[n](r)}else{(e.H=e.H||[]).push([n,r])}}}catch(e){consoleError(e)}}};var getHostListenerTarget=function(e,n){if(n&4)return doc;return e};var hostListenerOpts=function(e){return(e&2)!==0};var setNonce=function(e){return plt.p=e};var hostRefs=new WeakMap;var getHostRef=function(e){return hostRefs.get(e)};var registerInstance=function(e,n){return hostRefs.set(n.$=e,n)};var registerHost=function(e,n){var r={u:0,$hostElement$:e,m:n,k:new Map};{r.L=new Promise((function(e){return r.M=e}));e["s-p"]=[];e["s-rc"]=[]}addHostEventListeners(e,r,n.V);return hostRefs.set(e,r)};var isMemberInElement=function(e,n){return n in e};var consoleError=function(e,n){return(0,console.error)(e,n)};var cmpModules=new Map;var loadModule=function(e,n,r){var t=e.h.replace(/-/g,"_");var a=e.I;var i=cmpModules.get(a);if(i){return i[t]}if(!r||!BUILD.hotModuleReplacement){var o=function(e){cmpModules.set(a,e);return e[t]};switch(a){case"mds-modal":return import("./mds-modal.entry.js").then(o,consoleError)}}return import("./".concat(a,".entry.js").concat("")).then((function(e){{cmpModules.set(a,e)}return e[t]}),consoleError)};var styles=new Map;var win=typeof window!=="undefined"?window:{};var doc=win.document||{head:{}};var plt={u:0,P:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,n,r,t){return e.addEventListener(n,r,t)},rel:function(e,n,r,t){return e.removeEventListener(n,r,t)},ce:function(e,n){return new CustomEvent(e,n)}};var promiseResolve=function(e){return Promise.resolve(e)};var supportsConstructableStylesheets=function(){try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false}();var queueDomReads=[];var queueDomWrites=[];var queueTask=function(e,n){return function(r){e.push(r);if(!queuePending){queuePending=true;if(n&&plt.u&4){nextTick(flush)}else{plt.raf(flush)}}}};var consume=function(e){for(var n=0;n<e.length;n++){try{e[n](performance.now())}catch(e){consoleError(e)}}e.length=0};var flush=function(){consume(queueDomReads);{consume(queueDomWrites);if(queuePending=queueDomReads.length>0){plt.raf(flush)}}};var nextTick=function(e){return promiseResolve().then(e)};var writeTask=queueTask(queueDomWrites,true);export{Host as H,bootstrapLazy as b,createEvent as c,getElement as g,h,promiseResolve as p,registerInstance as r,setNonce as s};
|
package/dist/esm-es5/loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as bootstrapLazy}from"./index-
|
|
1
|
+
import{b as bootstrapLazy}from"./index-5f4fd73d.js";export{s as setNonce}from"./index-5f4fd73d.js";var defineCustomElements=function(e,o){if(typeof window==="undefined")return undefined;return bootstrapLazy([["mds-modal",[[1,"mds-modal",{opened:[1540],position:[1537],stateOpened:[32]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]],{position:["positionChange"],opened:["openedChange"]}]]]],o)};export{defineCustomElements};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-822a7c21.js";function r(t){var o,e,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(o=0;o<t.length;o++)t[o]&&(e=r(t[o]))&&(i&&(i+=" "),i+=e);else for(o in t)t[o]&&(i&&(i+=" "),i+=o);return i}function clsx(){for(var t,o,e=0,i="";e<arguments.length;)(t=arguments[e++])&&(o=r(t))&&(i&&(i+=" "),i+=o);return i}var miBaselineClose='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"/></svg>';var KeyboardManager=function(){function t(){var t=this;this.elements=[];this.handleClickBehaviorDispatchEvent=function(t){if(t.code==="Space"||t.code==="Enter"||t.code==="NumpadEnter"){t.target.click()}};this.handleEscapeBehaviorDispatchEvent=function(o){if(o.code==="Escape"&&t.escapeCallback){t.escapeCallback()}};this.addElement=function(o,e){if(e===void 0){e="element"}t.elements[e]=o};this.attachClickBehavior=function(o){if(o===void 0){o="element"}if(t.elements[o]){t.elements[o].addEventListener("keydown",t.handleClickBehaviorDispatchEvent)}};this.detachClickBehavior=function(o){if(o===void 0){o="element"}if(t.elements[o]){t.elements[o].removeEventListener("keydown",t.handleClickBehaviorDispatchEvent)}};this.attachEscapeBehavior=function(o){t.escapeCallback=o;if(typeof window!==undefined){window.addEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}};this.detachEscapeBehavior=function(){t.escapeCallback=function(){return};if(typeof window!==undefined){window.removeEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}}}return t}();var mdsModalCss='@tailwind components; @tailwind utilities; .focus-off,.focusable,.focusable-light,.focusable-light-off{-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-timing-function:cubic-bezier(0, 0, 0.2, 1);outline-offset:var(--magma-outline-blur-offset);outline:var(--magma-outline-blur);-webkit-transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform, -webkit-box-shadow, -webkit-transform}.focus-on,.focusable-light:focus-visible,.focusable:focus-visible{--magma-outline-blur-offset:var(--magma-outline-focus-offset);--magma-outline-blur:var(--magma-outline-focus)}.focus-light-on,.focusable-light:focus-visible{--magma-outline-blur:2px solid rgb(var(--tone-neutral))}.svg{display:-ms-flexbox;display:flex}.svg svg{aspect-ratio:1 / 1;height:100%;width:100%}.animate-right-intro,.animate-right-outro{-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}.fixed{position:fixed}.absolute{position:absolute}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.ml-auto{margin-left:auto}.flex{display:-ms-flexbox;display:flex}.w-16{width:4rem}.min-w-0{min-width:0px}.max-w-lg{max-width:32rem}.max-w-xl{max-width:36rem}.items-center{-ms-flex-align:center;align-items:center}.gap-4{gap:1rem}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-tone-neutral-09{--tw-border-opacity:1;border-color:rgba(var(--tone-neutral-09), var(--tw-border-opacity))}.bg-transparent{background-color:transparent}.p-4{padding:1rem}.p-8{padding:2rem}.text-tone-neutral-02{--tw-text-opacity:1;color:rgba(var(--tone-neutral-02), var(--tw-text-opacity))}.text-tone-neutral-04{--tw-text-opacity:1;color:rgba(var(--tone-neutral-04), var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-modal-overlay-color:var(--magma-overlay-color, 0 0 0);--mds-modal-overlay-opacity:var(--magma-overlay-opacity, 0.5);--mds-modal-window-background:rgb(var(--tone-neutral));--mds-modal-window-overflow:auto;--mds-modal-window-shadow:0 25px 50px -12px rgb(0 0 0 / 0.25);--mds-modal-z-index:var(--magma-modal-z-index);-webkit-transition-duration:700ms;transition-duration:700ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1);-ms-flex-align:center;align-items:center;background-color:rgba(var(--mds-modal-overlay-color) / 0);display:-ms-flexbox;display:flex;fill:rgb(var(--tone-neutral));inset:0;-ms-flex-pack:center;justify-content:center;-webkit-perspective:600px;perspective:600px;pointer-events:none;position:fixed;z-index:var(--mds-modal-z-index, 1000)}:host([position=top]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}:host([position=bottom]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}:host(.to-bottom-opened),:host(.to-center-opened),:host(.to-left-opened),:host(.to-right-opened),:host(.to-top-opened){-webkit-transition-duration:500ms;transition-duration:500ms;background-color:rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));pointer-events:auto}.close{top:0px;height:2.25rem;width:2.25rem;border-radius:9999px;font-size:2.25rem;line-height:2.5rem;opacity:0;-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);cursor:pointer;fill:inherit;position:absolute;-webkit-transform-origin:center;transform-origin:center;-webkit-transform:translate(0, 24px) rotate(90deg);transform:translate(0, 24px) rotate(90deg);-webkit-transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, transform;transition-property:opacity, outline, outline-offset, transform, -webkit-transform}.window{height:100%;gap:0px;background-color:var(--mds-modal-window-background);-webkit-box-shadow:var(--mds-modal-window-shadow);box-shadow:var(--mds-modal-window-shadow);display:grid;grid-template-rows:1fr;max-width:calc(100vw - 80px);overflow:var(--mds-modal-window-overflow)}.window--top{grid-template-rows:auto 1fr}.window--bottom{grid-template-rows:1fr auto}.window--top-bottom{grid-template-rows:auto 1fr auto}:host(.to-bottom){padding:2rem}@media (max-width: 767px){:host(.to-bottom){padding:1rem}}:host(.to-bottom){-ms-flex-pack:center;justify-content:center}:host(.to-bottom) .window,:host(.to-bottom)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-bottom-intro) .window,:host(.to-bottom-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-bottom-opened.to-bottom-outro) .window,:host(.to-bottom-opened.to-bottom-outro)>::slotted([slot="window"]),:host(.to-bottom-opened) .window,:host(.to-bottom-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-bottom-outro) .window,:host(.to-bottom-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-center){padding:2rem}@media (max-width: 767px){:host(.to-center){padding:1rem}}:host(.to-center){-ms-flex-pack:center;justify-content:center}:host(.to-center) .window,:host(.to-center)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-center-intro) .window,:host(.to-center-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-center-opened.to-center-outro) .window,:host(.to-center-opened.to-center-outro)>::slotted([slot="window"]),:host(.to-center-opened) .window,:host(.to-center-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-center-outro) .window,:host(.to-center-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-left){-ms-flex-pack:start;justify-content:flex-start}:host(.to-left) .window,:host(.to-left)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-left-intro) .window,:host(.to-left-intro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-opened.to-left-outro) .window,:host(.to-left-opened.to-left-outro)>::slotted([slot="window"]),:host(.to-left-opened) .window,:host(.to-left-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-left-opened) .close,:host(.to-left-opened.to-left-outro) .close{opacity:1;-webkit-transform:translate(-24px, 24px) rotate(0);transform:translate(-24px, 24px) rotate(0)}:host(.to-left-outro) .window,:host(.to-left-outro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-outro) .close{-webkit-transform:translate(24px, 24px) rotate(-90deg);transform:translate(24px, 24px) rotate(-90deg)}:host(.to-left) .close{right:0px;-webkit-transform:translate(36px, 24px) rotate(90deg);transform:translate(36px, 24px) rotate(90deg)}:host(.to-right){-ms-flex-pack:end;justify-content:flex-end}:host(.to-right) .window,:host(.to-right)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-right-intro) .window,:host(.to-right-intro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-opened.to-right-outro) .window,:host(.to-right-opened.to-right-outro)>::slotted([slot="window"]),:host(.to-right-opened) .window,:host(.to-right-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-right-opened) .close,:host(.to-right-opened.to-right-outro) .close{opacity:1;-webkit-transform:translate(24px, 24px) rotate(0);transform:translate(24px, 24px) rotate(0)}:host(.to-right-outro) .window,:host(.to-right-outro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-outro) .close{-webkit-transform:translate(-24px, 24px) rotate(90deg);transform:translate(-24px, 24px) rotate(90deg)}:host(.to-right) .close{left:0px;-webkit-transform:translate(-36px, 24px) rotate(-90deg);transform:translate(-36px, 24px) rotate(-90deg)}:host(.to-top){padding:2rem}@media (max-width: 767px){:host(.to-top){padding:1rem}}:host(.to-top){-ms-flex-pack:center;justify-content:center}:host(.to-top) .window,:host(.to-top)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-top-intro) .window,:host(.to-top-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-top-opened.to-top-outro) .window,:host(.to-top-opened.to-top-outro)>::slotted([slot="window"]),:host(.to-top-opened) .window,:host(.to-top-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-top-outro) .window,:host(.to-top-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}@media (max-width: 767px){.mobile\\:w-12{width:3rem}}';var MdsModal=function(){function t(t){var o=this;registerInstance(this,t);this.closeEvent=createEvent(this,"mdsModalClose",7);this.window=false;this.top=false;this.bottom=false;this.animationState="intro";this.km=new KeyboardManager;this.componentDidLoad=function(){var t;o.km.addElement(o.host,"host");var e=(t=o.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".close");if(e)o.km.addElement(e,"close");o.km.attachEscapeBehavior((function(){return o.closeEvent.emit()}));o.km.attachClickBehavior("close")};this.animationName=function(t,e){if(t===void 0){t=""}if(e===void 0){e=""}return"to-".concat(e!==""?e:o.position).concat(t!==""?"-"+t:"")};this.closeModal=function(t){var e;if(((e=t.target)===null||e===void 0?void 0:e.localName)!=="mds-modal"){return}o.opened=t.target!==t.currentTarget;if(!o.opened){o.closeEvent.emit()}};this.stateOpened=undefined;this.opened=false;this.position="center"}t.prototype.componentWillLoad=function(){var t;this.bottom=this.host.querySelector('[slot="bottom"]')!==null;this.top=this.host.querySelector('[slot="top"]')!==null;this.window=this.host.querySelector('[slot="window"]')!==null;this.stateOpened=this.opened;if(!this.window){this.position="right"}if(this.window){(t=this.host.querySelector('[slot="window"]'))===null||t===void 0?void 0:t.setAttribute("role","modal")}};t.prototype.componentWillRender=function(){this.animationState=this.opened?"intro":"outro";this.host.classList.add(this.animationName())};t.prototype.componentDidRender=function(){var t=this;this.animationDeelay=window.setTimeout((function(){t.animationState=t.animationState==="intro"?"outro":"intro";t.host.classList.remove(t.animationName(t.animationState==="intro"?"outro":"intro"));t.host.classList.add(t.animationName(t.animationState));window.clearTimeout(t.animationDeelay)}),500)};t.prototype.disconnectedCallback=function(){this.km.detachEscapeBehavior();this.km.detachClickBehavior("close")};t.prototype.positionChange=function(t,o){window.clearTimeout(this.animationDeelay);this.host.classList.remove(this.animationName("",o));this.host.classList.remove(this.animationName("intro",o));this.host.classList.remove(this.animationName("outro",o))};t.prototype.openedChange=function(t){this.stateOpened=t;window.clearTimeout(this.animationDeelay)};t.prototype.onModalCloseListener=function(){this.opened=false};t.prototype.onBannerCloseListener=function(){this.opened=false};t.prototype.render=function(){var t=this;return h(Host,{"aria-modal":clsx(this.opened?"true":"false"),class:clsx(this.stateOpened&&this.animationName("opened")),onClick:function(o){t.closeModal(o)}},this.window?h("slot",{name:"window"}):h("div",{class:clsx("window",(this.top||this.bottom)&&"window-".concat(this.top?"-top":"").concat(this.bottom?"-bottom":"")),role:"dialog",part:"window"},this.top&&h("slot",{name:"top"}),h("slot",null),this.bottom&&h("slot",{name:"bottom"})),!this.window&&h("i",{innerHTML:miBaselineClose,tabindex:"0",onClick:function(o){t.closeModal(o)},class:"svg close focusable-light"}))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{position:["positionChange"],opened:["openedChange"]}},enumerable:false,configurable:true});return t}();MdsModal.style=mdsModalCss;export{MdsModal as mds_modal};
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-5f4fd73d.js";function r(t){var o,i,e="";if("string"==typeof t||"number"==typeof t)e+=t;else if("object"==typeof t)if(Array.isArray(t))for(o=0;o<t.length;o++)t[o]&&(i=r(t[o]))&&(e&&(e+=" "),e+=i);else for(o in t)t[o]&&(e&&(e+=" "),e+=o);return e}function clsx(){for(var t,o,i=0,e="";i<arguments.length;)(t=arguments[i++])&&(o=r(t))&&(e&&(e+=" "),e+=o);return e}var miBaselineClose='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"/></svg>';var KeyboardManager=function(){function t(){var t=this;this.elements=[];this.handleClickBehaviorDispatchEvent=function(t){if(t.code==="Space"||t.code==="Enter"||t.code==="NumpadEnter"){t.target.click()}};this.handleEscapeBehaviorDispatchEvent=function(o){if(o.code==="Escape"&&t.escapeCallback){t.escapeCallback()}};this.addElement=function(o,i){if(i===void 0){i="element"}t.elements[i]=o};this.attachClickBehavior=function(o){if(o===void 0){o="element"}if(t.elements[o]){t.elements[o].addEventListener("keydown",t.handleClickBehaviorDispatchEvent)}};this.detachClickBehavior=function(o){if(o===void 0){o="element"}if(t.elements[o]){t.elements[o].removeEventListener("keydown",t.handleClickBehaviorDispatchEvent)}};this.attachEscapeBehavior=function(o){t.escapeCallback=o;if(window!==undefined){window.addEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}};this.detachEscapeBehavior=function(){t.escapeCallback=function(){return};if(window!==undefined){window.removeEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}}}return t}();var mdsModalCss='@tailwind components; @tailwind utilities; .focus-off,.focusable,.focusable-light,.focusable-light-off{-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-timing-function:cubic-bezier(0, 0, 0.2, 1);outline-offset:var(--magma-outline-blur-offset);outline:var(--magma-outline-blur);-webkit-transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform, -webkit-box-shadow, -webkit-transform}.focus-on,.focusable-light:focus-visible,.focusable:focus-visible{--magma-outline-blur-offset:var(--magma-outline-focus-offset);--magma-outline-blur:var(--magma-outline-focus)}.focus-light-on,.focusable-light:focus-visible{--magma-outline-blur:2px solid rgb(var(--tone-neutral))}.svg{display:-ms-flexbox;display:flex}.svg svg{aspect-ratio:1 / 1;height:100%;width:100%}.animate-right-intro,.animate-right-outro{-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}.fixed{position:fixed}.absolute{position:absolute}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.ml-auto{margin-left:auto}.flex{display:-ms-flexbox;display:flex}.w-16{width:4rem}.min-w-0{min-width:0px}.max-w-lg{max-width:32rem}.max-w-xl{max-width:36rem}.items-center{-ms-flex-align:center;align-items:center}.gap-4{gap:1rem}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-tone-neutral-09{--tw-border-opacity:1;border-color:rgba(var(--tone-neutral-09), var(--tw-border-opacity))}.bg-transparent{background-color:transparent}.p-4{padding:1rem}.p-8{padding:2rem}.text-tone-neutral-02{--tw-text-opacity:1;color:rgba(var(--tone-neutral-02), var(--tw-text-opacity))}.text-tone-neutral-04{--tw-text-opacity:1;color:rgba(var(--tone-neutral-04), var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-modal-overlay-color:var(--magma-overlay-color, 0 0 0);--mds-modal-overlay-opacity:var(--magma-overlay-opacity, 0.5);--mds-modal-window-background:rgb(var(--tone-neutral));--mds-modal-window-overflow:auto;--mds-modal-window-shadow:0 25px 50px -12px rgb(0 0 0 / 0.25);--mds-modal-z-index:var(--magma-modal-z-index);-webkit-transition-duration:700ms;transition-duration:700ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1);-ms-flex-align:center;align-items:center;background-color:rgba(var(--mds-modal-overlay-color) / 0);display:-ms-flexbox;display:flex;fill:rgb(var(--tone-neutral));inset:0;-ms-flex-pack:center;justify-content:center;-webkit-perspective:600px;perspective:600px;pointer-events:none;position:fixed;z-index:var(--mds-modal-z-index, 1000)}:host([position=top]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}:host([position=bottom]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}:host(.to-bottom-opened),:host(.to-center-opened),:host(.to-left-opened),:host(.to-right-opened),:host(.to-top-opened){-webkit-transition-duration:500ms;transition-duration:500ms;background-color:rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));pointer-events:auto}.close{top:0px;height:2.25rem;width:2.25rem;border-radius:9999px;font-size:2.25rem;line-height:2.5rem;opacity:0;-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);cursor:pointer;fill:inherit;position:absolute;-webkit-transform-origin:center;transform-origin:center;-webkit-transform:translate(0, 24px) rotate(90deg);transform:translate(0, 24px) rotate(90deg);-webkit-transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, transform;transition-property:opacity, outline, outline-offset, transform, -webkit-transform}.window{height:100%;gap:0px;background-color:var(--mds-modal-window-background);-webkit-box-shadow:var(--mds-modal-window-shadow);box-shadow:var(--mds-modal-window-shadow);display:grid;grid-template-rows:1fr;max-width:calc(100vw - 80px);overflow:var(--mds-modal-window-overflow)}.window--top{grid-template-rows:auto 1fr}.window--bottom{grid-template-rows:1fr auto}.window--top-bottom{grid-template-rows:auto 1fr auto}:host(.to-bottom){padding:2rem}@media (max-width: 767px){:host(.to-bottom){padding:1rem}}:host(.to-bottom){-ms-flex-pack:center;justify-content:center}:host(.to-bottom) .window,:host(.to-bottom)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-bottom-intro) .window,:host(.to-bottom-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-bottom-opened.to-bottom-outro) .window,:host(.to-bottom-opened.to-bottom-outro)>::slotted([slot="window"]),:host(.to-bottom-opened) .window,:host(.to-bottom-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-bottom-outro) .window,:host(.to-bottom-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-center){padding:2rem}@media (max-width: 767px){:host(.to-center){padding:1rem}}:host(.to-center){-ms-flex-pack:center;justify-content:center}:host(.to-center) .window,:host(.to-center)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-center-intro) .window,:host(.to-center-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-center-opened.to-center-outro) .window,:host(.to-center-opened.to-center-outro)>::slotted([slot="window"]),:host(.to-center-opened) .window,:host(.to-center-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-center-outro) .window,:host(.to-center-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-left){-ms-flex-pack:start;justify-content:flex-start}:host(.to-left) .window,:host(.to-left)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-left-intro) .window,:host(.to-left-intro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-opened.to-left-outro) .window,:host(.to-left-opened.to-left-outro)>::slotted([slot="window"]),:host(.to-left-opened) .window,:host(.to-left-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-left-opened) .close,:host(.to-left-opened.to-left-outro) .close{opacity:1;-webkit-transform:translate(-24px, 24px) rotate(0);transform:translate(-24px, 24px) rotate(0)}:host(.to-left-outro) .window,:host(.to-left-outro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-outro) .close{-webkit-transform:translate(24px, 24px) rotate(-90deg);transform:translate(24px, 24px) rotate(-90deg)}:host(.to-left) .close{right:0px;-webkit-transform:translate(36px, 24px) rotate(90deg);transform:translate(36px, 24px) rotate(90deg)}:host(.to-right){-ms-flex-pack:end;justify-content:flex-end}:host(.to-right) .window,:host(.to-right)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-right-intro) .window,:host(.to-right-intro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-opened.to-right-outro) .window,:host(.to-right-opened.to-right-outro)>::slotted([slot="window"]),:host(.to-right-opened) .window,:host(.to-right-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-right-opened) .close,:host(.to-right-opened.to-right-outro) .close{opacity:1;-webkit-transform:translate(24px, 24px) rotate(0);transform:translate(24px, 24px) rotate(0)}:host(.to-right-outro) .window,:host(.to-right-outro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-outro) .close{-webkit-transform:translate(-24px, 24px) rotate(90deg);transform:translate(-24px, 24px) rotate(90deg)}:host(.to-right) .close{left:0px;-webkit-transform:translate(-36px, 24px) rotate(-90deg);transform:translate(-36px, 24px) rotate(-90deg)}:host(.to-top){padding:2rem}@media (max-width: 767px){:host(.to-top){padding:1rem}}:host(.to-top){-ms-flex-pack:center;justify-content:center}:host(.to-top) .window,:host(.to-top)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-top-intro) .window,:host(.to-top-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-top-opened.to-top-outro) .window,:host(.to-top-opened.to-top-outro)>::slotted([slot="window"]),:host(.to-top-opened) .window,:host(.to-top-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-top-outro) .window,:host(.to-top-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}@media (max-width: 767px){.mobile\\:w-12{width:3rem}}';var MdsModal=function(){function t(t){var o=this;registerInstance(this,t);this.closeEvent=createEvent(this,"mdsModalClose",7);this.window=false;this.top=false;this.bottom=false;this.animationState="intro";this.km=new KeyboardManager;this.componentDidLoad=function(){var t;o.km.addElement(o.host,"host");var i=(t=o.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".close");if(i)o.km.addElement(i,"close");o.km.attachEscapeBehavior((function(){return o.closeEvent.emit()}));o.km.attachClickBehavior("close")};this.animationName=function(t,i){if(t===void 0){t=""}if(i===void 0){i=""}return"to-".concat(i!==""?i:o.position).concat(t!==""?"-"+t:"")};this.closeModal=function(t){var i;if(((i=t.target)===null||i===void 0?void 0:i.localName)!=="mds-modal"){return}o.opened=t.target!==t.currentTarget;if(!o.opened){o.closeEvent.emit()}};this.stateOpened=undefined;this.opened=false;this.position="center"}t.prototype.componentWillLoad=function(){var t;this.bottom=this.host.querySelector('[slot="bottom"]')!==null;this.top=this.host.querySelector('[slot="top"]')!==null;this.window=this.host.querySelector('[slot="window"]')!==null;this.stateOpened=this.opened;if(!this.window){this.position="right"}if(this.window){(t=this.host.querySelector('[slot="window"]'))===null||t===void 0?void 0:t.setAttribute("role","modal")}};t.prototype.componentWillRender=function(){this.animationState=this.opened?"intro":"outro";this.host.classList.add(this.animationName())};t.prototype.componentDidRender=function(){var t=this;this.animationDeelay=window.setTimeout((function(){t.animationState=t.animationState==="intro"?"outro":"intro";t.host.classList.remove(t.animationName(t.animationState==="intro"?"outro":"intro"));t.host.classList.add(t.animationName(t.animationState));window.clearTimeout(t.animationDeelay)}),500)};t.prototype.disconnectedCallback=function(){this.km.detachEscapeBehavior();this.km.detachClickBehavior("close")};t.prototype.positionChange=function(t,o){window.clearTimeout(this.animationDeelay);this.host.classList.remove(this.animationName("",o));this.host.classList.remove(this.animationName("intro",o));this.host.classList.remove(this.animationName("outro",o))};t.prototype.openedChange=function(t){this.stateOpened=t;window.clearTimeout(this.animationDeelay)};t.prototype.onModalCloseListener=function(){this.opened=false};t.prototype.onBannerCloseListener=function(){this.opened=false};t.prototype.render=function(){var t=this;return h(Host,{"aria-modal":clsx(this.opened?"true":"false"),class:clsx(this.stateOpened&&this.animationName("opened")),onClick:function(o){t.closeModal(o)}},this.window?h("slot",{name:"window"}):h("div",{class:clsx("window",(this.top||this.bottom)&&"window-".concat(this.top?"-top":"").concat(this.bottom?"-bottom":"")),role:"dialog",part:"window"},this.top&&h("slot",{name:"top"}),h("slot",null),this.bottom&&h("slot",{name:"bottom"})),!this.window&&h("i",{innerHTML:miBaselineClose,tabindex:"0",onClick:function(o){t.closeModal(o)},class:"svg close focusable-light"}))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{position:["positionChange"],opened:["openedChange"]}},enumerable:false,configurable:true});return t}();MdsModal.style=mdsModalCss;export{MdsModal as mds_modal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as promiseResolve,b as bootstrapLazy}from"./index-
|
|
1
|
+
import{p as promiseResolve,b as bootstrapLazy}from"./index-5f4fd73d.js";export{s as setNonce}from"./index-5f4fd73d.js";var patchBrowser=function(){var e=import.meta.url;var o={};if(e!==""){o.resourcesUrl=new URL(".",e).href}return promiseResolve(o)};patchBrowser().then((function(e){return bootstrapLazy([["mds-modal",[[1,"mds-modal",{opened:[1540],position:[1537],stateOpened:[32]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]],{position:["positionChange"],opened:["openedChange"]}]]]],e)}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-
|
|
1
|
+
import{p as e,b as o}from"./p-b327d4c0.js";export{s as setNonce}from"./p-b327d4c0.js";(()=>{const o=import.meta.url,n={};return""!==o&&(n.resourcesUrl=new URL(".",o).href),e(n)})().then((e=>o([["p-e441efd8",[[1,"mds-modal",{opened:[1540],position:[1537],stateOpened:[32]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]],{position:["positionChange"],opened:["openedChange"]}]]]],e)));
|
|
@@ -115,7 +115,7 @@ DOMTokenList
|
|
|
115
115
|
var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : '';
|
|
116
116
|
var start = function() {
|
|
117
117
|
// if src is not present then origin is "null", and new URL() throws TypeError: Failed to construct 'URL': Invalid base URL
|
|
118
|
-
var url = new URL('./p-
|
|
118
|
+
var url = new URL('./p-3289100c.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
|
|
119
119
|
System.import(url.href);
|
|
120
120
|
};
|
|
121
121
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-bc48f1e8.system.js"],(function(e,n){"use strict";var o,s;return{setters:[function(n){o=n.p;s=n.b;e("setNonce",n.s)}],execute:function(){var e=function(){var e=n.meta.url;var s={};if(e!==""){s.resourcesUrl=new URL(".",e).href}return o(s)};e().then((function(e){return s([["p-ff89867f.system",[[1,"mds-modal",{opened:[1540],position:[1537],stateOpened:[32]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]],{position:["positionChange"],opened:["openedChange"]}]]]],e)}))}}}));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
let n,t,e=!1;const l={},o=n=>"object"==(n=typeof n)||"function"===n;function s(n){var t,e,l;return null!==(l=null===(e=null===(t=n.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===e?void 0:e.getAttribute("content"))&&void 0!==l?l:void 0}const c=(n,t,...e)=>{let l=null,s=!1,c=!1;const r=[],u=t=>{for(let e=0;e<t.length;e++)l=t[e],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof n&&!o(l))&&(l+=""),s&&c?r[r.length-1].t+=l:r.push(s?i(null,l):l),c=s)};if(u(e),t){const n=t.className||t.class;n&&(t.class="object"!=typeof n?n:Object.keys(n).filter((t=>n[t])).join(" "))}const a=i(n,null);return a.l=t,r.length>0&&(a.o=r),a},i=(n,t)=>({i:0,u:n,t,m:null,o:null,l:null}),r={},u=n=>_(n).$hostElement$,a=(n,t,e)=>{const l=u(n);return{emit:n=>f(l,t,{bubbles:!!(4&e),composed:!!(2&e),cancelable:!!(1&e),detail:n})}},f=(n,t,e)=>{const l=Z.ce(t,e);return n.dispatchEvent(l),l},d=new WeakMap,y=n=>"sc-"+n.h,m=(n,t,e,l,s,c)=>{if(e!==l){let i=G(n,t),r=t.toLowerCase();if("class"===t){const t=n.classList,o=p(e),s=p(l);t.remove(...o.filter((n=>n&&!s.includes(n)))),t.add(...s.filter((n=>n&&!o.includes(n))))}else if(i||"o"!==t[0]||"n"!==t[1]){const r=o(l);if((i||r&&null!==l)&&!s)try{if(n.tagName.includes("-"))n[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=e&&n[t]==o||(n[t]=o)}}catch(n){}null==l||!1===l?!1===l&&""!==n.getAttribute(t)||n.removeAttribute(t):(!i||4&c||s)&&!r&&n.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):G(X,r)?r.slice(2):r[2]+t.slice(3),e&&Z.rel(n,t,e,!1),l&&Z.ael(n,t,l,!1)}},h=/\s/,p=n=>n?n.split(h):[],$=(n,t,e,o)=>{const s=11===t.m.nodeType&&t.m.host?t.m.host:t.m,c=n&&n.l||l,i=t.l||l;for(o in c)o in i||m(s,o,c[o],void 0,e,t.i);for(o in i)m(s,o,c[o],i[o],e,t.i)},v=(t,e,l)=>{const o=e.o[l];let s,c,i=0;if(null!==o.t)s=o.m=Y.createTextNode(o.t);else if(s=o.m=Y.createElement(o.u),$(null,o,!1),null!=n&&s["s-si"]!==n&&s.classList.add(s["s-si"]=n),o.o)for(i=0;i<o.o.length;++i)c=v(t,o,i),c&&s.appendChild(c);return s},b=(n,e,l,o,s,c)=>{let i,r=n;for(r.shadowRoot&&r.tagName===t&&(r=r.shadowRoot);s<=c;++s)o[s]&&(i=v(null,l,s),i&&(o[s].m=i,r.insertBefore(i,e)))},w=(n,t,e)=>{for(let l=t;l<=e;++l){const t=n[l];if(t){const n=t.m;n&&n.remove()}}},S=(n,t)=>n.u===t.u,g=(n,t)=>{const e=t.m=n.m,l=n.o,o=t.o,s=t.t;null===s?("slot"===t.u||$(n,t,!1),null!==l&&null!==o?((n,t,e,l)=>{let o,s=0,c=0,i=t.length-1,r=t[0],u=t[i],a=l.length-1,f=l[0],d=l[a];for(;s<=i&&c<=a;)null==r?r=t[++s]:null==u?u=t[--i]:null==f?f=l[++c]:null==d?d=l[--a]:S(r,f)?(g(r,f),r=t[++s],f=l[++c]):S(u,d)?(g(u,d),u=t[--i],d=l[--a]):S(r,d)?(g(r,d),n.insertBefore(r.m,u.m.nextSibling),r=t[++s],d=l[--a]):S(u,f)?(g(u,f),n.insertBefore(u.m,r.m),u=t[--i],f=l[++c]):(o=v(t&&t[c],e,c),f=l[++c],o&&r.m.parentNode.insertBefore(o,r.m));s>i?b(n,null==l[a+1]?null:l[a+1].m,e,l,c,a):c>a&&w(t,s,i)})(e,l,t,o):null!==o?(null!==n.t&&(e.textContent=""),b(e,null,t,o,0,o.length-1)):null!==l&&w(l,0,l.length-1)):n.t!==s&&(e.data=s)},j=(n,t)=>{t&&!n.p&&t["s-p"]&&t["s-p"].push(new Promise((t=>n.p=t)))},k=(n,t)=>{if(n.i|=16,!(4&n.i))return j(n,n.$),un((()=>M(n,t)));n.i|=512},M=(n,t)=>{const e=n.v;let l;return t&&(n.i|=256,n.S&&(n.S.map((([n,t])=>A(e,n,t))),n.S=void 0),l=A(e,"componentWillLoad")),l=O(l,(()=>A(e,"componentWillRender"))),O(l,(()=>P(n,e,t)))},O=(n,t)=>C(n)?n.then(t):t(),C=n=>n instanceof Promise||n&&n.then&&"function"==typeof n.then,P=async(n,t,e)=>{var l;const o=n.$hostElement$,c=o["s-rc"];e&&(n=>{const t=n.j,e=n.$hostElement$,l=t.i,o=((n,t)=>{var e;const l=y(t),o=Q.get(l);if(n=11===n.nodeType?n:Y,o)if("string"==typeof o){let t,c=d.get(n=n.head||n);if(c||d.set(n,c=new Set),!c.has(l)){{t=Y.createElement("style"),t.innerHTML=o;const l=null!==(e=Z.k)&&void 0!==e?e:s(Y);null!=l&&t.setAttribute("nonce",l),n.insertBefore(t,n.querySelector("link"))}c&&c.add(l)}}else n.adoptedStyleSheets.includes(o)||(n.adoptedStyleSheets=[...n.adoptedStyleSheets,o]);return l})(e.shadowRoot?e.shadowRoot:e.getRootNode(),t);10&l&&(e["s-sc"]=o,e.classList.add(o+"-h"))})(n);R(n,t,o,e),c&&(c.map((n=>n())),o["s-rc"]=void 0);{const t=null!==(l=o["s-p"])&&void 0!==l?l:[],e=()=>W(n);0===t.length?e():(Promise.all(t).then(e),n.i|=4,t.length=0)}},R=(e,l,o,s)=>{try{l=l.render(),e.i&=-17,e.i|=2,((e,l,o=!1)=>{const s=e.$hostElement$,u=e.j,a=e.M||i(null,null),f=(n=>n&&n.u===r)(l)?l:c(null,null,l);if(t=s.tagName,u.O&&(f.l=f.l||{},u.O.map((([n,t])=>f.l[t]=s[n]))),o&&f.l)for(const n of Object.keys(f.l))s.hasAttribute(n)&&!["key","ref","style","class"].includes(n)&&(f.l[n]=s[n]);f.u=null,f.i|=4,e.M=f,f.m=a.m=s.shadowRoot||s,n=s["s-sc"],g(a,f)})(e,l,s)}catch(n){I(n,e.$hostElement$)}return null},W=n=>{const t=n.$hostElement$,e=n.$;A(n.v,"componentDidRender"),64&n.i||(n.i|=64,E(t),n.C(t),e||x()),n.p&&(n.p(),n.p=void 0),512&n.i&&rn((()=>k(n,!1))),n.i&=-517},x=()=>{E(Y.documentElement),rn((()=>f(X,"appload",{detail:{namespace:"mds-modal"}})))},A=(n,t,e)=>{if(n&&n[t])try{return n[t](e)}catch(n){I(n)}},E=n=>n.setAttribute("hydrated",""),L=(n,t,e)=>{var l;if(t.P){n.watchers&&(t.R=n.watchers);const s=Object.entries(t.P),c=n.prototype;if(s.map((([n,[l]])=>{(31&l||2&e&&32&l)&&Object.defineProperty(c,n,{get(){return((n,t)=>_(this).W.get(t))(0,n)},set(e){((n,t,e,l)=>{const s=_(n),c=s.$hostElement$,i=s.W.get(t),r=s.i,u=s.v;if(e=((n,t)=>null==n||o(n)?n:4&t?"false"!==n&&(""===n||!!n):1&t?n+"":n)(e,l.P[t][0]),(!(8&r)||void 0===i)&&e!==i&&(!Number.isNaN(i)||!Number.isNaN(e))&&(s.W.set(t,e),u)){if(l.R&&128&r){const n=l.R[t];n&&n.map((n=>{try{u[n](e,i,t)}catch(n){I(n,c)}}))}2==(18&r)&&k(s,!1)}})(this,n,e,t)},configurable:!0,enumerable:!0})})),1&e){const e=new Map;c.attributeChangedCallback=function(n,l,o){Z.jmp((()=>{const s=e.get(n);if(this.hasOwnProperty(s))o=this[s],delete this[s];else{if(c.hasOwnProperty(s)&&"number"==typeof this[s]&&this[s]==o)return;if(null==s){const e=_(this),s=null==e?void 0:e.i;if(!(8&s)&&128&s&&o!==l){const s=e.v,c=t.R[n];null==c||c.forEach((t=>{null!=s[t]&&s[t].call(s,o,l,n)}))}return}}this[s]=(null!==o||"boolean"!=typeof this[s])&&o}))},n.observedAttributes=Array.from(new Set([...Object.keys(null!==(l=t.R)&&void 0!==l?l:{}),...s.filter((([n,t])=>15&t[0])).map((([n,l])=>{const o=l[1]||n;return e.set(o,n),512&l[0]&&t.O.push([n,o]),o}))]))}}return n},N=n=>{A(n,"disconnectedCallback")},T=(n,t={})=>{var e;const l=[],o=t.exclude||[],c=X.customElements,i=Y.head,r=i.querySelector("meta[charset]"),u=Y.createElement("style"),a=[];let f,d=!0;Object.assign(Z,t),Z.A=new URL(t.resourcesUrl||"./",Y.baseURI).href,n.map((n=>{n[1].map((t=>{var e;const s={i:t[0],h:t[1],P:t[2],L:t[3]};s.P=t[2],s.L=t[3],s.O=[],s.R=null!==(e=t[4])&&void 0!==e?e:{};const i=s.h,r=class extends HTMLElement{constructor(n){super(n),B(n=this,s),1&s.i&&n.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),d?a.push(this):Z.jmp((()=>(n=>{if(0==(1&Z.i)){const t=_(n),e=t.j,l=()=>{};if(1&t.i)H(n,t,e.L),(null==t?void 0:t.v)||(null==t?void 0:t.N)&&t.N.then((()=>{}));else{t.i|=1;{let e=n;for(;e=e.parentNode||e.host;)if(e["s-p"]){j(t,t.$=e);break}}e.P&&Object.entries(e.P).map((([t,[e]])=>{if(31&e&&n.hasOwnProperty(t)){const e=n[t];delete n[t],n[t]=e}})),(async(n,t,e)=>{let l;if(0==(32&t.i)){t.i|=32;{if(l=K(e),l.then){const n=()=>{};l=await l,n()}l.isProxied||(e.R=l.watchers,L(l,e,2),l.isProxied=!0);const n=()=>{};t.i|=8;try{new l(t)}catch(n){I(n)}t.i&=-9,t.i|=128,n()}if(l.style){let n=l.style;const t=y(e);if(!Q.has(t)){const l=()=>{};((n,t,e)=>{let l=Q.get(n);tn&&e?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,Q.set(n,l)})(t,n,!!(1&e.i)),l()}}}const o=t.$,s=()=>k(t,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()})(0,t,e)}l()}})(this)))}disconnectedCallback(){Z.jmp((()=>(async()=>{if(0==(1&Z.i)){const n=_(this);n.T&&(n.T.map((n=>n())),n.T=void 0),(null==n?void 0:n.v)?N(n.v):(null==n?void 0:n.N)&&n.N.then((()=>N(n.v)))}})()))}componentOnReady(){return _(this).N}};s.H=n[0],o.includes(i)||c.get(i)||(l.push(i),c.define(i,L(r,s,1)))}))}));{u.innerHTML=l+"{visibility:hidden}[hydrated]{visibility:inherit}",u.setAttribute("data-styles","");const n=null!==(e=Z.k)&&void 0!==e?e:s(Y);null!=n&&u.setAttribute("nonce",n),i.insertBefore(u,r?r.nextSibling:i.firstChild)}d=!1,a.length?a.map((n=>n.connectedCallback())):Z.jmp((()=>f=setTimeout(x,30)))},H=(n,t,e)=>{e&&e.map((([e,l,o])=>{const s=q(n,e),c=U(t,o),i=D(e);Z.ael(s,l,c,i),(t.T=t.T||[]).push((()=>Z.rel(s,l,c,i)))}))},U=(n,t)=>e=>{try{256&n.i?n.v[t](e):(n.S=n.S||[]).push([t,e])}catch(n){I(n)}},q=(n,t)=>4&t?Y:n,D=n=>0!=(2&n),F=n=>Z.k=n,V=new WeakMap,_=n=>V.get(n),z=(n,t)=>V.set(t.v=n,t),B=(n,t)=>{const e={i:0,$hostElement$:n,j:t,W:new Map};return e.N=new Promise((n=>e.C=n)),n["s-p"]=[],n["s-rc"]=[],H(n,e,t.L),V.set(n,e)},G=(n,t)=>t in n,I=(n,t)=>(0,console.error)(n,t),J=new Map,K=n=>{const t=n.h.replace(/-/g,"_"),e=n.H,l=J.get(e);return l?l[t]:import(`./${e}.entry.js`).then((n=>(J.set(e,n),n[t])),I)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},Q=new Map,X="undefined"!=typeof window?window:{},Y=X.document||{head:{}},Z={i:0,A:"",jmp:n=>n(),raf:n=>requestAnimationFrame(n),ael:(n,t,e,l)=>n.addEventListener(t,e,l),rel:(n,t,e,l)=>n.removeEventListener(t,e,l),ce:(n,t)=>new CustomEvent(n,t)},nn=n=>Promise.resolve(n),tn=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(n){}return!1})(),en=[],ln=[],on=(n,t)=>l=>{n.push(l),e||(e=!0,t&&4&Z.i?rn(cn):Z.raf(cn))},sn=n=>{for(let t=0;t<n.length;t++)try{n[t](performance.now())}catch(n){I(n)}n.length=0},cn=()=>{sn(en),sn(ln),(e=en.length>0)&&Z.raf(cn)},rn=n=>nn().then(n),un=on(ln,!0);export{r as H,T as b,a as c,u as g,c as h,nn as p,z as r,F as s}
|