youtil 3.0.4 → 3.0.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/cjs/enum.js +2 -2
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +1 -0
- package/cjs/loading.js +2 -2
- package/cjs/message.js +9 -9
- package/cjs/other.d.ts +14 -0
- package/cjs/other.js +86 -0
- package/cjs/request.d.ts +8 -2
- package/cjs/request.js +42 -21
- package/cjs/string.d.ts +42 -0
- package/cjs/string.js +108 -0
- package/docs/404.html +4 -4
- package/docs/CNAME +1 -0
- package/docs/api/functions/copyToClipboard/index.html +5 -5
- package/docs/api/functions/createEnum/index.html +5 -5
- package/docs/api/functions/decodeHtml/index.html +5 -5
- package/docs/api/functions/deepCopy/index.html +5 -5
- package/docs/api/functions/delParam/index.html +5 -5
- package/docs/api/functions/encodeHtml/index.html +5 -5
- package/docs/api/functions/formatDate/index.html +5 -5
- package/docs/api/functions/formatJson/index.html +17 -0
- package/docs/api/functions/getIdCardLastChar/index.html +16 -0
- package/docs/api/functions/getParam/index.html +6 -6
- package/docs/api/functions/getParamInt/index.html +5 -5
- package/docs/api/functions/getParams/index.html +6 -6
- package/docs/api/functions/getRandom/index.html +21 -0
- package/docs/api/functions/getRandomStr/index.html +16 -0
- package/docs/api/functions/hideLoading/index.html +5 -5
- package/docs/api/functions/initWindowMessage/index.html +5 -5
- package/docs/api/functions/parseDate/index.html +5 -5
- package/docs/api/functions/request/index.html +5 -5
- package/docs/api/functions/setParam/index.html +5 -5
- package/docs/api/functions/showLoading/index.html +5 -5
- package/docs/api/functions/sleep/index.html +6 -6
- package/docs/api/functions/toHump/index.html +18 -0
- package/docs/api/functions/toUnderline/index.html +16 -0
- package/docs/api/functions/toUrlParams/index.html +5 -5
- package/docs/api/functions/validateIdCard/index.html +16 -0
- package/docs/api/globals/index.html +5 -5
- package/docs/api/index.html +4 -4
- package/docs/api/interfaces/IRequestOptions/index.html +5 -5
- package/docs/api/interfaces/IShowLoadingConfig/index.html +5 -5
- package/docs/api/variables/Request/index.html +5 -5
- package/docs/api/variables/keyCodes/index.html +16 -0
- package/docs/assets/js/00078de9.40631b85.js +1 -0
- package/docs/assets/js/04050071.c7e3abde.js +1 -0
- package/docs/assets/js/08f709b9.a083fff8.js +1 -0
- package/docs/assets/js/094cfbf1.00977b14.js +1 -0
- package/docs/assets/js/0c2147ef.7be0fbdf.js +1 -0
- package/docs/assets/js/114.c257b8b0.js +2 -0
- package/docs/assets/js/1501a739.13d7c7be.js +1 -0
- package/docs/assets/js/1608b181.cbe9c45e.js +1 -0
- package/docs/assets/js/1774.902f2e94.js +1 -0
- package/docs/assets/js/17896441.7fc5704e.js +1 -0
- package/docs/assets/js/194adc5f.8a12cf8c.js +1 -0
- package/docs/assets/js/1be78505.71fee479.js +1 -0
- package/docs/assets/js/26a70007.f12496a6.js +1 -0
- package/docs/assets/js/2ac048f8.1f1f0188.js +1 -0
- package/docs/assets/js/2e314e38.32e955e9.js +1 -0
- package/docs/assets/js/{3b14ef11.f71babe0.js → 3b14ef11.5bc3d469.js} +1 -1
- package/docs/assets/js/3ec39cd5.55864cc1.js +1 -0
- package/docs/assets/js/479af78b.8e2443f4.js +1 -0
- package/docs/assets/js/5888.a314615c.js +2 -0
- package/docs/assets/js/66592e46.de586a2b.js +1 -0
- package/docs/assets/js/{6bc50bd8.d7b46cc0.js → 6bc50bd8.3c68878f.js} +1 -1
- package/docs/assets/js/7830.006c8eaa.js +1 -0
- package/docs/assets/js/7891b53e.79b654b9.js +1 -0
- package/docs/assets/js/8b76e124.7c5e5eb2.js +1 -0
- package/docs/assets/js/901a7e9f.5cd13eb6.js +1 -0
- package/docs/assets/js/9104954f.c7d49874.js +1 -0
- package/docs/assets/js/92b7d874.a379eff4.js +1 -0
- package/docs/assets/js/9334cb7c.c2c6b902.js +1 -0
- package/docs/assets/js/935f2afb.6c90f018.js +1 -0
- package/docs/assets/js/969412eb.5a33260d.js +1 -0
- package/docs/assets/js/9be94766.3c374589.js +1 -0
- package/docs/assets/js/9dd5329b.14301248.js +1 -0
- package/docs/assets/js/a0c44371.6c889be4.js +1 -0
- package/docs/assets/js/ab2af742.46b7af8c.js +1 -0
- package/docs/assets/js/b01f3e06.62f3a014.js +1 -0
- package/docs/assets/js/ba6f0f15.39cd6e80.js +1 -0
- package/docs/assets/js/ccb851b4.bba2fb6b.js +1 -0
- package/docs/assets/js/d4323bca.ac481634.js +1 -0
- package/docs/assets/js/d9f162ad.2abc1769.js +1 -0
- package/docs/assets/js/e2aa7f69.620e7b98.js +1 -0
- package/docs/assets/js/ef3f9d02.479dddf7.js +1 -0
- package/docs/assets/js/f4c916b9.07c4240c.js +1 -0
- package/docs/assets/js/f7d87c57.9b13a5a8.js +1 -0
- package/docs/assets/js/f97ec998.449e16b8.js +1 -0
- package/docs/assets/js/f9953324.325f2a5d.js +1 -0
- package/docs/assets/js/{fc1c80db.cfb5338b.js → fc1c80db.551e2052.js} +1 -1
- package/docs/assets/js/fdb649b1.5d0fff7c.js +1 -0
- package/docs/assets/js/main.15afa47b.js +2 -0
- package/docs/assets/js/runtime~main.1ee1dff9.js +1 -0
- package/docs/demos/IcePkgDemo_doc_01_request_0/index.html +4 -4
- package/docs/demos/IcePkgDemo_doc_01_request_1/index.html +4 -4
- package/docs/demos/IcePkgDemo_doc_02_time_0/index.html +4 -4
- package/docs/demos/IcePkgDemo_doc_03_loading_0/index.html +4 -4
- package/docs/index.html +4 -4
- package/docs/loading/index.html +18 -18
- package/docs/request/index.html +32 -32
- package/docs/sitemap.xml +1 -1
- package/docs/time/index.html +18 -18
- package/es/89c27c69.esm.es5.production.mjs +1 -0
- package/es/index.mjs +1 -1
- package/esm/enum.js +2 -2
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/loading.js +2 -2
- package/esm/message.js +9 -9
- package/esm/other.d.ts +14 -0
- package/esm/other.js +85 -0
- package/esm/request.d.ts +8 -2
- package/esm/request.js +42 -21
- package/esm/string.d.ts +42 -0
- package/esm/string.js +106 -0
- package/package.json +1 -1
- package/umd/index.js +1 -1
- package/docs/assets/js/00078de9.a02a731a.js +0 -1
- package/docs/assets/js/04050071.0825974f.js +0 -1
- package/docs/assets/js/08f709b9.811f5e45.js +0 -1
- package/docs/assets/js/094cfbf1.2b58cb63.js +0 -1
- package/docs/assets/js/0c2147ef.6eb74fc2.js +0 -2
- package/docs/assets/js/1501a739.5f21617c.js +0 -1
- package/docs/assets/js/1608b181.b1c51f75.js +0 -1
- package/docs/assets/js/17896441.6674ffec.js +0 -1
- package/docs/assets/js/194adc5f.0203fec9.js +0 -1
- package/docs/assets/js/1be78505.537008e6.js +0 -1
- package/docs/assets/js/2ac048f8.ee6f4e82.js +0 -1
- package/docs/assets/js/2e314e38.995f71c6.js +0 -1
- package/docs/assets/js/3ec39cd5.3e1ed37e.js +0 -1
- package/docs/assets/js/66592e46.f0e51f16.js +0 -2
- package/docs/assets/js/66592e46.f0e51f16.js.LICENSE.txt +0 -1
- package/docs/assets/js/774.fa0d167d.js +0 -1
- package/docs/assets/js/7891b53e.0e060d15.js +0 -1
- package/docs/assets/js/830.d8724ce6.js +0 -1
- package/docs/assets/js/888.800281f1.js +0 -2
- package/docs/assets/js/8b76e124.68a54c9e.js +0 -1
- package/docs/assets/js/9104954f.a1a72ca6.js +0 -1
- package/docs/assets/js/92b7d874.a69b898c.js +0 -1
- package/docs/assets/js/9334cb7c.2d33ddf8.js +0 -1
- package/docs/assets/js/935f2afb.a8948813.js +0 -1
- package/docs/assets/js/969412eb.cb2451c8.js +0 -1
- package/docs/assets/js/9be94766.2925f488.js +0 -1
- package/docs/assets/js/9dd5329b.6f458fc4.js +0 -1
- package/docs/assets/js/ab2af742.ff411c9b.js +0 -1
- package/docs/assets/js/ba6f0f15.5a9e407a.js +0 -1
- package/docs/assets/js/ccb851b4.71647e94.js +0 -1
- package/docs/assets/js/d4323bca.9bf7bf5a.js +0 -2
- package/docs/assets/js/d4323bca.9bf7bf5a.js.LICENSE.txt +0 -1
- package/docs/assets/js/e2aa7f69.b5afb674.js +0 -1
- package/docs/assets/js/ef3f9d02.841c2fab.js +0 -1
- package/docs/assets/js/f7d87c57.af927e77.js +0 -1
- package/docs/assets/js/f97ec998.133018f9.js +0 -1
- package/docs/assets/js/fdb649b1.86925c6b.js +0 -1
- package/docs/assets/js/main.98037fba.js +0 -2
- package/docs/assets/js/runtime~main.7aa653bc.js +0 -1
- package/es/bb1b9025.esm.es5.production.mjs +0 -1
- /package/docs/assets/js/{0c2147ef.6eb74fc2.js.LICENSE.txt → 114.c257b8b0.js.LICENSE.txt} +0 -0
- /package/docs/assets/js/{888.800281f1.js.LICENSE.txt → 5888.a314615c.js.LICENSE.txt} +0 -0
- /package/docs/assets/js/{main.98037fba.js.LICENSE.txt → main.15afa47b.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[401],{244:e=>{e.exports={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"}},251:e=>{e.exports={tocMobile:"tocMobile_ITEo"}},678:e=>{e.exports={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"}},1760:e=>{e.exports={admonition:"admonition_LlT9",admonitionHeading:"admonitionHeading_tbUL",admonitionIcon:"admonitionIcon_kALy",admonitionContent:"admonitionContent_S0QG"}},2252:(e,n,t)=>{"use strict";t.d(n,{n:()=>l,r:()=>s});var a=t(6540),i=t(3807),o=t(757).A,r=a.createContext(null);function l(e){var n=e.children,t=e.version;return o(r.Provider,{value:t},n)}function s(){var e=(0,a.useContext)(r);if(null===e)throw new i.dV("DocsVersionProvider");return e}},2702:e=>{e.exports={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"}},3355:e=>{e.exports={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"}},3924:e=>{e.exports={tableOfContents:"tableOfContents_bqdL",docItemContainer:"docItemContainer_F8PC"}},4411:e=>{e.exports={img:"img_ev3q"}},4669:e=>{e.exports={containsTaskList:"containsTaskList_mC6p"}},4814:e=>{e.exports={tocCollapsibleButton:"tocCollapsibleButton_TO0P",tocCollapsibleButtonExpanded:"tocCollapsibleButtonExpanded_MG3E"}},5164:e=>{e.exports={iconEdit:"iconEdit_Z9Sw"}},6362:e=>{e.exports={tags:"tags_jXut",tag:"tag_QGVx"}},7237:e=>{e.exports={lastUpdated:"lastUpdated_vwxv"}},8184:e=>{e.exports={tocCollapsible:"tocCollapsible_ETCw",tocCollapsibleContent:"tocCollapsibleContent_vkbj",tocCollapsibleExpanded:"tocCollapsibleExpanded_sAul"}},8637:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>dt});var a=t(6540),i=t(1003),o=t(3807),r=t(757).A,l=a.createContext(null);function s(e){var n=e.children,t=function(e){return(0,a.useMemo)((function(){return{metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc}}),[e])}(e.content);return r(l.Provider,{value:t},n)}function d(){var e=(0,a.useContext)(l);if(null===e)throw new o.dV("DocProvider");return e}var c=t(757).A;function u(){var e,n=d(),t=n.metadata,a=n.frontMatter,o=n.assets;return c(i.be,{title:t.title,description:t.description,keywords:a.keywords,image:null!=(e=o.image)?e:a.image})}var m=t(53),v=t(4581),p=t(8168),f=t(1312),h=t(5489),b=t(757).A;function g(e){var n=e.permalink,t=e.title,a=e.subLabel,i=e.isNext;return b(h.A,{className:(0,m.A)("pagination-nav__link",i?"pagination-nav__link--next":"pagination-nav__link--prev"),to:n},a&&b("div",{className:"pagination-nav__sublabel"},a),b("div",{className:"pagination-nav__label"},t))}var A=t(757).A;function N(e){var n=e.previous,t=e.next;return A("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,f.T)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"})},n&&A(g,(0,p.A)({},n,{subLabel:A(f.A,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc"},"Previous")})),t&&A(g,(0,p.A)({},t,{subLabel:A(f.A,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc"},"Next"),isNext:!0})))}var C=t(757).A;function L(){var e=d().metadata;return C(N,{previous:e.previous,next:e.next})}var x=t(4586),_=t(4070),T=t(7559),y=t(5597),k=t(2252),H=t(757).A;var w={unreleased:function(e){var n=e.siteTitle,t=e.versionMetadata;return H(f.A,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:n,versionLabel:H("b",null,t.label)}},"This is unreleased documentation for {siteTitle} {versionLabel} version.")},unmaintained:function(e){var n=e.siteTitle,t=e.versionMetadata;return H(f.A,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:n,versionLabel:H("b",null,t.label)}},"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.")}};function M(e){var n=w[e.versionMetadata.banner];return H(n,e)}function U(e){var n=e.versionLabel,t=e.to,a=e.onClick;return H(f.A,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:n,latestVersionLink:H("b",null,H(h.A,{to:t,onClick:a},H(f.A,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label"},"latest version")))}},"For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).")}function E(e){var n,t=e.className,a=e.versionMetadata,i=(0,x.A)().siteConfig.title,o=(0,_.vT)({failfast:!0}).pluginId,r=(0,y.g1)(o).savePreferredVersionName,l=(0,_.HW)(o),s=l.latestDocSuggestion,d=l.latestVersionSuggestion,c=null!=s?s:(n=d).docs.find((function(e){return e.id===n.mainDocId}));return H("div",{className:(0,m.A)(t,T.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert"},H("div",null,H(M,{siteTitle:i,versionMetadata:a})),H("div",{className:"margin-top--md"},H(U,{versionLabel:d.label,to:c.path,onClick:function(){return r(d.name)}})))}function B(e){var n=e.className,t=(0,k.r)();return t.banner?H(E,{className:n,versionMetadata:t}):null}var I=t(757).A;function S(e){var n=e.className,t=(0,k.r)();return t.badge?I("span",{className:(0,m.A)(n,T.G.docs.docVersionBadge,"badge badge--secondary")},I(f.A,{id:"theme.docs.versionBadge.label",values:{versionLabel:t.label}},"Version: {versionLabel}")):null}var V=t(757).A;function O(e){var n=e.lastUpdatedAt,t=e.formattedLastUpdatedAt;return V(f.A,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:V("b",null,V("time",{dateTime:new Date(1e3*n).toISOString()},t))}}," on {date}")}function z(e){var n=e.lastUpdatedBy;return V(f.A,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:V("b",null,n)}}," by {user}")}function R(e){var n=e.lastUpdatedAt,t=e.formattedLastUpdatedAt,a=e.lastUpdatedBy;return V("span",{className:T.G.common.lastUpdated},V(f.A,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:n&&t?V(O,{lastUpdatedAt:n,formattedLastUpdatedAt:t}):"",byUser:a?V(z,{lastUpdatedBy:a}):""}},"Last updated{atDate}{byUser}"),!1)}var D=t(8587),G=t(5164),P=t.n(G),W=t(757).A,j=["className"];function F(e){var n=e.className,t=(0,D.A)(e,j);return W("svg",(0,p.A)({fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,m.A)(P().iconEdit,n),"aria-hidden":"true"},t),W("g",null,W("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})))}var q=t(757).A;function Y(e){var n=e.editUrl;return q("a",{href:n,target:"_blank",rel:"noreferrer noopener",className:T.G.common.editThisPage},q(F,null),q(f.A,{id:"theme.common.editThisPage",description:"The link label to edit the current page"},"Edit this page"))}var Q=t(8982),Z=t.n(Q),X=t(757).A;function J(e){var n=e.permalink,t=e.label,a=e.count;return X(h.A,{href:n,className:(0,m.A)(Z().tag,a?Z().tagWithCount:Z().tagRegular)},t,a&&X("span",null,a))}var K=t(6362),$=t.n(K),ee=t(757).A,ne=t(6540).Fragment;function te(e){var n=e.tags;return ee(ne,null,ee("b",null,ee(f.A,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list"},"Tags:")),ee("ul",{className:(0,m.A)($().tags,"padding--none","margin-left--sm")},n.map((function(e){var n=e.label,t=e.permalink;return ee("li",{key:t,className:$().tag},ee(J,{label:n,permalink:t}))}))))}var ae=t(7237),ie=t.n(ae),oe=t(757).A;function re(e){return oe("div",{className:(0,m.A)(T.G.docs.docFooterTagsRow,"row margin-bottom--sm")},oe("div",{className:"col"},oe(te,e)))}function le(e){var n=e.editUrl,t=e.lastUpdatedAt,a=e.lastUpdatedBy,i=e.formattedLastUpdatedAt;return oe("div",{className:(0,m.A)(T.G.docs.docFooterEditMetaRow,"row")},oe("div",{className:"col"},n&&oe(Y,{editUrl:n})),oe("div",{className:(0,m.A)("col",ie().lastUpdated)},(t||a)&&oe(R,{lastUpdatedAt:t,formattedLastUpdatedAt:i,lastUpdatedBy:a})))}function se(){var e=d().metadata,n=e.editUrl,t=e.lastUpdatedAt,a=e.formattedLastUpdatedAt,i=e.lastUpdatedBy,o=e.tags,r=o.length>0,l=!!(n||t||i);return r||l?oe("footer",{className:(0,m.A)(T.G.docs.docFooter,"docusaurus-mt-lg")},r&&oe(re,{tags:o}),l&&oe(le,{editUrl:n,lastUpdatedAt:t,lastUpdatedBy:i,formattedLastUpdatedAt:a})):null}var de=t(1422),ce=t(6342),ue=["parentIndex"];function me(e){var n=e.map((function(e){return Object.assign({},e,{parentIndex:-1,children:[]})})),t=Array(7).fill(-1);n.forEach((function(e,n){var a=t.slice(2,e.level);e.parentIndex=Math.max.apply(Math,a),t[e.level]=n}));var a=[];return n.forEach((function(e){var t=e.parentIndex,i=(0,D.A)(e,ue);t>=0?n[t].children.push(i):a.push(i)})),a}function ve(e){var n=e.toc,t=e.minHeadingLevel,a=e.maxHeadingLevel;return n.flatMap((function(e){var n=ve({toc:e.children,minHeadingLevel:t,maxHeadingLevel:a});return function(e){return e.level>=t&&e.level<=a}(e)?[Object.assign({},e,{children:n})]:n}))}function pe(e){var n=e.getBoundingClientRect();return n.top===n.bottom?pe(e.parentNode):n}function fe(e,n){var t,a,i=n.anchorTopOffset,o=e.find((function(e){return pe(e).top>=i}));return o?function(e){return e.top>0&&e.bottom<window.innerHeight/2}(pe(o))?o:null!=(a=e[e.indexOf(o)-1])?a:null:null!=(t=e[e.length-1])?t:null}function he(){var e=(0,a.useRef)(0),n=(0,ce.p)().navbar.hideOnScroll;return(0,a.useEffect)((function(){e.current=n?0:document.querySelector(".navbar").clientHeight}),[n]),e}function be(e){var n=(0,a.useRef)(void 0),t=he();(0,a.useEffect)((function(){if(!e)return function(){};var a=e.linkClassName,i=e.linkActiveClassName,o=e.minHeadingLevel,r=e.maxHeadingLevel;function l(){var e=function(e){return Array.from(document.getElementsByClassName(e))}(a),l=function(e){for(var n=e.minHeadingLevel,t=e.maxHeadingLevel,a=[],i=n;i<=t;i+=1)a.push("h"+i+".anchor");return Array.from(document.querySelectorAll(a.join()))}({minHeadingLevel:o,maxHeadingLevel:r}),s=fe(l,{anchorTopOffset:t.current}),d=e.find((function(e){return s&&s.id===function(e){return decodeURIComponent(e.href.substring(e.href.indexOf("#")+1))}(e)}));e.forEach((function(e){!function(e,t){t?(n.current&&n.current!==e&&n.current.classList.remove(i),e.classList.add(i),n.current=e):e.classList.remove(i)}(e,e===d)}))}return document.addEventListener("scroll",l),document.addEventListener("resize",l),l(),function(){document.removeEventListener("scroll",l),document.removeEventListener("resize",l)}}),[e,t])}var ge=t(757).A;function Ae(e){var n=e.toc,t=e.className,a=e.linkClassName,i=e.isChild;return n.length?ge("ul",{className:i?void 0:t},n.map((function(e){return ge("li",{key:e.id},ge("a",{href:"#"+e.id,className:null!=a?a:void 0,dangerouslySetInnerHTML:{__html:e.value}}),ge(Ae,{isChild:!0,toc:e.children,className:t,linkClassName:a}))}))):null}const Ne=a.memo(Ae);var Ce=t(757).A,Le=["toc","className","linkClassName","linkActiveClassName","minHeadingLevel","maxHeadingLevel"];function xe(e){var n=e.toc,t=e.className,i=void 0===t?"table-of-contents table-of-contents__left-border":t,o=e.linkClassName,r=void 0===o?"table-of-contents__link":o,l=e.linkActiveClassName,s=void 0===l?void 0:l,d=e.minHeadingLevel,c=e.maxHeadingLevel,u=(0,D.A)(e,Le),m=(0,ce.p)(),v=null!=d?d:m.tableOfContents.minHeadingLevel,f=null!=c?c:m.tableOfContents.maxHeadingLevel,h=function(e){var n=e.toc,t=e.minHeadingLevel,i=e.maxHeadingLevel;return(0,a.useMemo)((function(){return ve({toc:me(n),minHeadingLevel:t,maxHeadingLevel:i})}),[n,t,i])}({toc:n,minHeadingLevel:v,maxHeadingLevel:f});return be((0,a.useMemo)((function(){if(r&&s)return{linkClassName:r,linkActiveClassName:s,minHeadingLevel:v,maxHeadingLevel:f}}),[r,s,v,f])),Ce(Ne,(0,p.A)({toc:h,className:i,linkClassName:r},u))}var _e=t(4814),Te=t.n(_e),ye=t(757).A,ke=["collapsed"];function He(e){var n=e.collapsed,t=(0,D.A)(e,ke);return ye("button",(0,p.A)({type:"button"},t,{className:(0,m.A)("clean-btn",Te().tocCollapsibleButton,!n&&Te().tocCollapsibleButtonExpanded,t.className)}),ye(f.A,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component"},"On this page"))}var we=t(8184),Me=t.n(we),Ue=t(757).A;function Ee(e){var n=e.toc,t=e.className,a=e.minHeadingLevel,i=e.maxHeadingLevel,o=(0,de.u)({initialState:!0}),r=o.collapsed,l=o.toggleCollapsed;return Ue("div",{className:(0,m.A)(Me().tocCollapsible,!r&&Me().tocCollapsibleExpanded,t)},Ue(He,{collapsed:r,onClick:l}),Ue(de.N,{lazy:!0,className:Me().tocCollapsibleContent,collapsed:r},Ue(xe,{toc:n,minHeadingLevel:a,maxHeadingLevel:i})))}var Be=t(251),Ie=t.n(Be),Se=t(757).A;function Ve(){var e=d(),n=e.toc,t=e.frontMatter;return Se(Ee,{toc:n,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:(0,m.A)(T.G.docs.docTocMobile,Ie().tocMobile)})}var Oe=t(3924),ze=t.n(Oe),Re=t(757).A,De=["className"],Ge="table-of-contents__link toc-highlight",Pe="table-of-contents__link--active";function We(e){var n=e.className,t=(0,D.A)(e,De);return Re("div",{className:(0,m.A)(ze().tableOfContents,"thin-scrollbar",n)},Re(xe,(0,p.A)({},t,{linkClassName:Ge,linkActiveClassName:Pe})))}var je=t(757).A;function Fe(){var e=d(),n=e.toc,t=e.frontMatter;return je(We,{toc:n,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:T.G.docs.docTocDesktop})}var qe=t(244),Ye=t.n(qe),Qe=t(757).A,Ze=["as","id"];function Xe(e){var n=e.as,t=e.id,a=(0,D.A)(e,Ze),i=(0,ce.p)().navbar.hideOnScroll;if("h1"===n||!t)return Qe(n,(0,p.A)({},a,{id:void 0}));var o=(0,f.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof a.children?a.children:t});return Qe(n,(0,p.A)({},a,{className:(0,m.A)("anchor",i?Ye().anchorWithHideOnScrollNavbar:Ye().anchorWithStickyNavbar,a.className),id:t}),a.children,Qe(h.A,{className:"hash-link",to:"#"+t,"aria-label":o,title:o},"\u200b"))}var Je=t(6665),Ke=t(5260),$e=t(757).A,en=["mdxType","originalType"];var nn=t(9694),tn=t(757).A;var an=t(757).A;var on=t(757).A;var rn=t(2303),ln=t(9484),sn=t.n(ln),dn=t(757).A,cn=["summary","children"];function un(e){return!!e&&("SUMMARY"===e.tagName||un(e.parentElement))}function mn(e,n){return!!e&&(e===n||mn(e.parentElement,n))}function vn(e){var n=e.summary,t=e.children,i=(0,D.A)(e,cn),o=(0,rn.A)(),r=(0,a.useRef)(null),l=(0,de.u)({initialState:!i.open}),s=l.collapsed,d=l.setCollapsed,c=(0,a.useState)(i.open),u=c[0],v=c[1],f=a.isValidElement(n)?n:dn("summary",null,null!=n?n:"Details");return dn("details",(0,p.A)({},i,{ref:r,open:u,"data-collapsed":s,className:(0,m.A)(sn().details,o&&sn().isBrowser,i.className),onMouseDown:function(e){un(e.target)&&e.detail>1&&e.preventDefault()},onClick:function(e){e.stopPropagation();var n=e.target;un(n)&&mn(n,r.current)&&(e.preventDefault(),s?(d(!1),v(!0)):d(!0))}}),f,dn(de.N,{lazy:!1,collapsed:s,disableSSRStyle:!0,onCollapseTransitionEnd:function(e){d(e),v(!e)}},dn("div",{className:sn().collapsibleContent},t)))}var pn=t(8684),fn=t.n(pn),hn=t(757).A;function bn(e){var n=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return hn(vn,(0,p.A)({},n,{className:(0,m.A)("alert alert--info",fn().details,n.className)}))}var gn=t(757).A,An=t(6540).Fragment;var Nn=t(757).A;function Cn(e){return Nn(Xe,e)}var Ln=t(4669),xn=t.n(Ln),_n=t(757).A;function Tn(e){if(void 0!==e)return(0,m.A)(e,(null==e?void 0:e.includes("contains-task-list"))&&xn().containsTaskList)}var yn=t(4411),kn=t.n(yn),Hn=t(757).A;var wn=t(1760),Mn=t.n(wn),Un=t(757).A,En=t(6540).Fragment;var Bn={note:{infimaClassName:"secondary",iconComponent:function(){return Un("svg",{viewBox:"0 0 14 16"},Un("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))},label:Un(f.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return Un("svg",{viewBox:"0 0 12 16"},Un("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))},label:Un(f.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return Un("svg",{viewBox:"0 0 12 16"},Un("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"}))},label:Un(f.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return Un("svg",{viewBox:"0 0 14 16"},Un("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))},label:Un(f.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return Un("svg",{viewBox:"0 0 16 16"},Un("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))},label:Un(f.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},In={secondary:"note",important:"info",success:"tip",warning:"danger"};function Sn(e){var n,t=function(e){var n=a.Children.toArray(e),t=n.find((function(e){var n;return a.isValidElement(e)&&"mdxAdmonitionTitle"===(null==(n=e.props)?void 0:n.mdxType)})),i=Un(En,null,n.filter((function(e){return e!==t})));return{mdxAdmonitionTitle:t,rest:i}}(e.children),i=t.mdxAdmonitionTitle,o=t.rest;return Object.assign({},e,{title:null!=(n=e.title)?n:i,children:o})}var Vn=t(418),On=t(757).A;const zn={head:function(e){var n=a.Children.map(e.children,(function(e){return a.isValidElement(e)?function(e){var n;if(null!=(n=e.props)&&n.mdxType&&e.props.originalType){var t=e.props,i=(t.mdxType,t.originalType,(0,D.A)(t,en));return a.createElement(e.props.originalType,i)}return e}(e):e}));return $e(Ke.A,e,n)},code:function(e){var n=["a","abbr","b","br","button","cite","code","del","dfn","em","i","img","input","ins","kbd","label","object","output","q","ruby","s","small","span","strong","sub","sup","time","u","var","wbr"],t=a.Children.toArray(e.children).every((function(e){var t;return"string"==typeof e&&!e.includes("\n")||(0,a.isValidElement)(e)&&n.includes(null==(t=e.props)?void 0:t.mdxType)}));return tn(t?"code":nn.A,e)},a:function(e){return an(h.A,e)},pre:function(e){var n;return on(nn.A,(0,a.isValidElement)(e.children)&&"code"===(null==(n=e.children.props)?void 0:n.originalType)?e.children.props:Object.assign({},e))},details:function(e){var n=a.Children.toArray(e.children),t=n.find((function(e){var n;return a.isValidElement(e)&&"summary"===(null==(n=e.props)?void 0:n.mdxType)})),i=gn(An,null,n.filter((function(e){return e!==t})));return gn(bn,(0,p.A)({},e,{summary:t}),i)},ul:function(e){return _n("ul",(0,p.A)({},e,{className:Tn(e.className)}))},img:function(e){return Hn("img",(0,p.A)({loading:"lazy"},e,{className:(n=e.className,(0,m.A)(n,kn().img))}));var n},h1:function(e){return On(Cn,(0,p.A)({as:"h1"},e))},h2:function(e){return On(Cn,(0,p.A)({as:"h2"},e))},h3:function(e){return On(Cn,(0,p.A)({as:"h3"},e))},h4:function(e){return On(Cn,(0,p.A)({as:"h4"},e))},h5:function(e){return On(Cn,(0,p.A)({as:"h5"},e))},h6:function(e){return On(Cn,(0,p.A)({as:"h6"},e))},admonition:function(e){var n=Sn(e),t=n.children,a=n.type,i=n.title,o=n.icon,r=function(e){var n,t=null!=(n=In[e])?n:e,a=Bn[t];return a||(console.warn('No admonition config found for admonition type "'+t+'". Using Info as fallback.'),Bn.info)}(a),l=null!=i?i:r.label,s=r.iconComponent,d=null!=o?o:Un(s,null);return Un("div",{className:(0,m.A)(T.G.common.admonition,T.G.common.admonitionType(e.type),"alert","alert--"+r.infimaClassName,Mn().admonition)},Un("div",{className:Mn().admonitionHeading},Un("span",{className:Mn().admonitionIcon},d),l),Un("div",{className:Mn().admonitionContent},t))},mermaid:Vn.A};var Rn=t(757).A;function Dn(e){var n=e.children;return Rn(Je.xA,{components:zn},n)}var Gn=t(757).A;function Pn(e){var n,t,a,i,o=e.children,r=(n=d(),t=n.metadata,a=n.frontMatter,i=n.contentTitle,a.hide_title||void 0!==i?null:t.title);return Gn("div",{className:(0,m.A)(T.G.docs.docMarkdown,"markdown")},r&&Gn("header",null,Gn(Xe,{as:"h1"},r)),Gn(Dn,null,o))}var Wn=t(7460),jn=t(9169),Fn=t(6025),qn=t(757).A;function Yn(e){return qn("svg",(0,p.A)({viewBox:"0 0 24 24"},e),qn("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"}))}var Qn=t(3355),Zn=t.n(Qn),Xn=t(757).A;function Jn(){var e=(0,Fn.A)("/");return Xn("li",{className:"breadcrumbs__item"},Xn(h.A,{"aria-label":(0,f.T)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e},Xn(Yn,{className:Zn().breadcrumbHomeIcon})))}var Kn=t(678),$n=t.n(Kn),et=t(757).A;function nt(e){var n=e.children,t=e.href,a="breadcrumbs__link";return e.isLast?et("span",{className:a,itemProp:"name"},n):t?et(h.A,{className:a,href:t,itemProp:"item"},et("span",{itemProp:"name"},n)):et("span",{className:a},n)}function tt(e){var n=e.children,t=e.active,a=e.index,i=e.addMicrodata;return et("li",(0,p.A)({},i&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,m.A)("breadcrumbs__item",{"breadcrumbs__item--active":t})}),n,et("meta",{itemProp:"position",content:String(a+1)}))}function at(){var e=(0,Wn.OF)(),n=(0,jn.Dt)();return e?et("nav",{className:(0,m.A)(T.G.docs.docBreadcrumbs,$n().breadcrumbsContainer),"aria-label":(0,f.T)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"})},et("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList"},n&&et(Jn,null),e.map((function(n,t){var a=t===e.length-1;return et(tt,{key:t,active:a,index:t,addMicrodata:!!n.href},et(nt,{href:n.href,isLast:a},n.label))})))):null}var it=t(2702),ot=t.n(it),rt=t(757).A;function lt(e){var n,t,a,i,o,r,l=e.children,s=(n=d(),t=n.frontMatter,a=n.toc,i=(0,v.l)(),o=t.hide_table_of_contents,r=!o&&a.length>0,{hidden:o,mobile:r?rt(Ve,null):void 0,desktop:!r||"desktop"!==i&&"ssr"!==i?void 0:rt(Fe,null)});return rt("div",{className:"row"},rt("div",{className:(0,m.A)("col",!s.hidden&&ot().docItemCol)},rt(B,null),rt("div",{className:ot().docItemContainer},rt("article",null,rt(at,null),rt(S,null),s.mobile,rt(Pn,null,l),rt(se,null)),rt(L,null))),s.desktop&&rt("div",{className:"col col--3"},s.desktop))}var st=t(757).A;function dt(e){var n="docs-doc-id-"+e.content.metadata.unversionedId,t=e.content;return st(s,{content:e.content},st(i.e3,{className:n},st(u,null),st(lt,null,st(t,null))))}},8684:e=>{e.exports={details:"details_b_Ee"}},8982:e=>{e.exports={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"}},9484:e=>{e.exports={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[198],{4827:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>p,default:()=>f,frontMatter:()=>l,metadata:()=>u,toc:()=>s});var r=t(8168),a=t(8587),o=(t(6540),t(6665)),i=["components"],l={},p=void 0,u={unversionedId:"api/functions/createEnum",id:"api/functions/createEnum",title:"createEnum",description:"youtil",source:"@site/doc/api/functions/createEnum.md",sourceDirName:"api/functions",slug:"/api/functions/createEnum",permalink:"/api/functions/createEnum",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"copyToClipboard",permalink:"/api/functions/copyToClipboard"},next:{title:"decodeHtml",permalink:"/api/functions/decodeHtml"}},c={},s=[{value:"Type Parameters",id:"type-parameters",level:2},{value:"T",id:"t",level:3},{value:"Parameters",id:"parameters",level:2},{value:"items",id:"items",level:3},{value:"Returns",id:"returns",level:2}],m={toc:s},y="wrapper";function f(e){var n=e.components,t=(0,a.A)(e,i);return(0,o.yg)(y,(0,r.A)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,o.yg)("p",null,(0,o.yg)("a",{parentName:"p",href:"/api/"},(0,o.yg)("strong",{parentName:"a"},"youtil"))),(0,o.yg)("hr",null),(0,o.yg)("p",null,(0,o.yg)("a",{parentName:"p",href:"/api/globals"},"youtil")," / createEnum"),(0,o.yg)("h1",{id:"function-createenum"},"Function: createEnum()"),(0,o.yg)("blockquote",null,(0,o.yg)("p",{parentName:"blockquote"},(0,o.yg)("strong",{parentName:"p"},"createEnum"),"\\<",(0,o.yg)("inlineCode",{parentName:"p"},"T"),">","(",(0,o.yg)("inlineCode",{parentName:"p"},"items"),"): ",(0,o.yg)("inlineCode",{parentName:"p"},"EnumType"),"\\<",(0,o.yg)("inlineCode",{parentName:"p"},"T"),">")),(0,o.yg)("p",null,"Defined in: ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/enum.ts#L29"},"enum.ts:29")),(0,o.yg)("p",null,"\u521b\u5efa\u4e00\u4e2a\u679a\u4e3e\uff0c\u652f\u6301\u591a\u79cd\u9ad8\u7ea7\u7528\u6cd5\uff1a\nconst enums = createEnum(","[{ key: 'MAN', label: '\u7537', value: 1 }]",")\nconsole.log(enums.MAN) // 1\nconsole.log(enums.pick('MAN')) // \u5bf9\u8c61\nconsole.log(enums.pick(1)) // \u5bf9\u8c61\nconsole.log(enums.pickLabel('MAN')) // \u7537\nconsole.log(enums.pickValue('MAN')) // 1\nconsole.log(enums) // \u6570\u7ec4\u5bf9\u8c61"),(0,o.yg)("h2",{id:"type-parameters"},"Type Parameters"),(0,o.yg)("h3",{id:"t"},"T"),(0,o.yg)("p",null,(0,o.yg)("inlineCode",{parentName:"p"},"T")," ",(0,o.yg)("em",{parentName:"p"},"extends")," readonly ",(0,o.yg)("inlineCode",{parentName:"p"},"EnumItem"),"\\<",(0,o.yg)("inlineCode",{parentName:"p"},"string"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,o.yg)("inlineCode",{parentName:"p"},"number"),">","[]"),(0,o.yg)("h2",{id:"parameters"},"Parameters"),(0,o.yg)("h3",{id:"items"},"items"),(0,o.yg)("p",null,(0,o.yg)("inlineCode",{parentName:"p"},"T")),(0,o.yg)("h2",{id:"returns"},"Returns"),(0,o.yg)("p",null,(0,o.yg)("inlineCode",{parentName:"p"},"EnumType"),"\\<",(0,o.yg)("inlineCode",{parentName:"p"},"T"),">"))}f.isMDXComponent=!0},6665:(e,n,t)=>{function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=r(t(6540));function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(){return i=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},i.apply(this,arguments)}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l(Object(t),!0).forEach((function(n){o(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function u(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var c=a.default.createContext({}),s=function(e){var n=a.default.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):p(p({},n),e)),t},m={inlineCode:"code",wrapper:function(e){var n=e.children;return a.default.createElement(a.default.Fragment,{},n)}},y=a.default.forwardRef((function(e,n){var t=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,l=u(e,["components","mdxType","originalType","parentName"]),c=s(t),y=r,f=c["".concat(i,".").concat(y)]||c[y]||m[y]||o;return t?a.default.createElement(f,p(p({ref:n},l),{},{components:t})):a.default.createElement(f,p({ref:n},l))}));y.displayName="MDXCreateElement",n.xA=function(e){var n=s(e.components);return a.default.createElement(c.Provider,{value:n},e.children)},n.yg=function(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=t.length,i=new Array(o);i[0]=y;var l={};for(var p in n)hasOwnProperty.call(n,p)&&(l[p]=n[p]);l.originalType=e,l.mdxType="string"==typeof e?e:r,i[1]=l;for(var u=2;u<o;u++)i[u]=t[u];return a.default.createElement.apply(null,i)}return a.default.createElement.apply(null,t)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[714,774],{1395:e=>{e.exports={menu:"menu_SIkG",menuWithAnnouncementBar:"menuWithAnnouncementBar_GW3s"}},1774:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});n(6540);var a=n(1312),o=n(1003),i=n(5543),r=n(757).A,l=n(6540).Fragment;function d(){return r(l,null,r(o.be,{title:(0,a.T)({id:"theme.NotFound.title",message:"Page Not Found"})}),r(i.A,null,r("main",{className:"container margin-vert--xl"},r("div",{className:"row"},r("div",{className:"col col--6 col--offset-3"},r("h1",{className:"hero__title"},r(a.A,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),r("p",null,r(a.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),r("p",null,r(a.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}},2252:(e,t,n)=>{"use strict";n.d(t,{n:()=>l,r:()=>d});var a=n(6540),o=n(3807),i=n(757).A,r=a.createContext(null);function l(e){var t=e.children,n=e.version;return i(r.Provider,{value:n},t)}function d(){var e=(0,a.useContext)(r);if(null===e)throw new o.dV("DocsVersionProvider");return e}},2649:e=>{e.exports={sidebar:"sidebar_njMd",sidebarWithHideableNavbar:"sidebarWithHideableNavbar_wUlq",sidebarHidden:"sidebarHidden_VK0M",sidebarLogo:"sidebarLogo_isFc"}},2878:e=>{e.exports={docMainContainer:"docMainContainer_gTbr",docMainContainerEnhanced:"docMainContainerEnhanced_Uz_u",docItemWrapperEnhanced:"docItemWrapperEnhanced_czyv"}},3377:e=>{e.exports={collapseSidebarButton:"collapseSidebarButton_PEFL",collapseSidebarButtonIcon:"collapseSidebarButtonIcon_kv0_"}},4664:e=>{e.exports={menuExternalLink:"menuExternalLink_NmtK"}},4810:e=>{e.exports={expandButton:"expandButton_m80_",expandButtonIcon:"expandButtonIcon_BlDH"}},5385:e=>{e.exports={backToTopButton:"backToTopButton_sjWU",backToTopButtonShow:"backToTopButtonShow_xfvO"}},5774:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Ze});var a=n(6540),o=n(53),i=n(1003),r=n(7559),l=n(2967),d=n(7460),s=n(2252),c=n(6588),u=n(5543),m=n(1312),b=n(3104),p=n(5062);var v=n(5385),h=n.n(v),f=n(757).A;function A(){var e=function(e){var t=e.threshold,n=(0,a.useState)(!1),o=n[0],i=n[1],r=(0,a.useRef)(!1),l=(0,b.gk)(),d=l.startScroll,s=l.cancelScroll;return(0,b.Mq)((function(e,n){var a=e.scrollY,o=null==n?void 0:n.scrollY;o&&(r.current?r.current=!1:a>=o?(s(),i(!1)):a<t?i(!1):a+window.innerHeight<document.documentElement.scrollHeight&&i(!0))})),(0,p.$)((function(e){e.location.hash&&(r.current=!0,i(!1))})),{shown:o,scrollToTop:function(){return d(0)}}}({threshold:300}),t=e.shown,n=e.scrollToTop;return f("button",{"aria-label":(0,m.T)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,o.A)("clean-btn",r.G.common.backToTopButton,h().backToTopButton,t&&h().backToTopButtonShow),type:"button",onClick:n})}var g=n(3109),_=n(6347),C=n(4581),k=n(6342),S=n(3465),x=n(8168),N=n(757).A;function T(e){return N("svg",(0,x.A)({width:"20",height:"20","aria-hidden":"true"},e),N("g",{fill:"#7a7a7a"},N("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),N("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})))}var I=n(3377),y=n.n(I),B=n(757).A;function w(e){var t=e.onClick;return B("button",{type:"button",title:(0,m.T)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,m.T)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,o.A)("button button--secondary button--outline",y().collapseSidebarButton),onClick:t},B(T,{className:y().collapseSidebarButtonIcon}))}var L=n(5041),M=n(8587),E=n(3807),H=n(757).A,P=Symbol("EmptyContext"),W=a.createContext(P);function G(e){var t=e.children,n=(0,a.useState)(null),o=n[0],i=n[1],r=(0,a.useMemo)((function(){return{expandedItem:o,setExpandedItem:i}}),[o]);return H(W.Provider,{value:r},t)}var F=n(1422),D=n(9169),V=n(5489),U=n(2303),z=n(757).A,R=["item","onItemClick","activePath","level","index"];function j(e){var t=e.categoryLabel,n=e.onClick;return z("button",{"aria-label":(0,m.T)({id:"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel",message:"Toggle the collapsible sidebar category '{label}'",description:"The ARIA label to toggle the collapsible sidebar category"},{label:t}),type:"button",className:"clean-btn menu__caret",onClick:n})}function K(e){var t=e.item,n=e.onItemClick,i=e.activePath,l=e.level,s=e.index,c=(0,M.A)(e,R),u=t.items,m=t.label,b=t.collapsible,p=t.className,v=t.href,h=(0,k.p)().docs.sidebar.autoCollapseCategories,f=function(e){var t=(0,U.A)();return(0,a.useMemo)((function(){return e.href?e.href:!t&&e.collapsible?(0,d._o)(e):void 0}),[e,t])}(t),A=(0,d.w8)(t,i),g=(0,D.ys)(v,i),_=(0,F.u)({initialState:function(){return!!b&&(!A&&t.collapsed)}}),C=_.collapsed,S=_.setCollapsed,N=function(){var e=(0,a.useContext)(W);if(e===P)throw new E.dV("DocSidebarItemsExpandedStateProvider");return e}(),T=N.expandedItem,I=N.setExpandedItem,y=function(e){void 0===e&&(e=!C),I(e?null:s),S(e)};return function(e){var t=e.isActive,n=e.collapsed,o=e.updateCollapsed,i=(0,E.ZC)(t);(0,a.useEffect)((function(){t&&!i&&n&&o(!1)}),[t,i,n,o])}({isActive:A,collapsed:C,updateCollapsed:y}),(0,a.useEffect)((function(){b&&null!=T&&T!==s&&h&&S(!0)}),[b,T,s,S,h]),z("li",{className:(0,o.A)(r.G.docs.docSidebarItemCategory,r.G.docs.docSidebarItemCategoryLevel(l),"menu__list-item",{"menu__list-item--collapsed":C},p)},z("div",{className:(0,o.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":g})},z(V.A,(0,x.A)({className:(0,o.A)("menu__link",{"menu__link--sublist":b,"menu__link--sublist-caret":!v&&b,"menu__link--active":A}),onClick:b?function(e){null==n||n(t),v?y(!1):(e.preventDefault(),y())}:function(){null==n||n(t)},"aria-current":g?"page":void 0,"aria-expanded":b?!C:void 0,href:b?null!=f?f:"#":f},c),m),v&&b&&z(j,{categoryLabel:m,onClick:function(e){e.preventDefault(),y()}})),z(F.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:C},z(se,{items:u,tabIndex:C?-1:0,onItemClick:n,activePath:i,level:l+1})))}var q=n(6654),O=n(5835),X=n(4664),Y=n.n(X),Z=n(757).A,$=["item","onItemClick","activePath","level","index"];function J(e){var t=e.item,n=e.onItemClick,a=e.activePath,i=e.level,l=(e.index,(0,M.A)(e,$)),s=t.href,c=t.label,u=t.className,m=t.autoAddBaseUrl,b=(0,d.w8)(t,a),p=(0,q.A)(s);return Z("li",{className:(0,o.A)(r.G.docs.docSidebarItemLink,r.G.docs.docSidebarItemLinkLevel(i),"menu__list-item",u),key:c},Z(V.A,(0,x.A)({className:(0,o.A)("menu__link",!p&&Y().menuExternalLink,{"menu__link--active":b}),autoAddBaseUrl:m,"aria-current":b?"page":void 0,to:s},p&&{onClick:n?function(){return n(t)}:void 0},l),c,!p&&Z(O.A,null)))}var Q=n(7275),ee=n.n(Q),te=n(757).A;function ne(e){var t=e.item,n=e.level,a=e.index,i=t.value,l=t.defaultStyle,d=t.className;return te("li",{className:(0,o.A)(r.G.docs.docSidebarItemLink,r.G.docs.docSidebarItemLinkLevel(n),l&&[ee().menuHtmlItem,"menu__list-item"],d),key:a,dangerouslySetInnerHTML:{__html:i}})}var ae=n(757).A,oe=["item"];function ie(e){var t=e.item,n=(0,M.A)(e,oe);switch(t.type){case"category":return ae(K,(0,x.A)({item:t},n));case"html":return ae(ne,(0,x.A)({item:t},n));default:return ae(J,(0,x.A)({item:t},n))}}var re=n(757).A,le=["items"];function de(e){var t=e.items,n=(0,M.A)(e,le);return re(G,null,t.map((function(e,t){return re(ie,(0,x.A)({key:t,item:e,index:t},n))})))}const se=(0,a.memo)(de);var ce=n(1395),ue=n.n(ce),me=n(757).A;function be(e){var t=e.path,n=e.sidebar,i=e.className,l=function(){var e=(0,L.Mj)().isActive,t=(0,a.useState)(e),n=t[0],o=t[1];return(0,b.Mq)((function(t){var n=t.scrollY;e&&o(0===n)}),[e]),e&&n}();return me("nav",{"aria-label":(0,m.T)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,o.A)("menu thin-scrollbar",ue().menu,l&&ue().menuWithAnnouncementBar,i)},me("ul",{className:(0,o.A)(r.G.docs.docSidebarMenu,"menu__list")},me(se,{items:n,activePath:t,level:1})))}var pe=n(2649),ve=n.n(pe),he=n(757).A;function fe(e){var t=e.path,n=e.sidebar,a=e.onCollapse,i=e.isHidden,r=(0,k.p)(),l=r.navbar.hideOnScroll,d=r.docs.sidebar.hideable;return he("div",{className:(0,o.A)(ve().sidebar,l&&ve().sidebarWithHideableNavbar,i&&ve().sidebarHidden)},l&&he(S.A,{tabIndex:-1,className:ve().sidebarLogo}),he(be,{path:t,sidebar:n}),d&&he(w,{onClick:a}))}const Ae=a.memo(fe);var ge=n(5600),_e=n(9876),Ce=n(757).A,ke=function(e){var t=e.sidebar,n=e.path,a=(0,_e.M)();return Ce("ul",{className:(0,o.A)(r.G.docs.docSidebarMenu,"menu__list")},Ce(se,{items:t,activePath:n,onItemClick:function(e){"category"===e.type&&e.href&&a.toggle(),"link"===e.type&&a.toggle()},level:1}))};function Se(e){return Ce(ge.GX,{component:ke,props:e})}const xe=a.memo(Se);var Ne=n(757).A,Te=n(6540).Fragment;function Ie(e){var t=(0,C.l)(),n="mobile"===t;return Ne(Te,null,("desktop"===t||"ssr"===t)&&Ne(Ae,e),n&&Ne(xe,e))}var ye=n(4810),Be=n.n(ye),we=n(757).A;function Le(e){var t=e.toggleSidebar;return we("div",{className:Be().expandButton,title:(0,m.T)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,m.T)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t},we(T,{className:Be().expandButtonIcon}))}var Me=n(7171),Ee=n.n(Me),He=n(757).A;function Pe(e){var t,n=e.children,o=(0,c.t)();return He(a.Fragment,{key:null!=(t=null==o?void 0:o.name)?t:"noSidebar"},n)}function We(e){var t=e.sidebar,n=e.hiddenSidebarContainer,i=e.setHiddenSidebarContainer,l=(0,_.zy)().pathname,d=(0,a.useState)(!1),s=d[0],c=d[1],u=(0,a.useCallback)((function(){s&&c(!1),!s&&(0,g.O)()&&c(!0),i((function(e){return!e}))}),[i,s]);return He("aside",{className:(0,o.A)(r.G.docs.docSidebarContainer,Ee().docSidebarContainer,n&&Ee().docSidebarContainerHidden),onTransitionEnd:function(e){e.currentTarget.classList.contains(Ee().docSidebarContainer)&&n&&c(!0)}},He(Pe,null,He("div",{className:(0,o.A)(Ee().sidebarViewport,s&&Ee().sidebarViewportHidden)},He(Ie,{sidebar:t,path:l,onCollapse:u,isHidden:s}),s&&He(Le,{toggleSidebar:u}))))}var Ge=n(2878),Fe=n.n(Ge),De=n(757).A;function Ve(e){var t=e.hiddenSidebarContainer,n=e.children,a=(0,c.t)();return De("main",{className:(0,o.A)(Fe().docMainContainer,(t||!a)&&Fe().docMainContainerEnhanced)},De("div",{className:(0,o.A)("container padding-top--md padding-bottom--lg",Fe().docItemWrapper,t&&Fe().docItemWrapperEnhanced)},n))}var Ue=n(9774),ze=n.n(Ue),Re=n(757).A;function je(e){var t=e.children,n=(0,c.t)(),o=(0,a.useState)(!1),i=o[0],r=o[1];return Re(u.A,{wrapperClassName:ze().docsWrapper},Re(A,null),Re("div",{className:ze().docPage},n&&Re(We,{sidebar:n.items,hiddenSidebarContainer:i,setHiddenSidebarContainer:r}),Re(Ve,{hiddenSidebarContainer:i},t)))}var Ke=n(1774),qe=n(1463),Oe=n(757).A,Xe=n(6540).Fragment;function Ye(e){var t=e.versionMetadata;return Oe(Xe,null,Oe(qe.A,{version:t.version,tag:(0,l.tU)(t.pluginId,t.version)}),Oe(i.be,null,t.noIndex&&Oe("meta",{name:"robots",content:"noindex, nofollow"})))}function Ze(e){var t=e.versionMetadata,n=(0,d.mz)(e);if(!n)return Oe(Ke.default,null);var a=n.docElement,l=n.sidebarName,u=n.sidebarItems;return Oe(Xe,null,Oe(Ye,e),Oe(i.e3,{className:(0,o.A)(r.G.wrapper.docsPages,r.G.page.docsDocPage,e.versionMetadata.className)},Oe(s.n,{version:t},Oe(c.V,{name:l,items:u},Oe(je,null,a)))))}},7171:e=>{e.exports={docSidebarContainer:"docSidebarContainer_b6E3",docSidebarContainerHidden:"docSidebarContainerHidden_b3ry",sidebarViewport:"sidebarViewport_Xe31"}},7275:e=>{e.exports={menuHtmlItem:"menuHtmlItem_M9Kj"}},9774:e=>{e.exports={docPage:"docPage__5DB",docsWrapper:"docsWrapper_BCFX","themedComponent--light":"themedComponent--light_NU7w"}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[807],{2117:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>d,default:()=>v,frontMatter:()=>u,metadata:()=>f,toc:()=>m});var r,o=t(8168),a=t(8587),i=(t(6540),t(6665)),c=t(8478),s=t(8279),l=["components"],u={},d="\u6d4b\u8bd5",f={unversionedId:"time",id:"time",title:"\u6d4b\u8bd5",description:"",source:"@site/doc/02-time.md",sourceDirName:".",slug:"/time",permalink:"/time",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{},sidebar:"defaultSidebar",previous:{title:"request",permalink:"/request"},next:{title:"loading",permalink:"/loading"}},p={},m=[],g=(r="IcePkgDemo_doc_02_time_0",{toc:m}),h="wrapper";function v(e){var n=e.components,r=(0,a.A)(e,l);return(0,i.yg)(h,(0,o.A)({},g,r,{components:n,mdxType:"MDXLayout"}),(0,i.yg)("h1",{id:"\u6d4b\u8bd5"},"\u6d4b\u8bd5"),(0,i.yg)(s.A,{code:"import { formatDate } from 'youtil';\nimport { useEffect } from 'react';\n\nconst App = () => {\n useEffect(() => {\n console.log('\u5f53\u524d\u65f6\u95f4\uff1a', formatDate(Date.now()));\n }, []);\n return <div>\n \u8bf7\u67e5\u770b\u63a7\u5236\u53f0\n </div>;\n}\n\nexport default App;",mobilePreview:!1,url:"/demos/IcePkgDemo_doc_02_time_0/?",mdxType:"Previewer"},(0,i.yg)(c.A,{mdxType:"BrowserOnly"},(function(){var e=t(8677).A;return(0,i.yg)(e,{mdxType:"IcePkgDemo_doc_02_time_0"})}))))}v.isMDXComponent=!0},2655:(e,n,t)=>{function r(e,n,t,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void t(e)}c.done?n(s):Promise.resolve(s).then(r,o)}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){var r,o;r=e,o=t[n],n in r?Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o}))}return e}t.d(n,{Kd:()=>d,Yq:()=>f,RZ:()=>i,Em:()=>l,Cs:()=>a}),"function"==typeof SuppressedError&&SuppressedError;var a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"\u8bf7\u7a0d\u5019",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(t=Object.assign({},{hasMask:!1,maskColor:"#00000070",onCancel:null,cancelInline:!1,id:"com_global_page_loading"},t)).id,o=t.hasMask,a=t.maskColor,c=t.onCancel,s=t.cancelInline,l="_".concat(r,"_timeout");window[l]&&clearTimeout(window[l]);var u=document.getElementById(r);u||((u=document.createElement("div")).id=r,u.className=r,document.body.append(u));var d="".concat(r,"_style");if(!document.getElementById(d)){var f=document.createElement("style");f.id=d,f.innerHTML="\n .".concat(r," {\n position: fixed;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n z-index: 10000;\n }\n .").concat(r,".show-mask {\n pointer-events: unset;\n background: #00000070;\n }\n .").concat(r," .mask-wrapper {\n position: fixed;\n }\n .").concat(r," .loading-wrapper {\n width: 120px;\n height: 120px;\n z-index: 8000;\n background: rgba(0, 0, 0, 0.6);\n border-radius: 8px;\n text-align: center;\n color: white;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n pointer-events: initial;\n line-height: 1.3;\n }\n .").concat(r," .loading-wrapper img {\n width: 50px;\n height: 50px;\n margin-bottom: 10px;\n }\n .").concat(r," .loading-wrapper a {\n color: #6ab2ff;\n }"),document.head.appendChild(f)}if(u.innerHTML='\n <div class="loading-wrapper">\n <img src="https://img.alicdn.com/tfs/TB1bnUsQBLoK1RjSZFuXXXn0XXa-32-32.svg" alt="\u52a0\u8f7d\u4e2d">\n <div>\n <span>'.concat(e,"</span>\n ").concat(s?"":"<br />","\n ").concat(c?'<a href="javascript:;" class="cancel">\u53d6\u6d88</a>':"","\n </div>\n </div>"),c){var p=u.querySelector(".cancel");p&&p.addEventListener("click",(function(){i(),c()}))}u.addEventListener("click",(function(){i()})),u.style.display="flex",u.style.background=o?a:"transparent",u.className="".concat(r," ").concat(o?"show-mask":""),n>0&&(window[l]=setTimeout((function(){i()}),1e3*n))},i=function(){var e=document.getElementById("com_global_page_loading");e&&(e.style.display="none")};var c=function(e){return Object.keys(e||{}).filter((function(n){return void 0!==e[n]})).map((function(n){var t="object"==typeof e[n]?JSON.stringify(e[n]):e[n];return"".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(t))})).join("&")},s=function(e,n){var t=Object.assign({},(null==e?void 0:e.headers)||{},(null==n?void 0:n.headers)||{}),r=Object.assign({},(null==e?void 0:e.fetchOptions)||{},(null==n?void 0:n.fetchOptions)||{});return Object.assign({},e||{},n||{},{headers:t,fetchOptions:r})},l=function(){var e=function(e){return function(){var n=this,t=arguments;return new Promise((function(o,a){var i=e.apply(n,t);function c(e){r(i,o,a,c,s,"next",e)}function s(e){r(i,o,a,c,s,"throw",e)}c(void 0)}))}}((function(e,n){var t,r,a,i,l,u,d,f,p,m,g,h,v,y,b,w,O,k,x,j,D;return function(e,n){var t,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=c(0),i.throw=c(1),i.return=c(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(t)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}}(this,(function(_){switch(_.label){case 0:if(r=(t=(n=s({errorMessage:"\u7cfb\u7edf\u7e41\u5fd9\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5",errorHandler:function(e){var t;(null==n?void 0:n.silent)||(null==n||null===(t=n.toastHandler)||void 0===t||t.call(n,e));throw Error(e)},baseUrl:"",headers:{},fetchOptions:{credentials:"include"},checkSuccess:function(e){return 0==(null==e?void 0:e.code)||200==(null==e?void 0:e.code)},toastHandler:function(e){return console.error("[\u60a8\u8fd8\u6ca1\u6709\u914d\u7f6etoastHandler\uff0c\u8bf7\u6839\u636e\u60a8\u7684UI\u7ec4\u4ef6\u5e93\u914d\u7f6e\u5408\u9002\u7684\u63d0\u793a\u65b9\u6cd5] ".concat(e||""))},onFetchResponse:function(e){if(200===e.status)return e.json();var n={code:e.status,status:e.status,message:e.statusText,headers:e.headers,_response:e},t=Error(n.message);throw t.response=n,t}},n))||{}).params,a=t.data,i=t.formData,l=t.json,u=t.method,d=t.headers,f=t.baseUrl,p=t.fetchOptions,m=t.checkSuccess,g=t.afterRequest,h=t.errorHandler,v=t.errorMessage,y=t.responseConverter,b=t.onFetchResponse,p.headers=o({},d||{},p.headers||{}),r&&(p.method=u||"GET",e="".concat(e).concat(e.indexOf("?")>=0?"&":"?").concat(c(r))),a)Object.assign(p,{method:u||"POST",body:c(a),headers:o({"Content-Type":"application/x-www-form-urlencoded;charset=utf-8"},p.headers||{})});else if(i){if(w=i,!(i instanceof FormData))for(var E in w=new FormData,i)w.append(E,i[E]);Object.assign(p,{method:u||"POST",body:w})}else l&&Object.assign(p,{method:u||"POST",body:JSON.stringify(l),headers:o({"Content-Type":"application/json;charset=utf-8"},p.headers||{})});O=null,_.label=1;case 1:return _.trys.push([1,3,,4]),0===(k="".concat(/^(http|\/\/)/g.test(e)?"":f||"").concat(e)).indexOf("//")&&"blob:"===location.protocol&&(k="".concat(null===(x=location.pathname.split(":"))||void 0===x?void 0:x[0],":").concat(k)),[4,fetch(k,p).then(b)];case 2:return O=_.sent(),[3,4];case 3:return console.error(j=_.sent()),null==g||g(!1,{message:null==j?void 0:j.message}),null==h||h((null===(D=j.response)||void 0===D?void 0:D.message)||v||"",j.response),[2,void 0];case 4:return O=y?y(O):O,(null==m?void 0:m(O))?(null==g||g(!0,O),[2,O.data]):(null==g||g(!1,O),null==h||h(O.message||O.msg||v||"",O),[2,void 0])}}))}));return function(n,t){return e.apply(this,arguments)}}(),u=function(e){var n=s(this.overrideDefaultOptions,e),t=function(e,t){return l(e,s(n,t))};return t.overrideDefaultOptions=n,t.create=u.bind(t),t};l.create=u.bind(l);var d=function(e,n){var t=n;return n||(t=e,e=l),function(n,r){return e(n,o({},t||{},r||{}))}},f=function(e,n){var t=function(e){n=n.replace(RegExp("".concat(e,"+"),"g"),(function(n){var t="".concat(r[e]);if("w"===e)return"".concat(n.length>2?"\u661f\u671f":"\u5468").concat(o[t]);for(var a=0,i=t.length;a<n.length-i;a++)t="0".concat(t);return 1===n.length?t:t.substring(t.length-n.length)}))};if(!e)return"";if("number"==typeof e)e=new Date(e);else if("string"==typeof e)if(/^\d{12,13}$/g.test(e))e=new Date(parseInt(e,10));else{if(!/^.{10}T.{8,12}Z?$/g.test(e))return e;e=new Date(e)}if(!(e instanceof Date))throw Error("formatDate error: not date.");if(isNaN(null==e?void 0:e.getFullYear()))throw Error("formatDate error: invalid date.");n=n||"yyyy-MM-dd HH:mm:ss";var r={y:e.getFullYear(),M:e.getMonth()+1,d:e.getDate(),q:Math.floor((e.getMonth()+3)/3),w:e.getDay(),H:e.getHours(),h:e.getHours()%12==0?12:e.getHours()%12,m:e.getMinutes(),s:e.getSeconds(),S:e.getMilliseconds()},o=["\u5929","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"];for(var a in r)t(a);return n}},8677:(e,n,t)=>{t.d(n,{A:()=>i});var r=t(2655),o=t(6540),a=t(757).A;const i=function(){return(0,o.useEffect)((function(){console.log("\u5f53\u524d\u65f6\u95f4\uff1a",(0,r.Yq)(Date.now()))}),[]),a("div",null,"\u8bf7\u67e5\u770b\u63a7\u5236\u53f0")}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[776],{6665:(e,t,r)=>{function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=n(r(6540));function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=a.default.createContext({}),c=function(e){var t=a.default.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):p(p({},t),e)),r},f={inlineCode:"code",wrapper:function(e){var t=e.children;return a.default.createElement(a.default.Fragment,{},t)}},y=a.default.forwardRef((function(e,t){var r=e.components,n=e.mdxType,i=e.originalType,o=e.parentName,l=u(e,["components","mdxType","originalType","parentName"]),s=c(r),y=n,d=s["".concat(o,".").concat(y)]||s[y]||f[y]||i;return r?a.default.createElement(d,p(p({ref:t},l),{},{components:r})):a.default.createElement(d,p({ref:t},l))}));y.displayName="MDXCreateElement",t.xA=function(e){var t=c(e.components);return a.default.createElement(s.Provider,{value:t},e.children)},t.yg=function(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=r.length,o=new Array(i);o[0]=y;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l.mdxType="string"==typeof e?e:n,o[1]=l;for(var u=2;u<i;u++)o[u]=r[u];return a.default.createElement.apply(null,o)}return a.default.createElement.apply(null,r)}},9715:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>p,default:()=>d,frontMatter:()=>l,metadata:()=>u,toc:()=>c});var n=r(8168),a=r(8587),i=(r(6540),r(6665)),o=["components"],l={},p=void 0,u={unversionedId:"api/functions/parseDate",id:"api/functions/parseDate",title:"parseDate",description:"youtil",source:"@site/doc/api/functions/parseDate.md",sourceDirName:"api/functions",slug:"/api/functions/parseDate",permalink:"/api/functions/parseDate",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"initWindowMessage",permalink:"/api/functions/initWindowMessage"},next:{title:"request",permalink:"/api/functions/request"}},s={},c=[{value:"Parameters",id:"parameters",level:2},{value:"str",id:"str",level:3},{value:"fmt?",id:"fmt",level:3},{value:"Returns",id:"returns",level:2}],f={toc:c},y="wrapper";function d(e){var t=e.components,r=(0,a.A)(e,o);return(0,i.yg)(y,(0,n.A)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,i.yg)("p",null,(0,i.yg)("a",{parentName:"p",href:"/api/"},(0,i.yg)("strong",{parentName:"a"},"youtil"))),(0,i.yg)("hr",null),(0,i.yg)("p",null,(0,i.yg)("a",{parentName:"p",href:"/api/globals"},"youtil")," / parseDate"),(0,i.yg)("h1",{id:"function-parsedate"},"Function: parseDate()"),(0,i.yg)("blockquote",null,(0,i.yg)("p",{parentName:"blockquote"},(0,i.yg)("strong",{parentName:"p"},"parseDate"),"(",(0,i.yg)("inlineCode",{parentName:"p"},"str"),", ",(0,i.yg)("inlineCode",{parentName:"p"},"fmt"),"?): ",(0,i.yg)("inlineCode",{parentName:"p"},"Date"))),(0,i.yg)("p",null,"Defined in: ",(0,i.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/time.ts#L67"},"time.ts:67")),(0,i.yg)("p",null,"\u5c06\u5b57\u7b26\u4e32\u89e3\u6790\u6210\u65e5\u671f"),(0,i.yg)("h2",{id:"parameters"},"Parameters"),(0,i.yg)("h3",{id:"str"},"str"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"string")),(0,i.yg)("p",null,"\u8f93\u5165\u7684\u65e5\u671f\u5b57\u7b26\u4e32\uff0c\u5982'2014-09-13'"),(0,i.yg)("h3",{id:"fmt"},"fmt?"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"string")),(0,i.yg)("p",null,"\u5b57\u7b26\u4e32\u683c\u5f0f\uff0c\u9ed8\u8ba4'yyyy-MM-dd'\uff0c\u652f\u6301\u5982\u4e0b\uff1ay\u3001M\u3001d\u3001H\u3001m\u3001s\u3001S\uff0c\u4e0d\u652f\u6301w\u548cq"),(0,i.yg)("h2",{id:"returns"},"Returns"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"Date")),(0,i.yg)("p",null,"\u89e3\u6790\u540e\u7684Date\u7c7b\u578b\u65e5\u671f"))}d.isMDXComponent=!0}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[708],{6665:(e,a,t)=>{function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=r(t(6540));function i(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function l(){return l=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},l.apply(this,arguments)}function o(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,r)}return t}function p(e){for(var a=1;a<arguments.length;a++){var t=null!=arguments[a]?arguments[a]:{};a%2?o(Object(t),!0).forEach((function(a){i(e,a,t[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))}))}return e}function u(e,a){if(null==e)return{};var t,r,n=function(e,a){if(null==e)return{};var t,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],a.indexOf(t)>=0||(n[t]=e[t]);return n}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],a.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var s=n.default.createContext({}),f=function(e){var a=n.default.useContext(s),t=a;return e&&(t="function"==typeof e?e(a):p(p({},a),e)),t},c={inlineCode:"code",wrapper:function(e){var a=e.children;return n.default.createElement(n.default.Fragment,{},a)}},y=n.default.forwardRef((function(e,a){var t=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,o=u(e,["components","mdxType","originalType","parentName"]),s=f(t),y=r,m=s["".concat(l,".").concat(y)]||s[y]||c[y]||i;return t?n.default.createElement(m,p(p({ref:a},o),{},{components:t})):n.default.createElement(m,p({ref:a},o))}));y.displayName="MDXCreateElement",a.xA=function(e){var a=f(e.components);return n.default.createElement(s.Provider,{value:a},e.children)},a.yg=function(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var i=t.length,l=new Array(i);l[0]=y;var o={};for(var p in a)hasOwnProperty.call(a,p)&&(o[p]=a[p]);o.originalType=e,o.mdxType="string"==typeof e?e:r,l[1]=o;for(var u=2;u<i;u++)l[u]=t[u];return n.default.createElement.apply(null,l)}return n.default.createElement.apply(null,t)}},8410:(e,a,t)=>{t.r(a),t.d(a,{assets:()=>s,contentTitle:()=>p,default:()=>m,frontMatter:()=>o,metadata:()=>u,toc:()=>f});var r=t(8168),n=t(8587),i=(t(6540),t(6665)),l=["components"],o={},p=void 0,u={unversionedId:"api/globals",id:"api/globals",title:"globals",description:"youtil",source:"@site/doc/api/globals.md",sourceDirName:"api",slug:"/api/globals",permalink:"/api/globals",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"toUrlParams",permalink:"/api/functions/toUrlParams"},next:{title:"IRequestOptions",permalink:"/api/interfaces/IRequestOptions"}},s={},f=[{value:"Interfaces",id:"interfaces",level:2},{value:"Variables",id:"variables",level:2},{value:"Functions",id:"functions",level:2}],c={toc:f},y="wrapper";function m(e){var a=e.components,t=(0,n.A)(e,l);return(0,i.yg)(y,(0,r.A)({},c,t,{components:a,mdxType:"MDXLayout"}),(0,i.yg)("p",null,(0,i.yg)("a",{parentName:"p",href:"/api/"},(0,i.yg)("strong",{parentName:"a"},"youtil"))),(0,i.yg)("hr",null),(0,i.yg)("h1",{id:"youtil"},"youtil"),(0,i.yg)("h2",{id:"interfaces"},"Interfaces"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/interfaces/IRequestOptions"},"IRequestOptions")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/interfaces/IShowLoadingConfig"},"IShowLoadingConfig"))),(0,i.yg)("h2",{id:"variables"},"Variables"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/variables/Request"},(0,i.yg)("del",{parentName:"a"},"Request")))),(0,i.yg)("h2",{id:"functions"},"Functions"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/functions/copyToClipboard"},"copyToClipboard")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/functions/createEnum"},"createEnum")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/functions/decodeHtml"},"decodeHtml")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/functions/deepCopy"},"deepCopy")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/functions/delParam"},"delParam")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/functions/encodeHtml"},"encodeHtml")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/functions/formatDate"},"formatDate")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/functions/getParam"},"getParam")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/functions/getParamInt"},"getParamInt")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/functions/getParams"},"getParams")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/functions/hideLoading"},"hideLoading")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/functions/initWindowMessage"},"initWindowMessage")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/functions/parseDate"},"parseDate")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/functions/request"},"request")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/functions/setParam"},"setParam")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/functions/showLoading"},"showLoading")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/functions/sleep"},"sleep")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"/api/functions/toUrlParams"},"toUrlParams"))))}m.isMDXComponent=!0}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 66592e46.f0e51f16.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[836],{467:(t,e,n)=>{function r(t,e,n,r,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function o(t){return function(){var e=this,n=arguments;return new Promise((function(o,a){var i=t.apply(e,n);function c(t){r(i,o,a,c,u,"next",t)}function u(t){r(i,o,a,c,u,"throw",t)}c(void 0)}))}}n.d(e,{A:()=>o})},675:(t,e,n)=>{n.d(e,{A:()=>o});var r=n(2284);function o(){o=function(){return e};var t,e={},n=Object.prototype,a=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,a=Object.create(o.prototype),c=new M(r||[]);return i(a,"_invoke",{value:S(t,n,c)}),a}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",v="suspendedYield",g="executing",y="completed",m={};function w(){}function b(){}function x(){}var O={};f(O,u,(function(){return this}));var E=Object.getPrototypeOf,j=E&&E(E(C([])));j&&j!==n&&a.call(j,u)&&(O=j);var k=x.prototype=w.prototype=Object.create(O);function L(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function n(o,i,c,u){var s=d(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==(0,r.A)(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):e.resolve(f).then((function(t){l.value=t,c(l)}),(function(t){return n("throw",t,c,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function a(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(a,a):a()}})}function S(e,n,r){var o=p;return function(a,i){if(o===g)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var u=T(c,r);if(u){if(u===m)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=g;var s=d(e,n,r);if("normal"===s.type){if(o=r.done?y:v,s.arg===m)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=y,r.method="throw",r.arg=s.arg)}}}function T(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,T(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var a=d(o,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var i=a.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function C(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(a.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError((0,r.A)(e)+" is not iterable")}return b.prototype=x,i(k,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},L(_.prototype),f(_.prototype,s,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,o,a){void 0===a&&(a=Promise);var i=new _(h(t,n,r,o),a);return e.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(k),f(k,l,"Generator"),f(k,u,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=C,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var n in this)"t"===n.charAt(0)&&a.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:C(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}},2437:(t,e,n)=>{n.r(e),n.d(e,{default:()=>a});var r=n(8478),o=n(757).A;const a=function(){return o(r.A,null,(function(){var t=n(8419).A;return o(t,null)}))}},2655:(t,e,n)=>{function r(t,e,n,r,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){var r,o;r=t,o=n[e],e in r?Object.defineProperty(r,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[e]=o}))}return t}n.d(e,{Kd:()=>f,Yq:()=>h,RZ:()=>i,Em:()=>s,Cs:()=>a}),"function"==typeof SuppressedError&&SuppressedError;var a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"\u8bf7\u7a0d\u5019",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(n=Object.assign({},{hasMask:!1,maskColor:"#00000070",onCancel:null,cancelInline:!1,id:"com_global_page_loading"},n)).id,o=n.hasMask,a=n.maskColor,c=n.onCancel,u=n.cancelInline,s="_".concat(r,"_timeout");window[s]&&clearTimeout(window[s]);var l=document.getElementById(r);l||((l=document.createElement("div")).id=r,l.className=r,document.body.append(l));var f="".concat(r,"_style");if(!document.getElementById(f)){var h=document.createElement("style");h.id=f,h.innerHTML="\n .".concat(r," {\n position: fixed;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n z-index: 10000;\n }\n .").concat(r,".show-mask {\n pointer-events: unset;\n background: #00000070;\n }\n .").concat(r," .mask-wrapper {\n position: fixed;\n }\n .").concat(r," .loading-wrapper {\n width: 120px;\n height: 120px;\n z-index: 8000;\n background: rgba(0, 0, 0, 0.6);\n border-radius: 8px;\n text-align: center;\n color: white;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n pointer-events: initial;\n line-height: 1.3;\n }\n .").concat(r," .loading-wrapper img {\n width: 50px;\n height: 50px;\n margin-bottom: 10px;\n }\n .").concat(r," .loading-wrapper a {\n color: #6ab2ff;\n }"),document.head.appendChild(h)}if(l.innerHTML='\n <div class="loading-wrapper">\n <img src="https://img.alicdn.com/tfs/TB1bnUsQBLoK1RjSZFuXXXn0XXa-32-32.svg" alt="\u52a0\u8f7d\u4e2d">\n <div>\n <span>'.concat(t,"</span>\n ").concat(u?"":"<br />","\n ").concat(c?'<a href="javascript:;" class="cancel">\u53d6\u6d88</a>':"","\n </div>\n </div>"),c){var d=l.querySelector(".cancel");d&&d.addEventListener("click",(function(){i(),c()}))}l.addEventListener("click",(function(){i()})),l.style.display="flex",l.style.background=o?a:"transparent",l.className="".concat(r," ").concat(o?"show-mask":""),e>0&&(window[s]=setTimeout((function(){i()}),1e3*e))},i=function(){var t=document.getElementById("com_global_page_loading");t&&(t.style.display="none")};var c=function(t){return Object.keys(t||{}).filter((function(e){return void 0!==t[e]})).map((function(e){var n="object"==typeof t[e]?JSON.stringify(t[e]):t[e];return"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(n))})).join("&")},u=function(t,e){var n=Object.assign({},(null==t?void 0:t.headers)||{},(null==e?void 0:e.headers)||{}),r=Object.assign({},(null==t?void 0:t.fetchOptions)||{},(null==e?void 0:e.fetchOptions)||{});return Object.assign({},t||{},e||{},{headers:n,fetchOptions:r})},s=function(){var t=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,a){var i=t.apply(e,n);function c(t){r(i,o,a,c,u,"next",t)}function u(t){r(i,o,a,c,u,"throw",t)}c(void 0)}))}}((function(t,e){var n,r,a,i,s,l,f,h,d,p,v,g,y,m,w,b,x,O,E,j,k;return function(t,e){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=c(0),i.throw=c(1),i.return=c(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}(this,(function(L){switch(L.label){case 0:if(r=(n=(e=u({errorMessage:"\u7cfb\u7edf\u7e41\u5fd9\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5",errorHandler:function(t){var n;(null==e?void 0:e.silent)||(null==e||null===(n=e.toastHandler)||void 0===n||n.call(e,t));throw Error(t)},baseUrl:"",headers:{},fetchOptions:{credentials:"include"},checkSuccess:function(t){return 0==(null==t?void 0:t.code)||200==(null==t?void 0:t.code)},toastHandler:function(t){return console.error("[\u60a8\u8fd8\u6ca1\u6709\u914d\u7f6etoastHandler\uff0c\u8bf7\u6839\u636e\u60a8\u7684UI\u7ec4\u4ef6\u5e93\u914d\u7f6e\u5408\u9002\u7684\u63d0\u793a\u65b9\u6cd5] ".concat(t||""))},onFetchResponse:function(t){if(200===t.status)return t.json();var e={code:t.status,status:t.status,message:t.statusText,headers:t.headers,_response:t},n=Error(e.message);throw n.response=e,n}},e))||{}).params,a=n.data,i=n.formData,s=n.json,l=n.method,f=n.headers,h=n.baseUrl,d=n.fetchOptions,p=n.checkSuccess,v=n.afterRequest,g=n.errorHandler,y=n.errorMessage,m=n.responseConverter,w=n.onFetchResponse,d.headers=o({},f||{},d.headers||{}),r&&(d.method=l||"GET",t="".concat(t).concat(t.indexOf("?")>=0?"&":"?").concat(c(r))),a)Object.assign(d,{method:l||"POST",body:c(a),headers:o({"Content-Type":"application/x-www-form-urlencoded;charset=utf-8"},d.headers||{})});else if(i){if(b=i,!(i instanceof FormData))for(var _ in b=new FormData,i)b.append(_,i[_]);Object.assign(d,{method:l||"POST",body:b})}else s&&Object.assign(d,{method:l||"POST",body:JSON.stringify(s),headers:o({"Content-Type":"application/json;charset=utf-8"},d.headers||{})});x=null,L.label=1;case 1:return L.trys.push([1,3,,4]),0===(O="".concat(/^(http|\/\/)/g.test(t)?"":h||"").concat(t)).indexOf("//")&&"blob:"===location.protocol&&(O="".concat(null===(E=location.pathname.split(":"))||void 0===E?void 0:E[0],":").concat(O)),[4,fetch(O,d).then(w)];case 2:return x=L.sent(),[3,4];case 3:return console.error(j=L.sent()),null==v||v(!1,{message:null==j?void 0:j.message}),null==g||g((null===(k=j.response)||void 0===k?void 0:k.message)||y||"",j.response),[2,void 0];case 4:return x=m?m(x):x,(null==p?void 0:p(x))?(null==v||v(!0,x),[2,x.data]):(null==v||v(!1,x),null==g||g(x.message||x.msg||y||"",x),[2,void 0])}}))}));return function(e,n){return t.apply(this,arguments)}}(),l=function(t){var e=u(this.overrideDefaultOptions,t),n=function(t,n){return s(t,u(e,n))};return n.overrideDefaultOptions=e,n.create=l.bind(n),n};s.create=l.bind(s);var f=function(t,e){var n=e;return e||(n=t,t=s),function(e,r){return t(e,o({},n||{},r||{}))}},h=function(t,e){var n=function(t){e=e.replace(RegExp("".concat(t,"+"),"g"),(function(e){var n="".concat(r[t]);if("w"===t)return"".concat(e.length>2?"\u661f\u671f":"\u5468").concat(o[n]);for(var a=0,i=n.length;a<e.length-i;a++)n="0".concat(n);return 1===e.length?n:n.substring(n.length-e.length)}))};if(!t)return"";if("number"==typeof t)t=new Date(t);else if("string"==typeof t)if(/^\d{12,13}$/g.test(t))t=new Date(parseInt(t,10));else{if(!/^.{10}T.{8,12}Z?$/g.test(t))return t;t=new Date(t)}if(!(t instanceof Date))throw Error("formatDate error: not date.");if(isNaN(null==t?void 0:t.getFullYear()))throw Error("formatDate error: invalid date.");e=e||"yyyy-MM-dd HH:mm:ss";var r={y:t.getFullYear(),M:t.getMonth()+1,d:t.getDate(),q:Math.floor((t.getMonth()+3)/3),w:t.getDay(),H:t.getHours(),h:t.getHours()%12==0?12:t.getHours()%12,m:t.getMinutes(),s:t.getSeconds(),S:t.getMilliseconds()},o=["\u5929","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"];for(var a in r)n(a);return e}},8419:(t,e,n)=>{n.d(e,{A:()=>s});var r=n(675),o=n(467),a=n(2655),i=(n(6540),n(757).A),c=a.Em.create({baseUrl:"http://xxx.com",errorMessage:"\u62a5\u9519\u5566\u5566\u5566"});console.log(c.overrideOptions);var u=c.create({toastHandler:function(t){return alert(t)}});console.log(u.overrideOptions);const s=function(){var t=function(){var t=(0,o.A)((0,r.A)().mark((function t(){return(0,r.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u("/test",{data:{a:1}});case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return i("div",null,i("a",{href:"javascript:;",onClick:t},"\u70b9\u51fb\u8bf7\u6c42"))}},8478:(t,e,n)=>{n.d(e,{A:()=>i});n(6540);var r=n(2303),o=n(757).A,a=n(6540).Fragment;function i(t){var e=t.children,n=t.fallback;return(0,r.A)()?o(a,null,null==e?void 0:e()):null!=n?n:null}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[774],{1774:(e,t,o)=>{o.r(t),o.d(t,{default:()=>h});o(6540);var n=o(1312),a=o(1003),i=o(5543),l=o(757).A,r=o(6540).Fragment;function h(){return l(r,null,l(a.be,{title:(0,n.T)({id:"theme.NotFound.title",message:"Page Not Found"})}),l(i.A,null,l("main",{className:"container margin-vert--xl"},l("div",{className:"row"},l("div",{className:"col col--6 col--offset-3"},l("h1",{className:"hero__title"},l(n.A,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),l("p",null,l(n.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),l("p",null,l(n.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[171],{2612:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>p,default:()=>s,frontMatter:()=>i,metadata:()=>u,toc:()=>d});var r=n(8168),a=n(8587),l=(n(6540),n(6665)),o=["components"],i={},p=void 0,u={unversionedId:"api/functions/delParam",id:"api/functions/delParam",title:"delParam",description:"youtil",source:"@site/doc/api/functions/delParam.md",sourceDirName:"api/functions",slug:"/api/functions/delParam",permalink:"/api/functions/delParam",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"deepCopy",permalink:"/api/functions/deepCopy"},next:{title:"encodeHtml",permalink:"/api/functions/encodeHtml"}},c={},d=[{value:"Parameters",id:"parameters",level:2},{value:"name",id:"name",level:3},{value:"url",id:"url",level:3},{value:"Returns",id:"returns",level:2}],f={toc:d},y="wrapper";function s(e){var t=e.components,n=(0,a.A)(e,o);return(0,l.yg)(y,(0,r.A)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,l.yg)("p",null,(0,l.yg)("a",{parentName:"p",href:"/api/"},(0,l.yg)("strong",{parentName:"a"},"youtil"))),(0,l.yg)("hr",null),(0,l.yg)("p",null,(0,l.yg)("a",{parentName:"p",href:"/api/globals"},"youtil")," / delParam"),(0,l.yg)("h1",{id:"function-delparam"},"Function: delParam()"),(0,l.yg)("blockquote",null,(0,l.yg)("p",{parentName:"blockquote"},(0,l.yg)("strong",{parentName:"p"},"delParam"),"(",(0,l.yg)("inlineCode",{parentName:"p"},"name"),", ",(0,l.yg)("inlineCode",{parentName:"p"},"url"),"): ",(0,l.yg)("inlineCode",{parentName:"p"},"string"))),(0,l.yg)("p",null,"Defined in: ",(0,l.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/param.ts#L65"},"param.ts:65")),(0,l.yg)("p",null,"\u5220\u9664URL\u4e2d\u67d0\u4e2a\u53c2\u6570\ndelParam('a', '?a=1&b=2&a=3#d') // '?b=2#d'\ndelParam('b', '?a=1&b=2&a=3#d') // '?a=1&a=3#d'\ndelParam('a', '?a=1#d') // '#d'"),(0,l.yg)("h2",{id:"parameters"},"Parameters"),(0,l.yg)("h3",{id:"name"},"name"),(0,l.yg)("p",null,(0,l.yg)("inlineCode",{parentName:"p"},"string")),(0,l.yg)("p",null,"\u53c2\u6570\u540d"),(0,l.yg)("h3",{id:"url"},"url"),(0,l.yg)("p",null,(0,l.yg)("inlineCode",{parentName:"p"},"string")),(0,l.yg)("p",null,"\u8981\u5220\u9664\u7684URL\uff0c\u9ed8\u8ba4\u5f53\u524d\u9875\u9762URL"),(0,l.yg)("h2",{id:"returns"},"Returns"),(0,l.yg)("p",null,(0,l.yg)("inlineCode",{parentName:"p"},"string")),(0,l.yg)("p",null,"\u5904\u7406\u5b8c\u540e\u7684URL"))}s.isMDXComponent=!0},6665:(e,t,n)=>{function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=r(n(6540));function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function i(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 p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=a.default.createContext({}),d=function(e){var t=a.default.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},f={inlineCode:"code",wrapper:function(e){var t=e.children;return a.default.createElement(a.default.Fragment,{},t)}},y=a.default.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,i=u(e,["components","mdxType","originalType","parentName"]),c=d(n),y=r,s=c["".concat(o,".").concat(y)]||c[y]||f[y]||l;return n?a.default.createElement(s,p(p({ref:t},i),{},{components:n})):a.default.createElement(s,p({ref:t},i))}));y.displayName="MDXCreateElement",t.xA=function(e){var t=d(e.components);return a.default.createElement(c.Provider,{value:t},e.children)},t.yg=function(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=y;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i.mdxType="string"==typeof e?e:r,o[1]=i;for(var u=2;u<l;u++)o[u]=n[u];return a.default.createElement.apply(null,o)}return a.default.createElement.apply(null,n)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[830],{5640:e=>{e.exports={codeBlockContainer:"codeBlockContainer_Ckt0"}},6665:(e,t,n)=>{"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(n(6540));function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function s(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 i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var u=o.default.createContext({}),p=function(e){var t=o.default.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.default.createElement(o.default.Fragment,{},t)}},f=o.default.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,c=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=p(n),f=r,m=u["".concat(c,".").concat(f)]||u[f]||d[f]||a;return n?o.default.createElement(m,i(i({ref:t},s),{},{components:n})):o.default.createElement(m,i({ref:t},s))}));f.displayName="MDXCreateElement",t.xA=function(e){var t=p(e.components);return o.default.createElement(u.Provider,{value:t},e.children)},t.yg=function(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,c=new Array(a);c[0]=f;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s.mdxType="string"==typeof e?e:r,c[1]=s;for(var l=2;l<a;l++)c[l]=n[l];return o.default.createElement.apply(null,c)}return o.default.createElement.apply(null,n)}},6833:e=>{e.exports={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"}},6861:(e,t,n)=>{"use strict";function r(e,t){var n=(void 0===t?{}:t).target,r=void 0===n?document.body:n;if("string"!=typeof e)throw new TypeError("Expected parameter `text` to be a `string`, got `"+typeof e+"`.");var o=document.createElement("textarea"),a=document.activeElement;o.value=e,o.setAttribute("readonly",""),o.style.contain="strict",o.style.position="absolute",o.style.left="-9999px",o.style.fontSize="12pt";var c=document.getSelection(),s=c.rangeCount>0&&c.getRangeAt(0);r.append(o),o.select(),o.selectionStart=0,o.selectionEnd=e.length;var i=!1;try{i=document.execCommand("copy")}catch(l){}return o.remove(),s&&(c.removeAllRanges(),c.addRange(s)),a&&a.focus(),i}n.d(t,{A:()=>r})},7359:e=>{e.exports={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"}},8426:(e,t)=>{function n(e){let t,n=[];for(let r of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(r))n.push(parseInt(r,10));else if(t=r.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,r,o,a]=t;if(r&&a){r=parseInt(r),a=parseInt(a);const e=r<a?1:-1;"-"!==o&&".."!==o&&"\u2025"!==o||(a+=e);for(let t=r;t!==a;t+=e)n.push(t)}}return n}t.default=n,e.exports=n},8742:e=>{e.exports={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"}},9694:(e,t,n)=>{"use strict";n.d(t,{A:()=>fe});var r=n(8168),o=n(8587),a=n(6540),c=n(2303),s=n(53),i=n(5293),l=n(6342);function u(){var e=(0,l.p)().prism,t=(0,i.G)().colorMode,n=e.theme,r=e.darkTheme||n;return"dark"===t?r:n}var p=n(7559),d=n(3909),f=n(8426),m=n.n(f),y=(0,d.A)(/title=(["'])(.*?)\1/,{quote:1,title:2}),g=(0,d.A)(/\{([\d,-]+)\}/,{range:1}),v={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}};function b(e,t){var n=e.map((function(e){var n=v[e],r=n.start,o=n.end;return"(?:"+r+"\\s*("+t.flatMap((function(e){var t,n;return[e.line,null==(t=e.block)?void 0:t.start,null==(n=e.block)?void 0:n.end].filter(Boolean)})).join("|")+")\\s*"+o+")"})).join("|");return new RegExp("^\\s*(?:"+n+")\\s*$")}function h(e,t){var n=e.replace(/\n$/,""),r=t.language,o=t.magicComments,a=t.metastring;if(a&&g.test(a)){var c=a.match(g).groups.range;if(0===o.length)throw new Error("A highlight range has been given in code block's metastring (``` "+a+"), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.");var s=o[0].className,i=m()(c).filter((function(e){return e>0})).map((function(e){return[e-1,[s]]}));return{lineClassNames:Object.fromEntries(i),code:n}}if(void 0===r)return{lineClassNames:{},code:n};for(var l=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return b(["js","jsBlock"],t);case"jsx":case"tsx":return b(["js","jsBlock","jsx"],t);case"html":return b(["js","jsBlock","html"],t);case"python":case"py":case"bash":return b(["bash"],t);case"markdown":case"md":return b(["html","jsx","bash"],t);default:return b(Object.keys(v),t)}}(r,o),u=n.split("\n"),p=Object.fromEntries(o.map((function(e){return[e.className,{start:0,range:""}]}))),d=Object.fromEntries(o.filter((function(e){return e.line})).map((function(e){var t=e.className;return[e.line,t]}))),f=Object.fromEntries(o.filter((function(e){return e.block})).map((function(e){var t=e.className;return[e.block.start,t]}))),y=Object.fromEntries(o.filter((function(e){return e.block})).map((function(e){var t=e.className;return[e.block.end,t]}))),h=0;h<u.length;){var k=u[h].match(l);if(k){var B=k.slice(1).find((function(e){return void 0!==e}));d[B]?p[d[B]].range+=h+",":f[B]?p[f[B]].start=h:y[B]&&(p[y[B]].range+=p[y[B]].start+"-"+(h-1)+","),u.splice(h,1)}else h+=1}n=u.join("\n");var N={};return Object.entries(p).forEach((function(e){var t=e[0],n=e[1].range;m()(n).forEach((function(e){null!=N[e]||(N[e]=[]),N[e].push(t)}))})),{lineClassNames:N,code:n}}var k=n(5640),B=n.n(k),N=n(757).A,w=["as"];function j(e){var t=e.as,n=(0,o.A)(e,w),a=function(e){var t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((function(e){var r=e[0],o=e[1],a=t[r];a&&"string"==typeof o&&(n[a]=o)})),n}(u());return N(t,(0,r.A)({},n,{style:a,className:(0,s.A)(n.className,B().codeBlockContainer,p.G.common.codeBlock)}))}var A=n(8742),C=n.n(A),O=n(757).A;function E(e){var t=e.children,n=e.className;return O(j,{as:"pre",tabIndex:0,className:(0,s.A)(C().codeBlockStandalone,"thin-scrollbar",n)},O("code",{className:C().codeBlockLines},t))}var L=n(3807),x={attributes:!0,characterData:!0,childList:!0,subtree:!0};function T(e,t){var n=(0,a.useState)(),r=n[0],o=n[1],c=(0,a.useCallback)((function(){var t;o(null==(t=e.current)?void 0:t.closest("[role=tabpanel][hidden]"))}),[e,o]);(0,a.useEffect)((function(){c()}),[c]),function(e,t,n){void 0===n&&(n=x);var r=(0,L._q)(t),o=(0,L.Be)(n);(0,a.useEffect)((function(){var t=new MutationObserver(r);return e&&t.observe(e,o),function(){return t.disconnect()}}),[e,r,o])}(r,(function(e){e.forEach((function(e){"attributes"===e.type&&"hidden"===e.attributeName&&(t(),c())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}const P={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]};var S={Prism:n(1258).A,theme:P};function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(){return I=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I.apply(this,arguments)}var D=/\r\n|\r|\n/,W=function(e){0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},H=function(e,t){var n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)};function M(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}var z=function(e){function t(){for(var t=this,n=[],r=arguments.length;r--;)n[r]=arguments[r];e.apply(this,n),_(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?function(e,t){var n=e.plain,r=Object.create(null),o=e.styles.reduce((function(e,n){var r=n.languages,o=n.style;return r&&!r.includes(t)||n.types.forEach((function(t){var n=I({},e[t],o);e[t]=n})),e}),r);return o.root=n,o.plain=I({},n,{backgroundColor:null}),o}(e.theme,e.language):void 0;return t.themeDict=n})),_(this,"getLineProps",(function(e){var n=e.key,r=e.className,o=e.style,a=I({},M(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),c=t.getThemeDict(t.props);return void 0!==c&&(a.style=c.plain),void 0!==o&&(a.style=void 0!==a.style?I({},a.style,o):o),void 0!==n&&(a.key=n),r&&(a.className+=" "+r),a})),_(this,"getStyleForToken",(function(e){var n=e.types,r=e.empty,o=n.length,a=t.getThemeDict(t.props);if(void 0!==a){if(1===o&&"plain"===n[0])return r?{display:"inline-block"}:void 0;if(1===o&&!r)return a[n[0]];var c=r?{display:"inline-block"}:{},s=n.map((function(e){return a[e]}));return Object.assign.apply(Object,[c].concat(s))}})),_(this,"getTokenProps",(function(e){var n=e.key,r=e.className,o=e.style,a=e.token,c=I({},M(e,["key","className","style","token"]),{className:"token "+a.types.join(" "),children:a.content,style:t.getStyleForToken(a),key:void 0});return void 0!==o&&(c.style=void 0!==c.style?I({},c.style,o):o),void 0!==n&&(c.key=n),r&&(c.className+=" "+r),c})),_(this,"tokenize",(function(e,t,n,r){var o={code:t,grammar:n,language:r,tokens:[]};e.hooks.run("before-tokenize",o);var a=o.tokens=e.tokenize(o.code,o.grammar,o.language);return e.hooks.run("after-tokenize",o),a}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,r=e.code,o=e.children,a=this.getThemeDict(this.props),c=t.languages[n];return o({tokens:function(e){for(var t=[[]],n=[e],r=[0],o=[e.length],a=0,c=0,s=[],i=[s];c>-1;){for(;(a=r[c]++)<o[c];){var l=void 0,u=t[c],p=n[c][a];if("string"==typeof p?(u=c>0?u:["plain"],l=p):(u=H(u,p.type),p.alias&&(u=H(u,p.alias)),l=p.content),"string"==typeof l){var d=l.split(D),f=d.length;s.push({types:u,content:d[0]});for(var m=1;m<f;m++)W(s),i.push(s=[]),s.push({types:u,content:d[m]})}else c++,t.push(u),n.push(l),r.push(0),o.push(l.length)}c--,t.pop(),n.pop(),r.pop(),o.pop()}return W(s),i}(void 0!==c?this.tokenize(t,r,c,n):[r]),className:"prism-code language-"+n,style:void 0!==a?a.root:{},getLineProps:this.getLineProps,getTokenProps:this.getTokenProps})},t}(a.Component);const V=z;var R=n(6833),F=n.n(R),G=n(757).A,q=n(6540).Fragment;function $(e){var t=e.line,n=e.classNames,o=e.showLineNumbers,a=e.getLineProps,c=e.getTokenProps;1===t.length&&"\n"===t[0].content&&(t[0].content="");var i=a({line:t,className:(0,s.A)(n,o&&F().codeLine)}),l=t.map((function(e,t){return G("span",(0,r.A)({key:t},c({token:e,key:t})))}));return G("span",i,o?G(q,null,G("span",{className:F().codeLineNumber}),G("span",{className:F().codeLineContent},l)):l,G("br",null))}var Z=n(6861),J=n(1312),K=n(757).A;function X(e){return K("svg",(0,r.A)({viewBox:"0 0 24 24"},e),K("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"}))}var Y=n(757).A;function Q(e){return Y("svg",(0,r.A)({viewBox:"0 0 24 24"},e),Y("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}var U=n(9908),ee=n.n(U),te=n(757).A;function ne(e){var t=e.code,n=e.className,r=(0,a.useState)(!1),o=r[0],c=r[1],i=(0,a.useRef)(void 0),l=(0,a.useCallback)((function(){(0,Z.A)(t),c(!0),i.current=window.setTimeout((function(){c(!1)}),1e3)}),[t]);return(0,a.useEffect)((function(){return function(){return window.clearTimeout(i.current)}}),[]),te("button",{type:"button","aria-label":o?(0,J.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,J.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,J.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,s.A)("clean-btn",n,ee().copyButton,o&&ee().copyButtonCopied),onClick:l},te("span",{className:ee().copyButtonIcons,"aria-hidden":"true"},te(X,{className:ee().copyButtonIcon}),te(Q,{className:ee().copyButtonSuccessIcon})))}var re=n(757).A;function oe(e){return re("svg",(0,r.A)({viewBox:"0 0 24 24"},e),re("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}))}var ae=n(7359),ce=n.n(ae),se=n(757).A;function ie(e){var t=e.className,n=e.onClick,r=e.isEnabled,o=(0,J.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return se("button",{type:"button",onClick:n,className:(0,s.A)("clean-btn",t,r&&ce().wordWrapButtonEnabled),"aria-label":o,title:o},se(oe,{className:ce().wordWrapButtonIcon,"aria-hidden":"true"}))}var le=n(757).A;function ue(e){var t,n,o,c,i,p,d,f,m,g,v,b=e.children,k=e.className,B=void 0===k?"":k,N=e.metastring,w=e.title,A=e.showLineNumbers,O=e.language,E=(0,l.p)().prism,L=E.defaultLanguage,x=E.magicComments,P=null!=(t=null!=O?O:null==(n=B.split(" ").find((function(e){return e.startsWith("language-")})))?void 0:n.replace(/language-/,""))?t:L,_=u(),I=(o=(0,a.useState)(!1),c=o[0],i=o[1],p=(0,a.useState)(!1),d=p[0],f=p[1],m=(0,a.useRef)(null),g=(0,a.useCallback)((function(){var e=m.current.querySelector("code");c?e.removeAttribute("style"):(e.style.whiteSpace="pre-wrap",e.style.overflowWrap="anywhere"),i((function(e){return!e}))}),[m,c]),v=(0,a.useCallback)((function(){var e=m.current,t=e.scrollWidth>e.clientWidth||m.current.querySelector("code").hasAttribute("style");f(t)}),[m]),T(m,v),(0,a.useEffect)((function(){v()}),[c,v]),(0,a.useEffect)((function(){return window.addEventListener("resize",v,{passive:!0}),function(){window.removeEventListener("resize",v)}}),[v]),{codeBlockRef:m,isEnabled:c,isCodeScrollable:d,toggle:g}),D=function(e){var t,n;return null!=(t=null==e||null==(n=e.match(y))?void 0:n.groups.title)?t:""}(N)||w,W=h(b,{metastring:N,language:P,magicComments:x}),H=W.lineClassNames,M=W.code,z=null!=A?A:function(e){return Boolean(null==e?void 0:e.includes("showLineNumbers"))}(N);return le(j,{as:"div",className:(0,s.A)(B,P&&!B.includes("language-"+P)&&"language-"+P)},D&&le("div",{className:C().codeBlockTitle},D),le("div",{className:C().codeBlockContent},le(V,(0,r.A)({},S,{theme:_,code:M,language:null!=P?P:"text"}),(function(e){var t=e.className,n=e.tokens,r=e.getLineProps,o=e.getTokenProps;return le("pre",{tabIndex:0,ref:I.codeBlockRef,className:(0,s.A)(t,C().codeBlock,"thin-scrollbar")},le("code",{className:(0,s.A)(C().codeBlockLines,z&&C().codeBlockLinesWithNumbering)},n.map((function(e,t){return le($,{key:t,line:e,getLineProps:r,getTokenProps:o,classNames:H[t],showLineNumbers:z})}))))})),le("div",{className:C().buttonGroup},(I.isEnabled||I.isCodeScrollable)&&le(ie,{className:C().codeButton,onClick:function(){return I.toggle()},isEnabled:I.isEnabled}),le(ne,{className:C().codeButton,code:M}))))}var pe=n(757).A,de=["children"];function fe(e){var t=e.children,n=(0,o.A)(e,de),s=(0,c.A)(),i=function(e){return a.Children.toArray(e).some((function(e){return(0,a.isValidElement)(e)}))?e:Array.isArray(e)?e.join(""):e}(t);return pe("string"==typeof i?ue:E,(0,r.A)({key:String(s)},n),i)}},9908:e=>{e.exports={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"}}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 888.800281f1.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[888],{1020:(t,e,r)=>{"use strict";var n=r(6540),o=60103;if("function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,r){var n,i={},c=null,u=null;for(n in void 0!==r&&(c=""+r),void 0!==e.key&&(c=""+e.key),void 0!==e.ref&&(u=e.ref),e)s.call(e,n)&&!l.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps)void 0===i[n]&&(i[n]=e[n]);return{$$typeof:o,type:t,key:c,ref:u,props:i,_owner:a.current}}e.jsx=c,e.jsxs=c},4308:t=>{t.exports={container:"container_jJsY",unfoldContainer:"unfoldContainer_TzKO",preview:"preview_yMOi",operations:"operations_Fpkw",item:"item_b5wY",codeWrapper:"codeWrapper_udwJ",mobileWrapper:"mobileWrapper_DSG0",iframeWrapper:"iframeWrapper_YdFS",mobilePreviewWrapper:"mobilePreviewWrapper_jrwF",mobilePreviewArea:"mobilePreviewArea_kH_F",mobileOperations:"mobileOperations_YR6C",mobileCodeWrapper:"mobileCodeWrapper_NG24",operationItem:"operationItem_BQul",dialog:"dialog_EwpE"}},4848:(t,e,r)=>{"use strict";t.exports=r(1020)},8279:(t,e,r)=>{"use strict";r.d(e,{A:()=>Va});var n=r(4848),o=r(5895);function i(t,e,r,o,i){return(0,n.jsx)(t,s(e),r,o,i)}function a(t,e,r,o,i){return(0,n.jsxs)(t,s(e),r,o,i)}function s(t){if(t&&"style"in t){var e=t.style;if("object"==typeof e){var r=Object.assign({},t),n={};for(var i in e)n[i]="string"==typeof e[i]?(0,o.oU)(e[i]):e[i];return r.style=n,r}}return t}var l=r(6540),c=r(9694),u=r(5556),f=r.n(u),d="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),p=new Uint8Array(16);function h(){if(!d)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return d(p)}for(var v=[],g=0;g<256;++g)v[g]=(g+256).toString(16).substr(1);const m=function(t,e){var r=e||0,n=v;return[n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]]].join("")};const b=function(t,e,r){var n=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||h)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var i=0;i<16;++i)e[n+i]=o[i];return e||m(o)};function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function w(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?y(Object(r),!0).forEach((function(e){O(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function E(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function O(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function C(){return C=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},C.apply(this,arguments)}function T(t){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},T(t)}function L(t,e){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},L(t,e)}function S(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function A(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=T(t);if(e){var o=T(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S(this,r)}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function R(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return _(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}var M="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{},x=function(t){return t&&t.Math==Math&&t},P=x("object"==typeof globalThis&&globalThis)||x("object"==typeof window&&window)||x("object"==typeof self&&self)||x("object"==typeof M&&M)||function(){return this}()||Function("return this")(),k={},j=function(t){try{return!!t()}catch(e){return!0}},N=!j((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),I=!j((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),z=I,H=Function.prototype.call,B=z?H.bind(H):function(){return H.apply(H,arguments)},D={},F={}.propertyIsEnumerable,U=Object.getOwnPropertyDescriptor,W=U&&!F.call({1:2},1);D.f=W?function(t){var e=U(this,t);return!!e&&e.enumerable}:F;var V,Y,$=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},Q=I,X=Function.prototype,G=X.call,K=Q&&X.bind.bind(G,G),Z=function(t){return Q?K(t):function(){return G.apply(t,arguments)}},J=Z,q=J({}.toString),tt=J("".slice),et=function(t){return tt(q(t),8,-1)},rt=et,nt=Z,ot=function(t){if("Function"===rt(t))return nt(t)},it=j,at=et,st=Object,lt=ot("".split),ct=it((function(){return!st("z").propertyIsEnumerable(0)}))?function(t){return"String"==at(t)?lt(t,""):st(t)}:st,ut=function(t){return null==t},ft=ut,dt=TypeError,pt=function(t){if(ft(t))throw dt("Can't call method on "+t);return t},ht=ct,vt=pt,gt=function(t){return ht(vt(t))},mt="object"==typeof document&&document.all,bt={all:mt,IS_HTMLDDA:void 0===mt&&void 0!==mt},yt=bt.all,wt=bt.IS_HTMLDDA?function(t){return"function"==typeof t||t===yt}:function(t){return"function"==typeof t},Et=wt,Ot=bt.all,Ct=bt.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:Et(t)||t===Ot}:function(t){return"object"==typeof t?null!==t:Et(t)},Tt=P,Lt=wt,St=function(t,e){return arguments.length<2?(r=Tt[t],Lt(r)?r:void 0):Tt[t]&&Tt[t][e];var r},At=ot({}.isPrototypeOf),_t=P,Rt=St("navigator","userAgent")||"",Mt=_t.process,xt=_t.Deno,Pt=Mt&&Mt.versions||xt&&xt.version,kt=Pt&&Pt.v8;kt&&(Y=(V=kt.split("."))[0]>0&&V[0]<4?1:+(V[0]+V[1])),!Y&&Rt&&(!(V=Rt.match(/Edge\/(\d+)/))||V[1]>=74)&&(V=Rt.match(/Chrome\/(\d+)/))&&(Y=+V[1]);var jt=Y,Nt=j,It=!!Object.getOwnPropertySymbols&&!Nt((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&jt&&jt<41})),zt=It&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ht=St,Bt=wt,Dt=At,Ft=Object,Ut=zt?function(t){return"symbol"==typeof t}:function(t){var e=Ht("Symbol");return Bt(e)&&Dt(e.prototype,Ft(t))},Wt=String,Vt=wt,Yt=function(t){try{return Wt(t)}catch(e){return"Object"}},$t=TypeError,Qt=function(t){if(Vt(t))return t;throw $t(Yt(t)+" is not a function")},Xt=Qt,Gt=ut,Kt=B,Zt=wt,Jt=Ct,qt=TypeError,te={exports:{}},ee=P,re=Object.defineProperty,ne=function(t,e){try{re(ee,t,{value:e,configurable:!0,writable:!0})}catch(r){ee[t]=e}return e},oe=ne,ie="__core-js_shared__",ae=P[ie]||oe(ie,{}),se=ae;(te.exports=function(t,e){return se[t]||(se[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.25.5",mode:"global",copyright:"\xa9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.5/LICENSE",source:"https://github.com/zloirock/core-js"});var le=pt,ce=Object,ue=function(t){return ce(le(t))},fe=ue,de=ot({}.hasOwnProperty),pe=Object.hasOwn||function(t,e){return de(fe(t),e)},he=ot,ve=0,ge=Math.random(),me=he(1..toString),be=function(t){return"Symbol("+(void 0===t?"":t)+")_"+me(++ve+ge,36)},ye=P,we=te.exports,Ee=pe,Oe=be,Ce=It,Te=zt,Le=we("wks"),Se=ye.Symbol,Ae=Se&&Se.for,_e=Te?Se:Se&&Se.withoutSetter||Oe,Re=function(t){if(!Ee(Le,t)||!Ce&&"string"!=typeof Le[t]){var e="Symbol."+t;Ce&&Ee(Se,t)?Le[t]=Se[t]:Le[t]=Te&&Ae?Ae(e):_e(e)}return Le[t]},Me=B,xe=Ct,Pe=Ut,ke=function(t,e){var r=t[e];return Gt(r)?void 0:Xt(r)},je=function(t,e){var r,n;if("string"===e&&Zt(r=t.toString)&&!Jt(n=Kt(r,t)))return n;if(Zt(r=t.valueOf)&&!Jt(n=Kt(r,t)))return n;if("string"!==e&&Zt(r=t.toString)&&!Jt(n=Kt(r,t)))return n;throw qt("Can't convert object to primitive value")},Ne=TypeError,Ie=Re("toPrimitive"),ze=function(t,e){if(!xe(t)||Pe(t))return t;var r,n=ke(t,Ie);if(n){if(void 0===e&&(e="default"),r=Me(n,t,e),!xe(r)||Pe(r))return r;throw Ne("Can't convert object to primitive value")}return void 0===e&&(e="number"),je(t,e)},He=Ut,Be=function(t){var e=ze(t,"string");return He(e)?e:e+""},De=Ct,Fe=P.document,Ue=De(Fe)&&De(Fe.createElement),We=function(t){return Ue?Fe.createElement(t):{}},Ve=We,Ye=!N&&!j((function(){return 7!=Object.defineProperty(Ve("div"),"a",{get:function(){return 7}}).a})),$e=N,Qe=B,Xe=D,Ge=$,Ke=gt,Ze=Be,Je=pe,qe=Ye,tr=Object.getOwnPropertyDescriptor;k.f=$e?tr:function(t,e){if(t=Ke(t),e=Ze(e),qe)try{return tr(t,e)}catch(r){}if(Je(t,e))return Ge(!Qe(Xe.f,t,e),t[e])};var er={},rr=N&&j((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),nr=Ct,or=String,ir=TypeError,ar=function(t){if(nr(t))return t;throw ir(or(t)+" is not an object")},sr=N,lr=Ye,cr=rr,ur=ar,fr=Be,dr=TypeError,pr=Object.defineProperty,hr=Object.getOwnPropertyDescriptor,vr="enumerable",gr="configurable",mr="writable";er.f=sr?cr?function(t,e,r){if(ur(t),e=fr(e),ur(r),"function"==typeof t&&"prototype"===e&&"value"in r&&mr in r&&!r[mr]){var n=hr(t,e);n&&n[mr]&&(t[e]=r.value,r={configurable:gr in r?r[gr]:n[gr],enumerable:vr in r?r[vr]:n[vr],writable:!1})}return pr(t,e,r)}:pr:function(t,e,r){if(ur(t),e=fr(e),ur(r),lr)try{return pr(t,e,r)}catch(n){}if("get"in r||"set"in r)throw dr("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var br=er,yr=$,wr=N?function(t,e,r){return br.f(t,e,yr(1,r))}:function(t,e,r){return t[e]=r,t},Er={exports:{}},Or=N,Cr=pe,Tr=Function.prototype,Lr=Or&&Object.getOwnPropertyDescriptor,Sr=Cr(Tr,"name"),Ar={EXISTS:Sr,PROPER:Sr&&"something"===function(){}.name,CONFIGURABLE:Sr&&(!Or||Or&&Lr(Tr,"name").configurable)},_r=wt,Rr=ae,Mr=ot(Function.toString);_r(Rr.inspectSource)||(Rr.inspectSource=function(t){return Mr(t)});var xr,Pr,kr,jr=Rr.inspectSource,Nr=wt,Ir=P.WeakMap,zr=Nr(Ir)&&/native code/.test(String(Ir)),Hr=te.exports,Br=be,Dr=Hr("keys"),Fr=function(t){return Dr[t]||(Dr[t]=Br(t))},Ur={},Wr=zr,Vr=P,Yr=Ct,$r=wr,Qr=pe,Xr=ae,Gr=Fr,Kr=Ur,Zr="Object already initialized",Jr=Vr.TypeError,qr=Vr.WeakMap;if(Wr||Xr.state){var tn=Xr.state||(Xr.state=new qr);tn.get=tn.get,tn.has=tn.has,tn.set=tn.set,xr=function(t,e){if(tn.has(t))throw Jr(Zr);return e.facade=t,tn.set(t,e),e},Pr=function(t){return tn.get(t)||{}},kr=function(t){return tn.has(t)}}else{var en=Gr("state");Kr[en]=!0,xr=function(t,e){if(Qr(t,en))throw Jr(Zr);return e.facade=t,$r(t,en,e),e},Pr=function(t){return Qr(t,en)?t[en]:{}},kr=function(t){return Qr(t,en)}}var rn={set:xr,get:Pr,has:kr,enforce:function(t){return kr(t)?Pr(t):xr(t,{})},getterFor:function(t){return function(e){var r;if(!Yr(e)||(r=Pr(e)).type!==t)throw Jr("Incompatible receiver, "+t+" required");return r}}},nn=j,on=wt,an=pe,sn=N,ln=Ar.CONFIGURABLE,cn=jr,un=rn.enforce,fn=rn.get,dn=Object.defineProperty,pn=sn&&!nn((function(){return 8!==dn((function(){}),"length",{value:8}).length})),hn=String(String).split("String"),vn=Er.exports=function(t,e,r){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!an(t,"name")||ln&&t.name!==e)&&(sn?dn(t,"name",{value:e,configurable:!0}):t.name=e),pn&&r&&an(r,"arity")&&t.length!==r.arity&&dn(t,"length",{value:r.arity});try{r&&an(r,"constructor")&&r.constructor?sn&&dn(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(o){}var n=un(t);return an(n,"source")||(n.source=hn.join("string"==typeof e?e:"")),t};Function.prototype.toString=vn((function(){return on(this)&&fn(this).source||cn(this)}),"toString");var gn=wt,mn=er,bn=Er.exports,yn=ne,wn={},En=Math.ceil,On=Math.floor,Cn=Math.trunc||function(t){var e=+t;return(e>0?On:En)(e)},Tn=function(t){var e=+t;return e!=e||0===e?0:Cn(e)},Ln=Tn,Sn=Math.max,An=Math.min,_n=Tn,Rn=Math.min,Mn=function(t){return t>0?Rn(_n(t),9007199254740991):0},xn=function(t){return Mn(t.length)},Pn=gt,kn=function(t,e){var r=Ln(t);return r<0?Sn(r+e,0):An(r,e)},jn=xn,Nn=function(t){return function(e,r,n){var o,i=Pn(e),a=jn(i),s=kn(n,a);if(t&&r!=r){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((t||s in i)&&i[s]===r)return t||s||0;return!t&&-1}},In={includes:Nn(!0),indexOf:Nn(!1)},zn=pe,Hn=gt,Bn=In.indexOf,Dn=Ur,Fn=ot([].push),Un=function(t,e){var r,n=Hn(t),o=0,i=[];for(r in n)!zn(Dn,r)&&zn(n,r)&&Fn(i,r);for(;e.length>o;)zn(n,r=e[o++])&&(~Bn(i,r)||Fn(i,r));return i},Wn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Vn=Un,Yn=Wn.concat("length","prototype");wn.f=Object.getOwnPropertyNames||function(t){return Vn(t,Yn)};var $n={};$n.f=Object.getOwnPropertySymbols;var Qn=St,Xn=wn,Gn=$n,Kn=ar,Zn=ot([].concat),Jn=Qn("Reflect","ownKeys")||function(t){var e=Xn.f(Kn(t)),r=Gn.f;return r?Zn(e,r(t)):e},qn=pe,to=Jn,eo=k,ro=er,no=j,oo=wt,io=/#|\.prototype\./,ao=function(t,e){var r=lo[so(t)];return r==uo||r!=co&&(oo(e)?no(e):!!e)},so=ao.normalize=function(t){return String(t).replace(io,".").toLowerCase()},lo=ao.data={},co=ao.NATIVE="N",uo=ao.POLYFILL="P",fo=ao,po=P,ho=k.f,vo=wr,go=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(gn(r)&&bn(r,i,n),n.global)o?t[e]=r:yn(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(a){}o?t[e]=r:mn.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},mo=ne,bo=function(t,e,r){for(var n=to(e),o=ro.f,i=eo.f,a=0;a<n.length;a++){var s=n[a];qn(t,s)||r&&qn(r,s)||o(t,s,i(e,s))}},yo=fo,wo=Qt,Eo=I,Oo=ot(ot.bind),Co=et,To=Array.isArray||function(t){return"Array"==Co(t)},Lo={};Lo[Re("toStringTag")]="z";var So="[object z]"===String(Lo),Ao=wt,_o=et,Ro=Re("toStringTag"),Mo=Object,xo="Arguments"==_o(function(){return arguments}()),Po=ot,ko=j,jo=wt,No=So?_o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(r){}}(e=Mo(t),Ro))?r:xo?_o(e):"Object"==(n=_o(e))&&Ao(e.callee)?"Arguments":n},Io=jr,zo=function(){},Ho=[],Bo=St("Reflect","construct"),Do=/^\s*(?:class|function)\b/,Fo=Po(Do.exec),Uo=!Do.exec(zo),Wo=function(t){if(!jo(t))return!1;try{return Bo(zo,Ho,t),!0}catch(e){return!1}},Vo=function(t){if(!jo(t))return!1;switch(No(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Uo||!!Fo(Do,Io(t))}catch(e){return!0}};Vo.sham=!0;var Yo=!Bo||ko((function(){var t;return Wo(Wo.call)||!Wo(Object)||!Wo((function(){t=!0}))||t}))?Vo:Wo,$o=To,Qo=Yo,Xo=Ct,Go=Re("species"),Ko=Array,Zo=function(t){var e;return $o(t)&&(e=t.constructor,(Qo(e)&&(e===Ko||$o(e.prototype))||Xo(e)&&null===(e=e[Go]))&&(e=void 0)),void 0===e?Ko:e},Jo=function(t,e){return wo(t),void 0===e?t:Eo?Oo(t,e):function(){return t.apply(e,arguments)}},qo=ct,ti=ue,ei=xn,ri=function(t,e){return new(Zo(t))(0===e?0:e)},ni=ot([].push),oi=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,a=7==t,s=5==t||i;return function(l,c,u,f){for(var d,p,h=ti(l),v=qo(h),g=Jo(c,u),m=ei(v),b=0,y=f||ri,w=e?y(l,m):r||a?y(l,0):void 0;m>b;b++)if((s||b in v)&&(p=g(d=v[b],b,h),t))if(e)w[b]=p;else if(p)switch(t){case 3:return!0;case 5:return d;case 6:return b;case 2:ni(w,d)}else switch(t){case 4:return!1;case 7:ni(w,d)}return i?-1:n||o?o:w}},ii={forEach:oi(0),map:oi(1),filter:oi(2),some:oi(3),every:oi(4),find:oi(5),findIndex:oi(6),filterReject:oi(7)},ai={},si=Un,li=Wn,ci=Object.keys||function(t){return si(t,li)},ui=N,fi=rr,di=er,pi=ar,hi=gt,vi=ci;ai.f=ui&&!fi?Object.defineProperties:function(t,e){pi(t);for(var r,n=hi(e),o=vi(e),i=o.length,a=0;i>a;)di.f(t,r=o[a++],n[r]);return t};var gi,mi=St("document","documentElement"),bi=ar,yi=ai,wi=Wn,Ei=Ur,Oi=mi,Ci=We,Ti="prototype",Li="script",Si=Fr("IE_PROTO"),Ai=function(){},_i=function(t){return"<"+Li+">"+t+"</"+Li+">"},Ri=function(t){t.write(_i("")),t.close();var e=t.parentWindow.Object;return t=null,e},Mi=function(){try{gi=new ActiveXObject("htmlfile")}catch(o){}var t,e,r;Mi="undefined"!=typeof document?document.domain&&gi?Ri(gi):(e=Ci("iframe"),r="java"+Li+":",e.style.display="none",Oi.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(_i("document.F=Object")),t.close(),t.F):Ri(gi);for(var n=wi.length;n--;)delete Mi[Ti][wi[n]];return Mi()};Ei[Si]=!0;var xi=Re,Pi=Object.create||function(t,e){var r;return null!==t?(Ai[Ti]=bi(t),r=new Ai,Ai[Ti]=null,r[Si]=t):r=Mi(),void 0===e?r:yi.f(r,e)},ki=er.f,ji=xi("unscopables"),Ni=Array.prototype;null==Ni[ji]&&ki(Ni,ji,{configurable:!0,value:Pi(null)});var Ii=function(t,e){var r,n,o,i,a,s=t.target,l=t.global,c=t.stat;if(r=l?po:c?po[s]||mo(s,{}):(po[s]||{}).prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(a=ho(r,n))&&a.value:r[n],!yo(l?n:s+(c?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;bo(i,o)}(t.sham||o&&o.sham)&&vo(i,"sham",!0),go(r,n,i,t)}},zi=ii.find,Hi=function(t){Ni[ji][t]=!0},Bi="find",Di=!0;Bi in[]&&Array(1)[Bi]((function(){Di=!1})),Ii({target:"Array",proto:!0,forced:Di},{find:function(t){return zi(this,t,arguments.length>1?arguments[1]:void 0)}}),Hi(Bi);var Fi={HIDE:"__react_tooltip_hide_event",REBUILD:"__react_tooltip_rebuild_event",SHOW:"__react_tooltip_show_event"},Ui=function(t,e){var r;"function"==typeof window.CustomEvent?r=new window.CustomEvent(t,{detail:e}):(r=document.createEvent("Event")).initEvent(t,!1,!0,e),window.dispatchEvent(r)};var Wi=function(t,e){var r=this.state.show,n=this.props.id,o=this.isCapture(e.currentTarget),i=e.currentTarget.getAttribute("currentItem");o||e.stopPropagation(),r&&"true"===i?t||this.hideTooltip(e):(e.currentTarget.setAttribute("currentItem","true"),Vi(e.currentTarget,this.getTargetArray(n)),this.showTooltip(e))},Vi=function(t,e){for(var r=0;r<e.length;r++)t!==e[r]?e[r].setAttribute("currentItem","false"):e[r].setAttribute("currentItem","true")},Yi={id:"9b69f92e-d3fe-498b-b1b4-c5e63a51b0cf",set:function(t,e,r){this.id in t?t[this.id][e]=r:Object.defineProperty(t,this.id,{configurable:!0,value:O({},e,r)})},get:function(t,e){var r=t[this.id];if(void 0!==r)return r[e]}};var $i=function(t,e,r){for(var n,o,i=e.respectEffect,a=void 0!==i&&i,s=e.customEvent,l=void 0!==s&&s,c=this.props.id,u=null,f=r.target;null===u&&null!==f;)o=f,u=f.getAttribute("data-tip")||null,n=f.getAttribute("data-for")||null,f=f.parentElement;if(f=o||r.target,!this.isCustomEvent(f)||l){var d=null==c&&null==n||n===c;if(null!=u&&(!a||"float"===this.getEffect(f))&&d){var p=function(t){var e={};for(var r in t)"function"==typeof t[r]?e[r]=t[r].bind(t):e[r]=t[r];return e}(r);p.currentTarget=f,t(p)}}},Qi=function(t,e){var r={};return t.forEach((function(t){var n=t.getAttribute(e);n&&n.split(" ").forEach((function(t){return r[t]=!0}))})),r},Xi=function(){return document.getElementsByTagName("body")[0]};function Gi(t,e,r,n,o,i,a){var s=Ki(r),l=s.width,c=s.height,u=Ki(e),f=u.width,d=u.height,p=Zi(t,e,i),h=p.mouseX,v=p.mouseY,g=Ji(i,f,d,l,c),m=qi(a),b=m.extraOffsetX,y=m.extraOffsetY,w=window.innerWidth,E=window.innerHeight,O=ta(r),C=O.parentTop,T=O.parentLeft,L=function(t){var e=g[t].l;return h+e+b},S=function(t){var e=g[t].t;return v+e+y},A=function(t){return function(t){var e=g[t].r;return h+e+b}(t)>w},_=function(t){return function(t){var e=g[t].b;return v+e+y}(t)>E},M=function(t){return function(t){return L(t)<0}(t)||A(t)||function(t){return S(t)<0}(t)||_(t)},x=function(t){return!M(t)},P={top:x("top"),bottom:x("bottom"),left:x("left"),right:x("right")};var k,j=function(){var t,e=R(o.split(",").concat(n,["top","bottom","left","right"]));try{for(e.s();!(t=e.n()).done;){var r=t.value;if(P[r])return r}}catch(i){e.e(i)}finally{e.f()}return n}(),N=!1;return j&&j!==n&&(N=!0,k=j),N?{isNewState:!0,newState:{place:k}}:{isNewState:!1,position:{left:parseInt(L(n)-T,10),top:parseInt(S(n)-C,10)}}}var Ki=function(t){var e=t.getBoundingClientRect(),r=e.height,n=e.width;return{height:parseInt(r,10),width:parseInt(n,10)}},Zi=function(t,e,r){var n=e.getBoundingClientRect(),o=n.top,i=n.left,a=Ki(e),s=a.width,l=a.height;return"float"===r?{mouseX:t.clientX,mouseY:t.clientY}:{mouseX:i+s/2,mouseY:o+l/2}},Ji=function(t,e,r,n,o){var i,a,s,l;return"float"===t?(i={l:-n/2,r:n/2,t:-(o+3+2),b:-3},s={l:-n/2,r:n/2,t:15,b:o+3+2+12},l={l:-(n+3+2),r:-3,t:-o/2,b:o/2},a={l:3,r:n+3+2,t:-o/2,b:o/2}):"solid"===t&&(i={l:-n/2,r:n/2,t:-(r/2+o+2),b:-r/2},s={l:-n/2,r:n/2,t:r/2,b:r/2+o+2},l={l:-(n+e/2+2),r:-e/2,t:-o/2,b:o/2},a={l:e/2,r:n+e/2+2,t:-o/2,b:o/2}),{top:i,bottom:s,left:l,right:a}},qi=function(t){var e=0,r=0;for(var n in"[object String]"===Object.prototype.toString.apply(t)&&(t=JSON.parse(t.toString().replace(/'/g,'"'))),t)"top"===n?r-=parseInt(t[n],10):"bottom"===n?r+=parseInt(t[n],10):"left"===n?e-=parseInt(t[n],10):"right"===n&&(e+=parseInt(t[n],10));return{extraOffsetX:e,extraOffsetY:r}},ta=function(t){for(var e=t;e;){var r=window.getComputedStyle(e);if("none"!==r.getPropertyValue("transform")||"transform"===r.getPropertyValue("will-change"))break;e=e.parentElement}return{parentTop:e&&e.getBoundingClientRect().top||0,parentLeft:e&&e.getBoundingClientRect().left||0}};function ea(t,e,r,n){if(e)return e;if(null!=r)return r;if(null===r)return null;var o=/<br\s*\/?>/;return n&&"false"!==n&&o.test(t)?t.split(o).map((function(t,e){return l.createElement("span",{key:e,className:"multi-line"},t)})):t}function ra(t){var e={};return Object.keys(t).filter((function(t){return/(^aria-\w+$|^role$)/.test(t)})).forEach((function(r){e[r]=t[r]})),e}function na(t){var e=t.length;return t.hasOwnProperty?Array.prototype.slice.call(t):new Array(e).fill().map((function(e){return t[e]}))}var oa={dark:{text:"#fff",background:"#222",border:"transparent",arrow:"#222"},success:{text:"#fff",background:"#8DC572",border:"transparent",arrow:"#8DC572"},warning:{text:"#fff",background:"#F0AD4E",border:"transparent",arrow:"#F0AD4E"},error:{text:"#fff",background:"#BE6464",border:"transparent",arrow:"#BE6464"},info:{text:"#fff",background:"#337AB7",border:"transparent",arrow:"#337AB7"},light:{text:"#222",background:"#fff",border:"transparent",arrow:"#fff"}};var ia,aa,sa="8px 21px",la={tooltip:3,arrow:0};function ca(t,e,r,n,o,i){return function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:sa,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:la,o=e.text,i=e.background,a=e.border,s=e.arrow,l=n.arrow,c=n.tooltip;return"\n \t.".concat(t," {\n\t color: ").concat(o,";\n\t background: ").concat(i,";\n\t border: 1px solid ").concat(a,";\n\t border-radius: ").concat(c,"px;\n\t padding: ").concat(r,";\n \t}\n\n \t.").concat(t,".place-top {\n margin-top: -10px;\n }\n .").concat(t,'.place-top::before {\n content: "";\n background-color: inherit;\n position: absolute;\n z-index: 2;\n width: 20px;\n height: 12px;\n }\n .').concat(t,'.place-top::after {\n content: "";\n position: absolute;\n width: 10px;\n height: 10px;\n border-top-right-radius: ').concat(l,"px;\n border: 1px solid ").concat(a,";\n background-color: ").concat(s,";\n z-index: -2;\n bottom: -6px;\n left: 50%;\n margin-left: -6px;\n transform: rotate(135deg);\n }\n\n .").concat(t,".place-bottom {\n margin-top: 10px;\n }\n .").concat(t,'.place-bottom::before {\n content: "";\n background-color: inherit;\n position: absolute;\n z-index: -1;\n width: 18px;\n height: 10px;\n }\n .').concat(t,'.place-bottom::after {\n content: "";\n position: absolute;\n width: 10px;\n height: 10px;\n border-top-right-radius: ').concat(l,"px;\n border: 1px solid ").concat(a,";\n background-color: ").concat(s,";\n z-index: -2;\n top: -6px;\n left: 50%;\n margin-left: -6px;\n transform: rotate(45deg);\n }\n\n .").concat(t,".place-left {\n margin-left: -10px;\n }\n .").concat(t,'.place-left::before {\n content: "";\n background-color: inherit;\n position: absolute;\n z-index: -1;\n width: 10px;\n height: 18px;\n }\n .').concat(t,'.place-left::after {\n content: "";\n position: absolute;\n width: 10px;\n height: 10px;\n border-top-right-radius: ').concat(l,"px;\n border: 1px solid ").concat(a,";\n background-color: ").concat(s,";\n z-index: -2;\n right: -6px;\n top: 50%;\n margin-top: -6px;\n transform: rotate(45deg);\n }\n\n .").concat(t,".place-right {\n margin-left: 10px;\n }\n .").concat(t,'.place-right::before {\n content: "";\n background-color: inherit;\n position: absolute;\n z-index: -1;\n width: 10px;\n height: 18px;\n }\n .').concat(t,'.place-right::after {\n content: "";\n position: absolute;\n width: 10px;\n height: 10px;\n border-top-right-radius: ').concat(l,"px;\n border: 1px solid ").concat(a,";\n background-color: ").concat(s,";\n z-index: -2;\n left: -6px;\n top: 50%;\n margin-top: -6px;\n transform: rotate(-135deg);\n }\n ")}(t,function(t,e,r){var n=t.text,o=t.background,i=t.border,a=t.arrow?t.arrow:t.background,s=function(t){return oa[t]?w({},oa[t]):void 0}(e);n&&(s.text=n);o&&(s.background=o);r&&(s.border=i||("light"===e?"black":"white"));a&&(s.arrow=a);return s}(e,r,n),o,i)}var ua,fa=function(t){t.hide=function(t){Ui(Fi.HIDE,{target:t})},t.rebuild=function(){Ui(Fi.REBUILD)},t.show=function(t){Ui(Fi.SHOW,{target:t})},t.prototype.globalRebuild=function(){this.mount&&(this.unbindListener(),this.bindListener())},t.prototype.globalShow=function(t){if(this.mount){var e=!!(t&&t.detail&&t.detail.target);this.showTooltip({currentTarget:e&&t.detail.target},!0)}},t.prototype.globalHide=function(t){if(this.mount){var e=!!(t&&t.detail&&t.detail.target);this.hideTooltip({currentTarget:e&&t.detail.target},e)}}}(ia=function(t){t.prototype.bindWindowEvents=function(t){window.removeEventListener(Fi.HIDE,this.globalHide),window.addEventListener(Fi.HIDE,this.globalHide,!1),window.removeEventListener(Fi.REBUILD,this.globalRebuild),window.addEventListener(Fi.REBUILD,this.globalRebuild,!1),window.removeEventListener(Fi.SHOW,this.globalShow),window.addEventListener(Fi.SHOW,this.globalShow,!1),t&&(window.removeEventListener("resize",this.onWindowResize),window.addEventListener("resize",this.onWindowResize,!1))},t.prototype.unbindWindowEvents=function(){window.removeEventListener(Fi.HIDE,this.globalHide),window.removeEventListener(Fi.REBUILD,this.globalRebuild),window.removeEventListener(Fi.SHOW,this.globalShow),window.removeEventListener("resize",this.onWindowResize)},t.prototype.onWindowResize=function(){this.mount&&this.hideTooltip()}}(ia=function(t){t.prototype.isCustomEvent=function(t){return this.state.event||!!t.getAttribute("data-event")},t.prototype.customBindListener=function(t){var e=this,r=this.state,n=r.event,o=r.eventOff,i=t.getAttribute("data-event")||n,a=t.getAttribute("data-event-off")||o;i.split(" ").forEach((function(r){t.removeEventListener(r,Yi.get(t,r));var n=Wi.bind(e,a);Yi.set(t,r,n),t.addEventListener(r,n,!1)})),a&&a.split(" ").forEach((function(r){t.removeEventListener(r,e.hideTooltip),t.addEventListener(r,e.hideTooltip,!1)}))},t.prototype.customUnbindListener=function(t){var e=this.state,r=e.event,n=e.eventOff,o=r||t.getAttribute("data-event"),i=n||t.getAttribute("data-event-off");t.removeEventListener(o,Yi.get(t,r)),i&&t.removeEventListener(i,this.hideTooltip)}}(ia=function(t){t.prototype.isCapture=function(t){return t&&"true"===t.getAttribute("data-iscapture")||this.props.isCapture||!1}}(ia=function(t){t.prototype.getEffect=function(t){return t.getAttribute("data-effect")||this.props.effect||"float"}}(ia=function(t){t.prototype.isBodyMode=function(){return!!this.props.bodyMode},t.prototype.bindBodyListener=function(t){var e=this,r=this.state,n=r.event,o=r.eventOff,i=r.possibleCustomEvents,a=r.possibleCustomEventsOff,s=Xi(),l=Qi(t,"data-event"),c=Qi(t,"data-event-off");null!=n&&(l[n]=!0),null!=o&&(c[o]=!0),i.split(" ").forEach((function(t){return l[t]=!0})),a.split(" ").forEach((function(t){return c[t]=!0})),this.unbindBodyListener(s);var u=this.bodyModeListeners={};for(var f in null==n&&(u.mouseover=$i.bind(this,this.showTooltip,{}),u.mousemove=$i.bind(this,this.updateTooltip,{respectEffect:!0}),u.mouseout=$i.bind(this,this.hideTooltip,{})),l)u[f]=$i.bind(this,(function(t){var r=t.currentTarget.getAttribute("data-event-off")||o;Wi.call(e,r,t)}),{customEvent:!0});for(var d in c)u[d]=$i.bind(this,this.hideTooltip,{customEvent:!0});for(var p in u)s.addEventListener(p,u[p])},t.prototype.unbindBodyListener=function(t){t=t||Xi();var e=this.bodyModeListeners;for(var r in e)t.removeEventListener(r,e[r])}}((aa=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&L(t,e)}(i,t);var e,r,n,o=A(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t)).state={uuid:t.uuid||"t"+b(),place:t.place||"top",desiredPlace:t.place||"top",type:t.type||"dark",effect:t.effect||"float",show:!1,border:!1,borderClass:"border",customColors:{},customRadius:{},offset:{},padding:t.padding,extraClass:"",html:!1,delayHide:0,delayShow:0,event:t.event||null,eventOff:t.eventOff||null,currentEvent:null,currentTarget:null,ariaProps:ra(t),isEmptyTip:!1,disable:!1,possibleCustomEvents:t.possibleCustomEvents||"",possibleCustomEventsOff:t.possibleCustomEventsOff||"",originTooltip:null,isMultiline:!1},e.bind(["showTooltip","updateTooltip","hideTooltip","hideTooltipOnScroll","getTooltipContent","globalRebuild","globalShow","globalHide","onWindowResize","mouseOnToolTip"]),e.mount=!0,e.delayShowLoop=null,e.delayHideLoop=null,e.delayReshow=null,e.intervalUpdateContent=null,e}return e=i,r=[{key:"bind",value:function(t){var e=this;t.forEach((function(t){e[t]=e[t].bind(e)}))}},{key:"componentDidMount",value:function(){var t=this.props;t.insecure;var e=t.resizeHide,r=t.disableInternalStyle;this.mount=!0,this.bindListener(),this.bindWindowEvents(e),r||this.injectStyles()}},{key:"componentWillUnmount",value:function(){this.mount=!1,this.clearTimer(),this.unbindListener(),this.removeScrollListener(this.state.currentTarget),this.unbindWindowEvents()}},{key:"injectStyles",value:function(){var t=this.tooltipRef;if(t){for(var e,r=t.parentNode;r.parentNode;)r=r.parentNode;switch(r.constructor.name){case"Document":case"HTMLDocument":case void 0:e=r.head;break;default:e=r}if(!e.querySelector("style[data-react-tooltip]")){var n=document.createElement("style");n.textContent='.__react_component_tooltip {\n border-radius: 3px;\n display: inline-block;\n font-size: 13px;\n left: -999em;\n opacity: 0;\n position: fixed;\n pointer-events: none;\n transition: opacity 0.3s ease-out;\n top: -999em;\n visibility: hidden;\n z-index: 999;\n}\n.__react_component_tooltip.allow_hover, .__react_component_tooltip.allow_click {\n pointer-events: auto;\n}\n.__react_component_tooltip::before, .__react_component_tooltip::after {\n content: "";\n width: 0;\n height: 0;\n position: absolute;\n}\n.__react_component_tooltip.show {\n opacity: 0.9;\n margin-top: 0;\n margin-left: 0;\n visibility: visible;\n}\n.__react_component_tooltip.place-top::before {\n bottom: 0;\n left: 50%;\n margin-left: -11px;\n}\n.__react_component_tooltip.place-bottom::before {\n top: 0;\n left: 50%;\n margin-left: -11px;\n}\n.__react_component_tooltip.place-left::before {\n right: 0;\n top: 50%;\n margin-top: -9px;\n}\n.__react_component_tooltip.place-right::before {\n left: 0;\n top: 50%;\n margin-top: -9px;\n}\n.__react_component_tooltip .multi-line {\n display: block;\n padding: 2px 0;\n text-align: center;\n}',n.setAttribute("data-react-tooltip","true"),e.appendChild(n)}}}},{key:"mouseOnToolTip",value:function(){return!(!this.state.show||!this.tooltipRef)&&(this.tooltipRef.matches||(this.tooltipRef.msMatchesSelector?this.tooltipRef.matches=this.tooltipRef.msMatchesSelector:this.tooltipRef.matches=this.tooltipRef.mozMatchesSelector),this.tooltipRef.matches(":hover"))}},{key:"getTargetArray",value:function(t){var e,r=[];if(t){var n=t.replace(/\\/g,"\\\\").replace(/"/g,'\\"');e='[data-tip][data-for="'.concat(n,'"]')}else e="[data-tip]:not([data-for])";return na(document.getElementsByTagName("*")).filter((function(t){return t.shadowRoot})).forEach((function(t){r=r.concat(na(t.shadowRoot.querySelectorAll(e)))})),r.concat(na(document.querySelectorAll(e)))}},{key:"bindListener",value:function(){var t=this,e=this.props,r=e.id,n=e.globalEventOff,o=e.isCapture,i=this.getTargetArray(r);i.forEach((function(e){null===e.getAttribute("currentItem")&&e.setAttribute("currentItem","false"),t.unbindBasicListener(e),t.isCustomEvent(e)&&t.customUnbindListener(e)})),this.isBodyMode()?this.bindBodyListener(i):i.forEach((function(e){var r=t.isCapture(e),n=t.getEffect(e);t.isCustomEvent(e)?t.customBindListener(e):(e.addEventListener("mouseenter",t.showTooltip,r),e.addEventListener("focus",t.showTooltip,r),"float"===n&&e.addEventListener("mousemove",t.updateTooltip,r),e.addEventListener("mouseleave",t.hideTooltip,r),e.addEventListener("blur",t.hideTooltip,r))})),n&&(window.removeEventListener(n,this.hideTooltip),window.addEventListener(n,this.hideTooltip,o)),this.bindRemovalTracker()}},{key:"unbindListener",value:function(){var t=this,e=this.props,r=e.id,n=e.globalEventOff;this.isBodyMode()?this.unbindBodyListener():this.getTargetArray(r).forEach((function(e){t.unbindBasicListener(e),t.isCustomEvent(e)&&t.customUnbindListener(e)})),n&&window.removeEventListener(n,this.hideTooltip),this.unbindRemovalTracker()}},{key:"unbindBasicListener",value:function(t){var e=this.isCapture(t);t.removeEventListener("mouseenter",this.showTooltip,e),t.removeEventListener("mousemove",this.updateTooltip,e),t.removeEventListener("mouseleave",this.hideTooltip,e)}},{key:"getTooltipContent",value:function(){var t,e=this.props,r=e.getContent,n=e.children;return r&&(t=Array.isArray(r)?r[0]&&r[0](this.state.originTooltip):r(this.state.originTooltip)),ea(this.state.originTooltip,n,t,this.state.isMultiline)}},{key:"isEmptyTip",value:function(t){return"string"==typeof t&&""===t||null===t}},{key:"showTooltip",value:function(t,e){if(this.tooltipRef){if(e&&!this.getTargetArray(this.props.id).some((function(e){return e===t.currentTarget})))return;var r=this.props,n=r.multiline,o=r.getContent,i=t.currentTarget.getAttribute("data-tip"),a=t.currentTarget.getAttribute("data-multiline")||n||!1,s=t instanceof window.FocusEvent||e,l=!0;t.currentTarget.getAttribute("data-scroll-hide")?l="true"===t.currentTarget.getAttribute("data-scroll-hide"):null!=this.props.scrollHide&&(l=this.props.scrollHide),t&&t.currentTarget&&t.currentTarget.setAttribute&&t.currentTarget.setAttribute("aria-describedby",this.props.id||this.state.uuid);var c=t.currentTarget.getAttribute("data-place")||this.props.place||"top",u=s?"solid":this.getEffect(t.currentTarget),f=t.currentTarget.getAttribute("data-offset")||this.props.offset||{},d=Gi(t,t.currentTarget,this.tooltipRef,c.split(",")[0],c,u,f);d.position&&this.props.overridePosition&&(d.position=this.props.overridePosition(d.position,t,t.currentTarget,this.tooltipRef,c,c,u,f));var p=d.isNewState?d.newState.place:c.split(",")[0];this.clearTimer();var h=t.currentTarget,v=this.state.show?h.getAttribute("data-delay-update")||this.props.delayUpdate:0,g=this,m=function(){g.setState({originTooltip:i,isMultiline:a,desiredPlace:c,place:p,type:h.getAttribute("data-type")||g.props.type||"dark",customColors:{text:h.getAttribute("data-text-color")||g.props.textColor||null,background:h.getAttribute("data-background-color")||g.props.backgroundColor||null,border:h.getAttribute("data-border-color")||g.props.borderColor||null,arrow:h.getAttribute("data-arrow-color")||g.props.arrowColor||null},customRadius:{tooltip:h.getAttribute("data-tooltip-radius")||g.props.tooltipRadius||"3",arrow:h.getAttribute("data-arrow-radius")||g.props.arrowRadius||"0"},effect:u,offset:f,padding:h.getAttribute("data-padding")||g.props.padding,html:(h.getAttribute("data-html")?"true"===h.getAttribute("data-html"):g.props.html)||!1,delayShow:h.getAttribute("data-delay-show")||g.props.delayShow||0,delayHide:h.getAttribute("data-delay-hide")||g.props.delayHide||0,delayUpdate:h.getAttribute("data-delay-update")||g.props.delayUpdate||0,border:(h.getAttribute("data-border")?"true"===h.getAttribute("data-border"):g.props.border)||!1,borderClass:h.getAttribute("data-border-class")||g.props.borderClass||"border",extraClass:h.getAttribute("data-class")||g.props.class||g.props.className||"",disable:(h.getAttribute("data-tip-disable")?"true"===h.getAttribute("data-tip-disable"):g.props.disable)||!1,currentTarget:h},(function(){l&&g.addScrollListener(g.state.currentTarget),g.updateTooltip(t),o&&Array.isArray(o)&&(g.intervalUpdateContent=setInterval((function(){if(g.mount){var t=g.props.getContent,e=ea(i,"",t[0](),a),r=g.isEmptyTip(e);g.setState({isEmptyTip:r}),g.updatePosition()}}),o[1]))}))};v?this.delayReshow=setTimeout(m,v):m()}}},{key:"updateTooltip",value:function(t){var e=this,r=this.state,n=r.delayShow,o=r.disable,i=this.props,a=i.afterShow,s=i.disable,l=this.getTooltipContent(),c=t.currentTarget||t.target;if(!this.mouseOnToolTip()&&!(this.isEmptyTip(l)||o||s)){var u=this.state.show?0:parseInt(n,10),f=function(){if(Array.isArray(l)&&l.length>0||l){var r=!e.state.show;e.setState({currentEvent:t,currentTarget:c,show:!0},(function(){e.updatePosition((function(){r&&a&&a(t)}))}))}};this.delayShowLoop&&clearTimeout(this.delayShowLoop),u?this.delayShowLoop=setTimeout(f,u):(this.delayShowLoop=null,f())}}},{key:"listenForTooltipExit",value:function(){this.state.show&&this.tooltipRef&&this.tooltipRef.addEventListener("mouseleave",this.hideTooltip)}},{key:"removeListenerForTooltipExit",value:function(){this.state.show&&this.tooltipRef&&this.tooltipRef.removeEventListener("mouseleave",this.hideTooltip)}},{key:"hideTooltip",value:function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isScroll:!1},o=this.state.disable,i=n.isScroll?0:this.state.delayHide,a=this.props,s=a.afterHide,l=a.disable,c=this.getTooltipContent();if(this.mount&&!(this.isEmptyTip(c)||o||l)){if(e&&(!this.getTargetArray(this.props.id).some((function(e){return e===t.currentTarget}))||!this.state.show))return;t&&t.currentTarget&&t.currentTarget.removeAttribute&&t.currentTarget.removeAttribute("aria-describedby");var u=function(){var e=r.state.show;r.mouseOnToolTip()?r.listenForTooltipExit():(r.removeListenerForTooltipExit(),r.setState({show:!1},(function(){r.removeScrollListener(r.state.currentTarget),e&&s&&s(t)})))};this.clearTimer(),i?this.delayHideLoop=setTimeout(u,parseInt(i,10)):u()}}},{key:"hideTooltipOnScroll",value:function(t,e){this.hideTooltip(t,e,{isScroll:!0})}},{key:"addScrollListener",value:function(t){var e=this.isCapture(t);window.addEventListener("scroll",this.hideTooltipOnScroll,e)}},{key:"removeScrollListener",value:function(t){var e=this.isCapture(t);window.removeEventListener("scroll",this.hideTooltipOnScroll,e)}},{key:"updatePosition",value:function(t){var e=this,r=this.state,n=r.currentEvent,o=r.currentTarget,i=r.place,a=r.desiredPlace,s=r.effect,l=r.offset,c=this.tooltipRef,u=Gi(n,o,c,i,a,s,l);if(u.position&&this.props.overridePosition&&(u.position=this.props.overridePosition(u.position,n,o,c,i,a,s,l)),u.isNewState)return this.setState(u.newState,(function(){e.updatePosition(t)}));t&&"function"==typeof t&&t(),c.style.left=u.position.left+"px",c.style.top=u.position.top+"px"}},{key:"clearTimer",value:function(){this.delayShowLoop&&(clearTimeout(this.delayShowLoop),this.delayShowLoop=null),this.delayHideLoop&&(clearTimeout(this.delayHideLoop),this.delayHideLoop=null),this.delayReshow&&(clearTimeout(this.delayReshow),this.delayReshow=null),this.intervalUpdateContent&&(clearInterval(this.intervalUpdateContent),this.intervalUpdateContent=null)}},{key:"hasCustomColors",value:function(){var t=this;return Boolean(Object.keys(this.state.customColors).find((function(e){return"border"!==e&&t.state.customColors[e]}))||this.state.border&&this.state.customColors.border)}},{key:"render",value:function(){var t=this,e=this.state,r=e.extraClass,n=e.html,o=e.ariaProps,a=e.disable,s=e.uuid,c=this.getTooltipContent(),u=this.isEmptyTip(c),f=this.props.disableInternalStyle?"":ca(this.state.uuid,this.state.customColors,this.state.type,this.state.border,this.state.padding,this.state.customRadius),d="__react_component_tooltip"+" ".concat(this.state.uuid)+(!this.state.show||a||u?"":" show")+(this.state.border?" "+this.state.borderClass:"")+" place-".concat(this.state.place)+" type-".concat(this.hasCustomColors()?"custom":this.state.type)+(this.props.delayUpdate?" allow_hover":"")+(this.props.clickable?" allow_click":""),p=this.props.wrapper;i.supportedWrappers.indexOf(p)<0&&(p=i.defaultProps.wrapper);var h=[d,r].filter(Boolean).join(" ");if(n){var v="".concat(c).concat(f?'\n<style aria-hidden="true">'.concat(f,"</style>"):"");return l.createElement(p,C({className:"".concat(h),id:this.props.id||s,ref:function(e){return t.tooltipRef=e}},o,{"data-id":"tooltip",dangerouslySetInnerHTML:{__html:v}}))}return l.createElement(p,C({className:"".concat(h),id:this.props.id||s},o,{ref:function(e){return t.tooltipRef=e},"data-id":"tooltip"}),f&&l.createElement("style",{dangerouslySetInnerHTML:{__html:f},"aria-hidden":"true"}),c)}}],n=[{key:"propTypes",get:function(){return{uuid:f().string,children:f().any,place:f().string,type:f().string,effect:f().string,offset:f().object,padding:f().string,multiline:f().bool,border:f().bool,borderClass:f().string,textColor:f().string,backgroundColor:f().string,borderColor:f().string,arrowColor:f().string,arrowRadius:f().string,tooltipRadius:f().string,insecure:f().bool,class:f().string,className:f().string,id:f().string,html:f().bool,delayHide:f().number,delayUpdate:f().number,delayShow:f().number,event:f().string,eventOff:f().string,isCapture:f().bool,globalEventOff:f().string,getContent:f().any,afterShow:f().func,afterHide:f().func,overridePosition:f().func,disable:f().bool,scrollHide:f().bool,resizeHide:f().bool,wrapper:f().string,bodyMode:f().bool,possibleCustomEvents:f().string,possibleCustomEventsOff:f().string,clickable:f().bool,disableInternalStyle:f().bool}}},{key:"getDerivedStateFromProps",value:function(t,e){var r=e.ariaProps,n=ra(t);return Object.keys(n).some((function(t){return n[t]!==r[t]}))?w(w({},e),{},{ariaProps:n}):null}}],r&&E(e.prototype,r),n&&E(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(l.Component),O(aa,"defaultProps",{insecure:!0,resizeHide:!0,wrapper:"div",clickable:!1}),O(aa,"supportedWrappers",["div","span"]),O(aa,"displayName","ReactTooltip"),(ua=ia=aa).prototype.bindRemovalTracker=function(){var t=this,e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(null!=e){var r=new e((function(e){for(var r=0;r<e.length;r++)for(var n=e[r],o=0;o<n.removedNodes.length;o++)if(n.removedNodes[o]===t.state.currentTarget)return void t.hideTooltip()}));r.observe(window.document,{childList:!0,subtree:!0}),this.removalTracker=r}},ia=void(ua.prototype.unbindRemovalTracker=function(){this.removalTracker&&(this.removalTracker.disconnect(),this.removalTracker=null)})||ia))||ia)||ia)||ia)||ia)||ia)||ia,da=r(6861),pa=r(4308),ha=r.n(pa);function va(){return i("svg",{width:"20px",height:"20px",viewBox:"0 0 20 20",fill:"currentColor",children:i("path",{d:"M14.4307124,13.5667899 L15.1349452,14.276759 L10.7473676,18.6288871 L6.42783259,14.2738791 L7.13782502,13.5696698 L10.7530744,17.2147744 L14.4307124,13.5667899 Z M4.79130753,8.067524 L16.3824174,11.1733525 L16.1235984,12.1392784 L4.53248848,9.03344983 L4.79130753,8.067524 Z M10.8154102,1.57503552 L15.1349452,5.93004351 L14.4249528,6.63425282 L10.809949,2.98914817 L7.13206544,6.6371327 L6.42783259,5.92716363 L10.8154102,1.57503552 Z",transform:"translate(10.457453, 10.101961) rotate(90.000000) translate(-10.457453, -10.101961) "})})}function ga(){return i("svg",{viewBox:"0 0 20 20",focusable:"false","data-icon":"snippets",width:"20px",height:"20px",fill:"currentColor","aria-hidden":"true",children:i("path",{d:"M15,5 L15,18 L2,18 L2,5 L15,5 Z M14,6 L3,6 L3,17 L14,17 L14,6 Z M18,2 L18,15 L16,15 L16,13.999 L17,14 L17,3 L6,3 L6,4 L5,4 L5,2 L18,2 Z M9,8 L9,11 L12,11 L12,12 L9,12 L9,15 L8,15 L8,12 L5,12 L5,11 L8,11 L8,8 L9,8 Z"})})}const ma=function(t){var e=t.children,r=t.code,n=(0,l.useState)(!1),o=n[0],s=n[1];return a("div",{children:[a("div",{className:[ha().container,!o&&ha().unfoldContainer].filter(Boolean).join(" "),children:[i("div",{className:ha().preview,children:e}),i(fa,{effect:"solid"}),a("div",{className:ha().operations,children:[i("div",{className:ha().item,onClick:function(){(0,da.A)(r)},"data-tip":"\u590d\u5236",children:i(ga,{})}),i("div",{className:ha().item,onClick:function(){return s((function(t){return!t}))},"data-tip":o?"\u6536\u8d77":"\u5c55\u5f00",children:i(va,{})})]})]}),i("div",{className:ha().codeWrapper,children:o&&i(c.A,{children:r,className:"language-jsx",mdxType:"code",originalType:"code",parentName:"pre"})})]})};function ba(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ya(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){ba(t,e,r[e])}))}return t}function wa(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):function(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})),t}var Ea,Oa=Object.defineProperty,Ca=Object.getOwnPropertySymbols,Ta=Object.prototype.hasOwnProperty,La=Object.prototype.propertyIsEnumerable,Sa=(t,e,r)=>e in t?Oa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Aa=(t,e)=>{for(var r in e||(e={}))Ta.call(e,r)&&Sa(t,r,e[r]);if(Ca)for(var r of Ca(e))La.call(e,r)&&Sa(t,r,e[r]);return t},_a=(t,e)=>{var r={};for(var n in t)Ta.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&Ca)for(var n of Ca(t))e.indexOf(n)<0&&La.call(t,n)&&(r[n]=t[n]);return r};(t=>{const e=class{constructor(t,r,n,o){if(this.version=t,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],t<e.MIN_VERSION||t>e.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=4*t+17;let a=[];for(let e=0;e<this.size;e++)a.push(!1);for(let e=0;e<this.size;e++)this.modules.push(a.slice()),this.isFunction.push(a.slice());this.drawFunctionPatterns();const s=this.addEccAndInterleave(n);if(this.drawCodewords(s),-1==o){let t=1e9;for(let e=0;e<8;e++){this.applyMask(e),this.drawFormatBits(e);const r=this.getPenaltyScore();r<t&&(o=e,t=r),this.applyMask(e)}}i(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}static encodeText(r,n){const o=t.QrSegment.makeSegments(r);return e.encodeSegments(o,n)}static encodeBinary(r,n){const o=t.QrSegment.makeBytes(r);return e.encodeSegments([o],n)}static encodeSegments(t,r,o=1,a=40,l=-1,c=!0){if(!(e.MIN_VERSION<=o&&o<=a&&a<=e.MAX_VERSION)||l<-1||l>7)throw new RangeError("Invalid value");let u,f;for(u=o;;u++){const n=8*e.getNumDataCodewords(u,r),o=s.getTotalBits(t,u);if(o<=n){f=o;break}if(u>=a)throw new RangeError("Data too long")}for(const n of[e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH])c&&f<=8*e.getNumDataCodewords(u,n)&&(r=n);let d=[];for(const e of t){n(e.mode.modeBits,4,d),n(e.numChars,e.mode.numCharCountBits(u),d);for(const t of e.getData())d.push(t)}i(d.length==f);const p=8*e.getNumDataCodewords(u,r);i(d.length<=p),n(0,Math.min(4,p-d.length),d),n(0,(8-d.length%8)%8,d),i(d.length%8==0);for(let e=236;d.length<p;e^=253)n(e,8,d);let h=[];for(;8*h.length<d.length;)h.push(0);return d.forEach(((t,e)=>h[e>>>3]|=t<<7-(7&e))),new e(u,r,h,l)}getModule(t,e){return 0<=t&&t<this.size&&0<=e&&e<this.size&&this.modules[e][t]}getModules(){return this.modules}drawFunctionPatterns(){for(let r=0;r<this.size;r++)this.setFunctionModule(6,r,r%2==0),this.setFunctionModule(r,6,r%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const t=this.getAlignmentPatternPositions(),e=t.length;for(let r=0;r<e;r++)for(let n=0;n<e;n++)0==r&&0==n||0==r&&n==e-1||r==e-1&&0==n||this.drawAlignmentPattern(t[r],t[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const e=this.errorCorrectionLevel.formatBits<<3|t;let r=e;for(let o=0;o<10;o++)r=r<<1^1335*(r>>>9);const n=21522^(e<<10|r);i(n>>>15==0);for(let i=0;i<=5;i++)this.setFunctionModule(8,i,o(n,i));this.setFunctionModule(8,7,o(n,6)),this.setFunctionModule(8,8,o(n,7)),this.setFunctionModule(7,8,o(n,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,o(n,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,o(n,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,o(n,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let r=0;r<12;r++)t=t<<1^7973*(t>>>11);const e=this.version<<12|t;i(e>>>18==0);for(let r=0;r<18;r++){const t=o(e,r),n=this.size-11+r%3,i=Math.floor(r/3);this.setFunctionModule(n,i,t),this.setFunctionModule(i,n,t)}}drawFinderPattern(t,e){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){const o=Math.max(Math.abs(n),Math.abs(r)),i=t+n,a=e+r;0<=i&&i<this.size&&0<=a&&a<this.size&&this.setFunctionModule(i,a,2!=o&&4!=o)}}drawAlignmentPattern(t,e){for(let r=-2;r<=2;r++)for(let n=-2;n<=2;n++)this.setFunctionModule(t+n,e+r,1!=Math.max(Math.abs(n),Math.abs(r)))}setFunctionModule(t,e,r){this.modules[e][t]=r,this.isFunction[e][t]=!0}addEccAndInterleave(t){const r=this.version,n=this.errorCorrectionLevel;if(t.length!=e.getNumDataCodewords(r,n))throw new RangeError("Invalid argument");const o=e.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][r],a=e.ECC_CODEWORDS_PER_BLOCK[n.ordinal][r],s=Math.floor(e.getNumRawDataModules(r)/8),l=o-s%o,c=Math.floor(s/o);let u=[];const f=e.reedSolomonComputeDivisor(a);for(let i=0,p=0;i<o;i++){let r=t.slice(p,p+c-a+(i<l?0:1));p+=r.length;const n=e.reedSolomonComputeRemainder(r,f);i<l&&r.push(0),u.push(r.concat(n))}let d=[];for(let e=0;e<u[0].length;e++)u.forEach(((t,r)=>{(e!=c-a||r>=l)&&d.push(t[e])}));return i(d.length==s),d}drawCodewords(t){if(t.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let e=this.size-1;e>=1;e-=2){6==e&&(e=5);for(let n=0;n<this.size;n++)for(let i=0;i<2;i++){const a=e-i,s=!(e+1&2)?this.size-1-n:n;!this.isFunction[s][a]&&r<8*t.length&&(this.modules[s][a]=o(t[r>>>3],7-(7&r)),r++)}}i(r==8*t.length)}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let e=0;e<this.size;e++)for(let r=0;r<this.size;r++){let n;switch(t){case 0:n=(r+e)%2==0;break;case 1:n=e%2==0;break;case 2:n=r%3==0;break;case 3:n=(r+e)%3==0;break;case 4:n=(Math.floor(r/3)+Math.floor(e/2))%2==0;break;case 5:n=r*e%2+r*e%3==0;break;case 6:n=(r*e%2+r*e%3)%2==0;break;case 7:n=((r+e)%2+r*e%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[e][r]&&n&&(this.modules[e][r]=!this.modules[e][r])}}getPenaltyScore(){let t=0;for(let i=0;i<this.size;i++){let r=!1,n=0,o=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[i][a]==r?(n++,5==n?t+=e.PENALTY_N1:n>5&&t++):(this.finderPenaltyAddHistory(n,o),r||(t+=this.finderPenaltyCountPatterns(o)*e.PENALTY_N3),r=this.modules[i][a],n=1);t+=this.finderPenaltyTerminateAndCount(r,n,o)*e.PENALTY_N3}for(let i=0;i<this.size;i++){let r=!1,n=0,o=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[a][i]==r?(n++,5==n?t+=e.PENALTY_N1:n>5&&t++):(this.finderPenaltyAddHistory(n,o),r||(t+=this.finderPenaltyCountPatterns(o)*e.PENALTY_N3),r=this.modules[a][i],n=1);t+=this.finderPenaltyTerminateAndCount(r,n,o)*e.PENALTY_N3}for(let i=0;i<this.size-1;i++)for(let r=0;r<this.size-1;r++){const n=this.modules[i][r];n==this.modules[i][r+1]&&n==this.modules[i+1][r]&&n==this.modules[i+1][r+1]&&(t+=e.PENALTY_N2)}let r=0;for(const e of this.modules)r=e.reduce(((t,e)=>t+(e?1:0)),r);const n=this.size*this.size,o=Math.ceil(Math.abs(20*r-10*n)/n)-1;return i(0<=o&&o<=9),t+=o*e.PENALTY_N4,i(0<=t&&t<=2568888),t}getAlignmentPatternPositions(){if(1==this.version)return[];{const t=Math.floor(this.version/7)+2,e=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*t-2));let r=[6];for(let n=this.size-7;r.length<t;n-=e)r.splice(1,0,n);return r}}static getNumRawDataModules(t){if(t<e.MIN_VERSION||t>e.MAX_VERSION)throw new RangeError("Version number out of range");let r=(16*t+128)*t+64;if(t>=2){const e=Math.floor(t/7)+2;r-=(25*e-10)*e-55,t>=7&&(r-=36)}return i(208<=r&&r<=29648),r}static getNumDataCodewords(t,r){return Math.floor(e.getNumRawDataModules(t)/8)-e.ECC_CODEWORDS_PER_BLOCK[r.ordinal][t]*e.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][t]}static reedSolomonComputeDivisor(t){if(t<1||t>255)throw new RangeError("Degree out of range");let r=[];for(let e=0;e<t-1;e++)r.push(0);r.push(1);let n=1;for(let o=0;o<t;o++){for(let t=0;t<r.length;t++)r[t]=e.reedSolomonMultiply(r[t],n),t+1<r.length&&(r[t]^=r[t+1]);n=e.reedSolomonMultiply(n,2)}return r}static reedSolomonComputeRemainder(t,r){let n=r.map((t=>0));for(const o of t){const t=o^n.shift();n.push(0),r.forEach(((r,o)=>n[o]^=e.reedSolomonMultiply(r,t)))}return n}static reedSolomonMultiply(t,e){if(t>>>8!=0||e>>>8!=0)throw new RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^285*(r>>>7),r^=(e>>>n&1)*t;return i(r>>>8==0),r}finderPenaltyCountPatterns(t){const e=t[1];i(e<=3*this.size);const r=e>0&&t[2]==e&&t[3]==3*e&&t[4]==e&&t[5]==e;return(r&&t[0]>=4*e&&t[6]>=e?1:0)+(r&&t[6]>=4*e&&t[0]>=e?1:0)}finderPenaltyTerminateAndCount(t,e,r){return t&&(this.finderPenaltyAddHistory(e,r),e=0),e+=this.size,this.finderPenaltyAddHistory(e,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(t,e){0==e[0]&&(t+=this.size),e.pop(),e.unshift(t)}};let r=e;function n(t,e,r){if(e<0||e>31||t>>>e!=0)throw new RangeError("Value out of range");for(let n=e-1;n>=0;n--)r.push(t>>>n&1)}function o(t,e){return!!(t>>>e&1)}function i(t){if(!t)throw new Error("Assertion error")}r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],t.QrCode=r;const a=class{constructor(t,e,r){if(this.mode=t,this.numChars=e,this.bitData=r,e<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(t){let e=[];for(const r of t)n(r,8,e);return new a(a.Mode.BYTE,t.length,e)}static makeNumeric(t){if(!a.isNumeric(t))throw new RangeError("String contains non-numeric characters");let e=[];for(let r=0;r<t.length;){const o=Math.min(t.length-r,3);n(parseInt(t.substr(r,o),10),3*o+1,e),r+=o}return new a(a.Mode.NUMERIC,t.length,e)}static makeAlphanumeric(t){if(!a.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let e,r=[];for(e=0;e+2<=t.length;e+=2){let o=45*a.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e));o+=a.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e+1)),n(o,11,r)}return e<t.length&&n(a.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e)),6,r),new a(a.Mode.ALPHANUMERIC,t.length,r)}static makeSegments(t){return""==t?[]:a.isNumeric(t)?[a.makeNumeric(t)]:a.isAlphanumeric(t)?[a.makeAlphanumeric(t)]:[a.makeBytes(a.toUtf8ByteArray(t))]}static makeEci(t){let e=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)n(t,8,e);else if(t<16384)n(2,2,e),n(t,14,e);else{if(!(t<1e6))throw new RangeError("ECI assignment value out of range");n(6,3,e),n(t,21,e)}return new a(a.Mode.ECI,0,e)}static isNumeric(t){return a.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return a.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(t,e){let r=0;for(const n of t){const t=n.mode.numCharCountBits(e);if(n.numChars>=1<<t)return 1/0;r+=4+t+n.bitData.length}return r}static toUtf8ByteArray(t){t=encodeURI(t);let e=[];for(let r=0;r<t.length;r++)"%"!=t.charAt(r)?e.push(t.charCodeAt(r)):(e.push(parseInt(t.substr(r+1,2),16)),r+=2);return e}};let s=a;s.NUMERIC_REGEX=/^[0-9]*$/,s.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,s.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",t.QrSegment=s})(Ea||(Ea={})),(t=>{let e;(t=>{const e=class{constructor(t,e){this.ordinal=t,this.formatBits=e}};let r=e;r.LOW=new e(0,1),r.MEDIUM=new e(1,0),r.QUARTILE=new e(2,3),r.HIGH=new e(3,2),t.Ecc=r})(e=t.QrCode||(t.QrCode={}))})(Ea||(Ea={})),(t=>{let e;(t=>{const e=class{constructor(t,e){this.modeBits=t,this.numBitsCharCount=e}numCharCountBits(t){return this.numBitsCharCount[Math.floor((t+7)/17)]}};let r=e;r.NUMERIC=new e(1,[10,12,14]),r.ALPHANUMERIC=new e(2,[9,11,13]),r.BYTE=new e(4,[8,16,16]),r.KANJI=new e(8,[8,10,12]),r.ECI=new e(7,[0,0,0]),t.Mode=r})(e=t.QrSegment||(t.QrSegment={}))})(Ea||(Ea={}));var Ra=Ea,Ma={L:Ra.QrCode.Ecc.LOW,M:Ra.QrCode.Ecc.MEDIUM,Q:Ra.QrCode.Ecc.QUARTILE,H:Ra.QrCode.Ecc.HIGH},xa=128,Pa="L",ka="#FFFFFF",ja="#000000",Na=!1;function Ia(t,e=0){const r=[];return t.forEach((function(t,n){let o=null;t.forEach((function(i,a){if(!i&&null!==o)return r.push(`M${o+e} ${n+e}h${a-o}v1H${o+e}z`),void(o=null);if(a!==t.length-1)i&&null===o&&(o=a);else{if(!i)return;null===o?r.push(`M${a+e},${n+e} h1v1H${a+e}z`):r.push(`M${o+e},${n+e} h${a+1-o}v1H${o+e}z`)}}))})),r.join("")}function za(t,e){return t.slice().map(((t,r)=>r<e.y||r>=e.y+e.h?t:t.map(((t,r)=>(r<e.x||r>=e.x+e.w)&&t))))}function Ha(t,e,r,n){if(null==n)return null;const o=r?4:0,i=t.length+2*o,a=Math.floor(.1*e),s=i/e,l=(n.width||a)*s,c=(n.height||a)*s,u=null==n.x?t.length/2-l/2:n.x*s,f=null==n.y?t.length/2-c/2:n.y*s;let d=null;if(n.excavate){let t=Math.floor(u),e=Math.floor(f);d={x:t,y:e,w:Math.ceil(l+u-t),h:Math.ceil(c+f-e)}}return{x:u,y:f,h:c,w:l,excavation:d}}!function(){try{(new Path2D).addPath(new Path2D)}catch(t){return!1}}();function Ba(t){const e=t,{value:r,size:n=xa,level:o=Pa,bgColor:i=ka,fgColor:a=ja,includeMargin:s=Na,imageSettings:c}=e,u=_a(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let f=Ra.QrCode.encodeText(r,Ma[o]).getModules();const d=s?4:0,p=f.length+2*d,h=Ha(f,n,s,c);let v=null;null!=c&&null!=h&&(null!=h.excavation&&(f=za(f,h.excavation)),v=l.createElement("image",{xlinkHref:c.src,height:h.h,width:h.w,x:h.x+d,y:h.y+d,preserveAspectRatio:"none"}));const g=Ia(f,d);return l.createElement("svg",Aa({height:n,width:n,viewBox:`0 0 ${p} ${p}`},u),l.createElement("path",{fill:i,d:`M0,0 h${p}v${p}H0z`,shapeRendering:"crispEdges"}),l.createElement("path",{fill:a,d:g,shapeRendering:"crispEdges"}),v)}function Da(t){return i("svg",wa(ya({width:"20px",height:"20px",viewBox:"0 0 16 16"},t),{children:a("g",{fill:"currentColor",children:[i("path",{d:"M11.534 7h3.932a.25.25 0 0 1 .192.41l-1.966 2.36a.25.25 0 0 1-.384 0l-1.966-2.36a.25.25 0 0 1 .192-.41zm-11 2h3.932a.25.25 0 0 0 .192-.41L2.692 6.23a.25.25 0 0 0-.384 0L.342 8.59A.25.25 0 0 0 .534 9z"}),i("path",{fillRule:"evenodd",d:"M8 3c-1.552 0-2.94.707-3.857 1.818a.5.5 0 1 1-.771-.636A6.002 6.002 0 0 1 13.917 7H12.9A5.002 5.002 0 0 0 8 3zM3.1 9a5.002 5.002 0 0 0 8.757 2.182a.5.5 0 1 1 .771.636A6.002 6.002 0 0 1 2.083 9H3.1z"})]})}))}function Fa(t){return i("svg",wa(ya({width:"15px",height:"15px",viewBox:"0 0 16 16"},t),{children:i("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.828 10.172a.5.5 0 0 0-.707 0l-4.096 4.096V11.5a.5.5 0 0 0-1 0v3.975a.5.5 0 0 0 .5.5H4.5a.5.5 0 0 0 0-1H1.732l4.096-4.096a.5.5 0 0 0 0-.707zm4.344 0a.5.5 0 0 1 .707 0l4.096 4.096V11.5a.5.5 0 1 1 1 0v3.975a.5.5 0 0 1-.5.5H11.5a.5.5 0 0 1 0-1h2.768l-4.096-4.096a.5.5 0 0 1 0-.707zm0-4.344a.5.5 0 0 0 .707 0l4.096-4.096V4.5a.5.5 0 1 0 1 0V.525a.5.5 0 0 0-.5-.5H11.5a.5.5 0 0 0 0 1h2.768l-4.096 4.096a.5.5 0 0 0 0 .707zm-4.344 0a.5.5 0 0 1-.707 0L1.025 1.732V4.5a.5.5 0 0 1-1 0V.525a.5.5 0 0 1 .5-.5H4.5a.5.5 0 0 1 0 1H1.732l4.096 4.096a.5.5 0 0 1 0 .707z"})}))}function Ua(t){return a("svg",wa(ya({width:"20px",height:"20px",viewBox:"0 0 1024 1024"},t),{version:"1.1",xmlns:"https://www.w3.org/2000/svg","p-id":"2552",children:[i("path",{d:"M468 128H160c-17.7 0-32 14.3-32 32v308c0 4.4 3.6 8 8 8h332c4.4 0 8-3.6 8-8V136c0-4.4-3.6-8-8-8z m-56 284H192V192h220v220z","p-id":"2553",fill:"#666666"}),i("path",{d:"M274 338h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zM468 548H136c-4.4 0-8 3.6-8 8v308c0 17.7 14.3 32 32 32h308c4.4 0 8-3.6 8-8V556c0-4.4-3.6-8-8-8z m-56 284H192V612h220v220z","p-id":"2554",fill:"#666666"}),i("path",{d:"M274 758h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zM864 128H556c-4.4 0-8 3.6-8 8v332c0 4.4 3.6 8 8 8h332c4.4 0 8-3.6 8-8V160c0-17.7-14.3-32-32-32z m-32 284H612V192h220v220z","p-id":"2555",fill:"#666666"}),i("path",{d:"M694 338h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zM888 548h-48c-4.4 0-8 3.6-8 8v134h-78V556c0-4.4-3.6-8-8-8H556c-4.4 0-8 3.6-8 8v332c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V644h78v102c0 4.4 3.6 8 8 8h190c4.4 0 8-3.6 8-8V556c0-4.4-3.6-8-8-8z","p-id":"2556",fill:"#666666"}),i("path",{d:"M746 832h-48c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM888 832h-48c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z","p-id":"2557",fill:"#666666"})]}))}const Wa=function(t){var e=t.code,r=t.url,n=(0,l.useRef)(null),o=(0,l.useState)(!1),s=o[0],u=o[1];return a("div",{className:ha().mobileWrapper+" mobile-previewer",children:[i("div",{className:ha().mobileCodeWrapper,children:i(c.A,{children:e,className:"language-jsx",mdxType:"code",originalType:"code",parentName:"pre"})}),a("div",{className:ha().mobilePreviewArea,children:[a("div",{className:ha().mobileOperations,children:[a("div",{className:ha().operationItem,onClick:function(){var t;null==n||null===(t=n.current)||void 0===t||t.contentWindow.location.reload()},children:[i(Da,{})," \xa0\u5237\u65b0"]}),a("div",{className:ha().operationItem,onClick:function(){window.open(r)},children:[i(Fa,{})," \xa0\u5168\u5c4f\u6a21\u5f0f"]}),a("div",{className:ha().operationItem,onClick:function(){u(!0)},children:[i(Ua,{})," \xa0\u4e8c\u7ef4\u7801"]})]}),a("div",{className:ha().iframeWrapper,children:[i("iframe",{ref:n,style:{width:"325px",height:"600px",backgroundColor:"#FFF"},scrolling:"yes",frameBorder:"0",src:r}),s&&i("div",{className:ha().dialog,onClick:function(){u(!1)},children:i(Ba,{value:""+location.origin+r,size:100})})]})]})]})};const Va=function(t){var e=t.mobilePreview,r=t.children,n=t.code,o=t.url,a=(n||"").replace(/`/g,"`").replace(/$/g,"$");return e?i(Wa,{code:a,url:o}):i(ma,{code:a,children:r})}},8478:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});r(6540);var n=r(2303),o=r(757).A,i=r(6540).Fragment;function a(t){var e=t.children,r=t.fallback;return(0,n.A)()?o(i,null,null==e?void 0:e()):null!=r?r:null}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[702],{3074:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>y,contentTitle:()=>o,default:()=>d,frontMatter:()=>p,metadata:()=>u,toc:()=>g});var l=t(8168),a=t(8587),r=(t(6540),t(6665)),i=["components"],p={},o=void 0,u={unversionedId:"api/README",id:"api/README",title:"README",description:"youtil",source:"@site/doc/api/README.md",sourceDirName:"api",slug:"/api/",permalink:"/api/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"loading",permalink:"/loading"},next:{title:"copyToClipboard",permalink:"/api/functions/copyToClipboard"}},y={},g=[{value:"\u5982\u4f55\u4f7f\u7528",id:"\u5982\u4f55\u4f7f\u7528",level:2},{value:"API",id:"api",level:2},{value:"\u5173\u4e8e\u547d\u540d",id:"\u5173\u4e8e\u547d\u540d",level:2},{value:"\u6a21\u5757\u5f00\u53d1",id:"\u6a21\u5757\u5f00\u53d1",level:2},{value:"\u76ee\u5f55\u7ed3\u6784\u4ecb\u7ecd",id:"\u76ee\u5f55\u7ed3\u6784\u4ecb\u7ecd",level:3},{value:"\u4ee3\u7801\u63d0\u4ea4\u987a\u5e8f",id:"\u4ee3\u7801\u63d0\u4ea4\u987a\u5e8f",level:3},{value:"\u5173\u4e8e@swc/helper\u7684\u7248\u672c",id:"\u5173\u4e8eswchelper\u7684\u7248\u672c",level:3},{value:"\u9644\u5f55",id:"\u9644\u5f55",level:3}],c={toc:g},m="wrapper";function d(e){var n=e.components,t=(0,a.A)(e,i);return(0,r.yg)(m,(0,l.A)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"youtil")),(0,r.yg)("hr",null),(0,r.yg)("h1",{id:"youtil"},"youtil"),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"youtil"),"\uff0c\u53d1\u97f3\u540c",(0,r.yg)("inlineCode",{parentName:"p"},"util"),"\uff0c\u4e2d\u6587\u53ef\u4ee5\u53eb\u505a",(0,r.yg)("inlineCode",{parentName:"p"},"\u6cb9\u68af"),"\uff0c\u4e00\u4e2a\u4e0e\u6846\u67b6\uff08",(0,r.yg)("inlineCode",{parentName:"p"},"Vue"),"\u3001",(0,r.yg)("inlineCode",{parentName:"p"},"React"),"\u7b49\uff09\u3001\u73af\u5883\uff08",(0,r.yg)("inlineCode",{parentName:"p"},"Nodejs"),"\u3001",(0,r.yg)("inlineCode",{parentName:"p"},"Browser"),"\u7b49\uff09\u65e0\u5173\u7684\u5c0f\u5de7\u3001\u7cbe\u7b80\u3001\u5b9e\u7528\u3001\u4e0d\u4f9d\u8d56\u4efb\u4f55\u7b2c\u4e09\u65b9\u5e93\u7684",(0,r.yg)("inlineCode",{parentName:"p"},"JavaScript"),"\u5de5\u5177\u5e93\u3002"),(0,r.yg)("blockquote",null,(0,r.yg)("ol",{parentName:"blockquote"},(0,r.yg)("li",{parentName:"ol"},"\u4ee3\u7801\u8fd8\u5728\u4e0d\u65ad\u8865\u5145\u5b8c\u5584\uff0c\u656c\u8bf7\u671f\u5f85\uff01"),(0,r.yg)("li",{parentName:"ol"},"\u5c11\u6570\u65b9\u6cd5\u53ef\u80fd\u4f9d\u8d56DOM\uff0c\u4f8b\u5982",(0,r.yg)("inlineCode",{parentName:"li"},"showLoading"),"\uff1b"))),(0,r.yg)("h2",{id:"\u5982\u4f55\u4f7f\u7528"},"\u5982\u4f55\u4f7f\u7528"),(0,r.yg)("p",null,"\u5b89\u88c5\uff1a",(0,r.yg)("inlineCode",{parentName:"p"},"npm i youtil -S")),(0,r.yg)("p",null,"\u4f7f\u7528\u793a\u4f8b\uff1a"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-js"},"import { formatDate, parseDate } from youtil;\nconsole.log(formatDate(Date.now()));\nconssole.log(parseDate('2023-02-14', 'yyyy-MM-dd'));\n")),(0,r.yg)("h2",{id:"api"},"API"),(0,r.yg)("p",null,"\u53c2\u89c1",(0,r.yg)("a",{parentName:"p",href:"https://youtil.haoji.me/api/globals"},"API\u6587\u6863"),";"),(0,r.yg)("h2",{id:"\u5173\u4e8e\u547d\u540d"},"\u5173\u4e8e\u547d\u540d"),(0,r.yg)("p",null,"\u4e4b\u524d\u60f3\u4e86\u5f88\u591a\u540d\u5b57\uff0c\u5305\u62ec",(0,r.yg)("inlineCode",{parentName:"p"},"autil"),"\u3001",(0,r.yg)("inlineCode",{parentName:"p"},"zutil"),"\u3001",(0,r.yg)("inlineCode",{parentName:"p"},"feutil"),"\u7b49\uff0c\u4ecea-z\u8bd5\u4e0b\u6765\u53ea\u6709\u51e0\u4e2a\u6ca1\u6709\u88ab\u6ce8\u518c\uff0c\u4f46\u662f\u4e0d\u597d\u8bb0\uff0c\u6700\u540e\u624d\u53d6\u4e86\u8fd9\u4e2a\u540d\u5b57\uff0c\u56e0\u4e3a\u6bd4\u8f83\u597d\u8bb0\u3002"),(0,r.yg)("h2",{id:"\u6a21\u5757\u5f00\u53d1"},"\u6a21\u5757\u5f00\u53d1"),(0,r.yg)("p",null,"\u4f9d\u8d56",(0,r.yg)("inlineCode",{parentName:"p"},"node@18"),"\u73af\u5883\uff0c\u6267\u884c",(0,r.yg)("inlineCode",{parentName:"p"},"cnpm run dev"),"\u5c06\u81ea\u52a8\u6253\u5f00\u672c\u5730\u9884\u89c8\u3002"),(0,r.yg)("h3",{id:"\u76ee\u5f55\u7ed3\u6784\u4ecb\u7ecd"},"\u76ee\u5f55\u7ed3\u6784\u4ecb\u7ecd"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"src\uff1a \u6e90\u6587\u4ef6\uff1b"),(0,r.yg)("li",{parentName:"ul"},"docs\uff1a \u6587\u6863\uff1b"),(0,r.yg)("li",{parentName:"ul"},"test\uff1a\u6d4b\u8bd5\u7528\u4f8b\uff1b"),(0,r.yg)("li",{parentName:"ul"},"dist\uff1a\u4f9b\u6d4f\u89c8\u5668\u76f4\u63a5\u4f7f\u7528\u7684bundle\u6a21\u5f0f\u4ea7\u7269\uff1b"),(0,r.yg)("li",{parentName:"ul"},"esm\uff1a\u4f9b\u5176\u4ed6\u9879\u76ee\u5f15\u5165\uff1b"),(0,r.yg)("li",{parentName:"ul"},"build\uff1a\u6587\u6863\u4e4b\u7c7b\u7684\u6784\u5efa\u4ea7\u7269\uff1b")),(0,r.yg)("h3",{id:"\u4ee3\u7801\u63d0\u4ea4\u987a\u5e8f"},"\u4ee3\u7801\u63d0\u4ea4\u987a\u5e8f"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"\u66f4\u65b0\u4ee3\u7801\uff1b"),(0,r.yg)("li",{parentName:"ul"},"\u66f4\u65b0",(0,r.yg)("inlineCode",{parentName:"li"},"package.json"),"\u548c",(0,r.yg)("inlineCode",{parentName:"li"},"changelog"),"\uff1b"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"npm publish"),"\uff1b"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"npm run after-publish"),"\u52a1\u5fc5\u4e0d\u80fd\u6f0f\u4e86\uff01"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"git push"),"\uff1b")),(0,r.yg)("p",null,"\u6ce8\u610f\uff1a@ice/pkg\u548c@swc/helpers \u5347\u7ea7\u52300.5.0\u4ee5\u4e0a\u7248\u672c\u65f6\u5176\u4ed6\u4e1a\u52a1\u53ef\u80fd\u62a5\u9519\uff0c\u975e\u5e38\u5751\uff01\u76ee\u524d\u5199\u6b7b\u7248\u672c"),(0,r.yg)("h3",{id:"\u5173\u4e8eswchelper\u7684\u7248\u672c"},"\u5173\u4e8e@swc/helper\u7684\u7248\u672c"),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"@swc/helper"),"\u5728\u5347\u7ea7\u52300.5.0\u4e4b\u540e\u6709\u4e00\u4e9b\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u4e00\u4e9b\u8001\u5de5\u7a0b\uff08\u5982node14+webpack4\uff09\u6784\u5efa\u4f1a\u5931\u8d25\u3002"),(0,r.yg)("p",null,"\u76ee\u524d\u6ca1\u6709\u95ee\u9898\u7684\u7248\u672c\uff1a"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"@swc/helper"),"\u5199\u6b7b",(0,r.yg)("inlineCode",{parentName:"li"},"0.4.14"),"\uff08\u90e8\u5206\u6784\u5efa\u4ea7\u7269\uff1a",(0,r.yg)("inlineCode",{parentName:"li"},'import _instanceof from "@swc/helpers/src/_instanceof.mjs"'),"\uff09\uff1b"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"@ice/pkg"),"\u5199\u6b7b",(0,r.yg)("inlineCode",{parentName:"li"},"1.5.5"),"\uff1b")),(0,r.yg)("p",null,"\u6709\u95ee\u9898\u7684\u7248\u672c\uff1a"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"@swc/helper"),"\u5199\u6b7b",(0,r.yg)("inlineCode",{parentName:"li"},"^0.5.0"),"\uff08\u90e8\u5206\u6784\u5efa\u4ea7\u7269\uff1a",(0,r.yg)("inlineCode",{parentName:"li"},'import { _ as _instanceof } from "@swc/helpers/_/_instanceof"'),"\uff09\uff1b"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"@ice/pkg"),"\u5199\u6b7b",(0,r.yg)("inlineCode",{parentName:"li"},"^1.5.5"),"\uff1b")),(0,r.yg)("h3",{id:"\u9644\u5f55"},"\u9644\u5f55"),(0,r.yg)("p",null,"\u4ed3\u5e93\u811a\u624b\u67b6\u6765\u6e90\uff1a"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-bash"},"npm install -g cnpm --registry=https://registry.npmmirror.com\ncnpm init @ice/pkg youtil # \u9009\u62e9\u524d\u7aef\u7c7b\u5e93\n# \u9ed8\u8ba4\u4e0d\u652f\u6301\u6587\u6863\u9884\u89c8\uff0c\u9700\u624b\u52a8\u5f00\u542f\ncnpm i @ice/pkg-plugin-docusaurus react react-dom -D\n# \u53c2\u8003 https://pkg.ice.work/guide/preview \u8fdb\u884c build.config.mts \u914d\u7f6e\ncd youtil\nmkdir docs\nvim index.md\ncnpm start\n")))}d.isMDXComponent=!0},6665:(e,n,t)=>{function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=l(t(6540));function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(){return i=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},i.apply(this,arguments)}function p(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,l)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p(Object(t),!0).forEach((function(n){r(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function u(e,n){if(null==e)return{};var t,l,a=function(e,n){if(null==e)return{};var t,l,a={},r=Object.keys(e);for(l=0;l<r.length;l++)t=r[l],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(l=0;l<r.length;l++)t=r[l],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var y=a.default.createContext({}),g=function(e){var n=a.default.useContext(y),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},c={inlineCode:"code",wrapper:function(e){var n=e.children;return a.default.createElement(a.default.Fragment,{},n)}},m=a.default.forwardRef((function(e,n){var t=e.components,l=e.mdxType,r=e.originalType,i=e.parentName,p=u(e,["components","mdxType","originalType","parentName"]),y=g(t),m=l,d=y["".concat(i,".").concat(m)]||y[m]||c[m]||r;return t?a.default.createElement(d,o(o({ref:n},p),{},{components:t})):a.default.createElement(d,o({ref:n},p))}));m.displayName="MDXCreateElement",n.xA=function(e){var n=g(e.components);return a.default.createElement(y.Provider,{value:n},e.children)},n.yg=function(e,n){var t=arguments,l=n&&n.mdxType;if("string"==typeof e||l){var r=t.length,i=new Array(r);i[0]=m;var p={};for(var o in n)hasOwnProperty.call(n,o)&&(p[o]=n[o]);p.originalType=e,p.mdxType="string"==typeof e?e:l,i[1]=p;for(var u=2;u<r;u++)i[u]=t[u];return a.default.createElement.apply(null,i)}return a.default.createElement.apply(null,t)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[641],{2655:(n,e,t)=>{function r(n,e,t,r,o,a,c){try{var i=n[a](c),l=i.value}catch(n){return void t(n)}i.done?e(l):Promise.resolve(l).then(r,o)}function o(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})))),r.forEach((function(e){var r,o;r=n,o=t[e],e in r?Object.defineProperty(r,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[e]=o}))}return n}t.d(e,{Kd:()=>d,Yq:()=>f,RZ:()=>c,Em:()=>s,Cs:()=>a}),"function"==typeof SuppressedError&&SuppressedError;var a=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"\u8bf7\u7a0d\u5019",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(t=Object.assign({},{hasMask:!1,maskColor:"#00000070",onCancel:null,cancelInline:!1,id:"com_global_page_loading"},t)).id,o=t.hasMask,a=t.maskColor,i=t.onCancel,l=t.cancelInline,s="_".concat(r,"_timeout");window[s]&&clearTimeout(window[s]);var u=document.getElementById(r);u||((u=document.createElement("div")).id=r,u.className=r,document.body.append(u));var d="".concat(r,"_style");if(!document.getElementById(d)){var f=document.createElement("style");f.id=d,f.innerHTML="\n .".concat(r," {\n position: fixed;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n z-index: 10000;\n }\n .").concat(r,".show-mask {\n pointer-events: unset;\n background: #00000070;\n }\n .").concat(r," .mask-wrapper {\n position: fixed;\n }\n .").concat(r," .loading-wrapper {\n width: 120px;\n height: 120px;\n z-index: 8000;\n background: rgba(0, 0, 0, 0.6);\n border-radius: 8px;\n text-align: center;\n color: white;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n pointer-events: initial;\n line-height: 1.3;\n }\n .").concat(r," .loading-wrapper img {\n width: 50px;\n height: 50px;\n margin-bottom: 10px;\n }\n .").concat(r," .loading-wrapper a {\n color: #6ab2ff;\n }"),document.head.appendChild(f)}if(u.innerHTML='\n <div class="loading-wrapper">\n <img src="https://img.alicdn.com/tfs/TB1bnUsQBLoK1RjSZFuXXXn0XXa-32-32.svg" alt="\u52a0\u8f7d\u4e2d">\n <div>\n <span>'.concat(n,"</span>\n ").concat(l?"":"<br />","\n ").concat(i?'<a href="javascript:;" class="cancel">\u53d6\u6d88</a>':"","\n </div>\n </div>"),i){var p=u.querySelector(".cancel");p&&p.addEventListener("click",(function(){c(),i()}))}u.addEventListener("click",(function(){c()})),u.style.display="flex",u.style.background=o?a:"transparent",u.className="".concat(r," ").concat(o?"show-mask":""),e>0&&(window[s]=setTimeout((function(){c()}),1e3*e))},c=function(){var n=document.getElementById("com_global_page_loading");n&&(n.style.display="none")};var i=function(n){return Object.keys(n||{}).filter((function(e){return void 0!==n[e]})).map((function(e){var t="object"==typeof n[e]?JSON.stringify(n[e]):n[e];return"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t))})).join("&")},l=function(n,e){var t=Object.assign({},(null==n?void 0:n.headers)||{},(null==e?void 0:e.headers)||{}),r=Object.assign({},(null==n?void 0:n.fetchOptions)||{},(null==e?void 0:e.fetchOptions)||{});return Object.assign({},n||{},e||{},{headers:t,fetchOptions:r})},s=function(){var n=function(n){return function(){var e=this,t=arguments;return new Promise((function(o,a){var c=n.apply(e,t);function i(n){r(c,o,a,i,l,"next",n)}function l(n){r(c,o,a,i,l,"throw",n)}i(void 0)}))}}((function(n,e){var t,r,a,c,s,u,d,f,p,h,v,g,b,m,y,w,k,O,j,C,x;return function(n,e){var t,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=i(0),c.throw=i(1),c.return=i(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function i(i){return function(l){return function(i){if(t)throw TypeError("Generator is already executing.");for(;c&&(c=0,i[0]&&(a=0)),a;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(n,a)}catch(n){i=[6,n],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}(this,(function(E){switch(E.label){case 0:if(r=(t=(e=l({errorMessage:"\u7cfb\u7edf\u7e41\u5fd9\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5",errorHandler:function(n){var t;(null==e?void 0:e.silent)||(null==e||null===(t=e.toastHandler)||void 0===t||t.call(e,n));throw Error(n)},baseUrl:"",headers:{},fetchOptions:{credentials:"include"},checkSuccess:function(n){return 0==(null==n?void 0:n.code)||200==(null==n?void 0:n.code)},toastHandler:function(n){return console.error("[\u60a8\u8fd8\u6ca1\u6709\u914d\u7f6etoastHandler\uff0c\u8bf7\u6839\u636e\u60a8\u7684UI\u7ec4\u4ef6\u5e93\u914d\u7f6e\u5408\u9002\u7684\u63d0\u793a\u65b9\u6cd5] ".concat(n||""))},onFetchResponse:function(n){if(200===n.status)return n.json();var e={code:n.status,status:n.status,message:n.statusText,headers:n.headers,_response:n},t=Error(e.message);throw t.response=e,t}},e))||{}).params,a=t.data,c=t.formData,s=t.json,u=t.method,d=t.headers,f=t.baseUrl,p=t.fetchOptions,h=t.checkSuccess,v=t.afterRequest,g=t.errorHandler,b=t.errorMessage,m=t.responseConverter,y=t.onFetchResponse,p.headers=o({},d||{},p.headers||{}),r&&(p.method=u||"GET",n="".concat(n).concat(n.indexOf("?")>=0?"&":"?").concat(i(r))),a)Object.assign(p,{method:u||"POST",body:i(a),headers:o({"Content-Type":"application/x-www-form-urlencoded;charset=utf-8"},p.headers||{})});else if(c){if(w=c,!(c instanceof FormData))for(var S in w=new FormData,c)w.append(S,c[S]);Object.assign(p,{method:u||"POST",body:w})}else s&&Object.assign(p,{method:u||"POST",body:JSON.stringify(s),headers:o({"Content-Type":"application/json;charset=utf-8"},p.headers||{})});k=null,E.label=1;case 1:return E.trys.push([1,3,,4]),0===(O="".concat(/^(http|\/\/)/g.test(n)?"":f||"").concat(n)).indexOf("//")&&"blob:"===location.protocol&&(O="".concat(null===(j=location.pathname.split(":"))||void 0===j?void 0:j[0],":").concat(O)),[4,fetch(O,p).then(y)];case 2:return k=E.sent(),[3,4];case 3:return console.error(C=E.sent()),null==v||v(!1,{message:null==C?void 0:C.message}),null==g||g((null===(x=C.response)||void 0===x?void 0:x.message)||b||"",C.response),[2,void 0];case 4:return k=m?m(k):k,(null==h?void 0:h(k))?(null==v||v(!0,k),[2,k.data]):(null==v||v(!1,k),null==g||g(k.message||k.msg||b||"",k),[2,void 0])}}))}));return function(e,t){return n.apply(this,arguments)}}(),u=function(n){var e=l(this.overrideDefaultOptions,n),t=function(n,t){return s(n,l(e,t))};return t.overrideDefaultOptions=e,t.create=u.bind(t),t};s.create=u.bind(s);var d=function(n,e){var t=e;return e||(t=n,n=s),function(e,r){return n(e,o({},t||{},r||{}))}},f=function(n,e){var t=function(n){e=e.replace(RegExp("".concat(n,"+"),"g"),(function(e){var t="".concat(r[n]);if("w"===n)return"".concat(e.length>2?"\u661f\u671f":"\u5468").concat(o[t]);for(var a=0,c=t.length;a<e.length-c;a++)t="0".concat(t);return 1===e.length?t:t.substring(t.length-e.length)}))};if(!n)return"";if("number"==typeof n)n=new Date(n);else if("string"==typeof n)if(/^\d{12,13}$/g.test(n))n=new Date(parseInt(n,10));else{if(!/^.{10}T.{8,12}Z?$/g.test(n))return n;n=new Date(n)}if(!(n instanceof Date))throw Error("formatDate error: not date.");if(isNaN(null==n?void 0:n.getFullYear()))throw Error("formatDate error: invalid date.");e=e||"yyyy-MM-dd HH:mm:ss";var r={y:n.getFullYear(),M:n.getMonth()+1,d:n.getDate(),q:Math.floor((n.getMonth()+3)/3),w:n.getDay(),H:n.getHours(),h:n.getHours()%12==0?12:n.getHours()%12,m:n.getMinutes(),s:n.getSeconds(),S:n.getMilliseconds()},o=["\u5929","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"];for(var a in r)t(a);return e}},6363:(n,e,t)=>{t.d(e,{A:()=>a});var r=t(2655),o=(t(6540),t(757).A);const a=function(){return o("div",null,o("a",{href:"javascript:;",onClick:function(){return(0,r.Cs)("\u6b63\u5728\u52a0\u8f7d...",10)}},"\u663e\u793aloading\uff0810\u79d2\u81ea\u52a8\u5173\u95ed\uff09"),o("br",null),o("a",{href:"javascript:;",onClick:function(){return(0,r.RZ)()}},"\u5173\u95edloading"),o("br",null),o("a",{href:"javascript:;",onClick:function(){return(0,r.Cs)("\u6b63\u5728\u52a0\u8f7d...",0)}},"\u4e00\u76f4\u663e\u793a"),o("br",null),o("a",{href:"javascript:;",onClick:function(){return(0,r.Cs)("\u6b63\u5728\u52a0\u8f7d...",0,{onCancel:function(){return alert("\u4f60\u70b9\u51fb\u4e86\u53d6\u6d88")}})}},"\u652f\u6301\u53d6\u6d88"),o("br",null),o("a",{href:"javascript:;",onClick:function(){return(0,r.Cs)("\u6b63\u5728\u52a0\u8f7d...",0,{onCancel:function(){return alert("\u4f60\u70b9\u51fb\u4e86\u53d6\u6d88")},cancelInline:!0})}},"\u53d6\u6d88\u4e0d\u6362\u884c"),o("br",null),o("a",{href:"javascript:;",onClick:function(){return(0,r.Cs)("\u53d1\u751f\u7684\u5bb6\u4e50\u9e21\u7c89\u53d7\u6253\u51fb\u4e86\u653e\u5927\u968f\u673a\u53d1\u9001\u8fbe\u4e86",0)}},"\u8d85\u5bbd\u6587\u5b57"),o("br",null),o("a",{href:"javascript:;",onClick:function(){return(0,r.Cs)("\u6b63\u5728\u52a0\u8f7d",10,{hasMask:!0})}},"\u663e\u793a\u906e\u7f69"),o("br",null))}},7050:(n,e,t)=>{t.r(e),t.d(e,{default:()=>a});var r=t(8478),o=t(757).A;const a=function(){return o(r.A,null,(function(){var n=t(6363).A;return o(n,null)}))}},8478:(n,e,t)=>{t.d(e,{A:()=>c});t(6540);var r=t(2303),o=t(757).A,a=t(6540).Fragment;function c(n){var e=n.children,t=n.fallback;return(0,r.A)()?o(a,null,null==e?void 0:e()):null!=t?t:null}}}]);
|