@gsc-basic/utils 1.4.3 → 1.4.6
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/index.d.ts +5 -34
- package/dist/index.js +10 -4
- package/package.json +10 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
import { titleCase } from "title-case";
|
|
3
|
-
import { compile as regexpToPath, pathToRegexp } from "path-to-regexp";
|
|
4
3
|
import ResizeObserver from "resize-observer-polyfill";
|
|
5
4
|
import { Config } from "dompurify";
|
|
6
5
|
import { MarkedExtension, MarkedOptions } from "marked";
|
|
7
|
-
|
|
6
|
+
import { compile as regexpToPath, pathToRegexp } from "path-to-regexp";
|
|
8
7
|
export declare function pascalCase(value: string): string;
|
|
9
8
|
/**
|
|
10
9
|
* 在大多数情况下使用 lodash 的 `kebabCase`,
|
|
@@ -13,8 +12,6 @@ export declare function pascalCase(value: string): string;
|
|
|
13
12
|
* @returns 转换后的 kebab-case 字符串
|
|
14
13
|
*/
|
|
15
14
|
export declare function safeKebabCase(value?: string | null): string;
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region src/core/common.d.ts
|
|
18
15
|
export declare const withInstall: (component: any, alias: string) => any;
|
|
19
16
|
export declare function getRawRoute(route: any): any;
|
|
20
17
|
export declare function openWindow(url: string, opt?: {
|
|
@@ -54,8 +51,6 @@ export declare function getActualWidthOfChars(text?: string, options?: {
|
|
|
54
51
|
size?: number;
|
|
55
52
|
family?: string;
|
|
56
53
|
}): number;
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region src/core/bem.d.ts
|
|
59
54
|
type Mod = string | {
|
|
60
55
|
[key: string]: any;
|
|
61
56
|
};
|
|
@@ -72,8 +67,6 @@ type BEM = ReturnType<typeof createBEM>;
|
|
|
72
67
|
export declare function buildBEM(name: string): (el?: Mods, mods?: Mods) => string;
|
|
73
68
|
export declare function createBEM(name: string, prefixCls?: string): ((el?: Mods, mods?: Mods) => string)[];
|
|
74
69
|
export declare function createNamespace(name: string, prefixCls?: string): readonly [string, (el?: Mods, mods?: Mods) => string];
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region src/core/cipher.d.ts
|
|
77
70
|
interface AesGcmEncryptionParams {
|
|
78
71
|
key: string;
|
|
79
72
|
additionalData?: string;
|
|
@@ -99,8 +92,6 @@ export declare class AesGcmEncryption {
|
|
|
99
92
|
decrypt(payload: string): Promise<string>;
|
|
100
93
|
private getKey;
|
|
101
94
|
}
|
|
102
|
-
//#endregion
|
|
103
|
-
//#region src/core/domUtils.d.ts
|
|
104
95
|
interface ViewportOffsetResult {
|
|
105
96
|
/**
|
|
106
97
|
* 元素左边距离 body 左边的距离(和 getBoundingClientRect 的 left 一样)
|
|
@@ -152,16 +143,12 @@ type EventListenerOrEventListenerObject = (evt: Event) => void | {
|
|
|
152
143
|
declare function on(element: EventTarget, event: string, handler: EventListenerOrEventListenerObject): void;
|
|
153
144
|
declare function off(element: EventTarget, event: string, handler: EventListenerOrEventListenerObject): void;
|
|
154
145
|
export declare function useRafThrottle(fn: () => any): (...args: any[]) => void;
|
|
155
|
-
//#endregion
|
|
156
|
-
//#region src/core/event.d.ts
|
|
157
146
|
export declare function addResizeListener(element: any, fn: () => any): void;
|
|
158
147
|
export declare function removeResizeListener(element: any, fn: () => any): void;
|
|
159
148
|
export declare function triggerWindowResize(): void;
|
|
160
149
|
export declare function addLocationListener(fn: () => void, options?: AddEventListenerOptions): {
|
|
161
150
|
removeListener: () => void;
|
|
162
151
|
};
|
|
163
|
-
//#endregion
|
|
164
|
-
//#region src/core/file.d.ts
|
|
165
152
|
/**
|
|
166
153
|
* @description: base64 to blob
|
|
167
154
|
*/
|
|
@@ -205,8 +192,6 @@ export declare function downloadByUrl({ url, target, fileName }: {
|
|
|
205
192
|
target?: TargetContext;
|
|
206
193
|
fileName?: string;
|
|
207
194
|
}): boolean;
|
|
208
|
-
//#endregion
|
|
209
|
-
//#region src/core/is.d.ts
|
|
210
195
|
export declare function is(val: unknown, type: string): boolean;
|
|
211
196
|
export declare function isObject(val: any): boolean;
|
|
212
197
|
export declare function isUrl(path: string): boolean;
|
|
@@ -224,8 +209,6 @@ export declare const isSupportNativeEllipsis: boolean;
|
|
|
224
209
|
export declare const isSupportResizeObserver: boolean;
|
|
225
210
|
export declare const isChineseText: (text: string) => boolean;
|
|
226
211
|
export declare const enableTransitions: () => boolean;
|
|
227
|
-
//#endregion
|
|
228
|
-
//#region src/core/jsxHelper.d.ts
|
|
229
212
|
interface InternalSlots {
|
|
230
213
|
[name: string]: any;
|
|
231
214
|
}
|
|
@@ -239,14 +222,11 @@ export declare function getSlot(slots: Readonly<InternalSlots>, slot?: string, d
|
|
|
239
222
|
* @param excludeKeys
|
|
240
223
|
*/
|
|
241
224
|
export declare function extendSlots(slots: Readonly<InternalSlots>, excludeKeys?: string[]): any;
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}): Promise<unknown>;
|
|
225
|
+
type LoadScriptOptions = Partial<Pick<HTMLScriptElement, 'type' | 'async' | 'defer' | 'crossOrigin' | 'integrity' | 'noModule' | 'referrerPolicy' | 'fetchPriority' | 'nonce'>> & {
|
|
226
|
+
attributes?: Record<string, string>;
|
|
227
|
+
};
|
|
228
|
+
declare function loadScript(src: string, { type, attributes, ...scriptOptions }?: LoadScriptOptions): Promise<unknown>;
|
|
247
229
|
declare function unloadScript(src: string): Promise<void>;
|
|
248
|
-
//#endregion
|
|
249
|
-
//#region src/core/matcher.d.ts
|
|
250
230
|
/**
|
|
251
231
|
* 简单的通配符匹配工具, 可在换行符之间匹配 ==> foo*r will match foo\nbar.
|
|
252
232
|
* 如有更复杂的需求可参考 https://github.com/micromatch/micromatch
|
|
@@ -291,8 +271,6 @@ interface MatcherOptions {
|
|
|
291
271
|
export declare function matcher(inputs: string | string[], patterns: string | string[], options?: MatcherOptions): string[];
|
|
292
272
|
export declare function isMatch(inputs: string | string[], patterns: string | string[], options?: MatcherOptions): boolean;
|
|
293
273
|
export declare function escapeStringRegexp(value: string): string;
|
|
294
|
-
//#endregion
|
|
295
|
-
//#region src/core/markdown.d.ts
|
|
296
274
|
interface MarkdownHighlightOptions {
|
|
297
275
|
/** 语法高亮函数:(code, lang) => highlightedHtml */
|
|
298
276
|
highlight: (code: string, lang: string) => string;
|
|
@@ -381,8 +359,6 @@ export declare function createMarkdownRenderer(options?: MarkdownRenderOptions):
|
|
|
381
359
|
* ```
|
|
382
360
|
*/
|
|
383
361
|
export declare function stripMarkdown(text: string): string;
|
|
384
|
-
//#endregion
|
|
385
|
-
//#region src/core/regexp.d.ts
|
|
386
362
|
export declare const regexpMap: {
|
|
387
363
|
mobile: RegExp;
|
|
388
364
|
tel: RegExp;
|
|
@@ -406,8 +382,6 @@ export declare const regexpMap: {
|
|
|
406
382
|
itcode: RegExp;
|
|
407
383
|
numeric: RegExp;
|
|
408
384
|
};
|
|
409
|
-
//#endregion
|
|
410
|
-
//#region src/core/treeHelper.d.ts
|
|
411
385
|
interface TreeHelperConfig {
|
|
412
386
|
id: string;
|
|
413
387
|
children: string;
|
|
@@ -427,11 +401,8 @@ export declare function treeMapEach(data: any, { children, conversion }: {
|
|
|
427
401
|
children?: string;
|
|
428
402
|
conversion: Fn;
|
|
429
403
|
}): any;
|
|
430
|
-
//#endregion
|
|
431
|
-
//#region src/core/uuid.d.ts
|
|
432
404
|
export declare function buildUUID({ native }?: {
|
|
433
405
|
native?: boolean | undefined;
|
|
434
406
|
}): string;
|
|
435
407
|
export declare function buildShortUUID(prefix?: string): string;
|
|
436
|
-
//#endregion
|
|
437
408
|
export { type AesGcmEncryptionParams, type BEM, type MarkdownHighlightOptions, type MarkdownRenderOptions, type Pbkdf2Params, ResizeObserver, off as domOffEvent, on as domOnEvent, filter as filterTree, forEach as forEachTree, loadScript, pathToRegexp, regexpToPath, titleCase, unloadScript };
|
package/dist/index.js
CHANGED
|
@@ -7,8 +7,14 @@ You shall not disclose such Confidential Information and shall use it only in
|
|
|
7
7
|
accordance with the terms of the license agreement.
|
|
8
8
|
|
|
9
9
|
--- Build Info ---
|
|
10
|
-
Version: 1.4.
|
|
11
|
-
Build Time: 2026/
|
|
12
|
-
Build Commit:
|
|
10
|
+
Version: 1.4.6
|
|
11
|
+
Build Time: 2026/11/26 15:29:22
|
|
12
|
+
Build Commit: 50f0151313db2d80b4ab32035fd512e247c889e7
|
|
13
13
|
*/
|
|
14
|
-
import{titleCase as e}from"title-case";import{camelCase as t,intersectionWith as n,isArray as r,isEqual as i,isFunction as a,isNil as o,isPlainObject as s,kebabCase as c,mergeWith as l,round as u,unionWith as d,upperFirst as f}from"lodash-es";import{compile as p,pathToRegexp as ee}from"path-to-regexp";import{hmac as m}from"@noble/hashes/hmac.js";import{sha256 as h,sha512 as g}from"@noble/hashes/sha2.js";import{bytesToHex as _,utf8ToBytes as v}from"@noble/hashes/utils.js";import y from"resize-observer-polyfill";import b from"dompurify";import{Marked as x}from"marked";import{markedHighlight as S}from"marked-highlight";import{gfmHeadingId as te}from"marked-gfm-heading-id";import ne from"marked-alert";import{markedSmartypants as re}from"marked-smartypants";import C from"highlight.js/lib/core";import ie from"highlight.js/lib/languages/bash";import ae from"highlight.js/lib/languages/c";import oe from"highlight.js/lib/languages/cpp";import se from"highlight.js/lib/languages/css";import ce from"highlight.js/lib/languages/go";import le from"highlight.js/lib/languages/java";import ue from"highlight.js/lib/languages/javascript";import de from"highlight.js/lib/languages/json";import fe from"highlight.js/lib/languages/markdown";import pe from"highlight.js/lib/languages/php";import me from"highlight.js/lib/languages/plaintext";import he from"highlight.js/lib/languages/python";import ge from"highlight.js/lib/languages/rust";import _e from"highlight.js/lib/languages/scss";import ve from"highlight.js/lib/languages/sql";import ye from"highlight.js/lib/languages/typescript";import w from"highlight.js/lib/languages/xml";import be from"highlight.js/lib/languages/yaml";import{v4 as T}from"uuid";function xe(e){return f(t(e))}function Se(e){if(!e)return``;let t=c(e),n=e.replace(/[^A-Z0-9]/gi,``);if(n.length===t.replace(/-/g,``).length){let e=0,r=``;for(let i=0;i<t.length;i+=1){let a=t[i];if(a===`-`){let o=t[i-1],s=t[i+1],c=n[e],l=c&&c.toUpperCase()===c&&c.toLowerCase()!==c,u=i+1===t.length-1;if(o&&s&&/[a-z0-9]/.test(o)&&/[a-z0-9]/.test(s)&&(!/\d/.test(o)&&/\d/.test(s)||/\d/.test(o)&&!/\d/.test(s)&&!l||/\d/.test(o)&&!/\d/.test(s)&&l&&u))continue;r+=a}else r+=a,e+=1}t=r}return t}const E={mobile:/^(?:(?:\+|00)86)?1[3-9]\d{9}$/,tel:/^(?:(?:\d{3}-)?\d{8}|(?:\d{4}-)?\d{7,8})(?:-\d+)?$/,numAndLetter:/^[A-Z0-9]+$/i,password:/^\S*(?=\S{6,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S+$/,email:/^[A-Z0-9_\u4E00-\u9FA5]+[A-Z0-9_.+%\u4E00-\u9FA5\-]*@[A-Z0-9_.\-]+(\.[A-Z0-9_\-]+)+$/i,postalCode:/^(0[1-7]|1[0-356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[0-5]|8[013-6])\d{4}$/,identityCard:/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[12]\d|30|31)\d{3}[\dX]$/i,ip:/^((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(?::(?:\d|[1-9]\d{1,3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5]))?$/,url:/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-][^!@#$%^&*?.\s]{0,64}\.)+[a-z]{2,6}\/?/,httpsUrl:/^https:\/\//,domain:/^([0-9a-z-]+\.)+([a-z]{2,})$/i,plateNumber:/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/,md5:/^[a-f0-9]{32}$/i,base64:/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([\w!$&',()*+;=\-.~:@/?%\s]*?)\s*$/i,uuid:/^[a-f\d]{4}(?:[a-f\d]{4}-){4}[a-f\d]{12}$/i,version:/^\d+(?:\.\d+){2}$/,videoUrl:/^https?:\/\/(.+\/)+.+(\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|mp4))$/i,imageUrl:/^https?:\/\/(.+\/)+.+(\.(gif|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/i,chinese:/^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/,itcode:/^[a-z]+\d*$/i,numeric:/^\d+$/},Ce=Object.prototype.toString;function D(e,t){return Ce.call(e)===`[object ${t}]`}function O(e){return e!==null&&D(e,`Object`)}function we(e){return E.url.test(e)}function k(e){return Array.isArray(e)&&e.length>0}function Te(e){return Number.isInteger(e)&&e>=0}function Ee(e){return E.numeric.test(e)}const A=typeof window>`u`,j=!A,M=j&&window.navigator.userAgent.toLowerCase().includes(`chrome`),N=j&&window.navigator.userAgent.toLowerCase().includes(`safari`),P=typeof window<`u`&&typeof document<`u`,De=P&&`webkitLineClamp`in document.body.style,Oe=P&&typeof ResizeObserver<`u`,ke=e=>E.chinese.test(e),Ae=()=>`startViewTransition`in document&&window.matchMedia(`(prefers-reduced-motion: no-preference)`).matches;function je(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Me(e,t){if(e==null)return{};var n,r,i=je(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function F(e){"@babel/helpers - typeof";return F=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},F(e)}function Ne(e,t){if(F(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(F(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Pe(e){var t=Ne(e,`string`);return F(t)==`symbol`?t:t+``}function I(e,t,n){return(t=Pe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Fe(Object(n),!0).forEach(function(t){I(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const Ie=[`matched`],Le=(e,t)=>{let n=e;return n.install=r=>{r.component(n.name||n.displayName,e),t&&(r.config.globalProperties[t]=e)},e};function Re(e){if(!e)return e;let{matched:t}=e;return L(L({},Me(e,Ie)),{},{matched:t?t.map(e=>({meta:e.meta,name:e.name,path:e.path})):void 0})}function ze(e,t={}){let{target:n=`__blank`,noopener:r=!0,noreferrer:i=!0}=t||{},a=[];r&&a.push(`noopener=yes`),i&&a.push(`noreferrer=yes`),window.open(e,n,a.join(`,`))}function Be(e,t,a=`replace`){return t?e?l(e,t,(e,t)=>{if(r(t)&&r(e))switch(a){case`union`:return d(e,t,i);case`intersection`:return n(e,t,i);case`concat`:return e.concat(t);case`replace`:return t;default:throw Error(`Unknown merge array strategy: ${a}`)}if(O(t)&&O(e))return Be(e,t,a)}):t:e}function Ve(e,t){if(!k(Object.keys(t)))return e;let n=``;for(let e in t){let r=t[e];n+=Array.isArray(r)?`${e}=${encodeURIComponent(r.join(`,`))}&`:`${e}=${encodeURIComponent(r)}&`}return n=n.replace(/&$/,``),/\?$/.test(e)?e+n:e.replace(/\/?$/,`?`)+n}function He(e){s(e)&&Object.keys(e).forEach(t=>{Reflect.deleteProperty(e,t)})}function Ue(e){return[`$`,`(`,`)`,`*`,`+`,`.`,`[`,`]`,`?`,`\\`,`^`,`{`,`}`,`|`].includes(e)?`\\${e}`:e}function We(e){let t=[``,...[...e].map(e=>Ue(e)),``].join(`.*`);return new RegExp(t,`i`)}function Ge(e=``,t={}){let{size:n=14,family:r=getComputedStyle(document.documentElement).getPropertyValue(`--vxe-font-family`)||`sans-serif`}=t,i=document.createElement(`canvas`).getContext(`2d`);i.font=`${n}px ${r}`;let a=i.measureText(e),o=Math.abs(a.actualBoundingBoxLeft)+Math.abs(a.actualBoundingBoxRight);return Math.ceil(Math.max(a.width,o))}function R(e,t){return t?typeof t==`string`?` ${e}--${t}`:Array.isArray(t)?t.reduce((t,n)=>t+R(e,n),``):Object.keys(t).reduce((n,r)=>n+(t[r]?R(e,r):``),``):``}function z(e){return(t,n)=>(t&&typeof t!=`string`&&(n=t,t=``),t=t?`${e}__${t}`:e,`${t}${R(t,n)}`)}function Ke(e,t=``){return[z(`${t}-${e}`)]}function qe(e,t=``){let n=`${t}-${e}`;return[n,z(n)]}function B(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function V(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){B(a,r,i,o,s,`next`,e)}function s(e){B(a,r,i,o,s,`throw`,e)}o(void 0)})}}const H=new TextEncoder,Je=new TextDecoder;function U(){var e;if(!((e=window.crypto)!=null&&e.subtle))throw Error(`Web Crypto API is not available in the current environment.`);return window.crypto}function W(e){let t=``,n=32768;for(let r=0;r<e.length;r+=n)t+=String.fromCharCode(...e.subarray(r,r+n));return btoa(t)}function Ye(e){let t=atob(e);return Uint8Array.from(t,e=>e.charCodeAt(0))}function Xe(e){return W(H.encode(e))}function Ze(e){return Je.decode(Ye(e))}function Qe(e){return _(h(v(e)))}function $e(e){return _(g(v(e)))}function et(e,t){return _(m(h,v(t),v(e)))}function tt(e=32){if(!Number.isSafeInteger(e)||e<=0||e>65536)throw Error(`The key byte length must be an integer between 1 and 65536.`);return W(U().getRandomValues(new Uint8Array(e)))}function nt(e){return G.apply(this,arguments)}function G(){return G=V(function*({password:e,salt:t,iterations:n=6e5,keyLength:r=32}){if(!Number.isSafeInteger(n)||n<=0)throw Error(`PBKDF2 iterations must be a positive integer.`);if(!Number.isSafeInteger(r)||r<=0)throw Error(`The derived key length must be a positive integer.`);let i=U(),a=yield i.subtle.importKey(`raw`,H.encode(e),`PBKDF2`,!1,[`deriveBits`]),o=yield i.subtle.deriveBits({name:`PBKDF2`,hash:`SHA-256`,salt:H.encode(t),iterations:n},a,r*8);return W(new Uint8Array(o))}),G.apply(this,arguments)}var rt=class{constructor({key:e,additionalData:t}){I(this,`key`,void 0),I(this,`additionalData`,void 0),this.key=e,this.additionalData=t?H.encode(t):void 0}encrypt(e){var t=this;return V(function*(){let n=U(),r=n.getRandomValues(new Uint8Array(12)),i=yield n.subtle.encrypt(L({name:`AES-GCM`,iv:r},t.additionalData?{additionalData:t.additionalData}:{}),yield t.getKey(),H.encode(e)),a=new Uint8Array(i),o=new Uint8Array(12+a.length);return o.set(r),o.set(a,12),W(o)})()}decrypt(e){var t=this;return V(function*(){let n=Ye(e);if(n.length<=12)throw Error(`The AES-GCM payload is invalid.`);let r=yield U().subtle.decrypt(L({name:`AES-GCM`,iv:n.slice(0,12)},t.additionalData?{additionalData:t.additionalData}:{}),yield t.getKey(),n.slice(12));return Je.decode(r)})()}getKey(){var e=this;return V(function*(){return U().subtle.importKey(`raw`,h(v(e.key)),`AES-GCM`,!1,[`encrypt`,`decrypt`])})()}};const it=()=>document.documentElement;function at(e){return!e||!e.getBoundingClientRect?0:e.getBoundingClientRect()}function ot(e){return(e||``).replace(/^\s+|\s+$/g,``)}function K(e,t){if(!e||!t)return!1;if(t.includes(` `))throw Error(`className should not contain space.`);return e.classList?e.classList.contains(t):` ${e.className} `.includes(` ${t} `)}function st(e,t,n){return n||(n=it()),n.style.setProperty(e,t),{prop:t}}function ct(e,t){if(!e)return;let n=e.className,r=(t||``).split(` `);for(let t=0,i=r.length;t<i;t++){let i=r[t];i&&(e.classList?e.classList.add(i):K(e,i)||(n+=` ${i}`))}e.classList||(e.className=n)}function lt(e,t){if(!e||!t)return;let n=t.split(` `),r=` ${e.className} `;for(let t=0,i=n.length;t<i;t++){let i=n[t];i&&(e.classList?e.classList.remove(i):K(e,i)&&(r=r.replace(` ${i} `,` `)))}e.classList||(e.className=ot(r))}function ut(e){let t=document.documentElement,n=t.scrollLeft,r=t.scrollTop,i=t.clientLeft,a=t.clientTop,o=window.scrollX,s=window.scrollY,c=at(e);if(!c)return{};let{left:l,top:u,width:d,height:f}=c,p=(o||n)-(i||0),ee=(s||r)-(a||0),m=l+o,h=u+s,g=m-p,_=h-ee,v=window.document.documentElement.clientWidth,y=window.document.documentElement.clientHeight;return{left:g,top:_,right:v-d-g,bottom:y-f-_,rightIncludeBody:v-g,bottomIncludeBody:y-_}}function dt(e,t){let n=[`webkit`,`Moz`,`ms`,`OT`],r={};return n.forEach(n=>{r[`${n}${f(e)}`]=t}),L(L({},r),{},{[e]:t})}function ft(e,t,n){e&&t&&n&&e.addEventListener(t,n,!1)}function pt(e,t,n){e&&t&&n&&e.removeEventListener(t,n,!1)}function mt(e){let t=!1;return function(...n){t||(t=!0,window.requestAnimationFrame(()=>{e.apply(this,n),t=!1}))}}function ht(e){for(let t of e){let e=t.target.__resizeListeners__||[];e.length&&e.forEach(e=>{e()})}}function gt(e,t){A||(e.__resizeListeners__||(e.__resizeListeners__=[],e.__ro__=new y(ht),e.__ro__.observe(e)),e.__resizeListeners__.push(t))}function _t(e,t){e&&e.__resizeListeners__&&(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.__ro__.disconnect(),e.__ro__=null,e.__resizeListeners__=null))}function vt(){let e=new Event(`resize`,{bubbles:!0,cancelable:!0});window.dispatchEvent(e)}function yt(e,t={}){function n(e){let t=window.history[e];return function(...n){let r=new Event(e);return r.arguments=n,window.dispatchEvent(r),t.apply(this,n)}}return window.history.pushState=n(`pushState`),window.history.replaceState=n(`replaceState`),window.addEventListener(`popstate`,e,t),window.addEventListener(`hashchange`,e,t),window.addEventListener(`replaceState`,e,t),window.addEventListener(`pushState`,e,t),{removeListener:()=>{window.removeEventListener(`popstate`,e,t),window.removeEventListener(`hashchange`,e,t),window.removeEventListener(`replaceState`,e,t),window.removeEventListener(`pushState`,e,t)}}}function bt(e){let t=e.split(`,`),n=t[0].match(/:(.*?);/)[1],r=window.atob(t[1]),i=r.length,a=new Uint8Array(i);for(;i--;)a[i]=r.charCodeAt(i);return new Blob([a],{type:n})}function xt(e,t){return new Promise((n,r)=>{let i=document.createElement(`CANVAS`),a=i==null?void 0:i.getContext(`2d`),o=new Image;o.crossOrigin=``,o.onload=function(){if(!i||!a)return r();i.height=o.height,i.width=o.width,a.drawImage(o,0,0);let e=i.toDataURL(t||`image/png`);i=null,n(e)},o.src=e})}function St(e){let{loaded:t,total:n}=e;if(n<=0||o(n))return 0;let r=t/n;return u((r>1?1:r)*100)}function Ct(e,t,n,r){xt(e).then(e=>{wt(e,t,n,r)})}function wt(e,t,n,r){Tt(bt(e),t,n,r)}function Tt(e,t,n,r){let i=new Blob(r===void 0?[e]:[r,e],{type:n||`application/octet-stream`}),a=window.URL.createObjectURL(i),o=document.createElement(`a`);o.style.display=`none`,o.href=a,o.setAttribute(`download`,t),o.download===void 0&&o.setAttribute(`target`,`_blank`),document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(a)}function Et({url:e,target:t=`_blank`,fileName:n}){if(/iP/.test(window.navigator.userAgent))return!1;if(M||N){let t=document.createElement(`a`);return t.href=e,t.download=n||e.substring(e.lastIndexOf(`/`)+1,e.length),t.style.display=`none`,document.body.appendChild(t),t.click(),document.body.removeChild(t),!0}return e.includes(`?`)||(e+=`?download`),ze(e,{target:t}),!0}function Dt(e,t=`default`,n){if(!e||!Reflect.has(e,t)||!a(e[t]))return null;let r=e[t];return r?r(n):null}function Ot(e,t=[]){let n=Object.keys(e),r={};return n.forEach(n=>{if(t.includes(n))return null;r[n]=t=>Dt(e,n,t)}),r}function kt(e,{type:t=`text/javascript`}={}){return new Promise((n,r)=>{let i=!1,a=document.querySelector(`script[src="${e}"]`);if(!a)a=document.createElement(`script`),a.type=t,a.async=!0,a.src=e,i=!0;else if(a.hasAttribute(`data-loaded`)){n({el:a});return}a.addEventListener(`error`,r),a.addEventListener(`abort`,r),a.addEventListener(`load`,()=>{a.setAttribute(`data-loaded`,`true`),n({el:a})}),i&&document.head.appendChild(a)})}function At(e){return new Promise((t,n)=>{let r=document.querySelector(`script[src="${e}"]`);if(!r){n();return}document.head.removeChild(r),t()})}function jt(e,t,n){return It(e,t,n,!1)}function Mt(e,t,n){return It(e,t,n,!0).length>0}function Nt(e){return typeof e==`string`?e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`):e}const q=new Map;function Pt(e,t){if(!Array.isArray(e))switch(typeof e){case`string`:e=[e];break;case`undefined`:e=[];break;default:throw TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(e=>{if(typeof e!=`string`){if(e===void 0)return!1;throw TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof e}' in the array`)}return!0})}function Ft(e,t){t=L({caseSensitive:!1},t);let n=e+JSON.stringify(t);if(q.has(n))return q.get(n);let r=e[0]===`!`;r&&(e=e.slice(1)),e=Nt(e).replace(/\\\*/g,`[\\s\\S]*`);let i=RegExp(`^${e}$`,t.caseSensitive?``:`i`);return i.negated=r,q.set(n,i),i}function It(e,t,n,r){if(e=Pt(e,`inputs`),t=Pt(t,`patterns`),t.length===0)return[];let i=t.map(e=>Ft(e,n)),{allPatterns:a}=n||{},o=[];for(let t of e){let e,n=i.map(()=>!1);for(let[r,a]of i.entries())if(a.test(t)&&(n[r]=!0,e=!a.negated,!e))break;if(!(e===!1||e===void 0&&i.some(e=>!e.negated)||a&&n.some((e,t)=>!e&&!i[t].negated))&&(o.push(t),r))break}return o}C.registerLanguage(`bash`,ie),C.registerLanguage(`c`,ae),C.registerLanguage(`cpp`,oe),C.registerLanguage(`css`,se),C.registerLanguage(`go`,ce),C.registerLanguage(`java`,le),C.registerLanguage(`javascript`,ue),C.registerLanguage(`json`,de),C.registerLanguage(`markdown`,fe),C.registerLanguage(`php`,pe),C.registerLanguage(`plaintext`,me),C.registerLanguage(`python`,he),C.registerLanguage(`rust`,ge),C.registerLanguage(`scss`,_e),C.registerLanguage(`sql`,ve),C.registerLanguage(`typescript`,ye),C.registerLanguage(`xml`,w),C.registerLanguage(`html`,w),C.registerLanguage(`yaml`,be);const Lt={walkTokens(e){e.type===`text`&&(e.text=e.text.replace(/([\u2E80-\u2EFF\u3000-\u303F\u31C0-\u31EF\u3200-\u32FF\u3300-\u33FF\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF\uFE30-\uFE4F])\r?\n([\u2E80-\u2EFF\u3000-\u303F\u31C0-\u31EF\u3200-\u32FF\u3300-\u33FF\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF\uFE30-\uFE4F])/g,`$1$2`))}},Rt={breaks:!0,gfm:!0},zt={FORBID_TAGS:[`style`],FORBID_ATTR:[`style`]};function Bt(e,t){let n=C.getLanguage(t)?t:`plaintext`;return C.highlight(e,{language:n}).value}const J=S({langPrefix:`hljs-`,highlight:Bt}),Y=[te(),Lt,ne(),re(),J];function X(e){if((e==null?void 0:e.highlight)===!1&&!(e!=null&&e.extensions))return Y.filter(e=>e!==J);if((e==null?void 0:e.highlight)===!1)return[...Y.filter(e=>e!==J),...e.extensions||[]];if(e!=null&&e.highlight){let{langPrefix:t=`language-`,highlight:n}=e.highlight,r=S({langPrefix:t,highlight:n}),i=[...Y.filter(e=>e!==J),r];return e.extensions&&i.push(...e.extensions),i}let t=[...Y];return e!=null&&e.extensions&&t.push(...e.extensions),t}function Vt(e,t){if(!e)return``;let n=X(t),r=new x;r.use(...n);let i=r.parse(e,L(L({},Rt),t==null?void 0:t.marked));return b.sanitize(i,L(L({},zt),t==null?void 0:t.sanitize))}function Ht(e){let t=L(L({},Rt),e==null?void 0:e.marked),n=L(L({},zt),e==null?void 0:e.sanitize),r=X(e),i=new x;return i.use(...r),{render(e,r){if(!e)return``;let a=r!=null&&r.marked||(r==null?void 0:r.highlight)!==void 0||r!=null&&r.extensions?(()=>{let n=X(r),i=new x;return i.use(...n),i.parse(e,L(L({},t),r.marked))})():i.parse(e,t),o=r!=null&&r.sanitize?L(L({},n),r.sanitize):n;return b.sanitize(a,o)}}}function Ut(e){if(!e)return``;let t=Vt(e);return typeof DOMParser<`u`?new DOMParser().parseFromString(t,`text/html`).body.textContent||``:t.replace(/<[^>]*>/g,``)}const Wt={id:`id`,children:`children`,pid:`pid`},Z=e=>Object.assign({},Wt,e);function Gt(e,t,n={}){n=Z(n);let{children:r}=n,i=[...e];for(let e of i){if(t(e))return e;e[r]&&i.push(...e[r])}return null}function Kt(e,t,n={}){n=Z(n);let{children:r}=n,i=[...e],a=[];for(let e of i)t(e)&&a.push(e),e[r]&&i.push(...e[r]);return a}function qt(e,t,n={}){n=Z(n);let r=[],i=[...e],a=new Set,{children:o}=n;for(;i.length;){let e=i[0];if(a.has(e))r.pop(),i.shift();else if(a.add(e),e[o]&&i.unshift(...e[o]),r.push(e),t(e))return r}return null}function Jt(e,t,n={}){n=Z(n);let r=[],i=[...e],a=[],o=new Set,{children:s}=n;for(;i.length;){let e=i[0];o.has(e)?(r.pop(),i.shift()):(o.add(e),e[s]&&i.unshift(...e[s]),r.push(e),t(e)&&a.push([...r]))}return a}function Yt(e,t,n={}){n=Z(n);let r=n.children;function i(e){return e.map(e=>L({},e)).filter(e=>(e[r]=e[r]&&i(e[r]),t(e)||e[r]&&e[r].length))}return i(e)}function Xt(e,t,n={}){n=Z(n);let r=[...e],{children:i}=n;for(let e=0;e<r.length;e++){if(t(r[e]))return;i&&r[e][i]&&r.splice(e+1,0,...r[e][i])}}function Zt(e,t){return e.map(e=>Q(e,t))}function Q(e,{children:t=`children`,conversion:n}){let r=Array.isArray(e[t])&&e[t].length>0,i=n(e)||{};return r?L(L({},i),{},{[t]:e[t].map(e=>Q(e,{children:t,conversion:n}))}):L({},i)}function Qt({native:e=!0}={}){var t,n,r;return e?(t=(n=window.crypto)==null||(r=n.randomUUID)==null?void 0:r.call(n))==null?T():t:T()}let $=0;function $t(e=``){let t=Date.now(),n=Math.floor(Math.random()*1e9);return $++,`${e}_${n}${$}${String(t)}`}export{rt as AesGcmEncryption,y as ResizeObserver,ct as addClass,yt as addLocationListener,gt as addResizeListener,z as buildBEM,$t as buildShortUUID,Qt as buildUUID,Ke as createBEM,Ht as createMarkdownRenderer,qe as createNamespace,We as createSearchReg,bt as dataURLtoBlob,Ze as decodeBase64,Be as deepMerge,nt as deriveKeyByPbkdf2,pt as domOffEvent,ft as domOnEvent,wt as downloadByBase64,Tt as downloadByData,Ct as downloadByOnlineUrl,Et as downloadByUrl,St as downloadPercent,Ae as enableTransitions,Xe as encodeBase64,Nt as escapeStringRegexp,Ot as extendSlots,Yt as filterTree,Gt as findNode,Kt as findNodeAll,qt as findPath,Jt as findPathAll,Xt as forEachTree,tt as generateRandomKey,Ge as getActualWidthOfChars,at as getBoundingClientRect,Re as getRawRoute,Dt as getSlot,ut as getViewportOffset,dt as hackCss,K as hasClass,Qe as hashBySha256,$e as hashBySha512,D as is,P as isBrowser,ke as isChineseText,M as isChrome,j as isClient,k as isIterableArray,Mt as isMatch,Ee as isNumeric,O as isObject,Te as isPositiveInteger,N as isSafari,A as isServer,De as isSupportNativeEllipsis,Oe as isSupportResizeObserver,we as isUrl,kt as loadScript,jt as matcher,ze as openWindow,xe as pascalCase,ee as pathToRegexp,E as regexpMap,p as regexpToPath,lt as removeClass,_t as removeResizeListener,Vt as renderMarkdown,Se as safeKebabCase,st as setCssVar,Ve as setObjToUrlParams,et as signByHmacSha256,Ut as stripMarkdown,e as titleCase,Zt as treeMap,Q as treeMapEach,vt as triggerWindowResize,At as unloadScript,He as unsetAllProperty,xt as urlToBase64,mt as useRafThrottle,Le as withInstall};
|
|
14
|
+
import{titleCase as e}from"title-case";import{camelCase as t,intersectionWith as n,isArray as r,isEqual as i,isFunction as a,isNil as o,isPlainObject as s,kebabCase as c,mergeWith as l,round as u,unionWith as d,upperFirst as f}from"lodash-es";import{compile as p,pathToRegexp as ee}from"path-to-regexp";import{hmac as m}from"@noble/hashes/hmac.js";import{sha256 as h,sha512 as g}from"@noble/hashes/sha2.js";import{bytesToHex as _,utf8ToBytes as v}from"@noble/hashes/utils.js";import y from"resize-observer-polyfill";import b from"dompurify";import{Marked as x}from"marked";import{markedHighlight as S}from"marked-highlight";import{gfmHeadingId as te}from"marked-gfm-heading-id";import ne from"marked-alert";import{markedSmartypants as re}from"marked-smartypants";import C from"highlight.js/lib/core";import ie from"highlight.js/lib/languages/bash";import ae from"highlight.js/lib/languages/c";import oe from"highlight.js/lib/languages/cpp";import se from"highlight.js/lib/languages/css";import ce from"highlight.js/lib/languages/go";import le from"highlight.js/lib/languages/java";import ue from"highlight.js/lib/languages/javascript";import de from"highlight.js/lib/languages/json";import fe from"highlight.js/lib/languages/markdown";import pe from"highlight.js/lib/languages/php";import me from"highlight.js/lib/languages/plaintext";import he from"highlight.js/lib/languages/python";import ge from"highlight.js/lib/languages/rust";import _e from"highlight.js/lib/languages/scss";import ve from"highlight.js/lib/languages/sql";import ye from"highlight.js/lib/languages/typescript";import w from"highlight.js/lib/languages/xml";import be from"highlight.js/lib/languages/yaml";import{v4 as T}from"uuid";function xe(e){return f(t(e))}function Se(e){if(!e)return``;let t=c(e),n=e.replace(/[^A-Z0-9]/gi,``);if(n.length===t.replace(/-/g,``).length){let e=0,r=``;for(let i=0;i<t.length;i+=1){let a=t[i];if(a===`-`){let o=t[i-1],s=t[i+1],c=n[e],l=c&&c.toUpperCase()===c&&c.toLowerCase()!==c,u=i+1===t.length-1;if(o&&s&&/[a-z0-9]/.test(o)&&/[a-z0-9]/.test(s)&&(!/\d/.test(o)&&/\d/.test(s)||/\d/.test(o)&&!/\d/.test(s)&&!l||/\d/.test(o)&&!/\d/.test(s)&&l&&u))continue;r+=a}else r+=a,e+=1}t=r}return t}const E={mobile:/^(?:(?:\+|00)86)?1[3-9]\d{9}$/,tel:/^(?:(?:\d{3}-)?\d{8}|(?:\d{4}-)?\d{7,8})(?:-\d+)?$/,numAndLetter:/^[A-Z0-9]+$/i,password:/^\S*(?=\S{6,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S+$/,email:/^[A-Z0-9_\u4E00-\u9FA5]+[A-Z0-9_.+%\u4E00-\u9FA5\-]*@[A-Z0-9_.\-]+(\.[A-Z0-9_\-]+)+$/i,postalCode:/^(0[1-7]|1[0-356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[0-5]|8[013-6])\d{4}$/,identityCard:/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[12]\d|30|31)\d{3}[\dX]$/i,ip:/^((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(?::(?:\d|[1-9]\d{1,3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5]))?$/,url:/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-][^!@#$%^&*?.\s]{0,64}\.)+[a-z]{2,6}\/?/,httpsUrl:/^https:\/\//,domain:/^([0-9a-z-]+\.)+([a-z]{2,})$/i,plateNumber:/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/,md5:/^[a-f0-9]{32}$/i,base64:/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([\w!$&',()*+;=\-.~:@/?%\s]*?)\s*$/i,uuid:/^[a-f\d]{4}(?:[a-f\d]{4}-){4}[a-f\d]{12}$/i,version:/^\d+(?:\.\d+){2}$/,videoUrl:/^https?:\/\/(.+\/)+.+(\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|mp4))$/i,imageUrl:/^https?:\/\/(.+\/)+.+(\.(gif|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/i,chinese:/^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/,itcode:/^[a-z]+\d*$/i,numeric:/^\d+$/},Ce=Object.prototype.toString;function D(e,t){return Ce.call(e)===`[object ${t}]`}function O(e){return e!==null&&D(e,`Object`)}function we(e){return E.url.test(e)}function k(e){return Array.isArray(e)&&e.length>0}function Te(e){return Number.isInteger(e)&&e>=0}function Ee(e){return E.numeric.test(e)}const A=typeof window>`u`,j=!A,M=j&&window.navigator.userAgent.toLowerCase().includes(`chrome`),N=j&&window.navigator.userAgent.toLowerCase().includes(`safari`),P=typeof window<`u`&&typeof document<`u`,De=P&&`webkitLineClamp`in document.body.style,Oe=P&&typeof ResizeObserver<`u`,ke=e=>E.chinese.test(e),Ae=()=>`startViewTransition`in document&&window.matchMedia(`(prefers-reduced-motion: no-preference)`).matches;function je(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Me(e,t){if(e==null)return{};var n,r,i=je(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function F(e){"@babel/helpers - typeof";return F=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},F(e)}function Ne(e,t){if(F(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(F(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Pe(e){var t=Ne(e,`string`);return F(t)==`symbol`?t:t+``}function I(e,t,n){return(t=Pe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Fe(Object(n),!0).forEach(function(t){I(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const Ie=[`matched`],Le=(e,t)=>{let n=e;return n.install=r=>{r.component(n.name||n.displayName,e),t&&(r.config.globalProperties[t]=e)},e};function Re(e){if(!e)return e;let{matched:t}=e;return L(L({},Me(e,Ie)),{},{matched:t?t.map(e=>({meta:e.meta,name:e.name,path:e.path})):void 0})}function ze(e,t={}){let{target:n=`__blank`,noopener:r=!0,noreferrer:i=!0}=t||{},a=[];r&&a.push(`noopener=yes`),i&&a.push(`noreferrer=yes`),window.open(e,n,a.join(`,`))}function Be(e,t,a=`replace`){return t?e?l(e,t,(e,t)=>{if(r(t)&&r(e))switch(a){case`union`:return d(e,t,i);case`intersection`:return n(e,t,i);case`concat`:return e.concat(t);case`replace`:return t;default:throw Error(`Unknown merge array strategy: ${a}`)}if(O(t)&&O(e))return Be(e,t,a)}):t:e}function Ve(e,t){if(!k(Object.keys(t)))return e;let n=``;for(let e in t){let r=t[e];n+=Array.isArray(r)?`${e}=${encodeURIComponent(r.join(`,`))}&`:`${e}=${encodeURIComponent(r)}&`}return n=n.replace(/&$/,``),/\?$/.test(e)?e+n:e.replace(/\/?$/,`?`)+n}function He(e){s(e)&&Object.keys(e).forEach(t=>{Reflect.deleteProperty(e,t)})}function Ue(e){return[`$`,`(`,`)`,`*`,`+`,`.`,`[`,`]`,`?`,`\\`,`^`,`{`,`}`,`|`].includes(e)?`\\${e}`:e}function We(e){let t=[``,...[...e].map(e=>Ue(e)),``].join(`.*`);return new RegExp(t,`i`)}function Ge(e=``,t={}){let{size:n=14,family:r=getComputedStyle(document.documentElement).getPropertyValue(`--vxe-font-family`)||`sans-serif`}=t,i=document.createElement(`canvas`).getContext(`2d`);i.font=`${n}px ${r}`;let a=i.measureText(e),o=Math.abs(a.actualBoundingBoxLeft)+Math.abs(a.actualBoundingBoxRight);return Math.ceil(Math.max(a.width,o))}function R(e,t){return t?typeof t==`string`?` ${e}--${t}`:Array.isArray(t)?t.reduce((t,n)=>t+R(e,n),``):Object.keys(t).reduce((n,r)=>n+(t[r]?R(e,r):``),``):``}function z(e){return(t,n)=>(t&&typeof t!=`string`&&(n=t,t=``),t=t?`${e}__${t}`:e,`${t}${R(t,n)}`)}function Ke(e,t=``){return[z(`${t}-${e}`)]}function qe(e,t=``){let n=`${t}-${e}`;return[n,z(n)]}function B(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function V(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){B(a,r,i,o,s,`next`,e)}function s(e){B(a,r,i,o,s,`throw`,e)}o(void 0)})}}const H=new TextEncoder,Je=new TextDecoder;function U(){var e;if(!((e=window.crypto)!=null&&e.subtle))throw Error(`Web Crypto API is not available in the current environment.`);return window.crypto}function W(e){let t=``,n=32768;for(let r=0;r<e.length;r+=n)t+=String.fromCharCode(...e.subarray(r,r+n));return btoa(t)}function Ye(e){let t=atob(e);return Uint8Array.from(t,e=>e.charCodeAt(0))}function Xe(e){return W(H.encode(e))}function Ze(e){return Je.decode(Ye(e))}function Qe(e){return _(h(v(e)))}function $e(e){return _(g(v(e)))}function et(e,t){return _(m(h,v(t),v(e)))}function tt(e=32){if(!Number.isSafeInteger(e)||e<=0||e>65536)throw Error(`The key byte length must be an integer between 1 and 65536.`);return W(U().getRandomValues(new Uint8Array(e)))}function nt(e){return G.apply(this,arguments)}function G(){return G=V(function*({password:e,salt:t,iterations:n=6e5,keyLength:r=32}){if(!Number.isSafeInteger(n)||n<=0)throw Error(`PBKDF2 iterations must be a positive integer.`);if(!Number.isSafeInteger(r)||r<=0)throw Error(`The derived key length must be a positive integer.`);let i=U(),a=yield i.subtle.importKey(`raw`,H.encode(e),`PBKDF2`,!1,[`deriveBits`]),o=yield i.subtle.deriveBits({name:`PBKDF2`,hash:`SHA-256`,salt:H.encode(t),iterations:n},a,r*8);return W(new Uint8Array(o))}),G.apply(this,arguments)}var rt=class{constructor({key:e,additionalData:t}){I(this,`key`,void 0),I(this,`additionalData`,void 0),this.key=e,this.additionalData=t?H.encode(t):void 0}encrypt(e){var t=this;return V(function*(){let n=U(),r=n.getRandomValues(/* @__PURE__ */ new Uint8Array(12)),i=yield n.subtle.encrypt(L({name:`AES-GCM`,iv:r},t.additionalData?{additionalData:t.additionalData}:{}),yield t.getKey(),H.encode(e)),a=new Uint8Array(i),o=new Uint8Array(12+a.length);return o.set(r),o.set(a,12),W(o)})()}decrypt(e){var t=this;return V(function*(){let n=Ye(e);if(n.length<=12)throw Error(`The AES-GCM payload is invalid.`);let r=yield U().subtle.decrypt(L({name:`AES-GCM`,iv:n.slice(0,12)},t.additionalData?{additionalData:t.additionalData}:{}),yield t.getKey(),n.slice(12));return Je.decode(r)})()}getKey(){var e=this;return V(function*(){return U().subtle.importKey(`raw`,h(v(e.key)),`AES-GCM`,!1,[`encrypt`,`decrypt`])})()}};const it=()=>document.documentElement;function at(e){return!e||!e.getBoundingClientRect?0:e.getBoundingClientRect()}function ot(e){return(e||``).replace(/^\s+|\s+$/g,``)}function K(e,t){if(!e||!t)return!1;if(t.includes(` `))throw Error(`className should not contain space.`);return e.classList?e.classList.contains(t):` ${e.className} `.includes(` ${t} `)}function st(e,t,n){return n||(n=it()),n.style.setProperty(e,t),{prop:t}}function ct(e,t){if(!e)return;let n=e.className,r=(t||``).split(` `);for(let t=0,i=r.length;t<i;t++){let i=r[t];i&&(e.classList?e.classList.add(i):K(e,i)||(n+=` ${i}`))}e.classList||(e.className=n)}function lt(e,t){if(!e||!t)return;let n=t.split(` `),r=` ${e.className} `;for(let t=0,i=n.length;t<i;t++){let i=n[t];i&&(e.classList?e.classList.remove(i):K(e,i)&&(r=r.replace(` ${i} `,` `)))}e.classList||(e.className=ot(r))}function ut(e){let t=document.documentElement,n=t.scrollLeft,r=t.scrollTop,i=t.clientLeft,a=t.clientTop,o=window.scrollX,s=window.scrollY,c=at(e);if(!c)return{};let{left:l,top:u,width:d,height:f}=c,p=(o||n)-(i||0),ee=(s||r)-(a||0),m=l+o,h=u+s,g=m-p,_=h-ee,v=window.document.documentElement.clientWidth,y=window.document.documentElement.clientHeight;return{left:g,top:_,right:v-d-g,bottom:y-f-_,rightIncludeBody:v-g,bottomIncludeBody:y-_}}function dt(e,t){let n=[`webkit`,`Moz`,`ms`,`OT`],r={};return n.forEach(n=>{r[`${n}${f(e)}`]=t}),L(L({},r),{},{[e]:t})}function ft(e,t,n){e&&t&&n&&e.addEventListener(t,n,!1)}function pt(e,t,n){e&&t&&n&&e.removeEventListener(t,n,!1)}function mt(e){let t=!1;return function(...n){t||(t=!0,window.requestAnimationFrame(()=>{e.apply(this,n),t=!1}))}}
|
|
15
|
+
/* istanbul ignore next */
|
|
16
|
+
function ht(e){for(let t of e){let e=t.target.__resizeListeners__||[];e.length&&e.forEach(e=>{e()})}}
|
|
17
|
+
/* istanbul ignore next */
|
|
18
|
+
function gt(e,t){A||(e.__resizeListeners__||(e.__resizeListeners__=[],e.__ro__=new y(ht),e.__ro__.observe(e)),e.__resizeListeners__.push(t))}
|
|
19
|
+
/* istanbul ignore next */
|
|
20
|
+
function _t(e,t){e&&e.__resizeListeners__&&(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.__ro__.disconnect(),e.__ro__=null,e.__resizeListeners__=null))}function vt(){let e=new Event(`resize`,{bubbles:!0,cancelable:!0});window.dispatchEvent(e)}function yt(e,t={}){function n(e){let t=window.history[e];return function(...n){let r=new Event(e);return r.arguments=n,window.dispatchEvent(r),t.apply(this,n)}}return window.history.pushState=n(`pushState`),window.history.replaceState=n(`replaceState`),window.addEventListener(`popstate`,e,t),window.addEventListener(`hashchange`,e,t),window.addEventListener(`replaceState`,e,t),window.addEventListener(`pushState`,e,t),{removeListener:()=>{window.removeEventListener(`popstate`,e,t),window.removeEventListener(`hashchange`,e,t),window.removeEventListener(`replaceState`,e,t),window.removeEventListener(`pushState`,e,t)}}}function bt(e){let t=e.split(`,`),n=t[0].match(/:(.*?);/)[1],r=window.atob(t[1]),i=r.length,a=new Uint8Array(i);for(;i--;)a[i]=r.charCodeAt(i);return new Blob([a],{type:n})}function xt(e,t){return new Promise((n,r)=>{let i=document.createElement(`CANVAS`),a=i==null?void 0:i.getContext(`2d`),o=new Image;o.crossOrigin=``,o.onload=function(){if(!i||!a)return r();i.height=o.height,i.width=o.width,a.drawImage(o,0,0);let e=i.toDataURL(t||`image/png`);i=null,n(e)},o.src=e})}function St(e){let{loaded:t,total:n}=e;if(n<=0||o(n))return 0;let r=t/n;return u((r>1?1:r)*100)}function Ct(e,t,n,r){xt(e).then(e=>{wt(e,t,n,r)})}function wt(e,t,n,r){Tt(bt(e),t,n,r)}function Tt(e,t,n,r){let i=new Blob(r===void 0?[e]:[r,e],{type:n||`application/octet-stream`}),a=window.URL.createObjectURL(i),o=document.createElement(`a`);o.style.display=`none`,o.href=a,o.setAttribute(`download`,t),o.download===void 0&&o.setAttribute(`target`,`_blank`),document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(a)}function Et({url:e,target:t=`_blank`,fileName:n}){if(/iP/.test(window.navigator.userAgent))return!1;if(M||N){let t=document.createElement(`a`);return t.href=e,t.download=n||e.substring(e.lastIndexOf(`/`)+1,e.length),t.style.display=`none`,document.body.appendChild(t),t.click(),document.body.removeChild(t),!0}return e.includes(`?`)||(e+=`?download`),ze(e,{target:t}),!0}function Dt(e,t=`default`,n){if(!e||!Reflect.has(e,t)||!a(e[t]))return null;let r=e[t];return r?r(n):null}function Ot(e,t=[]){let n=Object.keys(e),r={};return n.forEach(n=>{if(t.includes(n))return null;r[n]=t=>Dt(e,n,t)}),r}const kt=[`type`,`attributes`];function At(e,t={}){let{type:n=`text/javascript`,attributes:r}=t,i=Me(t,kt);return new Promise((t,a)=>{let o=!1,s=document.querySelector(`script[src="${e}"]`),c;if(!s)c=document.createElement(`script`),c.type=n,c.async=!0,Object.assign(c,i),Object.entries(r==null?{}:r).forEach(([e,t])=>{c.setAttribute(e,t)}),c.src=e,o=!0;else if(c=s,c.hasAttribute(`data-loaded`)){t({el:c});return}c.addEventListener(`error`,a),c.addEventListener(`abort`,a),c.addEventListener(`load`,()=>{c.setAttribute(`data-loaded`,`true`),t({el:c})}),o&&document.head.appendChild(c)})}function jt(e){return new Promise((t,n)=>{let r=document.querySelector(`script[src="${e}"]`);r?(document.head.removeChild(r),t()):n()})}function Mt(e,t,n){return Lt(e,t,n,!1)}function Nt(e,t,n){return Lt(e,t,n,!0).length>0}function Pt(e){return typeof e==`string`?e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`):e}const q=/* @__PURE__ */ new Map;function Ft(e,t){if(!Array.isArray(e))switch(typeof e){case`string`:e=[e];break;case`undefined`:e=[];break;default:throw TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(e=>{if(typeof e!=`string`){if(e===void 0)return!1;throw TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof e}' in the array`)}return!0})}function It(e,t){t=L({caseSensitive:!1},t);let n=e+JSON.stringify(t);if(q.has(n))return q.get(n);let r=e[0]===`!`;r&&(e=e.slice(1)),e=Pt(e).replace(/\\\*/g,`[\\s\\S]*`);let i=RegExp(`^${e}$`,t.caseSensitive?``:`i`);return i.negated=r,q.set(n,i),i}function Lt(e,t,n,r){if(e=Ft(e,`inputs`),t=Ft(t,`patterns`),t.length===0)return[];let i=t.map(e=>It(e,n)),{allPatterns:a}=n||{},o=[];for(let t of e){let e,n=i.map(()=>!1);for(let[r,a]of i.entries())if(a.test(t)&&(n[r]=!0,e=!a.negated,!e))break;if(!(e===!1||e===void 0&&i.some(e=>!e.negated)||a&&n.some((e,t)=>!e&&!i[t].negated))&&(o.push(t),r))break}return o}C.registerLanguage(`bash`,ie),C.registerLanguage(`c`,ae),C.registerLanguage(`cpp`,oe),C.registerLanguage(`css`,se),C.registerLanguage(`go`,ce),C.registerLanguage(`java`,le),C.registerLanguage(`javascript`,ue),C.registerLanguage(`json`,de),C.registerLanguage(`markdown`,fe),C.registerLanguage(`php`,pe),C.registerLanguage(`plaintext`,me),C.registerLanguage(`python`,he),C.registerLanguage(`rust`,ge),C.registerLanguage(`scss`,_e),C.registerLanguage(`sql`,ve),C.registerLanguage(`typescript`,ye),C.registerLanguage(`xml`,w),C.registerLanguage(`html`,w),C.registerLanguage(`yaml`,be);const Rt={walkTokens(e){e.type===`text`&&(e.text=e.text.replace(/([\u2E80-\u2EFF\u3000-\u303F\u31C0-\u31EF\u3200-\u32FF\u3300-\u33FF\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF\uFE30-\uFE4F])\r?\n([\u2E80-\u2EFF\u3000-\u303F\u31C0-\u31EF\u3200-\u32FF\u3300-\u33FF\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF\uFE30-\uFE4F])/g,`$1$2`))}},zt={breaks:!0,gfm:!0},Bt={FORBID_TAGS:[`style`],FORBID_ATTR:[`style`]};function Vt(e,t){let n=C.getLanguage(t)?t:`plaintext`;return C.highlight(e,{language:n}).value}const J=S({langPrefix:`hljs-`,highlight:Vt}),Y=[te(),Rt,ne(),re(),J];function X(e){if((e==null?void 0:e.highlight)===!1&&!(e!=null&&e.extensions))return Y.filter(e=>e!==J);if((e==null?void 0:e.highlight)===!1)return[...Y.filter(e=>e!==J),...e.extensions||[]];if(e!=null&&e.highlight){let{langPrefix:t=`language-`,highlight:n}=e.highlight,r=S({langPrefix:t,highlight:n}),i=[...Y.filter(e=>e!==J),r];return e.extensions&&i.push(...e.extensions),i}let t=[...Y];return e!=null&&e.extensions&&t.push(...e.extensions),t}function Ht(e,t){if(!e)return``;let n=X(t),r=new x;r.use(...n);let i=r.parse(e,L(L({},zt),t==null?void 0:t.marked));return b.sanitize(i,L(L({},Bt),t==null?void 0:t.sanitize))}function Ut(e){let t=L(L({},zt),e==null?void 0:e.marked),n=L(L({},Bt),e==null?void 0:e.sanitize),r=X(e),i=new x;return i.use(...r),{render(e,r){if(!e)return``;let a=r!=null&&r.marked||(r==null?void 0:r.highlight)!==void 0||r!=null&&r.extensions?(()=>{let n=X(r),i=new x;return i.use(...n),i.parse(e,L(L({},t),r.marked))})():i.parse(e,t),o=r!=null&&r.sanitize?L(L({},n),r.sanitize):n;return b.sanitize(a,o)}}}function Wt(e){if(!e)return``;let t=Ht(e);return typeof DOMParser<`u`?new DOMParser().parseFromString(t,`text/html`).body.textContent||``:t.replace(/<[^>]*>/g,``)}const Gt={id:`id`,children:`children`,pid:`pid`},Z=e=>Object.assign({},Gt,e);function Kt(e,t,n={}){n=Z(n);let{children:r}=n,i=[...e];for(let e of i){if(t(e))return e;e[r]&&i.push(...e[r])}return null}function qt(e,t,n={}){n=Z(n);let{children:r}=n,i=[...e],a=[];for(let e of i)t(e)&&a.push(e),e[r]&&i.push(...e[r]);return a}function Jt(e,t,n={}){n=Z(n);let r=[],i=[...e],a=/* @__PURE__ */ new Set,{children:o}=n;for(;i.length;){let e=i[0];if(a.has(e))r.pop(),i.shift();else if(a.add(e),e[o]&&i.unshift(...e[o]),r.push(e),t(e))return r}return null}function Yt(e,t,n={}){n=Z(n);let r=[],i=[...e],a=[],o=/* @__PURE__ */ new Set,{children:s}=n;for(;i.length;){let e=i[0];o.has(e)?(r.pop(),i.shift()):(o.add(e),e[s]&&i.unshift(...e[s]),r.push(e),t(e)&&a.push([...r]))}return a}function Xt(e,t,n={}){n=Z(n);let r=n.children;function i(e){return e.map(e=>L({},e)).filter(e=>(e[r]=e[r]&&i(e[r]),t(e)||e[r]&&e[r].length))}return i(e)}function Zt(e,t,n={}){n=Z(n);let r=[...e],{children:i}=n;for(let e=0;e<r.length;e++){if(t(r[e]))return;i&&r[e][i]&&r.splice(e+1,0,...r[e][i])}}function Qt(e,t){return e.map(e=>Q(e,t))}function Q(e,{children:t=`children`,conversion:n}){let r=Array.isArray(e[t])&&e[t].length>0,i=n(e)||{};return r?L(L({},i),{},{[t]:e[t].map(e=>Q(e,{children:t,conversion:n}))}):L({},i)}function $t({native:e=!0}={}){var t,n,r;return e?(t=(n=window.crypto)==null||(r=n.randomUUID)==null?void 0:r.call(n))==null?T():t:T()}let $=0;function en(e=``){let t=Date.now(),n=Math.floor(Math.random()*1e9);return $++,`${e}_${n}${$}${String(t)}`}export{rt as AesGcmEncryption,y as ResizeObserver,ct as addClass,yt as addLocationListener,gt as addResizeListener,z as buildBEM,en as buildShortUUID,$t as buildUUID,Ke as createBEM,Ut as createMarkdownRenderer,qe as createNamespace,We as createSearchReg,bt as dataURLtoBlob,Ze as decodeBase64,Be as deepMerge,nt as deriveKeyByPbkdf2,pt as domOffEvent,ft as domOnEvent,wt as downloadByBase64,Tt as downloadByData,Ct as downloadByOnlineUrl,Et as downloadByUrl,St as downloadPercent,Ae as enableTransitions,Xe as encodeBase64,Pt as escapeStringRegexp,Ot as extendSlots,Xt as filterTree,Kt as findNode,qt as findNodeAll,Jt as findPath,Yt as findPathAll,Zt as forEachTree,tt as generateRandomKey,Ge as getActualWidthOfChars,at as getBoundingClientRect,Re as getRawRoute,Dt as getSlot,ut as getViewportOffset,dt as hackCss,K as hasClass,Qe as hashBySha256,$e as hashBySha512,D as is,P as isBrowser,ke as isChineseText,M as isChrome,j as isClient,k as isIterableArray,Nt as isMatch,Ee as isNumeric,O as isObject,Te as isPositiveInteger,N as isSafari,A as isServer,De as isSupportNativeEllipsis,Oe as isSupportResizeObserver,we as isUrl,At as loadScript,Mt as matcher,ze as openWindow,xe as pascalCase,ee as pathToRegexp,E as regexpMap,p as regexpToPath,lt as removeClass,_t as removeResizeListener,Ht as renderMarkdown,Se as safeKebabCase,st as setCssVar,Ve as setObjToUrlParams,et as signByHmacSha256,Wt as stripMarkdown,e as titleCase,Qt as treeMap,Q as treeMapEach,vt as triggerWindowResize,jt as unloadScript,He as unsetAllProperty,xt as urlToBase64,mt as useRafThrottle,Le as withInstall};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gsc-basic/utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.6",
|
|
5
5
|
"description": "Web Dev Utils for GSC Basic Team",
|
|
6
6
|
"author": "Lenovo SSG BASD <-GSC_Scaffolding_Support@lenovo.com>",
|
|
7
7
|
"license": "LicenseRef-Proprietary",
|
|
@@ -29,22 +29,27 @@
|
|
|
29
29
|
"files": [
|
|
30
30
|
"./dist"
|
|
31
31
|
],
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": "^24.22.1 || ^26.12.1",
|
|
34
|
+
"npm": ">= 11.19.1",
|
|
35
|
+
"pnpm": ">= 12.15.0"
|
|
36
|
+
},
|
|
32
37
|
"peerDependencies": {
|
|
33
38
|
"lodash-es": "^4.18.1"
|
|
34
39
|
},
|
|
35
40
|
"dependencies": {
|
|
36
41
|
"@noble/hashes": "^2.4.0",
|
|
37
|
-
"dompurify": "^3.
|
|
42
|
+
"dompurify": "^3.5.0",
|
|
38
43
|
"highlight.js": "^11.12.0",
|
|
39
|
-
"marked": "^18.0
|
|
44
|
+
"marked": "^18.3.0",
|
|
40
45
|
"marked-alert": "^2.1.2",
|
|
41
46
|
"marked-gfm-heading-id": "^4.1.4",
|
|
42
47
|
"marked-highlight": "^2.2.4",
|
|
43
48
|
"marked-smartypants": "^1.1.12",
|
|
44
|
-
"path-to-regexp": "^
|
|
49
|
+
"path-to-regexp": "^9.0.0",
|
|
45
50
|
"resize-observer-polyfill": "^1.5.1",
|
|
46
51
|
"title-case": "^4.3.2",
|
|
47
|
-
"uuid": "^14.0.
|
|
52
|
+
"uuid": "^14.0.3"
|
|
48
53
|
},
|
|
49
54
|
"devDependencies": {
|
|
50
55
|
"lodash-es": "^4.18.1"
|