@forsakringskassan/devindex-menu 2.0.0 → 2.0.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/menu.js +1137 -9
- package/dist/esm/menu.js +1137 -9
- package/package.json +12 -9
package/dist/esm/menu.js
CHANGED
|
@@ -1,5 +1,1124 @@
|
|
|
1
1
|
// raw-loader:./client.js?raw
|
|
2
|
-
var client_default = '/**\n * @param {string} cookieName\n * @param {string} cookieValue\n * @param {number} exdays\n * @returns {void}\n */\nfunction setCookie(cookieName, cookieValue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);\n var expires = "expires=".concat(d.toUTCString());\n document.cookie = "".concat(cookieName, "=").concat(cookieValue, ";").concat(expires, ";path=/");\n}\n\n/**\n * @param {string} cookieName\n * @returns {string | undefined}\n */\nfunction getCookie(cookieName) {\n var name = "".concat(cookieName, "=");\n var decodedCookie = decodeURIComponent(document.cookie);\n var ca = decodedCookie.split(";");\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) === " ") {\n c = c.substring(1);\n }\n if (c.indexOf(name) === 0) {\n return c.substring(name.length, c.length);\n }\n }\n return undefined;\n}\n(function () {\n /** @type {NodeListOf<HTMLSelectElement>} */\n var selections = document.querySelectorAll(".secret-menu select");\n for (var i = 0; i < selections.length; i++) {\n var select = selections[i];\n select.value = getCookie(select.name) ? getCookie(select.name) : "default";\n if (select.getAttribute("data-sessionStorage") === "true") {\n var cookieValue = getCookie(select.name);\n if (cookieValue) {\n sessionStorage.setItem(select.name, atob(cookieValue));\n }\n }\n select.onchange = function (event) {\n var element = event.target;\n setCookie(element.name, element.value, 30);\n if (element.getAttribute("data-exec-on-change")) {\n window[element.getAttribute("data-exec-on-change")]();\n }\n if (element.getAttribute("data-reload") === "true") {\n location.reload(true);\n }\n if (element.getAttribute("data-sessionStorage") === "true") {\n var sessionKey = element.id;\n if (element.value) {\n var value = atob(element.value);\n console.log("Laddar sessionstorage ".concat(sessionKey, " med \\n ").concat(value));\n sessionStorage.setItem(sessionKey, value);\n } else {\n console.log("T\\xF6mmer sessionstorage");\n sessionStorage.removeItem(sessionKey);\n }\n location.reload(true);\n }\n };\n }\n
|
|
2
|
+
var client_default = '/**\n * @param {string} cookieName\n * @param {string} cookieValue\n * @param {number} exdays\n * @returns {void}\n */\nfunction setCookie(cookieName, cookieValue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);\n var expires = "expires=".concat(d.toUTCString());\n document.cookie = "".concat(cookieName, "=").concat(cookieValue, ";").concat(expires, ";path=/");\n}\n\n/**\n * @param {string} cookieName\n * @returns {string | undefined}\n */\nfunction getCookie(cookieName) {\n var name = "".concat(cookieName, "=");\n var decodedCookie = decodeURIComponent(document.cookie);\n var ca = decodedCookie.split(";");\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) === " ") {\n c = c.substring(1);\n }\n if (c.indexOf(name) === 0) {\n return c.substring(name.length, c.length);\n }\n }\n return undefined;\n}\n(function () {\n /** @type {NodeListOf<HTMLSelectElement>} */\n var selections = document.querySelectorAll(".secret-menu select");\n for (var i = 0; i < selections.length; i++) {\n var select = selections[i];\n select.value = getCookie(select.name) ? getCookie(select.name) : "default";\n if (select.getAttribute("data-sessionStorage") === "true") {\n var cookieValue = getCookie(select.name);\n if (cookieValue) {\n sessionStorage.setItem(select.name, atob(cookieValue));\n }\n }\n select.onchange = function (event) {\n var element = event.target;\n setCookie(element.name, element.value, 30);\n if (element.getAttribute("data-exec-on-change")) {\n window[element.getAttribute("data-exec-on-change")]();\n }\n if (element.getAttribute("data-reload") === "true") {\n location.reload(true);\n }\n if (element.getAttribute("data-sessionStorage") === "true") {\n var sessionKey = element.id;\n if (element.value) {\n var value = atob(element.value);\n console.log("Laddar sessionstorage ".concat(sessionKey, " med \\n ").concat(value));\n sessionStorage.setItem(sessionKey, value);\n } else {\n console.log("T\\xF6mmer sessionstorage");\n sessionStorage.removeItem(sessionKey);\n }\n location.reload(true);\n }\n };\n }\n\n /* Forcerar att sidan laddas om, \xE4ven n\xE4r l\xE4nken \xE4r av typen: /#/granska/8 */\n /** @type {NodeListOf<HTMLAnchorElement>} */\n var links = document.querySelectorAll(".secret-menu ul li a");\n for (var _i = 0; _i < links.length; _i++) {\n var link = links[_i];\n if (link.getAttribute("href").startsWith("/#")) {\n /**\n * @param {MouseEvent} event\n */\n link.onclick = function (event) {\n event.preventDefault();\n window.location.href = event.target.getAttribute("href");\n setTimeout(function () {\n console.log("Reload after click on hash-link.");\n location.reload();\n }, "500");\n };\n }\n }\n})();\nfunction toggleMenu() {\n var menu = document.querySelector(".secret-menu");\n menu.classList.toggle("open");\n}\nwindow.toggleMenu = toggleMenu;';
|
|
3
|
+
|
|
4
|
+
// node_modules/@fkui/logic/lib/esm/index.js
|
|
5
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
6
|
+
var lodash_clonedeep = { exports: {} };
|
|
7
|
+
lodash_clonedeep.exports;
|
|
8
|
+
var hasRequiredLodash_clonedeep;
|
|
9
|
+
function requireLodash_clonedeep() {
|
|
10
|
+
if (hasRequiredLodash_clonedeep) return lodash_clonedeep.exports;
|
|
11
|
+
hasRequiredLodash_clonedeep = 1;
|
|
12
|
+
(function(module, exports$1) {
|
|
13
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
14
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
15
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
16
|
+
var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", promiseTag = "[object Promise]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", weakMapTag = "[object WeakMap]";
|
|
17
|
+
var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
|
|
18
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
19
|
+
var reFlags = /\w*$/;
|
|
20
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
21
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
22
|
+
var cloneableTags = {};
|
|
23
|
+
cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
|
24
|
+
cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
|
|
25
|
+
var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
26
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
27
|
+
var root = freeGlobal || freeSelf || Function("return this")();
|
|
28
|
+
var freeExports = exports$1 && !exports$1.nodeType && exports$1;
|
|
29
|
+
var freeModule = freeExports && true && module && !module.nodeType && module;
|
|
30
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
31
|
+
function addMapEntry(map, pair) {
|
|
32
|
+
map.set(pair[0], pair[1]);
|
|
33
|
+
return map;
|
|
34
|
+
}
|
|
35
|
+
function addSetEntry(set, value) {
|
|
36
|
+
set.add(value);
|
|
37
|
+
return set;
|
|
38
|
+
}
|
|
39
|
+
function arrayEach(array, iteratee) {
|
|
40
|
+
var index = -1, length = array ? array.length : 0;
|
|
41
|
+
while (++index < length) {
|
|
42
|
+
if (iteratee(array[index], index, array) === false) {
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return array;
|
|
47
|
+
}
|
|
48
|
+
function arrayPush(array, values) {
|
|
49
|
+
var index = -1, length = values.length, offset = array.length;
|
|
50
|
+
while (++index < length) {
|
|
51
|
+
array[offset + index] = values[index];
|
|
52
|
+
}
|
|
53
|
+
return array;
|
|
54
|
+
}
|
|
55
|
+
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
56
|
+
var index = -1, length = array ? array.length : 0;
|
|
57
|
+
while (++index < length) {
|
|
58
|
+
accumulator = iteratee(accumulator, array[index], index, array);
|
|
59
|
+
}
|
|
60
|
+
return accumulator;
|
|
61
|
+
}
|
|
62
|
+
function baseTimes(n, iteratee) {
|
|
63
|
+
var index = -1, result = Array(n);
|
|
64
|
+
while (++index < n) {
|
|
65
|
+
result[index] = iteratee(index);
|
|
66
|
+
}
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
function getValue(object, key) {
|
|
70
|
+
return object == null ? void 0 : object[key];
|
|
71
|
+
}
|
|
72
|
+
function isHostObject(value) {
|
|
73
|
+
var result = false;
|
|
74
|
+
if (value != null && typeof value.toString != "function") {
|
|
75
|
+
try {
|
|
76
|
+
result = !!(value + "");
|
|
77
|
+
} catch (e) {
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return result;
|
|
81
|
+
}
|
|
82
|
+
function mapToArray(map) {
|
|
83
|
+
var index = -1, result = Array(map.size);
|
|
84
|
+
map.forEach(function(value, key) {
|
|
85
|
+
result[++index] = [key, value];
|
|
86
|
+
});
|
|
87
|
+
return result;
|
|
88
|
+
}
|
|
89
|
+
function overArg(func, transform) {
|
|
90
|
+
return function(arg) {
|
|
91
|
+
return func(transform(arg));
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
function setToArray(set) {
|
|
95
|
+
var index = -1, result = Array(set.size);
|
|
96
|
+
set.forEach(function(value) {
|
|
97
|
+
result[++index] = value;
|
|
98
|
+
});
|
|
99
|
+
return result;
|
|
100
|
+
}
|
|
101
|
+
var arrayProto = Array.prototype, funcProto = Function.prototype, objectProto = Object.prototype;
|
|
102
|
+
var coreJsData = root["__core-js_shared__"];
|
|
103
|
+
var maskSrcKey = (function() {
|
|
104
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
105
|
+
return uid ? "Symbol(src)_1." + uid : "";
|
|
106
|
+
})();
|
|
107
|
+
var funcToString = funcProto.toString;
|
|
108
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
109
|
+
var objectToString = objectProto.toString;
|
|
110
|
+
var reIsNative = RegExp(
|
|
111
|
+
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
112
|
+
);
|
|
113
|
+
var Buffer2 = moduleExports ? root.Buffer : void 0, Symbol2 = root.Symbol, Uint8Array2 = root.Uint8Array, getPrototype = overArg(Object.getPrototypeOf, Object), objectCreate = Object.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice;
|
|
114
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0, nativeKeys = overArg(Object.keys, Object);
|
|
115
|
+
var DataView = getNative(root, "DataView"), Map2 = getNative(root, "Map"), Promise2 = getNative(root, "Promise"), Set = getNative(root, "Set"), WeakMap = getNative(root, "WeakMap"), nativeCreate = getNative(Object, "create");
|
|
116
|
+
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
|
|
117
|
+
var symbolProto = Symbol2 ? Symbol2.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
|
|
118
|
+
function Hash(entries) {
|
|
119
|
+
var index = -1, length = entries ? entries.length : 0;
|
|
120
|
+
this.clear();
|
|
121
|
+
while (++index < length) {
|
|
122
|
+
var entry = entries[index];
|
|
123
|
+
this.set(entry[0], entry[1]);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function hashClear() {
|
|
127
|
+
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
128
|
+
}
|
|
129
|
+
function hashDelete(key) {
|
|
130
|
+
return this.has(key) && delete this.__data__[key];
|
|
131
|
+
}
|
|
132
|
+
function hashGet(key) {
|
|
133
|
+
var data = this.__data__;
|
|
134
|
+
if (nativeCreate) {
|
|
135
|
+
var result = data[key];
|
|
136
|
+
return result === HASH_UNDEFINED ? void 0 : result;
|
|
137
|
+
}
|
|
138
|
+
return hasOwnProperty.call(data, key) ? data[key] : void 0;
|
|
139
|
+
}
|
|
140
|
+
function hashHas(key) {
|
|
141
|
+
var data = this.__data__;
|
|
142
|
+
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
|
|
143
|
+
}
|
|
144
|
+
function hashSet(key, value) {
|
|
145
|
+
var data = this.__data__;
|
|
146
|
+
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
|
|
147
|
+
return this;
|
|
148
|
+
}
|
|
149
|
+
Hash.prototype.clear = hashClear;
|
|
150
|
+
Hash.prototype["delete"] = hashDelete;
|
|
151
|
+
Hash.prototype.get = hashGet;
|
|
152
|
+
Hash.prototype.has = hashHas;
|
|
153
|
+
Hash.prototype.set = hashSet;
|
|
154
|
+
function ListCache(entries) {
|
|
155
|
+
var index = -1, length = entries ? entries.length : 0;
|
|
156
|
+
this.clear();
|
|
157
|
+
while (++index < length) {
|
|
158
|
+
var entry = entries[index];
|
|
159
|
+
this.set(entry[0], entry[1]);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
function listCacheClear() {
|
|
163
|
+
this.__data__ = [];
|
|
164
|
+
}
|
|
165
|
+
function listCacheDelete(key) {
|
|
166
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
167
|
+
if (index < 0) {
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
170
|
+
var lastIndex = data.length - 1;
|
|
171
|
+
if (index == lastIndex) {
|
|
172
|
+
data.pop();
|
|
173
|
+
} else {
|
|
174
|
+
splice.call(data, index, 1);
|
|
175
|
+
}
|
|
176
|
+
return true;
|
|
177
|
+
}
|
|
178
|
+
function listCacheGet(key) {
|
|
179
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
180
|
+
return index < 0 ? void 0 : data[index][1];
|
|
181
|
+
}
|
|
182
|
+
function listCacheHas(key) {
|
|
183
|
+
return assocIndexOf(this.__data__, key) > -1;
|
|
184
|
+
}
|
|
185
|
+
function listCacheSet(key, value) {
|
|
186
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
187
|
+
if (index < 0) {
|
|
188
|
+
data.push([key, value]);
|
|
189
|
+
} else {
|
|
190
|
+
data[index][1] = value;
|
|
191
|
+
}
|
|
192
|
+
return this;
|
|
193
|
+
}
|
|
194
|
+
ListCache.prototype.clear = listCacheClear;
|
|
195
|
+
ListCache.prototype["delete"] = listCacheDelete;
|
|
196
|
+
ListCache.prototype.get = listCacheGet;
|
|
197
|
+
ListCache.prototype.has = listCacheHas;
|
|
198
|
+
ListCache.prototype.set = listCacheSet;
|
|
199
|
+
function MapCache(entries) {
|
|
200
|
+
var index = -1, length = entries ? entries.length : 0;
|
|
201
|
+
this.clear();
|
|
202
|
+
while (++index < length) {
|
|
203
|
+
var entry = entries[index];
|
|
204
|
+
this.set(entry[0], entry[1]);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
function mapCacheClear() {
|
|
208
|
+
this.__data__ = {
|
|
209
|
+
"hash": new Hash(),
|
|
210
|
+
"map": new (Map2 || ListCache)(),
|
|
211
|
+
"string": new Hash()
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
function mapCacheDelete(key) {
|
|
215
|
+
return getMapData(this, key)["delete"](key);
|
|
216
|
+
}
|
|
217
|
+
function mapCacheGet(key) {
|
|
218
|
+
return getMapData(this, key).get(key);
|
|
219
|
+
}
|
|
220
|
+
function mapCacheHas(key) {
|
|
221
|
+
return getMapData(this, key).has(key);
|
|
222
|
+
}
|
|
223
|
+
function mapCacheSet(key, value) {
|
|
224
|
+
getMapData(this, key).set(key, value);
|
|
225
|
+
return this;
|
|
226
|
+
}
|
|
227
|
+
MapCache.prototype.clear = mapCacheClear;
|
|
228
|
+
MapCache.prototype["delete"] = mapCacheDelete;
|
|
229
|
+
MapCache.prototype.get = mapCacheGet;
|
|
230
|
+
MapCache.prototype.has = mapCacheHas;
|
|
231
|
+
MapCache.prototype.set = mapCacheSet;
|
|
232
|
+
function Stack(entries) {
|
|
233
|
+
this.__data__ = new ListCache(entries);
|
|
234
|
+
}
|
|
235
|
+
function stackClear() {
|
|
236
|
+
this.__data__ = new ListCache();
|
|
237
|
+
}
|
|
238
|
+
function stackDelete(key) {
|
|
239
|
+
return this.__data__["delete"](key);
|
|
240
|
+
}
|
|
241
|
+
function stackGet(key) {
|
|
242
|
+
return this.__data__.get(key);
|
|
243
|
+
}
|
|
244
|
+
function stackHas(key) {
|
|
245
|
+
return this.__data__.has(key);
|
|
246
|
+
}
|
|
247
|
+
function stackSet(key, value) {
|
|
248
|
+
var cache = this.__data__;
|
|
249
|
+
if (cache instanceof ListCache) {
|
|
250
|
+
var pairs = cache.__data__;
|
|
251
|
+
if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
252
|
+
pairs.push([key, value]);
|
|
253
|
+
return this;
|
|
254
|
+
}
|
|
255
|
+
cache = this.__data__ = new MapCache(pairs);
|
|
256
|
+
}
|
|
257
|
+
cache.set(key, value);
|
|
258
|
+
return this;
|
|
259
|
+
}
|
|
260
|
+
Stack.prototype.clear = stackClear;
|
|
261
|
+
Stack.prototype["delete"] = stackDelete;
|
|
262
|
+
Stack.prototype.get = stackGet;
|
|
263
|
+
Stack.prototype.has = stackHas;
|
|
264
|
+
Stack.prototype.set = stackSet;
|
|
265
|
+
function arrayLikeKeys(value, inherited) {
|
|
266
|
+
var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
|
|
267
|
+
var length = result.length, skipIndexes = !!length;
|
|
268
|
+
for (var key in value) {
|
|
269
|
+
if (hasOwnProperty.call(value, key) && !(skipIndexes && (key == "length" || isIndex(key, length)))) {
|
|
270
|
+
result.push(key);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
return result;
|
|
274
|
+
}
|
|
275
|
+
function assignValue(object, key, value) {
|
|
276
|
+
var objValue = object[key];
|
|
277
|
+
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
|
|
278
|
+
object[key] = value;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
function assocIndexOf(array, key) {
|
|
282
|
+
var length = array.length;
|
|
283
|
+
while (length--) {
|
|
284
|
+
if (eq(array[length][0], key)) {
|
|
285
|
+
return length;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
return -1;
|
|
289
|
+
}
|
|
290
|
+
function baseAssign(object, source) {
|
|
291
|
+
return object && copyObject(source, keys(source), object);
|
|
292
|
+
}
|
|
293
|
+
function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
|
|
294
|
+
var result;
|
|
295
|
+
if (customizer) {
|
|
296
|
+
result = object ? customizer(value, key, object, stack) : customizer(value);
|
|
297
|
+
}
|
|
298
|
+
if (result !== void 0) {
|
|
299
|
+
return result;
|
|
300
|
+
}
|
|
301
|
+
if (!isObject(value)) {
|
|
302
|
+
return value;
|
|
303
|
+
}
|
|
304
|
+
var isArr = isArray(value);
|
|
305
|
+
if (isArr) {
|
|
306
|
+
result = initCloneArray(value);
|
|
307
|
+
if (!isDeep) {
|
|
308
|
+
return copyArray(value, result);
|
|
309
|
+
}
|
|
310
|
+
} else {
|
|
311
|
+
var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
|
|
312
|
+
if (isBuffer(value)) {
|
|
313
|
+
return cloneBuffer(value, isDeep);
|
|
314
|
+
}
|
|
315
|
+
if (tag == objectTag || tag == argsTag || isFunc && !object) {
|
|
316
|
+
if (isHostObject(value)) {
|
|
317
|
+
return object ? value : {};
|
|
318
|
+
}
|
|
319
|
+
result = initCloneObject(isFunc ? {} : value);
|
|
320
|
+
if (!isDeep) {
|
|
321
|
+
return copySymbols(value, baseAssign(result, value));
|
|
322
|
+
}
|
|
323
|
+
} else {
|
|
324
|
+
if (!cloneableTags[tag]) {
|
|
325
|
+
return object ? value : {};
|
|
326
|
+
}
|
|
327
|
+
result = initCloneByTag(value, tag, baseClone, isDeep);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
stack || (stack = new Stack());
|
|
331
|
+
var stacked = stack.get(value);
|
|
332
|
+
if (stacked) {
|
|
333
|
+
return stacked;
|
|
334
|
+
}
|
|
335
|
+
stack.set(value, result);
|
|
336
|
+
if (!isArr) {
|
|
337
|
+
var props = isFull ? getAllKeys(value) : keys(value);
|
|
338
|
+
}
|
|
339
|
+
arrayEach(props || value, function(subValue, key2) {
|
|
340
|
+
if (props) {
|
|
341
|
+
key2 = subValue;
|
|
342
|
+
subValue = value[key2];
|
|
343
|
+
}
|
|
344
|
+
assignValue(result, key2, baseClone(subValue, isDeep, isFull, customizer, key2, value, stack));
|
|
345
|
+
});
|
|
346
|
+
return result;
|
|
347
|
+
}
|
|
348
|
+
function baseCreate(proto) {
|
|
349
|
+
return isObject(proto) ? objectCreate(proto) : {};
|
|
350
|
+
}
|
|
351
|
+
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
352
|
+
var result = keysFunc(object);
|
|
353
|
+
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
354
|
+
}
|
|
355
|
+
function baseGetTag(value) {
|
|
356
|
+
return objectToString.call(value);
|
|
357
|
+
}
|
|
358
|
+
function baseIsNative(value) {
|
|
359
|
+
if (!isObject(value) || isMasked(value)) {
|
|
360
|
+
return false;
|
|
361
|
+
}
|
|
362
|
+
var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
|
|
363
|
+
return pattern.test(toSource(value));
|
|
364
|
+
}
|
|
365
|
+
function baseKeys(object) {
|
|
366
|
+
if (!isPrototype(object)) {
|
|
367
|
+
return nativeKeys(object);
|
|
368
|
+
}
|
|
369
|
+
var result = [];
|
|
370
|
+
for (var key in Object(object)) {
|
|
371
|
+
if (hasOwnProperty.call(object, key) && key != "constructor") {
|
|
372
|
+
result.push(key);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
return result;
|
|
376
|
+
}
|
|
377
|
+
function cloneBuffer(buffer, isDeep) {
|
|
378
|
+
if (isDeep) {
|
|
379
|
+
return buffer.slice();
|
|
380
|
+
}
|
|
381
|
+
var result = new buffer.constructor(buffer.length);
|
|
382
|
+
buffer.copy(result);
|
|
383
|
+
return result;
|
|
384
|
+
}
|
|
385
|
+
function cloneArrayBuffer(arrayBuffer) {
|
|
386
|
+
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
387
|
+
new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
|
|
388
|
+
return result;
|
|
389
|
+
}
|
|
390
|
+
function cloneDataView(dataView, isDeep) {
|
|
391
|
+
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
|
392
|
+
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
393
|
+
}
|
|
394
|
+
function cloneMap(map, isDeep, cloneFunc) {
|
|
395
|
+
var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
|
|
396
|
+
return arrayReduce(array, addMapEntry, new map.constructor());
|
|
397
|
+
}
|
|
398
|
+
function cloneRegExp(regexp) {
|
|
399
|
+
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
|
400
|
+
result.lastIndex = regexp.lastIndex;
|
|
401
|
+
return result;
|
|
402
|
+
}
|
|
403
|
+
function cloneSet(set, isDeep, cloneFunc) {
|
|
404
|
+
var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
|
|
405
|
+
return arrayReduce(array, addSetEntry, new set.constructor());
|
|
406
|
+
}
|
|
407
|
+
function cloneSymbol(symbol) {
|
|
408
|
+
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
|
|
409
|
+
}
|
|
410
|
+
function cloneTypedArray(typedArray, isDeep) {
|
|
411
|
+
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
412
|
+
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
413
|
+
}
|
|
414
|
+
function copyArray(source, array) {
|
|
415
|
+
var index = -1, length = source.length;
|
|
416
|
+
array || (array = Array(length));
|
|
417
|
+
while (++index < length) {
|
|
418
|
+
array[index] = source[index];
|
|
419
|
+
}
|
|
420
|
+
return array;
|
|
421
|
+
}
|
|
422
|
+
function copyObject(source, props, object, customizer) {
|
|
423
|
+
object || (object = {});
|
|
424
|
+
var index = -1, length = props.length;
|
|
425
|
+
while (++index < length) {
|
|
426
|
+
var key = props[index];
|
|
427
|
+
var newValue = void 0;
|
|
428
|
+
assignValue(object, key, newValue === void 0 ? source[key] : newValue);
|
|
429
|
+
}
|
|
430
|
+
return object;
|
|
431
|
+
}
|
|
432
|
+
function copySymbols(source, object) {
|
|
433
|
+
return copyObject(source, getSymbols(source), object);
|
|
434
|
+
}
|
|
435
|
+
function getAllKeys(object) {
|
|
436
|
+
return baseGetAllKeys(object, keys, getSymbols);
|
|
437
|
+
}
|
|
438
|
+
function getMapData(map, key) {
|
|
439
|
+
var data = map.__data__;
|
|
440
|
+
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
441
|
+
}
|
|
442
|
+
function getNative(object, key) {
|
|
443
|
+
var value = getValue(object, key);
|
|
444
|
+
return baseIsNative(value) ? value : void 0;
|
|
445
|
+
}
|
|
446
|
+
var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
|
|
447
|
+
var getTag = baseGetTag;
|
|
448
|
+
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
|
|
449
|
+
getTag = function(value) {
|
|
450
|
+
var result = objectToString.call(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : void 0;
|
|
451
|
+
if (ctorString) {
|
|
452
|
+
switch (ctorString) {
|
|
453
|
+
case dataViewCtorString:
|
|
454
|
+
return dataViewTag;
|
|
455
|
+
case mapCtorString:
|
|
456
|
+
return mapTag;
|
|
457
|
+
case promiseCtorString:
|
|
458
|
+
return promiseTag;
|
|
459
|
+
case setCtorString:
|
|
460
|
+
return setTag;
|
|
461
|
+
case weakMapCtorString:
|
|
462
|
+
return weakMapTag;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
return result;
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
function initCloneArray(array) {
|
|
469
|
+
var length = array.length, result = array.constructor(length);
|
|
470
|
+
if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) {
|
|
471
|
+
result.index = array.index;
|
|
472
|
+
result.input = array.input;
|
|
473
|
+
}
|
|
474
|
+
return result;
|
|
475
|
+
}
|
|
476
|
+
function initCloneObject(object) {
|
|
477
|
+
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
|
|
478
|
+
}
|
|
479
|
+
function initCloneByTag(object, tag, cloneFunc, isDeep) {
|
|
480
|
+
var Ctor = object.constructor;
|
|
481
|
+
switch (tag) {
|
|
482
|
+
case arrayBufferTag:
|
|
483
|
+
return cloneArrayBuffer(object);
|
|
484
|
+
case boolTag:
|
|
485
|
+
case dateTag:
|
|
486
|
+
return new Ctor(+object);
|
|
487
|
+
case dataViewTag:
|
|
488
|
+
return cloneDataView(object, isDeep);
|
|
489
|
+
case float32Tag:
|
|
490
|
+
case float64Tag:
|
|
491
|
+
case int8Tag:
|
|
492
|
+
case int16Tag:
|
|
493
|
+
case int32Tag:
|
|
494
|
+
case uint8Tag:
|
|
495
|
+
case uint8ClampedTag:
|
|
496
|
+
case uint16Tag:
|
|
497
|
+
case uint32Tag:
|
|
498
|
+
return cloneTypedArray(object, isDeep);
|
|
499
|
+
case mapTag:
|
|
500
|
+
return cloneMap(object, isDeep, cloneFunc);
|
|
501
|
+
case numberTag:
|
|
502
|
+
case stringTag:
|
|
503
|
+
return new Ctor(object);
|
|
504
|
+
case regexpTag:
|
|
505
|
+
return cloneRegExp(object);
|
|
506
|
+
case setTag:
|
|
507
|
+
return cloneSet(object, isDeep, cloneFunc);
|
|
508
|
+
case symbolTag:
|
|
509
|
+
return cloneSymbol(object);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
function isIndex(value, length) {
|
|
513
|
+
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
514
|
+
return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
515
|
+
}
|
|
516
|
+
function isKeyable(value) {
|
|
517
|
+
var type = typeof value;
|
|
518
|
+
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
519
|
+
}
|
|
520
|
+
function isMasked(func) {
|
|
521
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
522
|
+
}
|
|
523
|
+
function isPrototype(value) {
|
|
524
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
|
|
525
|
+
return value === proto;
|
|
526
|
+
}
|
|
527
|
+
function toSource(func) {
|
|
528
|
+
if (func != null) {
|
|
529
|
+
try {
|
|
530
|
+
return funcToString.call(func);
|
|
531
|
+
} catch (e) {
|
|
532
|
+
}
|
|
533
|
+
try {
|
|
534
|
+
return func + "";
|
|
535
|
+
} catch (e) {
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
return "";
|
|
539
|
+
}
|
|
540
|
+
function cloneDeep(value) {
|
|
541
|
+
return baseClone(value, true, true);
|
|
542
|
+
}
|
|
543
|
+
function eq(value, other) {
|
|
544
|
+
return value === other || value !== value && other !== other;
|
|
545
|
+
}
|
|
546
|
+
function isArguments(value) {
|
|
547
|
+
return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag);
|
|
548
|
+
}
|
|
549
|
+
var isArray = Array.isArray;
|
|
550
|
+
function isArrayLike(value) {
|
|
551
|
+
return value != null && isLength(value.length) && !isFunction(value);
|
|
552
|
+
}
|
|
553
|
+
function isArrayLikeObject(value) {
|
|
554
|
+
return isObjectLike(value) && isArrayLike(value);
|
|
555
|
+
}
|
|
556
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
557
|
+
function isFunction(value) {
|
|
558
|
+
var tag = isObject(value) ? objectToString.call(value) : "";
|
|
559
|
+
return tag == funcTag || tag == genTag;
|
|
560
|
+
}
|
|
561
|
+
function isLength(value) {
|
|
562
|
+
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
563
|
+
}
|
|
564
|
+
function isObject(value) {
|
|
565
|
+
var type = typeof value;
|
|
566
|
+
return !!value && (type == "object" || type == "function");
|
|
567
|
+
}
|
|
568
|
+
function isObjectLike(value) {
|
|
569
|
+
return !!value && typeof value == "object";
|
|
570
|
+
}
|
|
571
|
+
function keys(object) {
|
|
572
|
+
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
573
|
+
}
|
|
574
|
+
function stubArray() {
|
|
575
|
+
return [];
|
|
576
|
+
}
|
|
577
|
+
function stubFalse() {
|
|
578
|
+
return false;
|
|
579
|
+
}
|
|
580
|
+
module.exports = cloneDeep;
|
|
581
|
+
})(lodash_clonedeep, lodash_clonedeep.exports);
|
|
582
|
+
return lodash_clonedeep.exports;
|
|
583
|
+
}
|
|
584
|
+
var lodash_clonedeepExports = requireLodash_clonedeep();
|
|
585
|
+
var TWELVE_HOURS = 12 * 60 * 60;
|
|
586
|
+
function setCookie(options) {
|
|
587
|
+
const { name, value, keepAnyExistingCookie, timeLimitSeconds } = options;
|
|
588
|
+
const shouldKeepTheExistingCookie = keepAnyExistingCookie && findCookie(name);
|
|
589
|
+
if (shouldKeepTheExistingCookie) {
|
|
590
|
+
return;
|
|
591
|
+
}
|
|
592
|
+
const timeout = timeLimitSeconds ?? TWELVE_HOURS;
|
|
593
|
+
const cookieString = `${name}=${encodeURIComponent(value)}; path=/; max-age=${String(timeout)};`;
|
|
594
|
+
document.cookie = cookieString;
|
|
595
|
+
}
|
|
596
|
+
function findCookie(name) {
|
|
597
|
+
if (!document?.cookie) {
|
|
598
|
+
return void 0;
|
|
599
|
+
}
|
|
600
|
+
const cookieKeyValueStrings = document.cookie.split(";");
|
|
601
|
+
for (const cookie of cookieKeyValueStrings) {
|
|
602
|
+
const [foundCookieName, foundCookieValue] = cookie.split("=", 2);
|
|
603
|
+
if (name === foundCookieName.trim()) {
|
|
604
|
+
return foundCookieValue ? decodeURIComponent(foundCookieValue) : void 0;
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
return void 0;
|
|
608
|
+
}
|
|
609
|
+
function getDefaultExportFromCjs(x) {
|
|
610
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
611
|
+
}
|
|
612
|
+
var dayjs_min$1 = { exports: {} };
|
|
613
|
+
var dayjs_min = dayjs_min$1.exports;
|
|
614
|
+
var hasRequiredDayjs_min;
|
|
615
|
+
function requireDayjs_min() {
|
|
616
|
+
if (hasRequiredDayjs_min) return dayjs_min$1.exports;
|
|
617
|
+
hasRequiredDayjs_min = 1;
|
|
618
|
+
(function(module, exports$1) {
|
|
619
|
+
!(function(t, e) {
|
|
620
|
+
module.exports = e();
|
|
621
|
+
})(dayjs_min, (function() {
|
|
622
|
+
var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
|
|
623
|
+
var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
|
|
624
|
+
return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
|
|
625
|
+
} }, m = function(t2, e2, n2) {
|
|
626
|
+
var r2 = String(t2);
|
|
627
|
+
return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2;
|
|
628
|
+
}, v = { s: m, z: function(t2) {
|
|
629
|
+
var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
|
|
630
|
+
return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
|
|
631
|
+
}, m: function t2(e2, n2) {
|
|
632
|
+
if (e2.date() < n2.date()) return -t2(n2, e2);
|
|
633
|
+
var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, c), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), c);
|
|
634
|
+
return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
|
|
635
|
+
}, a: function(t2) {
|
|
636
|
+
return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
|
|
637
|
+
}, p: function(t2) {
|
|
638
|
+
return { M: c, y: h, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: f }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
|
|
639
|
+
}, u: function(t2) {
|
|
640
|
+
return void 0 === t2;
|
|
641
|
+
} }, g = "en", D = {};
|
|
642
|
+
D[g] = M;
|
|
643
|
+
var p = "$isDayjsObject", S = function(t2) {
|
|
644
|
+
return t2 instanceof _ || !(!t2 || !t2[p]);
|
|
645
|
+
}, w = function t2(e2, n2, r2) {
|
|
646
|
+
var i2;
|
|
647
|
+
if (!e2) return g;
|
|
648
|
+
if ("string" == typeof e2) {
|
|
649
|
+
var s2 = e2.toLowerCase();
|
|
650
|
+
D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
|
|
651
|
+
var u2 = e2.split("-");
|
|
652
|
+
if (!i2 && u2.length > 1) return t2(u2[0]);
|
|
653
|
+
} else {
|
|
654
|
+
var a2 = e2.name;
|
|
655
|
+
D[a2] = e2, i2 = a2;
|
|
656
|
+
}
|
|
657
|
+
return !r2 && i2 && (g = i2), i2 || !r2 && g;
|
|
658
|
+
}, O = function(t2, e2) {
|
|
659
|
+
if (S(t2)) return t2.clone();
|
|
660
|
+
var n2 = "object" == typeof e2 ? e2 : {};
|
|
661
|
+
return n2.date = t2, n2.args = arguments, new _(n2);
|
|
662
|
+
}, b = v;
|
|
663
|
+
b.l = w, b.i = S, b.w = function(t2, e2) {
|
|
664
|
+
return O(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
|
|
665
|
+
};
|
|
666
|
+
var _ = (function() {
|
|
667
|
+
function M2(t2) {
|
|
668
|
+
this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true;
|
|
669
|
+
}
|
|
670
|
+
var m2 = M2.prototype;
|
|
671
|
+
return m2.parse = function(t2) {
|
|
672
|
+
this.$d = (function(t3) {
|
|
673
|
+
var e2 = t3.date, n2 = t3.utc;
|
|
674
|
+
if (null === e2) return /* @__PURE__ */ new Date(NaN);
|
|
675
|
+
if (b.u(e2)) return /* @__PURE__ */ new Date();
|
|
676
|
+
if (e2 instanceof Date) return new Date(e2);
|
|
677
|
+
if ("string" == typeof e2 && !/Z$/i.test(e2)) {
|
|
678
|
+
var r2 = e2.match($);
|
|
679
|
+
if (r2) {
|
|
680
|
+
var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
|
|
681
|
+
return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
return new Date(e2);
|
|
685
|
+
})(t2), this.init();
|
|
686
|
+
}, m2.init = function() {
|
|
687
|
+
var t2 = this.$d;
|
|
688
|
+
this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
|
|
689
|
+
}, m2.$utils = function() {
|
|
690
|
+
return b;
|
|
691
|
+
}, m2.isValid = function() {
|
|
692
|
+
return !(this.$d.toString() === l);
|
|
693
|
+
}, m2.isSame = function(t2, e2) {
|
|
694
|
+
var n2 = O(t2);
|
|
695
|
+
return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
|
|
696
|
+
}, m2.isAfter = function(t2, e2) {
|
|
697
|
+
return O(t2) < this.startOf(e2);
|
|
698
|
+
}, m2.isBefore = function(t2, e2) {
|
|
699
|
+
return this.endOf(e2) < O(t2);
|
|
700
|
+
}, m2.$g = function(t2, e2, n2) {
|
|
701
|
+
return b.u(t2) ? this[e2] : this.set(n2, t2);
|
|
702
|
+
}, m2.unix = function() {
|
|
703
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
704
|
+
}, m2.valueOf = function() {
|
|
705
|
+
return this.$d.getTime();
|
|
706
|
+
}, m2.startOf = function(t2, e2) {
|
|
707
|
+
var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t2), l2 = function(t3, e3) {
|
|
708
|
+
var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
|
|
709
|
+
return r2 ? i2 : i2.endOf(a);
|
|
710
|
+
}, $2 = function(t3, e3) {
|
|
711
|
+
return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
|
|
712
|
+
}, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
|
|
713
|
+
switch (f2) {
|
|
714
|
+
case h:
|
|
715
|
+
return r2 ? l2(1, 0) : l2(31, 11);
|
|
716
|
+
case c:
|
|
717
|
+
return r2 ? l2(1, M3) : l2(0, M3 + 1);
|
|
718
|
+
case o:
|
|
719
|
+
var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
|
|
720
|
+
return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
|
|
721
|
+
case a:
|
|
722
|
+
case d:
|
|
723
|
+
return $2(v2 + "Hours", 0);
|
|
724
|
+
case u:
|
|
725
|
+
return $2(v2 + "Minutes", 1);
|
|
726
|
+
case s:
|
|
727
|
+
return $2(v2 + "Seconds", 2);
|
|
728
|
+
case i:
|
|
729
|
+
return $2(v2 + "Milliseconds", 3);
|
|
730
|
+
default:
|
|
731
|
+
return this.clone();
|
|
732
|
+
}
|
|
733
|
+
}, m2.endOf = function(t2) {
|
|
734
|
+
return this.startOf(t2, false);
|
|
735
|
+
}, m2.$set = function(t2, e2) {
|
|
736
|
+
var n2, o2 = b.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
|
|
737
|
+
if (o2 === c || o2 === h) {
|
|
738
|
+
var y2 = this.clone().set(d, 1);
|
|
739
|
+
y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
|
|
740
|
+
} else l2 && this.$d[l2]($2);
|
|
741
|
+
return this.init(), this;
|
|
742
|
+
}, m2.set = function(t2, e2) {
|
|
743
|
+
return this.clone().$set(t2, e2);
|
|
744
|
+
}, m2.get = function(t2) {
|
|
745
|
+
return this[b.p(t2)]();
|
|
746
|
+
}, m2.add = function(r2, f2) {
|
|
747
|
+
var d2, l2 = this;
|
|
748
|
+
r2 = Number(r2);
|
|
749
|
+
var $2 = b.p(f2), y2 = function(t2) {
|
|
750
|
+
var e2 = O(l2);
|
|
751
|
+
return b.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
|
|
752
|
+
};
|
|
753
|
+
if ($2 === c) return this.set(c, this.$M + r2);
|
|
754
|
+
if ($2 === h) return this.set(h, this.$y + r2);
|
|
755
|
+
if ($2 === a) return y2(1);
|
|
756
|
+
if ($2 === o) return y2(7);
|
|
757
|
+
var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
|
|
758
|
+
return b.w(m3, this);
|
|
759
|
+
}, m2.subtract = function(t2, e2) {
|
|
760
|
+
return this.add(-1 * t2, e2);
|
|
761
|
+
}, m2.format = function(t2) {
|
|
762
|
+
var e2 = this, n2 = this.$locale();
|
|
763
|
+
if (!this.isValid()) return n2.invalidDate || l;
|
|
764
|
+
var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t3, n3, i3, s3) {
|
|
765
|
+
return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
|
|
766
|
+
}, d2 = function(t3) {
|
|
767
|
+
return b.s(s2 % 12 || 12, t3, "0");
|
|
768
|
+
}, $2 = f2 || function(t3, e3, n3) {
|
|
769
|
+
var r3 = t3 < 12 ? "AM" : "PM";
|
|
770
|
+
return n3 ? r3.toLowerCase() : r3;
|
|
771
|
+
};
|
|
772
|
+
return r2.replace(y, (function(t3, r3) {
|
|
773
|
+
return r3 || (function(t4) {
|
|
774
|
+
switch (t4) {
|
|
775
|
+
case "YY":
|
|
776
|
+
return String(e2.$y).slice(-2);
|
|
777
|
+
case "YYYY":
|
|
778
|
+
return b.s(e2.$y, 4, "0");
|
|
779
|
+
case "M":
|
|
780
|
+
return a2 + 1;
|
|
781
|
+
case "MM":
|
|
782
|
+
return b.s(a2 + 1, 2, "0");
|
|
783
|
+
case "MMM":
|
|
784
|
+
return h2(n2.monthsShort, a2, c2, 3);
|
|
785
|
+
case "MMMM":
|
|
786
|
+
return h2(c2, a2);
|
|
787
|
+
case "D":
|
|
788
|
+
return e2.$D;
|
|
789
|
+
case "DD":
|
|
790
|
+
return b.s(e2.$D, 2, "0");
|
|
791
|
+
case "d":
|
|
792
|
+
return String(e2.$W);
|
|
793
|
+
case "dd":
|
|
794
|
+
return h2(n2.weekdaysMin, e2.$W, o2, 2);
|
|
795
|
+
case "ddd":
|
|
796
|
+
return h2(n2.weekdaysShort, e2.$W, o2, 3);
|
|
797
|
+
case "dddd":
|
|
798
|
+
return o2[e2.$W];
|
|
799
|
+
case "H":
|
|
800
|
+
return String(s2);
|
|
801
|
+
case "HH":
|
|
802
|
+
return b.s(s2, 2, "0");
|
|
803
|
+
case "h":
|
|
804
|
+
return d2(1);
|
|
805
|
+
case "hh":
|
|
806
|
+
return d2(2);
|
|
807
|
+
case "a":
|
|
808
|
+
return $2(s2, u2, true);
|
|
809
|
+
case "A":
|
|
810
|
+
return $2(s2, u2, false);
|
|
811
|
+
case "m":
|
|
812
|
+
return String(u2);
|
|
813
|
+
case "mm":
|
|
814
|
+
return b.s(u2, 2, "0");
|
|
815
|
+
case "s":
|
|
816
|
+
return String(e2.$s);
|
|
817
|
+
case "ss":
|
|
818
|
+
return b.s(e2.$s, 2, "0");
|
|
819
|
+
case "SSS":
|
|
820
|
+
return b.s(e2.$ms, 3, "0");
|
|
821
|
+
case "Z":
|
|
822
|
+
return i2;
|
|
823
|
+
}
|
|
824
|
+
return null;
|
|
825
|
+
})(t3) || i2.replace(":", "");
|
|
826
|
+
}));
|
|
827
|
+
}, m2.utcOffset = function() {
|
|
828
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
829
|
+
}, m2.diff = function(r2, d2, l2) {
|
|
830
|
+
var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
|
|
831
|
+
return b.m(y2, m3);
|
|
832
|
+
};
|
|
833
|
+
switch (M3) {
|
|
834
|
+
case h:
|
|
835
|
+
$2 = D2() / 12;
|
|
836
|
+
break;
|
|
837
|
+
case c:
|
|
838
|
+
$2 = D2();
|
|
839
|
+
break;
|
|
840
|
+
case f:
|
|
841
|
+
$2 = D2() / 3;
|
|
842
|
+
break;
|
|
843
|
+
case o:
|
|
844
|
+
$2 = (g2 - v2) / 6048e5;
|
|
845
|
+
break;
|
|
846
|
+
case a:
|
|
847
|
+
$2 = (g2 - v2) / 864e5;
|
|
848
|
+
break;
|
|
849
|
+
case u:
|
|
850
|
+
$2 = g2 / n;
|
|
851
|
+
break;
|
|
852
|
+
case s:
|
|
853
|
+
$2 = g2 / e;
|
|
854
|
+
break;
|
|
855
|
+
case i:
|
|
856
|
+
$2 = g2 / t;
|
|
857
|
+
break;
|
|
858
|
+
default:
|
|
859
|
+
$2 = g2;
|
|
860
|
+
}
|
|
861
|
+
return l2 ? $2 : b.a($2);
|
|
862
|
+
}, m2.daysInMonth = function() {
|
|
863
|
+
return this.endOf(c).$D;
|
|
864
|
+
}, m2.$locale = function() {
|
|
865
|
+
return D[this.$L];
|
|
866
|
+
}, m2.locale = function(t2, e2) {
|
|
867
|
+
if (!t2) return this.$L;
|
|
868
|
+
var n2 = this.clone(), r2 = w(t2, e2, true);
|
|
869
|
+
return r2 && (n2.$L = r2), n2;
|
|
870
|
+
}, m2.clone = function() {
|
|
871
|
+
return b.w(this.$d, this);
|
|
872
|
+
}, m2.toDate = function() {
|
|
873
|
+
return new Date(this.valueOf());
|
|
874
|
+
}, m2.toJSON = function() {
|
|
875
|
+
return this.isValid() ? this.toISOString() : null;
|
|
876
|
+
}, m2.toISOString = function() {
|
|
877
|
+
return this.$d.toISOString();
|
|
878
|
+
}, m2.toString = function() {
|
|
879
|
+
return this.$d.toUTCString();
|
|
880
|
+
}, M2;
|
|
881
|
+
})(), k = _.prototype;
|
|
882
|
+
return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach((function(t2) {
|
|
883
|
+
k[t2[1]] = function(e2) {
|
|
884
|
+
return this.$g(e2, t2[0], t2[1]);
|
|
885
|
+
};
|
|
886
|
+
})), O.extend = function(t2, e2) {
|
|
887
|
+
return t2.$i || (t2(e2, _, O), t2.$i = true), O;
|
|
888
|
+
}, O.locale = w, O.isDayjs = S, O.unix = function(t2) {
|
|
889
|
+
return O(1e3 * t2);
|
|
890
|
+
}, O.en = D[g], O.Ls = D, O.p = {}, O;
|
|
891
|
+
}));
|
|
892
|
+
})(dayjs_min$1);
|
|
893
|
+
return dayjs_min$1.exports;
|
|
894
|
+
}
|
|
895
|
+
var dayjs_minExports = requireDayjs_min();
|
|
896
|
+
var dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
|
|
897
|
+
var sv$1 = { exports: {} };
|
|
898
|
+
var sv = sv$1.exports;
|
|
899
|
+
var hasRequiredSv;
|
|
900
|
+
function requireSv() {
|
|
901
|
+
if (hasRequiredSv) return sv$1.exports;
|
|
902
|
+
hasRequiredSv = 1;
|
|
903
|
+
(function(module, exports$1) {
|
|
904
|
+
!(function(e, t) {
|
|
905
|
+
module.exports = t(requireDayjs_min());
|
|
906
|
+
})(sv, (function(e) {
|
|
907
|
+
function t(e2) {
|
|
908
|
+
return e2 && "object" == typeof e2 && "default" in e2 ? e2 : { default: e2 };
|
|
909
|
+
}
|
|
910
|
+
var a = t(e), d = { name: "sv", weekdays: "s\xF6ndag_m\xE5ndag_tisdag_onsdag_torsdag_fredag_l\xF6rdag".split("_"), weekdaysShort: "s\xF6n_m\xE5n_tis_ons_tor_fre_l\xF6r".split("_"), weekdaysMin: "s\xF6_m\xE5_ti_on_to_fr_l\xF6".split("_"), months: "januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"), monthsShort: "jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"), weekStart: 1, yearStart: 4, ordinal: function(e2) {
|
|
911
|
+
var t2 = e2 % 10;
|
|
912
|
+
return "[" + e2 + (1 === t2 || 2 === t2 ? "a" : "e") + "]";
|
|
913
|
+
}, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY-MM-DD", LL: "D MMMM YYYY", LLL: "D MMMM YYYY [kl.] HH:mm", LLLL: "dddd D MMMM YYYY [kl.] HH:mm", lll: "D MMM YYYY HH:mm", llll: "ddd D MMM YYYY HH:mm" }, relativeTime: { future: "om %s", past: "f\xF6r %s sedan", s: "n\xE5gra sekunder", m: "en minut", mm: "%d minuter", h: "en timme", hh: "%d timmar", d: "en dag", dd: "%d dagar", M: "en m\xE5nad", MM: "%d m\xE5nader", y: "ett \xE5r", yy: "%d \xE5r" } };
|
|
914
|
+
return a.default.locale(d, null, true), d;
|
|
915
|
+
}));
|
|
916
|
+
})(sv$1);
|
|
917
|
+
return sv$1.exports;
|
|
918
|
+
}
|
|
919
|
+
requireSv();
|
|
920
|
+
var weekOfYear$2 = { exports: {} };
|
|
921
|
+
var weekOfYear$1 = weekOfYear$2.exports;
|
|
922
|
+
var hasRequiredWeekOfYear;
|
|
923
|
+
function requireWeekOfYear() {
|
|
924
|
+
if (hasRequiredWeekOfYear) return weekOfYear$2.exports;
|
|
925
|
+
hasRequiredWeekOfYear = 1;
|
|
926
|
+
(function(module, exports$1) {
|
|
927
|
+
!(function(e, t) {
|
|
928
|
+
module.exports = t();
|
|
929
|
+
})(weekOfYear$1, (function() {
|
|
930
|
+
var e = "week", t = "year";
|
|
931
|
+
return function(i, n, r) {
|
|
932
|
+
var f = n.prototype;
|
|
933
|
+
f.week = function(i2) {
|
|
934
|
+
if (void 0 === i2 && (i2 = null), null !== i2) return this.add(7 * (i2 - this.week()), "day");
|
|
935
|
+
var n2 = this.$locale().yearStart || 1;
|
|
936
|
+
if (11 === this.month() && this.date() > 25) {
|
|
937
|
+
var f2 = r(this).startOf(t).add(1, t).date(n2), s = r(this).endOf(e);
|
|
938
|
+
if (f2.isBefore(s)) return 1;
|
|
939
|
+
}
|
|
940
|
+
var a = r(this).startOf(t).date(n2).startOf(e).subtract(1, "millisecond"), o = this.diff(a, e, true);
|
|
941
|
+
return o < 0 ? r(this).startOf("week").week() : Math.ceil(o);
|
|
942
|
+
}, f.weeks = function(e2) {
|
|
943
|
+
return void 0 === e2 && (e2 = null), this.week(e2);
|
|
944
|
+
};
|
|
945
|
+
};
|
|
946
|
+
}));
|
|
947
|
+
})(weekOfYear$2);
|
|
948
|
+
return weekOfYear$2.exports;
|
|
949
|
+
}
|
|
950
|
+
var weekOfYearExports = requireWeekOfYear();
|
|
951
|
+
var weekOfYear = /* @__PURE__ */ getDefaultExportFromCjs(weekOfYearExports);
|
|
952
|
+
dayjs.extend(weekOfYear);
|
|
953
|
+
var DateFormat;
|
|
954
|
+
(function(DateFormat2) {
|
|
955
|
+
DateFormat2["FULL"] = "full";
|
|
956
|
+
DateFormat2["LONG"] = "long";
|
|
957
|
+
DateFormat2["ISO8601"] = "iso-8601";
|
|
958
|
+
DateFormat2["YYYYMMDD"] = "YYYYMMDD";
|
|
959
|
+
})(DateFormat || (DateFormat = {}));
|
|
960
|
+
var Locale;
|
|
961
|
+
(function(Locale2) {
|
|
962
|
+
Locale2["SWEDISH"] = "sv";
|
|
963
|
+
Locale2["ENGLISH"] = "en";
|
|
964
|
+
})(Locale || (Locale = {}));
|
|
965
|
+
var Weekday;
|
|
966
|
+
(function(Weekday2) {
|
|
967
|
+
Weekday2[Weekday2["MONDAY"] = 1] = "MONDAY";
|
|
968
|
+
Weekday2[Weekday2["TUESDAY"] = 2] = "TUESDAY";
|
|
969
|
+
Weekday2[Weekday2["WEDNESDAY"] = 3] = "WEDNESDAY";
|
|
970
|
+
Weekday2[Weekday2["THURSDAY"] = 4] = "THURSDAY";
|
|
971
|
+
Weekday2[Weekday2["FRIDAY"] = 5] = "FRIDAY";
|
|
972
|
+
Weekday2[Weekday2["SATURDAY"] = 6] = "SATURDAY";
|
|
973
|
+
Weekday2[Weekday2["SUNDAY"] = 7] = "SUNDAY";
|
|
974
|
+
})(Weekday || (Weekday = {}));
|
|
975
|
+
({
|
|
976
|
+
[Locale.SWEDISH]: [
|
|
977
|
+
{
|
|
978
|
+
weekday: Weekday.MONDAY,
|
|
979
|
+
name: "m\xE5ndag",
|
|
980
|
+
shortName: "m\xE5n"
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
weekday: Weekday.TUESDAY,
|
|
984
|
+
name: "tisdag",
|
|
985
|
+
shortName: "tis"
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
weekday: Weekday.WEDNESDAY,
|
|
989
|
+
name: "onsdag",
|
|
990
|
+
shortName: "ons"
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
weekday: Weekday.THURSDAY,
|
|
994
|
+
name: "torsdag",
|
|
995
|
+
shortName: "tor"
|
|
996
|
+
},
|
|
997
|
+
{
|
|
998
|
+
weekday: Weekday.FRIDAY,
|
|
999
|
+
name: "fredag",
|
|
1000
|
+
shortName: "fre"
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
weekday: Weekday.SATURDAY,
|
|
1004
|
+
name: "l\xF6rdag",
|
|
1005
|
+
shortName: "l\xF6r"
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
weekday: Weekday.SUNDAY,
|
|
1009
|
+
name: "s\xF6ndag",
|
|
1010
|
+
shortName: "s\xF6n"
|
|
1011
|
+
}
|
|
1012
|
+
],
|
|
1013
|
+
[Locale.ENGLISH]: [
|
|
1014
|
+
{
|
|
1015
|
+
weekday: Weekday.MONDAY,
|
|
1016
|
+
name: "Monday",
|
|
1017
|
+
shortName: "Mon"
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
weekday: Weekday.TUESDAY,
|
|
1021
|
+
name: "Tuesday",
|
|
1022
|
+
shortName: "Tue"
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
weekday: Weekday.WEDNESDAY,
|
|
1026
|
+
name: "Wednesday",
|
|
1027
|
+
shortName: "Wed"
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
weekday: Weekday.THURSDAY,
|
|
1031
|
+
name: "Thursday",
|
|
1032
|
+
shortName: "Thu"
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
weekday: Weekday.FRIDAY,
|
|
1036
|
+
name: "Friday",
|
|
1037
|
+
shortName: "Fri"
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
weekday: Weekday.SATURDAY,
|
|
1041
|
+
name: "Saturday",
|
|
1042
|
+
shortName: "Sat"
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
weekday: Weekday.SUNDAY,
|
|
1046
|
+
name: "Sunday",
|
|
1047
|
+
shortName: "Sun"
|
|
1048
|
+
}
|
|
1049
|
+
]
|
|
1050
|
+
});
|
|
1051
|
+
var ISO8601_YYYY_MM_DD = "YYYY-MM-DD";
|
|
1052
|
+
var formatter = {
|
|
1053
|
+
[Locale.SWEDISH]: {
|
|
1054
|
+
[DateFormat.FULL]: "dddd D MMMM YYYY",
|
|
1055
|
+
[DateFormat.LONG]: "D MMMM YYYY",
|
|
1056
|
+
[DateFormat.ISO8601]: ISO8601_YYYY_MM_DD,
|
|
1057
|
+
[DateFormat.YYYYMMDD]: "YYYYMMDD"
|
|
1058
|
+
},
|
|
1059
|
+
[Locale.ENGLISH]: {
|
|
1060
|
+
[DateFormat.FULL]: "dddd, D MMMM YYYY",
|
|
1061
|
+
[DateFormat.LONG]: "D MMMM YYYY",
|
|
1062
|
+
[DateFormat.ISO8601]: ISO8601_YYYY_MM_DD,
|
|
1063
|
+
[DateFormat.YYYYMMDD]: "YYYYMMDD"
|
|
1064
|
+
}
|
|
1065
|
+
};
|
|
1066
|
+
var wrapper;
|
|
1067
|
+
function createScreenReaderWrapper(options) {
|
|
1068
|
+
if (!getWrapper()) {
|
|
1069
|
+
wrapper = document.createElement("div");
|
|
1070
|
+
wrapper.id = "fkui-alert-screen-reader";
|
|
1071
|
+
wrapper.className = "sr-only";
|
|
1072
|
+
updateProperties(options);
|
|
1073
|
+
document.body.appendChild(wrapper);
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
function updateProperties(options) {
|
|
1077
|
+
const wrapper2 = getWrapper();
|
|
1078
|
+
const ariaLive = options.assertive ? "assertive" : "polite";
|
|
1079
|
+
wrapper2.setAttribute("aria-live", ariaLive);
|
|
1080
|
+
}
|
|
1081
|
+
function getWrapper() {
|
|
1082
|
+
return wrapper;
|
|
1083
|
+
}
|
|
1084
|
+
if (typeof document !== "undefined") {
|
|
1085
|
+
createScreenReaderWrapper({ assertive: false });
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
// src/settings/text.ts
|
|
1089
|
+
var template = `
|
|
1090
|
+
<template id="devindex-text">
|
|
1091
|
+
<span><!-- title --></span>
|
|
1092
|
+
<p><!-- description --></p>
|
|
1093
|
+
<br />
|
|
1094
|
+
<input type="text"></input>
|
|
1095
|
+
</template>
|
|
1096
|
+
`;
|
|
1097
|
+
var ONE_MONTH_IN_SECONDS = 2592e3;
|
|
1098
|
+
function createElement(setting) {
|
|
1099
|
+
const template2 = document.querySelector("#devindex-text");
|
|
1100
|
+
const clone = document.importNode(template2.content, true);
|
|
1101
|
+
const title = clone.querySelector("span");
|
|
1102
|
+
const description = clone.querySelector("p");
|
|
1103
|
+
const input = clone.querySelector("input");
|
|
1104
|
+
input.name = setting.key;
|
|
1105
|
+
input.value = findCookie(input.name) ?? "";
|
|
1106
|
+
input.addEventListener("input", () => {
|
|
1107
|
+
setCookie({
|
|
1108
|
+
name: input.name,
|
|
1109
|
+
value: input.value,
|
|
1110
|
+
timeLimitSeconds: ONE_MONTH_IN_SECONDS
|
|
1111
|
+
});
|
|
1112
|
+
});
|
|
1113
|
+
title.textContent = setting.title;
|
|
1114
|
+
if (setting.description) {
|
|
1115
|
+
description.textContent = setting.description;
|
|
1116
|
+
} else {
|
|
1117
|
+
description.remove();
|
|
1118
|
+
}
|
|
1119
|
+
return clone;
|
|
1120
|
+
}
|
|
1121
|
+
var text_default = { createElement, template };
|
|
3
1122
|
|
|
4
1123
|
// src/style.scss
|
|
5
1124
|
var style_default = `.secret-menu {
|
|
@@ -87,6 +1206,7 @@ var style_default = `.secret-menu {
|
|
|
87
1206
|
}`;
|
|
88
1207
|
|
|
89
1208
|
// src/menu.ts
|
|
1209
|
+
var settingsNodes = [];
|
|
90
1210
|
function evaluateMock(mock) {
|
|
91
1211
|
if (typeof mock === "function") {
|
|
92
1212
|
const req = {};
|
|
@@ -96,7 +1216,7 @@ function evaluateMock(mock) {
|
|
|
96
1216
|
}
|
|
97
1217
|
}
|
|
98
1218
|
function generateOptionMarkupForSelect(setting) {
|
|
99
|
-
const reload = setting.reloadOnChange
|
|
1219
|
+
const reload = setting.reloadOnChange ?? true;
|
|
100
1220
|
const description = setting.description ? `<p>${setting.description}</p>` : "";
|
|
101
1221
|
const execOnChange = setting.execOnChange ? ` data-exec-on-change="${setting.execOnChange}"` : "";
|
|
102
1222
|
let markup = `<label for="${setting.key}" class="label">${setting.title}</label>${description}<select id="${setting.key}" data-sessionStorage="${setting.sessionStorage}" data-reload="${reload}" ${execOnChange} name="${setting.key}" tabindex="-1">`;
|
|
@@ -117,10 +1237,6 @@ function generateOptionMarkupForLink(setting) {
|
|
|
117
1237
|
markup = `${markup}</ul>`;
|
|
118
1238
|
return markup;
|
|
119
1239
|
}
|
|
120
|
-
function generateOptionMarkupForTextInput(setting) {
|
|
121
|
-
const description = setting.description ? `<p>${setting.description}</p>` : "";
|
|
122
|
-
return `${setting.title} ${description} <br /> <input name="${setting.key}" type="text"></input>`;
|
|
123
|
-
}
|
|
124
1240
|
function generateOptionMarkup(setting) {
|
|
125
1241
|
switch (setting.type) {
|
|
126
1242
|
case "select":
|
|
@@ -128,7 +1244,7 @@ function generateOptionMarkup(setting) {
|
|
|
128
1244
|
case "links":
|
|
129
1245
|
return generateOptionMarkupForLink(setting);
|
|
130
1246
|
case "text":
|
|
131
|
-
|
|
1247
|
+
settingsNodes.push(text_default.createElement(setting));
|
|
132
1248
|
}
|
|
133
1249
|
return "";
|
|
134
1250
|
}
|
|
@@ -136,7 +1252,7 @@ function isMock(userSettingsOrMock) {
|
|
|
136
1252
|
return "responses" in userSettingsOrMock || "defaultResponse" in userSettingsOrMock;
|
|
137
1253
|
}
|
|
138
1254
|
function getFirstCookie(matcher) {
|
|
139
|
-
const entries = Object.entries(matcher.request.cookies
|
|
1255
|
+
const entries = Object.entries(matcher.request.cookies ?? {});
|
|
140
1256
|
const [key, value] = entries[0];
|
|
141
1257
|
return { key, value };
|
|
142
1258
|
}
|
|
@@ -172,6 +1288,13 @@ var defaultSetting = {
|
|
|
172
1288
|
type: "select"
|
|
173
1289
|
};
|
|
174
1290
|
var menu_default = (userSettingsAndMocks) => {
|
|
1291
|
+
document.head.insertAdjacentHTML("beforeend", `<style>${style_default}</style>`);
|
|
1292
|
+
document.body.insertAdjacentHTML(
|
|
1293
|
+
"beforeend",
|
|
1294
|
+
`
|
|
1295
|
+
${text_default.template}
|
|
1296
|
+
`
|
|
1297
|
+
);
|
|
175
1298
|
let settingsMarkup = "";
|
|
176
1299
|
userSettingsAndMocks.map(
|
|
177
1300
|
(userSettingOrMock) => isMock(userSettingOrMock) ? entryFromMock(userSettingOrMock) : userSettingOrMock
|
|
@@ -179,7 +1302,6 @@ var menu_default = (userSettingsAndMocks) => {
|
|
|
179
1302
|
const setting = { ...defaultSetting, ...userSetting };
|
|
180
1303
|
settingsMarkup = settingsMarkup + generateOptionMarkup(setting);
|
|
181
1304
|
});
|
|
182
|
-
document.head.insertAdjacentHTML("beforeend", `<style>${style_default}</style>`);
|
|
183
1305
|
document.body.insertAdjacentHTML(
|
|
184
1306
|
"beforeend",
|
|
185
1307
|
`
|
|
@@ -195,6 +1317,12 @@ var menu_default = (userSettingsAndMocks) => {
|
|
|
195
1317
|
</div>
|
|
196
1318
|
</div>`
|
|
197
1319
|
);
|
|
1320
|
+
const menu = document.querySelector(".menu");
|
|
1321
|
+
if (menu) {
|
|
1322
|
+
for (const node of settingsNodes) {
|
|
1323
|
+
menu.append(node);
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
198
1326
|
const script = document.createElement("script");
|
|
199
1327
|
script.innerText = client_default;
|
|
200
1328
|
document.body.appendChild(script);
|