From 06769917c36b634338058e8a3a3e2ddaf6df21c6 Mon Sep 17 00:00:00 2001 From: AmbitionsXXXV Date: Tue, 21 Nov 2023 15:42:24 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20etc-pages=20from=20@=20Ambitio?= =?UTF-8?q?nsXXXV/etc-hooks@e6a509d107bc66991a7689f0ef2e65fc87b3e007=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 2 +- asset-manifest.json | 8 +- demos.2ae370ee.async.js | 1 - demos.712f3f3a.async.js | 1 + ...i__theme__ContextWrapper.b983661c.async.js | 2 +- guide/index.html | 2 +- hooks/basic/index.html | 2 +- hooks/index/index.html | 2 +- hooks/use-ant-pagination/index.html | 2 +- hooks/use-boolean/index.html | 2 +- hooks/use-callback-ref/index.html | 2 +- hooks/use-clipboard/index.html | 2 +- hooks/use-color-schema/index.html | 2 +- hooks/use-counter/index.html | 2 +- hooks/use-creation/index/index.html | 2 +- hooks/use-debounce-fn/index.html | 2 +- hooks/use-debounce/index.html | 2 +- hooks/use-latest/index.html | 2 +- hooks/use-memoized-fn/index.html | 2 +- hooks/use-mount/index.html | 2 +- hooks/use-os/index.html | 2 +- hooks/use-reset-state/index.html | 12 ++ hooks/use-set/index.html | 2 +- hooks/use-title/index.html | 2 +- hooks/use-toggle/index.html | 2 +- hooks/use-unmount-ref/index.html | 2 +- hooks/use-unmount/index.html | 2 +- hooks/use-update/index.html | 2 +- index.html | 2 +- ...useResetState__index.md.778c6473.chunk.css | 1 + ..._useResetState__index.md.e6476c28.async.js | 1 + umi.58b4da03.js => umi.0bef3027.js | 170 +++++++++++------- ~demos/:id/index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 12 ++ .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- 64 files changed, 190 insertions(+), 128 deletions(-) delete mode 100644 demos.2ae370ee.async.js create mode 100644 demos.712f3f3a.async.js rename dumi__tmp-production__dumi__theme__ContextWrapper.f5792938.async.js => dumi__tmp-production__dumi__theme__ContextWrapper.b983661c.async.js (68%) create mode 100644 hooks/use-reset-state/index.html create mode 100644 packages__hooks__src__useResetState__index.md.778c6473.chunk.css create mode 100644 packages__hooks__src__useResetState__index.md.e6476c28.async.js rename umi.58b4da03.js => umi.0bef3027.js (70%) create mode 100644 ~demos/packages-hooks-src-use-reset-state-demo-example/index.html diff --git a/404.html b/404.html index 7dd747f..ac69dae 100644 --- a/404.html +++ b/404.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/asset-manifest.json b/asset-manifest.json index b7215bf..ea149b4 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,10 +1,10 @@ { "umi.css": "/etc-hooks/umi.7ab43a5e.css", - "umi.js": "/etc-hooks/umi.58b4da03.js", - "demos.js": "/etc-hooks/demos.2ae370ee.async.js", + "umi.js": "/etc-hooks/umi.0bef3027.js", + "demos.js": "/etc-hooks/demos.712f3f3a.async.js", "nm__dumi__dist__client__pages__404.css": "/etc-hooks/nm__dumi__dist__client__pages__404.8b85f2d9.chunk.css", "nm__dumi__dist__client__pages__404.js": "/etc-hooks/nm__dumi__dist__client__pages__404.b3cff8f6.async.js", - "dumi__tmp-production__dumi__theme__ContextWrapper.js": "/etc-hooks/dumi__tmp-production__dumi__theme__ContextWrapper.f5792938.async.js", + "dumi__tmp-production__dumi__theme__ContextWrapper.js": "/etc-hooks/dumi__tmp-production__dumi__theme__ContextWrapper.b983661c.async.js", "nm__dumi__theme-default__layouts__DocLayout__index.js": "/etc-hooks/nm__dumi__theme-default__layouts__DocLayout__index.a8021425.async.js", "docs__guide__index.md.css": "/etc-hooks/docs__guide__index.md.778c6473.chunk.css", "docs__guide__index.md.js": "/etc-hooks/docs__guide__index.md.51d6bf1c.async.js", @@ -36,6 +36,8 @@ "packages__hooks__src__useMount__index.md.js": "/etc-hooks/packages__hooks__src__useMount__index.md.7e24d7ef.async.js", "packages__hooks__src__useOs__index.md.css": "/etc-hooks/packages__hooks__src__useOs__index.md.778c6473.chunk.css", "packages__hooks__src__useOs__index.md.js": "/etc-hooks/packages__hooks__src__useOs__index.md.4ad06e94.async.js", + "packages__hooks__src__useResetState__index.md.css": "/etc-hooks/packages__hooks__src__useResetState__index.md.778c6473.chunk.css", + "packages__hooks__src__useResetState__index.md.js": "/etc-hooks/packages__hooks__src__useResetState__index.md.e6476c28.async.js", "packages__hooks__src__useSet__index.md.css": "/etc-hooks/packages__hooks__src__useSet__index.md.778c6473.chunk.css", "packages__hooks__src__useSet__index.md.js": "/etc-hooks/packages__hooks__src__useSet__index.md.9cdc33b6.async.js", "packages__hooks__src__useTitle__index.md.css": "/etc-hooks/packages__hooks__src__useTitle__index.md.778c6473.chunk.css", diff --git a/demos.2ae370ee.async.js b/demos.2ae370ee.async.js deleted file mode 100644 index 5085551..0000000 --- a/demos.2ae370ee.async.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunketc_hooks=self.webpackChunketc_hooks||[]).push([[433],{12113:function(D,_,e){e.r(_);var f=e(28152),m=e.n(f),c=e(50959),i=e(66721),a=e(21737),u=e(11527);_.default=function(){var r=(0,i.Z)(!0),o=m()(r,2),l=o[0],n=o[1],t=n.toggle,s=n.setTrue,d=n.setFalse;return(0,u.jsxs)("div",{children:[(0,u.jsxs)("p",{children:["Effects\uFF1A",JSON.stringify(l)]}),(0,u.jsxs)("p",{children:[(0,u.jsx)(a.ZP,{type:"primary",onClick:t,children:"Toggle"}),(0,u.jsx)(a.ZP,{type:"primary",onClick:d,style:{margin:"0 16px"},children:"setFalse"}),(0,u.jsx)(a.ZP,{type:"primary",onClick:s,children:"setTrue"})]})]})}},12846:function(D,_,e){e.r(_),e.d(_,{default:function(){return r}});var f=e(50959),m=function(l){var n=(0,f.useRef)(l);return(0,f.useEffect)(function(){n.current=l}),(0,f.useMemo)(function(){return function(){for(var t,s=arguments.length,d=new Array(s),E=0;E0&&arguments[0]!==void 0?arguments[0]:{},E=d.timeout,h=E===void 0?2e3:E,v=(0,c.useState)(null),P=m()(v,2),M=P[0],O=P[1],R=(0,c.useState)(!1),j=m()(R,2),p=j[0],U=j[1],Z=(0,c.useState)(null),g=m()(Z,2),k=g[0],F=g[1],x=function(N){window.clearTimeout(k),F(window.setTimeout(function(){return U(!1)},h)),U(N)},Q=function(N){"clipboard"in navigator?navigator.clipboard.writeText(N).then(function(){x(!0),i.ZP.success("\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F")}).catch(function(w){return O(w)}):O(new Error("useClipboard: navigator.clipboard is not supported"))},X=function(){U(!1),O(null),window.clearTimeout(k)};return{copy:Q,reset:X,error:M,copied:p}},u=a,r=e(43497),o=e(21737),l=e(11527),n=function(){var d=(0,c.useState)("Hello, world!"),E=m()(d,2),h=E[0],v=E[1],P=u({timeout:500});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.Z,{value:h,onChange:function(O){return v(O.target.value)}}),(0,l.jsx)(o.ZP,{color:P.copied?"teal":"blue",onClick:function(){return P.copy(h)},children:P.copied?"Copied":"Copy"})]})},t=n},25188:function(D,_,e){e.r(_),e.d(_,{default:function(){return n}});var f=e(50959),m=e(28152),c=e.n(m);function i(t,s){try{return t.addEventListener("change",s),function(){return t.removeEventListener("change",s)}}catch(d){return t.addListener(s),function(){return t.removeListener(s)}}}function a(t,s){return typeof s=="boolean"?s:typeof window!="undefined"&&"matchMedia"in window?window.matchMedia(t).matches:!1}function u(t,s){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{getInitialValueInEffect:!0},E=d.getInitialValueInEffect,h=(0,f.useState)(E?s:a(t,s)),v=c()(h,2),P=v[0],M=v[1],O=(0,f.useRef)();return(0,f.useEffect)(function(){if("matchMedia"in window)return O.current=window.matchMedia(t),M(O.current.matches),i(O.current,function(R){return M(R.matches)})},[t]),P}function r(t,s){return u("(prefers-color-scheme: dark)",t==="dark",s)?"dark":"light"}var o=r,l=e(11527),n=function(){var t=o();return(0,l.jsxs)("div",{className:"dark:text-white",children:["Your system color scheme is ",t]})}},28111:function(D,_,e){e.r(_),e.d(_,{default:function(){return s}});var f=e(28152),m=e.n(f),c=e(50959),i=e(77117),a=e.n(i);function u(d,E,h){return E===void 0&&h===void 0?d:E!==void 0&&h===void 0?Math.max(d,E):Math.min(E===void 0&&h!==void 0?d:Math.max(d,E),h)}var r={min:-1/0,max:1/0},o=function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r,v=a()(a()({},r),h),P=v.min,M=v.max,O=(0,c.useState)(u(E,P,M)),R=m()(O,2),j=R[0],p=R[1],U=function(x){return p(u(x,P,M))},Z=function(){return p(u(E,P,M))},g=function(){return p(function(x){return u(x+1,P,M)})},k=function(){return p(function(x){return u(x-1,P,M)})};return[j,{set:U,reset:Z,increment:g,decrement:k}]},l=o,n=e(21737),t=e(11527),s=function(){var d=l(0,{min:0,max:10}),E=m()(d,2),h=E[0],v=E[1];return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{style:{marginTop:16},children:[" ",h," "]}),(0,t.jsxs)("div",{style:{display:"flex",gap:2},children:[(0,t.jsx)(n.ZP,{onClick:v.increment,children:"Increment"}),(0,t.jsx)(n.ZP,{onClick:v.decrement,children:"Decrement"}),(0,t.jsx)(n.ZP,{onClick:v.reset,children:"Reset"}),(0,t.jsx)(n.ZP,{onClick:function(){return v.set(5)},children:"Set 5"})]})]})}},34453:function(D,_,e){e.r(_);var f=e(28152),m=e.n(f),c=e(96345),i=e.n(c),a=e(15033),u=e.n(a),r=e(21320),o=e.n(r),l=e(50959),n=e(56973),t=e(21737),s=e(11527),d=i()(function E(){u()(this,E),o()(this,"data",void 0),this.data=Math.random()});_.default=function(){var E=(0,n.Z)(function(){return new d},[]),h=(0,l.useState)({}),v=m()(h,2),P=v[1];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:E.data}),(0,s.jsx)(t.ZP,{type:"primary",onClick:function(){P({})},children:"Rerender"})]})}},15647:function(D,_,e){e.r(_),e.d(_,{default:function(){return l}});var f=e(28152),m=e.n(f),c=e(50959),i=e(73066),a=function(t,s){var d=(0,c.useState)(t),E=m()(d,2),h=E[0],v=E[1],P=(0,i.Z)(function(){v(t)},s),M=P.run;return(0,c.useEffect)(function(){M()},[t]),h},u=a,r=e(43497),o=e(11527),l=function(){var n=(0,c.useState)(),t=m()(n,2),s=t[0],d=t[1],E=u(s,{wait:500});return(0,o.jsxs)("div",{children:[(0,o.jsx)(r.Z,{value:s,onChange:function(v){return d(v.target.value)},placeholder:"Typed value",style:{width:280}}),(0,o.jsxs)("p",{style:{marginTop:16},children:["DebouncedValue: ",E]})]})}},17876:function(D,_,e){e.r(_);var f=e(28152),m=e.n(f),c=e(73066),i=e(50959),a=e(21737),u=e(11527);_.default=function(){var r=(0,i.useState)(0),o=m()(r,2),l=o[0],n=o[1],t=(0,c.Z)(function(){n(l+1)},{wait:500}),s=t.run;return(0,u.jsxs)("div",{children:[(0,u.jsxs)("p",{style:{marginTop:16},children:[" Clicked count: ",l," "]}),(0,u.jsx)(a.ZP,{type:"primary",onClick:s,children:"Click fast!"})]})}},3726:function(D,_,e){e.r(_);var f=e(28152),m=e.n(f),c=e(50959),i=e(66476),a=e(11527);_.default=function(){var u=(0,c.useState)(0),r=m()(u,2),o=r[0],l=r[1],n=(0,i.Z)(o);return(0,c.useEffect)(function(){var t=setInterval(function(){l(n.current+1)},1e3);return function(){return clearInterval(t)}},[]),(0,a.jsxs)("p",{children:["count: ",o]})}},22370:function(D,_,e){e.r(_);var f=e(28152),m=e.n(f),c=e(50959),i=e(68475),a=e(21737),u=e(7790),r=e(11527);_.default=function(){var o=(0,c.useState)(0),l=m()(o,2),n=l[0],t=l[1],s=(0,c.useCallback)(function(){i.ZP.info("Current count is ".concat(n))},[n]),d=(0,u.Z)(function(){i.ZP.info("Current count is ".concat(n))});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("p",{children:["count: ",n]}),(0,r.jsx)(a.ZP,{type:"primary",onClick:function(){t(function(h){return h+1})},children:"Add Count"}),(0,r.jsxs)("div",{style:{marginTop:16},children:[(0,r.jsx)(a.ZP,{type:"primary",onClick:s,children:"call callbackFn"}),(0,r.jsx)(a.ZP,{type:"primary",onClick:d,style:{marginLeft:8},children:"call memoizedFn"})]})]})}},89876:function(D,_,e){e.r(_);var f=e(28152),m=e.n(f),c=e(50959),i=e(7790),a=e(68475),u=e(21737),r=e(11527);_.default=function(){var l=(0,c.useState)(0),n=m()(l,2),t=n[0],s=n[1],d=(0,c.useCallback)(function(){a.ZP.info("Current count is ".concat(t))},[t]),E=(0,i.Z)(function(){a.ZP.info("Current count is ".concat(t))});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("p",{children:["count: ",t]}),(0,r.jsx)(u.ZP,{type:"primary",onClick:function(){s(function(v){return v+1})},children:"Add Count"}),(0,r.jsx)("p",{children:"You can click the button to see the number of sub-component renderings"}),(0,r.jsxs)("div",{style:{marginTop:32},children:[(0,r.jsx)("h3",{children:"Component with useCallback function:"}),(0,r.jsx)(o,{showCount:d})]}),(0,r.jsxs)("div",{style:{marginTop:32},children:[(0,r.jsx)("h3",{children:"Component with useMemoizedFn function:"}),(0,r.jsx)(o,{showCount:E})]})]})};var o=c.memo(function(l){var n=l.showCount,t=(0,c.useRef)(0);return t.current+=1,(0,r.jsxs)("div",{children:[(0,r.jsxs)("p",{children:["Render Count: ",t.current]}),(0,r.jsx)(u.ZP,{type:"primary",onClick:n,children:"showParentCount"})]})})},24155:function(D,_,e){e.r(_);var f=e(28152),m=e.n(f),c=e(50959),i=e(51989),a=e(66721),u=e(68475),r=e(21737),o=e(11527),l=function(){return(0,i.Z)(function(){u.ZP.info("mount")}),(0,o.jsx)("div",{children:"Hello World"})};_.default=function(){var n=(0,a.Z)(!1),t=m()(n,2),s=t[0],d=t[1].toggle;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.ZP,{type:"primary",onClick:d,children:s?"unmount":"mount"}),s&&(0,o.jsx)(l,{})]})}},18409:function(D,_,e){e.r(_),e.d(_,{default:function(){return l}});var f=e(50959),m=e(28152),c=e.n(m),i=function(){return typeof document!="undefined"?f.useLayoutEffect:f.useEffect},a=i;function u(){if(typeof window=="undefined")return"undetermined";var n=window.navigator.userAgent,t=/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)|(Mac)/i,s=/(Win32)|(Win64)|(Windows)|(WinCE)/i,d=/(iPhone)|(iPad)|(iPod)/i;return t.test(n)?"macos":d.test(n)?"ios":s.test(n)?"windows":/Android/i.test(n)?"android":/Linux/i.test(n)?"linux":"undetermined"}function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{getValueInEffect:!0},t=(0,f.useState)(n.getValueInEffect?"undetermined":u()),s=c()(t,2),d=s[0],E=s[1];return a(function(){n.getValueInEffect&&E(u)},[]),d}var o=e(11527),l=function(){var n=r({getValueInEffect:!1});return(0,o.jsxs)("div",{children:["Current operating system: ",n]})}},14629:function(D,_,e){e.r(_);var f=e(28152),m=e.n(f),c=e(68475),i=e(43497),a=e(21737),u=e(50959),r=e(69834),o=e(11527);function l(n){return new Promise(function(t,s){setTimeout(function(){Math.random()>.5?t():s(new Error("Failed to modify username"))},1e3)})}_.default=function(){var n=(0,u.useState)(""),t=m()(n,2),s=t[0],d=t[1],E=(0,r.Z)(l,{manual:!0,onSuccess:function(O,R){d(""),c.ZP.success('The username was changed to "'.concat(R[0],'" !'))},onError:function(O){c.ZP.error(O.message)}}),h=E.loading,v=E.run,P=E.cancel;return(0,o.jsxs)("div",{children:[(0,o.jsx)(i.Z,{onChange:function(O){return d(O.target.value)},value:s,placeholder:"Please enter username",style:{width:240,marginRight:16}}),(0,o.jsx)(a.ZP,{disabled:h,type:"primary",onClick:function(){return v(s)},children:h?"Loading":"Edit"}),(0,o.jsx)(a.ZP,{type:"primary",onClick:P,style:{marginLeft:16},children:"Cancel"})]})}},28525:function(D,_,e){e.r(_);var f=e(69834),m=e(90674),c=e.n(m),i=e(50959),a=e(11527);function u(){return new Promise(function(r,o){setTimeout(function(){Math.random()>.5?r(c().mock("@name")):o(new Error("Failed to get username"))},1e3)})}_.default=function(){var r=(0,f.Z)(u),o=r.data,l=r.error,n=r.loading;return l?(0,a.jsx)("div",{children:l.message}):n?(0,a.jsx)("div",{children:"loading..."}):(0,a.jsxs)("div",{children:["Username: ",o]})}},12449:function(D,_,e){e.r(_);var f=e(28152),m=e.n(f),c=e(50959),i=e(68475),a=e(43497),u=e(21737),r=e(69834),o=e(11527);function l(n){return new Promise(function(t,s){setTimeout(function(){Math.random()>.5?t():s(new Error("Failed to modify username"))},1e3)})}_.default=function(){var n=(0,c.useState)(""),t=m()(n,2),s=t[0],d=t[1],E=(0,r.Z)(l,{manual:!0,onBefore:function(M){i.ZP.info("Start Request: ".concat(M[0]))},onSuccess:function(M,O){d(""),i.ZP.success('The username was changed to "'.concat(O[0],'" !'))},onError:function(M){i.ZP.error(M.message)},onFinally:function(M,O,R){i.ZP.info("Request finish")}}),h=E.loading,v=E.run;return(0,o.jsxs)("div",{children:[(0,o.jsx)(a.Z,{value:s,placeholder:"Please enter username",style:{width:240,marginRight:16},onChange:function(M){return d(M.target.value)}}),(0,o.jsx)(u.ZP,{disabled:h,type:"primary",onClick:function(){return v(s)},children:h?"Loading":"Edit"})]})}},39482:function(D,_,e){e.r(_);var f=e(28152),m=e.n(f),c=e(50959),i=e(68475),a=e(43497),u=e(21737),r=e(69834),o=e(11527);function l(n){return new Promise(function(t,s){setTimeout(function(){Math.random()>.5?t():s(new Error("Failed to modify username"))},1e3)})}_.default=function(){var n=(0,c.useState)(""),t=m()(n,2),s=t[0],d=t[1],E=(0,r.Z)(l,{manual:!0,onSuccess:function(M,O){d(""),i.ZP.success('The username was changed to "'.concat(O[0],'" !'))},onError:function(M){i.ZP.error(M.message)}}),h=E.loading,v=E.run;return(0,o.jsxs)("div",{children:[(0,o.jsx)(a.Z,{onChange:function(M){return d(M.target.value)},value:s,placeholder:"Please enter username",style:{width:240,marginRight:16}}),(0,o.jsx)(u.ZP,{disabled:h,type:"primary",onClick:function(){return v(s)},children:h?"Loading":"Edit"})]})}},5329:function(D,_,e){e.r(_);var f=e(13448),m=e.n(f),c=e(74815),i=e.n(c),a=e(28152),u=e.n(a),r=e(68475),o=e(43497),l=e(21737),n=e(50959),t=e(69834),s=e(11527);function d(E){return new Promise(function(h,v){setTimeout(function(){Math.random()>.5?h():v(new Error("Failed to modify username"))},1e3)})}_.default=function(){var E=(0,n.useState)(""),h=u()(E,2),v=h[0],P=h[1],M=(0,t.Z)(d,{manual:!0}),O=M.loading,R=M.runAsync,j=function(){var p=i()(m()().mark(function U(){return m()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.prev=0,g.next=3,R(v);case 3:P(""),r.ZP.success('The username was changed to "'.concat(v,'" !')),g.next=10;break;case 7:g.prev=7,g.t0=g.catch(0),r.ZP.error(g.t0.message);case 10:case"end":return g.stop()}},U,null,[[0,7]])}));return function(){return p.apply(this,arguments)}}();return(0,s.jsxs)("div",{children:[(0,s.jsx)(o.Z,{value:v,placeholder:"Please enter username",style:{width:240,marginRight:16},onChange:function(U){return P(U.target.value)}}),(0,s.jsx)(l.ZP,{disabled:O,type:"primary",onClick:j,children:O?"Loading":"Edit"})]})}},77862:function(D,_,e){e.r(_);var f=e(28152),m=e.n(f),c=e(68475),i=e(43497),a=e(21737),u=e(50959),r=e(69834),o=e(90674),l=e.n(o),n=e(11527);function t(){return new Promise(function(d){setTimeout(function(){d(l().mock("@name"))},1e3)})}function s(d){return new Promise(function(E,h){setTimeout(function(){Math.random()>.5?E():h(new Error("Failed to modify username"))},1e3)})}_.default=function(){var d=(0,u.useRef)(),E=(0,u.useState)(""),h=m()(E,2),v=h[0],P=h[1],M=(0,r.Z)(t),O=M.data,R=M.mutate,j=(0,r.Z)(s,{manual:!0,onSuccess:function(g,k){P(""),c.ZP.success('The username was changed to "'.concat(k[0],'" !'))},onError:function(g){c.ZP.error(g.message),R(d.current)}}),p=j.run,U=function(){d.current=O,R(v),p(v)};return(0,n.jsxs)("div",{children:[(0,n.jsxs)("p",{children:["Username: ",O]}),(0,n.jsx)(i.Z,{value:v,placeholder:"Please enter username",style:{width:240,marginRight:16},onChange:function(g){return P(g.target.value)}}),(0,n.jsx)(a.ZP,{type:"primary",onClick:U,children:"Edit"})]})}},81771:function(D,_,e){e.r(_);var f=e(28152),m=e.n(f),c=e(50959),i=e(69834),a=e(90674),u=e.n(a),r=e(43497),o=e(21737),l=e(11527);function n(t){return new Promise(function(s){setTimeout(function(){s(u().mock("@name"))},1e3)})}_.default=function(){var t=(0,c.useState)(""),s=m()(t,2),d=s[0],E=s[1],h=(0,i.Z)(n,{defaultParams:["1"]}),v=h.data,P=h.run,M=h.params,O=function(){P(d)};return(0,l.jsxs)("div",{children:[(0,l.jsx)(r.Z,{value:d,placeholder:"Please enter userId",style:{width:240,marginRight:16},onChange:function(j){return E(j.target.value)}}),(0,l.jsx)(o.ZP,{type:"primary",onClick:O,children:"GetUserName"}),(0,l.jsxs)("p",{style:{marginTop:8},children:["UserId: ",M[0]]}),(0,l.jsxs)("p",{children:["Username: ",v]})]})}},69054:function(D,_,e){e.r(_);var f=e(50959),m=e(69834),c=e(90674),i=e.n(c),a=e(21737),u=e(11527);function r(o){return console.log("use-request-refresh-id",o),new Promise(function(l){setTimeout(function(){l(i().mock("@name"))},1e3)})}_.default=function(){var o=(0,m.Z)(function(d){return r(d)},{manual:!0}),l=o.data,n=o.loading,t=o.run,s=o.refresh;return(0,f.useEffect)(function(){t(1)},[]),n?(0,u.jsx)("div",{children:"loading..."}):(0,u.jsxs)("div",{children:[(0,u.jsxs)("p",{children:["Username: ",l]}),(0,u.jsx)(a.ZP,{onClick:s,type:"primary",children:"Refresh"})]})}},82861:function(D,_,e){e.r(_);var f=e(69834),m=e(90674),c=e.n(m),i=e(50959),a=e(11527);function u(){return new Promise(function(r){setTimeout(function(){r(c().mock("@name"))},1e3)})}_.default=function(){var r=(0,f.Z)(u),o=r.data,l=r.error,n=r.loading;return l?(0,a.jsx)("div",{children:"failed to load"}):n?(0,a.jsx)("div",{children:"loading..."}):(0,a.jsxs)("div",{children:["Username: ",o]})}},4895:function(D,_,e){e.r(_);var f=e(28152),m=e.n(f),c=e(50959),i=e(68475),a=e(43497),u=e(21737),r=e(69834),o=e(11527);function l(n){return new Promise(function(t){setTimeout(function(){t({success:!0})},1e3)})}_.default=function(){var n=(0,c.useState)(""),t=m()(n,2),s=t[0],d=t[1],E=(0,r.Z)(l,{manual:!0,onSuccess:function(M,O){M.success&&(d(""),i.ZP.success('The username was changed to "'.concat(O[0],'" !')))}}),h=E.loading,v=E.run;return(0,o.jsxs)("div",{children:[(0,o.jsx)(a.Z,{value:s,placeholder:"Please enter username",style:{width:240,marginRight:16},onChange:function(M){return d(M.target.value)}}),(0,o.jsx)(u.ZP,{disabled:h,type:"primary",onClick:function(){return v(s)},children:h?"Loading":"Edit"})]})}},18271:function(D,_,e){e.r(_),e.d(_,{default:function(){return l}});var f=e(28152),m=e.n(f),c=e(50959),i=e(7790);function a(n){var t=function(){return new Set(n)},s=(0,c.useState)(t),d=m()(s,2),E=d[0],h=d[1],v=(0,i.Z)(function(O){E.has(O)||h(function(R){var j=new Set(R);return j.add(O),j})}),P=(0,i.Z)(function(O){E.has(O)&&h(function(R){var j=new Set(R);return j.delete(O),j})}),M=(0,i.Z)(function(){return h(t())});return[E,{add:v,remove:P,reset:M}]}var u=a,r=e(21737),o=e(11527),l=function(){var n=u(["Hello"]),t=m()(n,2),s=t[0],d=t[1],E=d.add,h=d.remove,v=d.reset;return(0,o.jsxs)("div",{children:[(0,o.jsx)(r.ZP,{type:"primary",onClick:function(){return E(String(Date.now()))},children:"Add Timestamp"}),(0,o.jsx)(r.ZP,{type:"primary",onClick:function(){return h("Hello")},disabled:!s.has("Hello"),style:{margin:"0 8px"},children:"Remove Hello"}),(0,o.jsx)(r.ZP,{type:"primary",onClick:function(){return v()},children:"Reset"}),(0,o.jsx)("div",{style:{marginTop:16},children:(0,o.jsx)("pre",{children:JSON.stringify(Array.from(s),null,2)})})]})}},49907:function(D,_,e){e.r(_),e.d(_,{default:function(){return l}});var f=e(50959),m=e(12929),c=!!(typeof window!="undefined"&&window.document&&window.document.createElement),i=c,a={restorePrevTitle:!1};function u(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a,s=(0,f.useRef)(i?document.title:"");(0,f.useEffect)(function(){n.trim().length>0&&(document.title=n)},[n]),(0,m.Z)(function(){t.restorePrevTitle&&(document.title=s.current)})}var r=u,o=e(11527),l=function(){return r("Page Title"),(0,o.jsx)("div",{children:(0,o.jsx)("p",{children:"Set title of this page."})})}},73451:function(D,_,e){e.r(_);var f=e(28152),m=e.n(f),c=e(50959),i=e(22093),a=e(21737),u=e(11527);_.default=function(){var r=(0,i.Z)(),o=m()(r,2),l=o[0],n=o[1],t=n.toggle,s=n.setLeft,d=n.setRight;return(0,u.jsxs)("div",{children:[(0,u.jsxs)("p",{children:["\u5F53\u524D\u7684 state \u7684\u503C\u4E3A: ","".concat(l)]}),(0,u.jsxs)("p",{children:[(0,u.jsx)(a.ZP,{onClick:t,children:"toggle\u5207\u6362"}),(0,u.jsx)(a.ZP,{onClick:s,children:"setLeft\u5207\u6362"}),(0,u.jsx)(a.ZP,{onClick:d,children:"setRight\u5207\u6362"})]})]})}},18755:function(D,_,e){e.r(_);var f=e(28152),m=e.n(f),c=e(50959),i=e(22093),a=e(21737),u=e(11527);_.default=function(){var r=(0,i.Z)("OOR","Aimyon"),o=m()(r,2),l=o[0],n=o[1],t=n.toggle,s=n.set,d=n.setLeft,E=n.setRight;return(0,u.jsxs)("div",{children:[(0,u.jsxs)("p",{children:["Effects\uFF1A",l]}),(0,u.jsxs)("p",{children:[(0,u.jsx)(a.ZP,{type:"primary",onClick:t,children:"Toggle"}),(0,u.jsx)(a.ZP,{type:"primary",style:{margin:"0 8px"},onClick:function(){return s("OOR")},children:"Set OOR"}),(0,u.jsx)(a.ZP,{type:"primary",onClick:function(){return s("Aimyon")},children:"Set Aimyon"}),(0,u.jsx)(a.ZP,{type:"primary",onClick:d,style:{margin:"0 8px"},children:"setLeft"}),(0,u.jsx)(a.ZP,{type:"primary",onClick:E,children:"setRight"})]})]})}},25116:function(D,_,e){e.r(_);var f=e(28152),m=e.n(f),c=e(12929),i=e(66721),a=e(68475),u=e(50959),r=e(11527),o=function(){return(0,c.Z)(function(){a.ZP.info("Component unmount")}),(0,r.jsx)("p",{children:"Et cetera!!!"})};_.default=function(){var l=(0,i.Z)(!0),n=m()(l,2),t=n[0],s=n[1].toggle;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:s,children:t?"unmount":"mount"}),t&&(0,r.jsx)(o,{})]})}},58825:function(D,_,e){e.r(_),e.d(_,{default:function(){return t}});var f=e(28152),m=e.n(f),c=e(50959),i=function(){var d=(0,c.useRef)(!1);return(0,c.useEffect)(function(){return d.current=!1,function(){d.current=!0}},[]),d},a=i,u=e(66721),r=e(68475),o=e(21737),l=e(11527),n=function(){var d=a();return(0,c.useEffect)(function(){setTimeout(function(){d.current||r.ZP.info("component is alive")},3e3)},[]),(0,l.jsx)("p",{children:"Hello World!"})},t=function(){var s=(0,u.Z)(!0),d=m()(s,2),E=d[0],h=d[1].toggle;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.ZP,{type:"primary",onClick:h,children:E?"unmount":"mount"}),E&&(0,l.jsx)(n,{})]})}},9007:function(D,_,e){e.r(_);var f=e(50959),m=e(14327),c=e(21737),i=e(11527);_.default=function(){var a=(0,m.Z)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{children:["Time: ",Date.now()]}),(0,i.jsx)(c.ZP,{type:"primary",onClick:a,style:{marginTop:8},children:"update"})]})}},66721:function(D,_,e){e.d(_,{Z:function(){return u}});var f=e(28152),m=e.n(f),c=e(50959),i=e(22093),a=e(83350);function u(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;(0,a.Z)(r)||(r=!1);var o=(0,i.Z)(r),l=m()(o,2),n=l[0],t=l[1],s=t.toggle,d=t.set,E=(0,c.useMemo)(function(){var h=function(){return d(!0)},v=function(){return d(!1)};return{toggle:s,setTrue:h,setFalse:v,set:function(M){return d(M)}}},[]);return[n,E]}},56973:function(D,_,e){e.d(_,{Z:function(){return c}});var f=e(50959);function m(i,a){if(i===a)return!0;for(var u=0;u3&&arguments[3]!==void 0?arguments[3]:{};j()(this,z),g()(this,"count",0),g()(this,"pluginImpls",void 0),g()(this,"state",{loading:!1,params:void 0,data:void 0,error:void 0}),this.serviceRef=L,this.options=A,this.subscribe=I,this.initState=B,this.state=i()(i()({},this.state),{},{loading:!A.manual},B)}return U()(z,[{key:"cancel",value:function(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")}},{key:"run",value:function(){var A=this;this.runAsync.apply(this,arguments).catch(function(I){A.options.onError||console.error(I)})}},{key:"runAsync",value:function(){var L=O()(P()().mark(function I(){var B,K,y,W,S,G,C,b,H,V,q,Y,ee,$,ne=arguments;return P()().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:for(this.count+=1,B=this.count,K=ne.length,y=new Array(K),W=0;W1?I-1:0),K=1;K0&&arguments[0]!==void 0?arguments[0]:{};this.state=i()(i()({},this.state),A),this.subscribe()}}]),z}(),Q=["manual"],X=function(L){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],B=A.manual,K=B===void 0?!1:B,y=o()(A,Q);h.Z&&A.defaultParams&&!Array.isArray(A.defaultParams)&&console.warn("expected defaultParams is array, but got ".concat(u()(A.defaultParams)));var W=i()({manual:K},y),S=(0,n.Z)(L),G=(0,E.Z)(),C=(0,l.Z)(function(){var b=I.map(function(H){var V;return H==null||(V=H.onInit)===null||V===void 0?void 0:V.call(H,W)}).filter(Boolean);return new x(S,W,G,Object.assign.apply(Object,[{}].concat(m()(b))))},[]);return C.options=W,C.pluginImpls=I.map(function(b){return b(C,W)}),(0,t.Z)(function(){if(!K){var b=C.state.params||A.defaultParams||[];C.run.apply(C,m()(b))}}),(0,d.Z)(function(){C.cancel()}),{data:C.state.data,loading:C.state.loading,run:(0,s.Z)(C.run.bind(C)),runAsync:(0,s.Z)(C.runAsync.bind(C)),error:C.state.error,params:C.state.params||[],cancel:(0,s.Z)(C.cancel.bind(C)),mutate:(0,s.Z)(C.mutate.bind(C)),refresh:(0,s.Z)(C.refresh.bind(C)),refreshAsync:(0,s.Z)(C.refreshAsync.bind(C))}},J=X,N=function(L,A,I){return J(L,A,m()(I||[]))},w=N,te=w},22093:function(D,_,e){var f=e(28152),m=e.n(f),c=e(50959);function i(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,u=arguments.length>1?arguments[1]:void 0,r=(0,c.useState)(a),o=m()(r,2),l=o[0],n=o[1],t=(0,c.useMemo)(function(){var s=u===void 0?!a:u,d=function(){return n(function(M){return M===a?s:a})},E=function(M){return n(M)},h=function(){return n(a)},v=function(){return n(s)};return{set:E,toggle:d,setLeft:h,setRight:v}},[]);return[l,t]}_.Z=i},12929:function(D,_,e){var f=e(27566),m=e.n(f),c=e(50959),i=e(66476),a=e(79841),u=e(76139),r=function(l){u.Z&&((0,a.mf)(l)||console.error("useUnmount expected parameter is a function, but got ".concat(m()(l))));var n=(0,i.Z)(l);(0,c.useEffect)(function(){return function(){return n.current()}},[])};_.Z=r},14327:function(D,_,e){var f=e(28152),m=e.n(f),c=e(50959),i=function(){var u=(0,c.useState)({}),r=m()(u,2),o=r[1];return(0,c.useCallback)(function(){return o({})},[])};_.Z=i},79841:function(D,_,e){e.d(_,{mf:function(){return i}});var f=e(27566),m=e.n(f),c=function(n){return n!==null&&_typeof(n)==="object"},i=function(n){return typeof n=="function"},a=function(n){return typeof n=="string"},u=function(n){return typeof n=="boolean"},r=function(n){return typeof n=="number"},o=function(n){return typeof n=="undefined"}},76139:function(D,_){var e=!1;_.Z=e}}]); diff --git a/demos.712f3f3a.async.js b/demos.712f3f3a.async.js new file mode 100644 index 0000000..4d6ad99 --- /dev/null +++ b/demos.712f3f3a.async.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunketc_hooks=self.webpackChunketc_hooks||[]).push([[433],{12113:function(D,u,e){e.r(u);var f=e(28152),m=e.n(f),c=e(50959),d=e(66721),a=e(21737),_=e(11527);u.default=function(){var o=(0,d.Z)(!0),r=m()(o,2),l=r[0],n=r[1],t=n.toggle,s=n.setTrue,i=n.setFalse;return(0,_.jsxs)("div",{children:[(0,_.jsxs)("p",{children:["Effects\uFF1A",JSON.stringify(l)]}),(0,_.jsxs)("p",{children:[(0,_.jsx)(a.ZP,{type:"primary",onClick:t,children:"Toggle"}),(0,_.jsx)(a.ZP,{type:"primary",onClick:i,style:{margin:"0 16px"},children:"setFalse"}),(0,_.jsx)(a.ZP,{type:"primary",onClick:s,children:"setTrue"})]})]})}},12846:function(D,u,e){e.r(u),e.d(u,{default:function(){return o}});var f=e(50959),m=function(l){var n=(0,f.useRef)(l);return(0,f.useEffect)(function(){n.current=l}),(0,f.useMemo)(function(){return function(){for(var t,s=arguments.length,i=new Array(s),h=0;h0&&arguments[0]!==void 0?arguments[0]:{},h=i.timeout,E=h===void 0?2e3:h,v=(0,c.useState)(null),P=m()(v,2),M=P[0],O=P[1],R=(0,c.useState)(!1),j=m()(R,2),W=j[0],U=j[1],Z=(0,c.useState)(null),g=m()(Z,2),k=g[0],F=g[1],x=function(N){window.clearTimeout(k),F(window.setTimeout(function(){return U(!1)},E)),U(N)},Q=function(N){"clipboard"in navigator?navigator.clipboard.writeText(N).then(function(){x(!0),d.ZP.success("\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F")}).catch(function(w){return O(w)}):O(new Error("useClipboard: navigator.clipboard is not supported"))},X=function(){U(!1),O(null),window.clearTimeout(k)};return{copy:Q,reset:X,error:M,copied:W}},_=a,o=e(43497),r=e(21737),l=e(11527),n=function(){var i=(0,c.useState)("Hello, world!"),h=m()(i,2),E=h[0],v=h[1],P=_({timeout:500});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.Z,{value:E,onChange:function(O){return v(O.target.value)}}),(0,l.jsx)(r.ZP,{color:P.copied?"teal":"blue",onClick:function(){return P.copy(E)},children:P.copied?"Copied":"Copy"})]})},t=n},25188:function(D,u,e){e.r(u),e.d(u,{default:function(){return n}});var f=e(50959),m=e(28152),c=e.n(m);function d(t,s){try{return t.addEventListener("change",s),function(){return t.removeEventListener("change",s)}}catch(i){return t.addListener(s),function(){return t.removeListener(s)}}}function a(t,s){return typeof s=="boolean"?s:typeof window!="undefined"&&"matchMedia"in window?window.matchMedia(t).matches:!1}function _(t,s){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{getInitialValueInEffect:!0},h=i.getInitialValueInEffect,E=(0,f.useState)(h?s:a(t,s)),v=c()(E,2),P=v[0],M=v[1],O=(0,f.useRef)();return(0,f.useEffect)(function(){if("matchMedia"in window)return O.current=window.matchMedia(t),M(O.current.matches),d(O.current,function(R){return M(R.matches)})},[t]),P}function o(t,s){return _("(prefers-color-scheme: dark)",t==="dark",s)?"dark":"light"}var r=o,l=e(11527),n=function(){var t=r();return(0,l.jsxs)("div",{className:"dark:text-white",children:["Your system color scheme is ",t]})}},28111:function(D,u,e){e.r(u),e.d(u,{default:function(){return s}});var f=e(28152),m=e.n(f),c=e(50959),d=e(77117),a=e.n(d);function _(i,h,E){return h===void 0&&E===void 0?i:h!==void 0&&E===void 0?Math.max(i,h):Math.min(h===void 0&&E!==void 0?i:Math.max(i,h),E)}var o={min:-1/0,max:1/0},r=function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o,v=a()(a()({},o),E),P=v.min,M=v.max,O=(0,c.useState)(_(h,P,M)),R=m()(O,2),j=R[0],W=R[1],U=function(x){return W(_(x,P,M))},Z=function(){return W(_(h,P,M))},g=function(){return W(function(x){return _(x+1,P,M)})},k=function(){return W(function(x){return _(x-1,P,M)})};return[j,{set:U,reset:Z,increment:g,decrement:k}]},l=r,n=e(21737),t=e(11527),s=function(){var i=l(0,{min:0,max:10}),h=m()(i,2),E=h[0],v=h[1];return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{style:{marginTop:16},children:[" ",E," "]}),(0,t.jsxs)("div",{style:{display:"flex",gap:2},children:[(0,t.jsx)(n.ZP,{onClick:v.increment,children:"Increment"}),(0,t.jsx)(n.ZP,{onClick:v.decrement,children:"Decrement"}),(0,t.jsx)(n.ZP,{onClick:v.reset,children:"Reset"}),(0,t.jsx)(n.ZP,{onClick:function(){return v.set(5)},children:"Set 5"})]})]})}},34453:function(D,u,e){e.r(u);var f=e(28152),m=e.n(f),c=e(96345),d=e.n(c),a=e(15033),_=e.n(a),o=e(21320),r=e.n(o),l=e(50959),n=e(56973),t=e(21737),s=e(11527),i=d()(function h(){_()(this,h),r()(this,"data",void 0),this.data=Math.random()});u.default=function(){var h=(0,n.Z)(function(){return new i},[]),E=(0,l.useState)({}),v=m()(E,2),P=v[1];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:h.data}),(0,s.jsx)(t.ZP,{type:"primary",onClick:function(){P({})},children:"Rerender"})]})}},15647:function(D,u,e){e.r(u),e.d(u,{default:function(){return l}});var f=e(28152),m=e.n(f),c=e(50959),d=e(73066),a=function(t,s){var i=(0,c.useState)(t),h=m()(i,2),E=h[0],v=h[1],P=(0,d.Z)(function(){v(t)},s),M=P.run;return(0,c.useEffect)(function(){M()},[t]),E},_=a,o=e(43497),r=e(11527),l=function(){var n=(0,c.useState)(),t=m()(n,2),s=t[0],i=t[1],h=_(s,{wait:500});return(0,r.jsxs)("div",{children:[(0,r.jsx)(o.Z,{value:s,onChange:function(v){return i(v.target.value)},placeholder:"Typed value",style:{width:280}}),(0,r.jsxs)("p",{style:{marginTop:16},children:["DebouncedValue: ",h]})]})}},17876:function(D,u,e){e.r(u);var f=e(28152),m=e.n(f),c=e(73066),d=e(50959),a=e(21737),_=e(11527);u.default=function(){var o=(0,d.useState)(0),r=m()(o,2),l=r[0],n=r[1],t=(0,c.Z)(function(){n(l+1)},{wait:500}),s=t.run;return(0,_.jsxs)("div",{children:[(0,_.jsxs)("p",{style:{marginTop:16},children:[" Clicked count: ",l," "]}),(0,_.jsx)(a.ZP,{type:"primary",onClick:s,children:"Click fast!"})]})}},3726:function(D,u,e){e.r(u);var f=e(28152),m=e.n(f),c=e(50959),d=e(66476),a=e(11527);u.default=function(){var _=(0,c.useState)(0),o=m()(_,2),r=o[0],l=o[1],n=(0,d.Z)(r);return(0,c.useEffect)(function(){var t=setInterval(function(){l(n.current+1)},1e3);return function(){return clearInterval(t)}},[]),(0,a.jsxs)("p",{children:["count: ",r]})}},22370:function(D,u,e){e.r(u);var f=e(28152),m=e.n(f),c=e(50959),d=e(68475),a=e(21737),_=e(7790),o=e(11527);u.default=function(){var r=(0,c.useState)(0),l=m()(r,2),n=l[0],t=l[1],s=(0,c.useCallback)(function(){d.ZP.info("Current count is ".concat(n))},[n]),i=(0,_.Z)(function(){d.ZP.info("Current count is ".concat(n))});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("p",{children:["count: ",n]}),(0,o.jsx)(a.ZP,{type:"primary",onClick:function(){t(function(E){return E+1})},children:"Add Count"}),(0,o.jsxs)("div",{style:{marginTop:16},children:[(0,o.jsx)(a.ZP,{type:"primary",onClick:s,children:"call callbackFn"}),(0,o.jsx)(a.ZP,{type:"primary",onClick:i,style:{marginLeft:8},children:"call memoizedFn"})]})]})}},89876:function(D,u,e){e.r(u);var f=e(28152),m=e.n(f),c=e(50959),d=e(7790),a=e(68475),_=e(21737),o=e(11527);u.default=function(){var l=(0,c.useState)(0),n=m()(l,2),t=n[0],s=n[1],i=(0,c.useCallback)(function(){a.ZP.info("Current count is ".concat(t))},[t]),h=(0,d.Z)(function(){a.ZP.info("Current count is ".concat(t))});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("p",{children:["count: ",t]}),(0,o.jsx)(_.ZP,{type:"primary",onClick:function(){s(function(v){return v+1})},children:"Add Count"}),(0,o.jsx)("p",{children:"You can click the button to see the number of sub-component renderings"}),(0,o.jsxs)("div",{style:{marginTop:32},children:[(0,o.jsx)("h3",{children:"Component with useCallback function:"}),(0,o.jsx)(r,{showCount:i})]}),(0,o.jsxs)("div",{style:{marginTop:32},children:[(0,o.jsx)("h3",{children:"Component with useMemoizedFn function:"}),(0,o.jsx)(r,{showCount:h})]})]})};var r=c.memo(function(l){var n=l.showCount,t=(0,c.useRef)(0);return t.current+=1,(0,o.jsxs)("div",{children:[(0,o.jsxs)("p",{children:["Render Count: ",t.current]}),(0,o.jsx)(_.ZP,{type:"primary",onClick:n,children:"showParentCount"})]})})},24155:function(D,u,e){e.r(u);var f=e(28152),m=e.n(f),c=e(50959),d=e(51989),a=e(66721),_=e(68475),o=e(21737),r=e(11527),l=function(){return(0,d.Z)(function(){_.ZP.info("mount")}),(0,r.jsx)("div",{children:"Hello World"})};u.default=function(){var n=(0,a.Z)(!1),t=m()(n,2),s=t[0],i=t[1].toggle;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.ZP,{type:"primary",onClick:i,children:s?"unmount":"mount"}),s&&(0,r.jsx)(l,{})]})}},18409:function(D,u,e){e.r(u),e.d(u,{default:function(){return l}});var f=e(50959),m=e(28152),c=e.n(m),d=function(){return typeof document!="undefined"?f.useLayoutEffect:f.useEffect},a=d;function _(){if(typeof window=="undefined")return"undetermined";var n=window.navigator.userAgent,t=/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)|(Mac)/i,s=/(Win32)|(Win64)|(Windows)|(WinCE)/i,i=/(iPhone)|(iPad)|(iPod)/i;return t.test(n)?"macos":i.test(n)?"ios":s.test(n)?"windows":/Android/i.test(n)?"android":/Linux/i.test(n)?"linux":"undetermined"}function o(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{getValueInEffect:!0},t=(0,f.useState)(n.getValueInEffect?"undetermined":_()),s=c()(t,2),i=s[0],h=s[1];return a(function(){n.getValueInEffect&&h(_)},[]),i}var r=e(11527),l=function(){var n=o({getValueInEffect:!1});return(0,r.jsxs)("div",{children:["Current operating system: ",n]})}},14629:function(D,u,e){e.r(u);var f=e(28152),m=e.n(f),c=e(68475),d=e(43497),a=e(21737),_=e(50959),o=e(69834),r=e(11527);function l(n){return new Promise(function(t,s){setTimeout(function(){Math.random()>.5?t():s(new Error("Failed to modify username"))},1e3)})}u.default=function(){var n=(0,_.useState)(""),t=m()(n,2),s=t[0],i=t[1],h=(0,o.Z)(l,{manual:!0,onSuccess:function(O,R){i(""),c.ZP.success('The username was changed to "'.concat(R[0],'" !'))},onError:function(O){c.ZP.error(O.message)}}),E=h.loading,v=h.run,P=h.cancel;return(0,r.jsxs)("div",{children:[(0,r.jsx)(d.Z,{onChange:function(O){return i(O.target.value)},value:s,placeholder:"Please enter username",style:{width:240,marginRight:16}}),(0,r.jsx)(a.ZP,{disabled:E,type:"primary",onClick:function(){return v(s)},children:E?"Loading":"Edit"}),(0,r.jsx)(a.ZP,{type:"primary",onClick:P,style:{marginLeft:16},children:"Cancel"})]})}},28525:function(D,u,e){e.r(u);var f=e(69834),m=e(90674),c=e.n(m),d=e(50959),a=e(11527);function _(){return new Promise(function(o,r){setTimeout(function(){Math.random()>.5?o(c().mock("@name")):r(new Error("Failed to get username"))},1e3)})}u.default=function(){var o=(0,f.Z)(_),r=o.data,l=o.error,n=o.loading;return l?(0,a.jsx)("div",{children:l.message}):n?(0,a.jsx)("div",{children:"loading..."}):(0,a.jsxs)("div",{children:["Username: ",r]})}},12449:function(D,u,e){e.r(u);var f=e(28152),m=e.n(f),c=e(50959),d=e(68475),a=e(43497),_=e(21737),o=e(69834),r=e(11527);function l(n){return new Promise(function(t,s){setTimeout(function(){Math.random()>.5?t():s(new Error("Failed to modify username"))},1e3)})}u.default=function(){var n=(0,c.useState)(""),t=m()(n,2),s=t[0],i=t[1],h=(0,o.Z)(l,{manual:!0,onBefore:function(M){d.ZP.info("Start Request: ".concat(M[0]))},onSuccess:function(M,O){i(""),d.ZP.success('The username was changed to "'.concat(O[0],'" !'))},onError:function(M){d.ZP.error(M.message)},onFinally:function(M,O,R){d.ZP.info("Request finish")}}),E=h.loading,v=h.run;return(0,r.jsxs)("div",{children:[(0,r.jsx)(a.Z,{value:s,placeholder:"Please enter username",style:{width:240,marginRight:16},onChange:function(M){return i(M.target.value)}}),(0,r.jsx)(_.ZP,{disabled:E,type:"primary",onClick:function(){return v(s)},children:E?"Loading":"Edit"})]})}},39482:function(D,u,e){e.r(u);var f=e(28152),m=e.n(f),c=e(50959),d=e(68475),a=e(43497),_=e(21737),o=e(69834),r=e(11527);function l(n){return new Promise(function(t,s){setTimeout(function(){Math.random()>.5?t():s(new Error("Failed to modify username"))},1e3)})}u.default=function(){var n=(0,c.useState)(""),t=m()(n,2),s=t[0],i=t[1],h=(0,o.Z)(l,{manual:!0,onSuccess:function(M,O){i(""),d.ZP.success('The username was changed to "'.concat(O[0],'" !'))},onError:function(M){d.ZP.error(M.message)}}),E=h.loading,v=h.run;return(0,r.jsxs)("div",{children:[(0,r.jsx)(a.Z,{onChange:function(M){return i(M.target.value)},value:s,placeholder:"Please enter username",style:{width:240,marginRight:16}}),(0,r.jsx)(_.ZP,{disabled:E,type:"primary",onClick:function(){return v(s)},children:E?"Loading":"Edit"})]})}},5329:function(D,u,e){e.r(u);var f=e(13448),m=e.n(f),c=e(74815),d=e.n(c),a=e(28152),_=e.n(a),o=e(68475),r=e(43497),l=e(21737),n=e(50959),t=e(69834),s=e(11527);function i(h){return new Promise(function(E,v){setTimeout(function(){Math.random()>.5?E():v(new Error("Failed to modify username"))},1e3)})}u.default=function(){var h=(0,n.useState)(""),E=_()(h,2),v=E[0],P=E[1],M=(0,t.Z)(i,{manual:!0}),O=M.loading,R=M.runAsync,j=function(){var W=d()(m()().mark(function U(){return m()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.prev=0,g.next=3,R(v);case 3:P(""),o.ZP.success('The username was changed to "'.concat(v,'" !')),g.next=10;break;case 7:g.prev=7,g.t0=g.catch(0),o.ZP.error(g.t0.message);case 10:case"end":return g.stop()}},U,null,[[0,7]])}));return function(){return W.apply(this,arguments)}}();return(0,s.jsxs)("div",{children:[(0,s.jsx)(r.Z,{value:v,placeholder:"Please enter username",style:{width:240,marginRight:16},onChange:function(U){return P(U.target.value)}}),(0,s.jsx)(l.ZP,{disabled:O,type:"primary",onClick:j,children:O?"Loading":"Edit"})]})}},77862:function(D,u,e){e.r(u);var f=e(28152),m=e.n(f),c=e(68475),d=e(43497),a=e(21737),_=e(50959),o=e(69834),r=e(90674),l=e.n(r),n=e(11527);function t(){return new Promise(function(i){setTimeout(function(){i(l().mock("@name"))},1e3)})}function s(i){return new Promise(function(h,E){setTimeout(function(){Math.random()>.5?h():E(new Error("Failed to modify username"))},1e3)})}u.default=function(){var i=(0,_.useRef)(),h=(0,_.useState)(""),E=m()(h,2),v=E[0],P=E[1],M=(0,o.Z)(t),O=M.data,R=M.mutate,j=(0,o.Z)(s,{manual:!0,onSuccess:function(g,k){P(""),c.ZP.success('The username was changed to "'.concat(k[0],'" !'))},onError:function(g){c.ZP.error(g.message),R(i.current)}}),W=j.run,U=function(){i.current=O,R(v),W(v)};return(0,n.jsxs)("div",{children:[(0,n.jsxs)("p",{children:["Username: ",O]}),(0,n.jsx)(d.Z,{value:v,placeholder:"Please enter username",style:{width:240,marginRight:16},onChange:function(g){return P(g.target.value)}}),(0,n.jsx)(a.ZP,{type:"primary",onClick:U,children:"Edit"})]})}},81771:function(D,u,e){e.r(u);var f=e(28152),m=e.n(f),c=e(50959),d=e(69834),a=e(90674),_=e.n(a),o=e(43497),r=e(21737),l=e(11527);function n(t){return new Promise(function(s){setTimeout(function(){s(_().mock("@name"))},1e3)})}u.default=function(){var t=(0,c.useState)(""),s=m()(t,2),i=s[0],h=s[1],E=(0,d.Z)(n,{defaultParams:["1"]}),v=E.data,P=E.run,M=E.params,O=function(){P(i)};return(0,l.jsxs)("div",{children:[(0,l.jsx)(o.Z,{value:i,placeholder:"Please enter userId",style:{width:240,marginRight:16},onChange:function(j){return h(j.target.value)}}),(0,l.jsx)(r.ZP,{type:"primary",onClick:O,children:"GetUserName"}),(0,l.jsxs)("p",{style:{marginTop:8},children:["UserId: ",M[0]]}),(0,l.jsxs)("p",{children:["Username: ",v]})]})}},69054:function(D,u,e){e.r(u);var f=e(50959),m=e(69834),c=e(90674),d=e.n(c),a=e(21737),_=e(11527);function o(r){return console.log("use-request-refresh-id",r),new Promise(function(l){setTimeout(function(){l(d().mock("@name"))},1e3)})}u.default=function(){var r=(0,m.Z)(function(i){return o(i)},{manual:!0}),l=r.data,n=r.loading,t=r.run,s=r.refresh;return(0,f.useEffect)(function(){t(1)},[]),n?(0,_.jsx)("div",{children:"loading..."}):(0,_.jsxs)("div",{children:[(0,_.jsxs)("p",{children:["Username: ",l]}),(0,_.jsx)(a.ZP,{onClick:s,type:"primary",children:"Refresh"})]})}},82861:function(D,u,e){e.r(u);var f=e(69834),m=e(90674),c=e.n(m),d=e(50959),a=e(11527);function _(){return new Promise(function(o){setTimeout(function(){o(c().mock("@name"))},1e3)})}u.default=function(){var o=(0,f.Z)(_),r=o.data,l=o.error,n=o.loading;return l?(0,a.jsx)("div",{children:"failed to load"}):n?(0,a.jsx)("div",{children:"loading..."}):(0,a.jsxs)("div",{children:["Username: ",r]})}},4895:function(D,u,e){e.r(u);var f=e(28152),m=e.n(f),c=e(50959),d=e(68475),a=e(43497),_=e(21737),o=e(69834),r=e(11527);function l(n){return new Promise(function(t){setTimeout(function(){t({success:!0})},1e3)})}u.default=function(){var n=(0,c.useState)(""),t=m()(n,2),s=t[0],i=t[1],h=(0,o.Z)(l,{manual:!0,onSuccess:function(M,O){M.success&&(i(""),d.ZP.success('The username was changed to "'.concat(O[0],'" !')))}}),E=h.loading,v=h.run;return(0,r.jsxs)("div",{children:[(0,r.jsx)(a.Z,{value:s,placeholder:"Please enter username",style:{width:240,marginRight:16},onChange:function(M){return i(M.target.value)}}),(0,r.jsx)(_.ZP,{disabled:E,type:"primary",onClick:function(){return v(s)},children:E?"Loading":"Edit"})]})}},56235:function(D,u,e){e.r(u),e.d(u,{default:function(){return l}});var f=e(28152),m=e.n(f),c=e(21737),d=e(50959),a=e(7790),_=function(t){var s=(0,d.useState)(t),i=m()(s,2),h=i[0],E=i[1],v=(0,a.Z)(function(){E(t)});return[h,E,v]},o=_,r=e(11527),l=function(){var n=o({hello:"",count:0}),t=m()(n,3),s=t[0],i=t[1],h=t[2];return(0,r.jsxs)("div",{children:[(0,r.jsx)("pre",{children:JSON.stringify(s,null,2)}),(0,r.jsxs)("p",{children:[(0,r.jsx)(c.ZP,{style:{marginRight:"8px"},onClick:function(){return i({hello:"world",count:1})},children:"set hello and count"}),(0,r.jsx)(c.ZP,{onClick:h,children:"resetState"})]})]})}},18271:function(D,u,e){e.r(u),e.d(u,{default:function(){return l}});var f=e(28152),m=e.n(f),c=e(50959),d=e(7790);function a(n){var t=function(){return new Set(n)},s=(0,c.useState)(t),i=m()(s,2),h=i[0],E=i[1],v=(0,d.Z)(function(O){h.has(O)||E(function(R){var j=new Set(R);return j.add(O),j})}),P=(0,d.Z)(function(O){h.has(O)&&E(function(R){var j=new Set(R);return j.delete(O),j})}),M=(0,d.Z)(function(){return E(t())});return[h,{add:v,remove:P,reset:M}]}var _=a,o=e(21737),r=e(11527),l=function(){var n=_(["Hello"]),t=m()(n,2),s=t[0],i=t[1],h=i.add,E=i.remove,v=i.reset;return(0,r.jsxs)("div",{children:[(0,r.jsx)(o.ZP,{type:"primary",onClick:function(){return h(String(Date.now()))},children:"Add Timestamp"}),(0,r.jsx)(o.ZP,{type:"primary",onClick:function(){return E("Hello")},disabled:!s.has("Hello"),style:{margin:"0 8px"},children:"Remove Hello"}),(0,r.jsx)(o.ZP,{type:"primary",onClick:function(){return v()},children:"Reset"}),(0,r.jsx)("div",{style:{marginTop:16},children:(0,r.jsx)("pre",{children:JSON.stringify(Array.from(s),null,2)})})]})}},49907:function(D,u,e){e.r(u),e.d(u,{default:function(){return l}});var f=e(50959),m=e(12929),c=!!(typeof window!="undefined"&&window.document&&window.document.createElement),d=c,a={restorePrevTitle:!1};function _(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a,s=(0,f.useRef)(d?document.title:"");(0,f.useEffect)(function(){n.trim().length>0&&(document.title=n)},[n]),(0,m.Z)(function(){t.restorePrevTitle&&(document.title=s.current)})}var o=_,r=e(11527),l=function(){return o("Page Title"),(0,r.jsx)("div",{children:(0,r.jsx)("p",{children:"Set title of this page."})})}},73451:function(D,u,e){e.r(u);var f=e(28152),m=e.n(f),c=e(50959),d=e(22093),a=e(21737),_=e(11527);u.default=function(){var o=(0,d.Z)(),r=m()(o,2),l=r[0],n=r[1],t=n.toggle,s=n.setLeft,i=n.setRight;return(0,_.jsxs)("div",{children:[(0,_.jsxs)("p",{children:["\u5F53\u524D\u7684 state \u7684\u503C\u4E3A: ","".concat(l)]}),(0,_.jsxs)("p",{children:[(0,_.jsx)(a.ZP,{onClick:t,children:"toggle\u5207\u6362"}),(0,_.jsx)(a.ZP,{onClick:s,children:"setLeft\u5207\u6362"}),(0,_.jsx)(a.ZP,{onClick:i,children:"setRight\u5207\u6362"})]})]})}},18755:function(D,u,e){e.r(u);var f=e(28152),m=e.n(f),c=e(50959),d=e(22093),a=e(21737),_=e(11527);u.default=function(){var o=(0,d.Z)("OOR","Aimyon"),r=m()(o,2),l=r[0],n=r[1],t=n.toggle,s=n.set,i=n.setLeft,h=n.setRight;return(0,_.jsxs)("div",{children:[(0,_.jsxs)("p",{children:["Effects\uFF1A",l]}),(0,_.jsxs)("p",{children:[(0,_.jsx)(a.ZP,{type:"primary",onClick:t,children:"Toggle"}),(0,_.jsx)(a.ZP,{type:"primary",style:{margin:"0 8px"},onClick:function(){return s("OOR")},children:"Set OOR"}),(0,_.jsx)(a.ZP,{type:"primary",onClick:function(){return s("Aimyon")},children:"Set Aimyon"}),(0,_.jsx)(a.ZP,{type:"primary",onClick:i,style:{margin:"0 8px"},children:"setLeft"}),(0,_.jsx)(a.ZP,{type:"primary",onClick:h,children:"setRight"})]})]})}},25116:function(D,u,e){e.r(u);var f=e(28152),m=e.n(f),c=e(12929),d=e(66721),a=e(68475),_=e(50959),o=e(11527),r=function(){return(0,c.Z)(function(){a.ZP.info("Component unmount")}),(0,o.jsx)("p",{children:"Et cetera!!!"})};u.default=function(){var l=(0,d.Z)(!0),n=m()(l,2),t=n[0],s=n[1].toggle;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("button",{type:"button",onClick:s,children:t?"unmount":"mount"}),t&&(0,o.jsx)(r,{})]})}},58825:function(D,u,e){e.r(u),e.d(u,{default:function(){return t}});var f=e(28152),m=e.n(f),c=e(50959),d=function(){var i=(0,c.useRef)(!1);return(0,c.useEffect)(function(){return i.current=!1,function(){i.current=!0}},[]),i},a=d,_=e(66721),o=e(68475),r=e(21737),l=e(11527),n=function(){var i=a();return(0,c.useEffect)(function(){setTimeout(function(){i.current||o.ZP.info("component is alive")},3e3)},[]),(0,l.jsx)("p",{children:"Hello World!"})},t=function(){var s=(0,_.Z)(!0),i=m()(s,2),h=i[0],E=i[1].toggle;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.ZP,{type:"primary",onClick:E,children:h?"unmount":"mount"}),h&&(0,l.jsx)(n,{})]})}},9007:function(D,u,e){e.r(u);var f=e(50959),m=e(14327),c=e(21737),d=e(11527);u.default=function(){var a=(0,m.Z)();return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{children:["Time: ",Date.now()]}),(0,d.jsx)(c.ZP,{type:"primary",onClick:a,style:{marginTop:8},children:"update"})]})}},66721:function(D,u,e){e.d(u,{Z:function(){return _}});var f=e(28152),m=e.n(f),c=e(50959),d=e(22093),a=e(83350);function _(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;(0,a.Z)(o)||(o=!1);var r=(0,d.Z)(o),l=m()(r,2),n=l[0],t=l[1],s=t.toggle,i=t.set,h=(0,c.useMemo)(function(){var E=function(){return i(!0)},v=function(){return i(!1)};return{toggle:s,setTrue:E,setFalse:v,set:function(M){return i(M)}}},[]);return[n,h]}},56973:function(D,u,e){e.d(u,{Z:function(){return c}});var f=e(50959);function m(d,a){if(d===a)return!0;for(var _=0;_3&&arguments[3]!==void 0?arguments[3]:{};j()(this,z),g()(this,"count",0),g()(this,"pluginImpls",void 0),g()(this,"state",{loading:!1,params:void 0,data:void 0,error:void 0}),this.serviceRef=L,this.options=A,this.subscribe=I,this.initState=B,this.state=d()(d()({},this.state),{},{loading:!A.manual},B)}return U()(z,[{key:"cancel",value:function(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")}},{key:"run",value:function(){var A=this;this.runAsync.apply(this,arguments).catch(function(I){A.options.onError||console.error(I)})}},{key:"runAsync",value:function(){var L=O()(P()().mark(function I(){var B,K,y,p,S,G,C,b,H,V,q,Y,ee,$,ne=arguments;return P()().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:for(this.count+=1,B=this.count,K=ne.length,y=new Array(K),p=0;p1?I-1:0),K=1;K0&&arguments[0]!==void 0?arguments[0]:{};this.state=d()(d()({},this.state),A),this.subscribe()}}]),z}(),Q=["manual"],X=function(L){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],B=A.manual,K=B===void 0?!1:B,y=r()(A,Q);E.Z&&A.defaultParams&&!Array.isArray(A.defaultParams)&&console.warn("expected defaultParams is array, but got ".concat(_()(A.defaultParams)));var p=d()({manual:K},y),S=(0,n.Z)(L),G=(0,h.Z)(),C=(0,l.Z)(function(){var b=I.map(function(H){var V;return H==null||(V=H.onInit)===null||V===void 0?void 0:V.call(H,p)}).filter(Boolean);return new x(S,p,G,Object.assign.apply(Object,[{}].concat(m()(b))))},[]);return C.options=p,C.pluginImpls=I.map(function(b){return b(C,p)}),(0,t.Z)(function(){if(!K){var b=C.state.params||A.defaultParams||[];C.run.apply(C,m()(b))}}),(0,i.Z)(function(){C.cancel()}),{data:C.state.data,loading:C.state.loading,run:(0,s.Z)(C.run.bind(C)),runAsync:(0,s.Z)(C.runAsync.bind(C)),error:C.state.error,params:C.state.params||[],cancel:(0,s.Z)(C.cancel.bind(C)),mutate:(0,s.Z)(C.mutate.bind(C)),refresh:(0,s.Z)(C.refresh.bind(C)),refreshAsync:(0,s.Z)(C.refreshAsync.bind(C))}},J=X,N=function(L,A,I){return J(L,A,m()(I||[]))},w=N,te=w},22093:function(D,u,e){var f=e(28152),m=e.n(f),c=e(50959);function d(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,_=arguments.length>1?arguments[1]:void 0,o=(0,c.useState)(a),r=m()(o,2),l=r[0],n=r[1],t=(0,c.useMemo)(function(){var s=_===void 0?!a:_,i=function(){return n(function(M){return M===a?s:a})},h=function(M){return n(M)},E=function(){return n(a)},v=function(){return n(s)};return{set:h,toggle:i,setLeft:E,setRight:v}},[]);return[l,t]}u.Z=d},12929:function(D,u,e){var f=e(27566),m=e.n(f),c=e(50959),d=e(66476),a=e(79841),_=e(76139),o=function(l){_.Z&&((0,a.mf)(l)||console.error("useUnmount expected parameter is a function, but got ".concat(m()(l))));var n=(0,d.Z)(l);(0,c.useEffect)(function(){return function(){return n.current()}},[])};u.Z=o},14327:function(D,u,e){var f=e(28152),m=e.n(f),c=e(50959),d=function(){var _=(0,c.useState)({}),o=m()(_,2),r=o[1];return(0,c.useCallback)(function(){return r({})},[])};u.Z=d},79841:function(D,u,e){e.d(u,{mf:function(){return d}});var f=e(27566),m=e.n(f),c=function(n){return n!==null&&_typeof(n)==="object"},d=function(n){return typeof n=="function"},a=function(n){return typeof n=="string"},_=function(n){return typeof n=="boolean"},o=function(n){return typeof n=="number"},r=function(n){return typeof n=="undefined"}},76139:function(D,u){var e=!1;u.Z=e}}]); diff --git a/dumi__tmp-production__dumi__theme__ContextWrapper.f5792938.async.js b/dumi__tmp-production__dumi__theme__ContextWrapper.b983661c.async.js similarity index 68% rename from dumi__tmp-production__dumi__theme__ContextWrapper.f5792938.async.js rename to dumi__tmp-production__dumi__theme__ContextWrapper.b983661c.async.js index 37c38dd..480c004 100644 --- a/dumi__tmp-production__dumi__theme__ContextWrapper.f5792938.async.js +++ b/dumi__tmp-production__dumi__theme__ContextWrapper.b983661c.async.js @@ -1 +1 @@ -"use strict";(self.webpackChunketc_hooks=self.webpackChunketc_hooks||[]).push([[923],{24986:function(g,n,e){e.r(n),e.d(n,{default:function(){return d}});var u=e(28152),r=e.n(u),t=e(50959),o=e(64205),a=e(50807),s=e(44478),h=e(14078),k=e(11527),c={};function d(){var m=(0,o.pC)(),E=(0,t.useState)(!1),l=r()(E,2),f=l[0],p=l[1],i=(0,t.useRef)(o.m8.location.pathname);return(0,t.useEffect)(function(){return o.m8.listen(function(_){_.location.pathname!==i.current&&(i.current=_.location.pathname,document.documentElement.scrollTo(0,0))})},[]),(0,k.jsx)(a.D.Provider,{value:{pkg:{name:"etc-hooks",description:"",version:"1.0.0",license:"ISC",author:""},historyType:"browser",entryExports:c,demos:s.DE,components:s.wx,locales:h.k,loading:f,setLoading:p,hostname:void 0,themeConfig:{logo:"/etc-hooks/short-logo.png",title:"Etcetera hooks",footer:'Powered by etcetera',prefersColor:{default:"light",switch:!0},nprogress:!0,lastUpdated:!0,nav:[{title:"\u6307\u5357",link:"/guide"},{title:"Hooks",link:"/hooks/index"},{title:"GitHub",link:"https://github.com/AmbitionsXXXV/etc-hooks"}],sidebar:{"/":[{title:"\u9996\u9875",children:[{title:"\u9996\u9875",link:"/"}]}],"/guide":[{title:"\u4ECB\u7ECD",children:[{title:"\u4ECB\u7ECD",link:"/guide"}]}],"/hooks":[{title:"\u8BF7\u6C42",children:[{title:"\u5FEB\u901F\u4E0A\u624B",link:"/hooks/index"},{title:"\u57FA\u672C\u7528\u6CD5",link:"/hooks/basic"}]},{title:"\u751F\u547D\u5468\u671F",link:"/hooks",children:[{title:"useCallbackRef",link:"/hooks/use-callback-ref"},{title:"useMount",link:"/hooks/use-mount"},{title:"useUnmount",link:"/hooks/use-unmount"},{title:"useUnmountRef",link:"/hooks/use-unmount-ref"}]},{title:"\u72B6\u6001",children:[{title:"useBoolean",link:"/hooks/use-boolean"},{title:"useCounter",link:"/hooks/use-counter"},{title:"useDebounce",link:"/hooks/use-debounce"},{title:"useSet",link:"/hooks/use-set"},{title:"useToggle",link:"/hooks/use-toggle"},{title:"useUpdate",link:"/hooks/use-update"}]},{title:"DOM",children:[{title:"useTitle",link:"/hooks/use-title"},{title:"useColorSchema",link:"/hooks/use-color-schema"}]},{title:"Effect",children:[{title:"useDebounceFn",link:"/hooks/use-debounce-fn"}]},{title:"\u8FDB\u9636\u5DE5\u5177 hooks",children:[{title:"useAntPagination",link:"/hooks/use-ant-pagination"},{title:"useClipboard",link:"/hooks/use-clipboard"},{title:"useLatest",link:"/hooks/use-latest"},{title:"useMemoizedFn",link:"/hooks/use-memoized-fn"},{title:"useOs",link:"/hooks/use-os"}]}]}},_2_level_nav_available:!0},children:m})}}}]); +"use strict";(self.webpackChunketc_hooks=self.webpackChunketc_hooks||[]).push([[923],{24986:function(g,n,e){e.r(n),e.d(n,{default:function(){return d}});var u=e(28152),r=e.n(u),t=e(50959),o=e(64205),a=e(50807),s=e(90666),h=e(14078),k=e(11527),c={};function d(){var m=(0,o.pC)(),E=(0,t.useState)(!1),l=r()(E,2),f=l[0],p=l[1],i=(0,t.useRef)(o.m8.location.pathname);return(0,t.useEffect)(function(){return o.m8.listen(function(_){_.location.pathname!==i.current&&(i.current=_.location.pathname,document.documentElement.scrollTo(0,0))})},[]),(0,k.jsx)(a.D.Provider,{value:{pkg:{name:"etc-hooks",description:"",version:"1.0.0",license:"ISC",author:""},historyType:"browser",entryExports:c,demos:s.DE,components:s.wx,locales:h.k,loading:f,setLoading:p,hostname:void 0,themeConfig:{logo:"/etc-hooks/short-logo.png",title:"Etcetera hooks",footer:'Powered by etcetera',prefersColor:{default:"light",switch:!0},nprogress:!0,lastUpdated:!0,nav:[{title:"\u6307\u5357",link:"/guide"},{title:"Hooks",link:"/hooks/index"},{title:"GitHub",link:"https://github.com/AmbitionsXXXV/etc-hooks"}],sidebar:{"/":[{title:"\u9996\u9875",children:[{title:"\u9996\u9875",link:"/"}]}],"/guide":[{title:"\u4ECB\u7ECD",children:[{title:"\u4ECB\u7ECD",link:"/guide"}]}],"/hooks":[{title:"\u8BF7\u6C42",children:[{title:"\u5FEB\u901F\u4E0A\u624B",link:"/hooks/index"},{title:"\u57FA\u672C\u7528\u6CD5",link:"/hooks/basic"}]},{title:"\u751F\u547D\u5468\u671F",link:"/hooks",children:[{title:"useCallbackRef",link:"/hooks/use-callback-ref"},{title:"useMount",link:"/hooks/use-mount"},{title:"useUnmount",link:"/hooks/use-unmount"},{title:"useUnmountRef",link:"/hooks/use-unmount-ref"}]},{title:"\u72B6\u6001",children:[{title:"useBoolean",link:"/hooks/use-boolean"},{title:"useCounter",link:"/hooks/use-counter"},{title:"useDebounce",link:"/hooks/use-debounce"},{title:"useResetState",link:"/hooks/use-reset-state"},{title:"useSet",link:"/hooks/use-set"},{title:"useToggle",link:"/hooks/use-toggle"},{title:"useUpdate",link:"/hooks/use-update"}]},{title:"DOM",children:[{title:"useTitle",link:"/hooks/use-title"},{title:"useColorSchema",link:"/hooks/use-color-schema"}]},{title:"Effect",children:[{title:"useDebounceFn",link:"/hooks/use-debounce-fn"}]},{title:"\u8FDB\u9636\u5DE5\u5177 hooks",children:[{title:"useAntPagination",link:"/hooks/use-ant-pagination"},{title:"useClipboard",link:"/hooks/use-clipboard"},{title:"useLatest",link:"/hooks/use-latest"},{title:"useMemoizedFn",link:"/hooks/use-memoized-fn"},{title:"useOs",link:"/hooks/use-os"}]}]}},_2_level_nav_available:!0},children:m})}}}]); diff --git a/guide/index.html b/guide/index.html index 7dd747f..ac69dae 100644 --- a/guide/index.html +++ b/guide/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/basic/index.html b/hooks/basic/index.html index 7dd747f..ac69dae 100644 --- a/hooks/basic/index.html +++ b/hooks/basic/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/index/index.html b/hooks/index/index.html index 7dd747f..ac69dae 100644 --- a/hooks/index/index.html +++ b/hooks/index/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-ant-pagination/index.html b/hooks/use-ant-pagination/index.html index 7dd747f..ac69dae 100644 --- a/hooks/use-ant-pagination/index.html +++ b/hooks/use-ant-pagination/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-boolean/index.html b/hooks/use-boolean/index.html index 7dd747f..ac69dae 100644 --- a/hooks/use-boolean/index.html +++ b/hooks/use-boolean/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-callback-ref/index.html b/hooks/use-callback-ref/index.html index 7dd747f..ac69dae 100644 --- a/hooks/use-callback-ref/index.html +++ b/hooks/use-callback-ref/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-clipboard/index.html b/hooks/use-clipboard/index.html index 7dd747f..ac69dae 100644 --- a/hooks/use-clipboard/index.html +++ b/hooks/use-clipboard/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-color-schema/index.html b/hooks/use-color-schema/index.html index 7dd747f..ac69dae 100644 --- a/hooks/use-color-schema/index.html +++ b/hooks/use-color-schema/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-counter/index.html b/hooks/use-counter/index.html index 7dd747f..ac69dae 100644 --- a/hooks/use-counter/index.html +++ b/hooks/use-counter/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-creation/index/index.html b/hooks/use-creation/index/index.html index 7dd747f..ac69dae 100644 --- a/hooks/use-creation/index/index.html +++ b/hooks/use-creation/index/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-debounce-fn/index.html b/hooks/use-debounce-fn/index.html index 7dd747f..ac69dae 100644 --- a/hooks/use-debounce-fn/index.html +++ b/hooks/use-debounce-fn/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-debounce/index.html b/hooks/use-debounce/index.html index 7dd747f..ac69dae 100644 --- a/hooks/use-debounce/index.html +++ b/hooks/use-debounce/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-latest/index.html b/hooks/use-latest/index.html index 7dd747f..ac69dae 100644 --- a/hooks/use-latest/index.html +++ b/hooks/use-latest/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-memoized-fn/index.html b/hooks/use-memoized-fn/index.html index 7dd747f..ac69dae 100644 --- a/hooks/use-memoized-fn/index.html +++ b/hooks/use-memoized-fn/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-mount/index.html b/hooks/use-mount/index.html index 7dd747f..ac69dae 100644 --- a/hooks/use-mount/index.html +++ b/hooks/use-mount/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-os/index.html b/hooks/use-os/index.html index 7dd747f..ac69dae 100644 --- a/hooks/use-os/index.html +++ b/hooks/use-os/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-reset-state/index.html b/hooks/use-reset-state/index.html new file mode 100644 index 0000000..ac69dae --- /dev/null +++ b/hooks/use-reset-state/index.html @@ -0,0 +1,12 @@ + + + + +Etcetera hooks + + + +
+ + + \ No newline at end of file diff --git a/hooks/use-set/index.html b/hooks/use-set/index.html index 7dd747f..ac69dae 100644 --- a/hooks/use-set/index.html +++ b/hooks/use-set/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-title/index.html b/hooks/use-title/index.html index 7dd747f..ac69dae 100644 --- a/hooks/use-title/index.html +++ b/hooks/use-title/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-toggle/index.html b/hooks/use-toggle/index.html index 7dd747f..ac69dae 100644 --- a/hooks/use-toggle/index.html +++ b/hooks/use-toggle/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-unmount-ref/index.html b/hooks/use-unmount-ref/index.html index 7dd747f..ac69dae 100644 --- a/hooks/use-unmount-ref/index.html +++ b/hooks/use-unmount-ref/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-unmount/index.html b/hooks/use-unmount/index.html index 7dd747f..ac69dae 100644 --- a/hooks/use-unmount/index.html +++ b/hooks/use-unmount/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-update/index.html b/hooks/use-update/index.html index 7dd747f..ac69dae 100644 --- a/hooks/use-update/index.html +++ b/hooks/use-update/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/index.html b/index.html index 7dd747f..ac69dae 100644 --- a/index.html +++ b/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/packages__hooks__src__useResetState__index.md.778c6473.chunk.css b/packages__hooks__src__useResetState__index.md.778c6473.chunk.css new file mode 100644 index 0000000..563c5c9 --- /dev/null +++ b/packages__hooks__src__useResetState__index.md.778c6473.chunk.css @@ -0,0 +1 @@ +.dumi-default-table{margin:24px 0 32px;transform:translate(0)}.dumi-default-table-content{overflow:auto}.dumi-default-table-content:before,.dumi-default-table-content:after{content:"";display:block;position:fixed;z-index:1;top:0;bottom:0;width:6px;pointer-events:none}.dumi-default-table-content[data-left-folded]:before{left:0;background-image:linear-gradient(to right,rgba(0,0,0,.1),rgba(0,0,0,0))}[data-prefers-color=dark] .dumi-default-table-content[data-left-folded]:before{background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.dumi-default-table-content[data-right-folded]:after{right:0;background-image:linear-gradient(to left,rgba(0,0,0,.1),rgba(0,0,0,0))}[data-prefers-color=dark] .dumi-default-table-content[data-right-folded]:after{background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.dumi-default-table-content>table>thead>tr>th,.dumi-default-table-content>table>tr>th{white-space:nowrap}.dumi-default-badge{display:inline-block;margin-inline-start:2px;padding:1px 8px;font-size:12px;font-weight:400;line-height:20px;border-radius:4px;vertical-align:top}.dumi-default-badge:not([type]),.dumi-default-badge[type=info]{color:#1677ff;background:#e2eeff}[data-prefers-color=dark] .dumi-default-badge:not([type]),[data-prefers-color=dark] .dumi-default-badge[type=info]{color:#1677ff;background:#002962}.dumi-default-badge[type=warning]{color:#d59200;background:#ffefcb}[data-prefers-color=dark] .dumi-default-badge[type=warning]{color:#d59200;background:#231800}.dumi-default-badge[type=success]{color:#208a41;background:#cbf3d7}[data-prefers-color=dark] .dumi-default-badge[type=success]{color:#208a41;background:#092712}.dumi-default-badge[type=error]{color:#ce1f31;background:#fbe2e5}[data-prefers-color=dark] .dumi-default-badge[type=error]{color:#ce1f31;background:#3c090e}.dumi-default-tree{padding:16px;margin:24px 0 32px;background:#fbfcfd;border:1px solid #e4e9ec;border-radius:2px;color:#30363f;overflow-y:auto}[data-prefers-color=dark] .dumi-default-tree{color:#c6c9cd;background:#020305;border-color:#1c2022}.dumi-default-tree small{padding-left:24px;color:#616d7f;font-size:14px;white-space:nowrap}[data-prefers-color=dark] .dumi-default-tree small{color:#616d7f}.dumi-default-tree small:before{content:"# "}.dumi-default-tree.rc-tree{transition:all .3s;line-height:1.5715;list-style:none;font-size:14px}.dumi-default-tree.rc-tree .rc-tree-treenode{position:relative;display:flex;align-items:flex-start}.dumi-default-tree.rc-tree .rc-tree-treenode:before{position:absolute;top:0;right:0;bottom:4px;left:0;transition:background .3s;content:""}.dumi-default-tree.rc-tree .rc-tree-treenode:hover:before{background:#eeeff0}[data-prefers-color=dark] .dumi-default-tree.rc-tree .rc-tree-treenode:hover:before{background:#1c1d1e}.dumi-default-tree.rc-tree .rc-tree-treenode>*{z-index:1}.dumi-default-tree.rc-tree .rc-tree-treenode span.rc-tree-switcher{display:flex;align-items:center;justify-content:center;width:24px;height:28px;margin-right:2px;line-height:28px;background:transparent;cursor:pointer;flex-shrink:0}.dumi-default-tree.rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper{flex:auto;min-height:28px;margin:0;padding:0 4px;line-height:28px;cursor:pointer;white-space:nowrap}.dumi-default-tree.rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper .rc-tree-iconEle{margin-right:6px;vertical-align:0}.dumi-default-tree.rc-tree.rc-tree-show-line .rc-tree-indent{display:inline-block;height:0;vertical-align:bottom;flex-shrink:0}.dumi-default-tree.rc-tree.rc-tree-show-line .rc-tree-indent-unit{position:relative;display:inline-block;width:24px;height:28px}.dumi-default-tree.rc-tree.rc-tree-show-line .rc-tree-indent-unit:before{position:absolute;top:0;right:12px;bottom:-4px;border-right:1px solid #d9d9d9;content:""}.dumi-default-tree.rc-tree.rc-tree-show-line .rc-tree-indent-unit-end:before{display:none}.dumi-default-tree.rc-tree.rc-tree-show-line .tree-switcher-leaf-line{position:relative;z-index:1;display:inline-block;width:100%;height:100%;text-align:center}.dumi-default-tree.rc-tree.rc-tree-show-line .tree-switcher-leaf-line:before{position:absolute;top:0;bottom:-4px;margin-left:-1px;border-left:1px solid #d9d9d9;content:" "}.dumi-default-tree.rc-tree.rc-tree-show-line .tree-switcher-leaf-line:after{position:absolute;top:0;bottom:14px;width:12px;margin-left:-1px;border-bottom:1px solid #d9d9d9;content:" "}.dumi-default-tree.rc-tree.rc-tree-show-line .rc-tree-treenode-leaf-last .tree-switcher-leaf-line:before{height:14px}.dumi-default-tree-icon{width:16px;color:#30363f;vertical-align:-.225em;display:inline-block}[data-prefers-color=dark] .dumi-default-tree-icon{color:#c6c9cd}.ant-motion-collapse{overflow:hidden;transition:height .2s ease-in-out,opacity .2s ease-in-out!important} diff --git a/packages__hooks__src__useResetState__index.md.e6476c28.async.js b/packages__hooks__src__useResetState__index.md.e6476c28.async.js new file mode 100644 index 0000000..fdd181e --- /dev/null +++ b/packages__hooks__src__useResetState__index.md.e6476c28.async.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunketc_hooks=self.webpackChunketc_hooks||[]).push([[855],{44358:function(i,t,e){e.r(t);var r=e(1261),l=e(49014),u=e(13111),c=e(87007),o=e(16744),m=e(30899),h=e(55174),n=e(64205),x=e(50959),_=e(11527);function d(){var a=(0,n.eL)(),s=a.texts;return(0,_.jsx)(n.dY,{children:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("div",{className:"markdown",children:[(0,_.jsxs)("h1",{id:"useresetstate",children:[(0,_.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",href:"#useresetstate",children:(0,_.jsx)("span",{className:"icon icon-link"})}),"useResetState"]}),(0,_.jsxs)("p",{children:[s[0].value,(0,_.jsx)("code",{children:s[1].value}),s[2].value]}),(0,_.jsxs)("h2",{id:"\u4EE3\u7801\u6F14\u793A",children:[(0,_.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",href:"#\u4EE3\u7801\u6F14\u793A",children:(0,_.jsx)("span",{className:"icon icon-link"})}),"\u4EE3\u7801\u6F14\u793A"]})]}),(0,_.jsx)(n.Dl,{demo:{id:"packages-hooks-src-use-reset-state-demo-example"},previewerProps:{hideactions:'["CSB"]',filename:"packages/hooks/src/useResetState/example/example.tsx"}}),(0,_.jsxs)("div",{className:"markdown",children:[(0,_.jsxs)("h2",{id:"api",children:[(0,_.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",href:"#api",children:(0,_.jsx)("span",{className:"icon icon-link"})}),"API"]}),(0,_.jsx)(o.Z,{lang:"typescript",children:s[3].value})]})]})})}t.default=d}}]); diff --git a/umi.58b4da03.js b/umi.0bef3027.js similarity index 70% rename from umi.58b4da03.js rename to umi.0bef3027.js index a680ebe..5034607 100644 --- a/umi.58b4da03.js +++ b/umi.0bef3027.js @@ -1,67 +1,67 @@ -!(function(){var yf=Object.defineProperty,gf=Object.defineProperties;var If=Object.getOwnPropertyDescriptors;var $c=Object.getOwnPropertySymbols;var xf=Object.prototype.hasOwnProperty,Ef=Object.prototype.propertyIsEnumerable;var Hc=(l,d,e)=>d in l?yf(l,d,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[d]=e,Zc=(l,d)=>{for(var e in d||(d={}))xf.call(d,e)&&Hc(l,e,d[e]);if($c)for(var e of $c(d))Ef.call(d,e)&&Hc(l,e,d[e]);return l},Wc=(l,d)=>gf(l,If(d));(function(){var __webpack_modules__={86622:function(l,d,e){"use strict";e.d(d,{kG:function(){return p}});function o(y){return Math.floor(Math.log(y)*Math.LOG10E)}function a(y,g){if(typeof y.repeat=="function")return y.repeat(g);for(var S=new Array(g),w=0;w0}),Oe=[],Me=0,Ue=ne;Me1)throw new RangeError("integer-width stems only accept a single optional option");Ue.options[0].replace(fe,function(dt,vt,jt,Ce,tt,$e){if(vt)ne.minimumIntegerDigits=jt.length;else{if(Ce&&tt)throw new Error("We currently do not support maximum integer digits");if($e)throw new Error("We currently do not support exact integer digits")}return""});continue}if(be.test(Ue.stem)){ne.minimumIntegerDigits=Ue.stem.length;continue}if(te.test(Ue.stem)){if(Ue.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");Ue.stem.replace(te,function(dt,vt,jt,Ce,tt,$e){return jt==="*"?ne.minimumFractionDigits=vt.length:Ce&&Ce[0]==="#"?ne.maximumFractionDigits=Ce.length:tt&&$e?(ne.minimumFractionDigits=tt.length,ne.maximumFractionDigits=tt.length+$e.length):(ne.minimumFractionDigits=vt.length,ne.maximumFractionDigits=vt.length),""});var Ge=Ue.options[0];Ge==="w"?ne=(0,o.pi)((0,o.pi)({},ne),{trailingZeroDisplay:"stripIfInteger"}):Ge&&(ne=(0,o.pi)((0,o.pi)({},ne),Ae(Ge)));continue}if(ee.test(Ue.stem)){ne=(0,o.pi)((0,o.pi)({},ne),Ae(Ue.stem));continue}var Te=se(Ue.stem);Te&&(ne=(0,o.pi)((0,o.pi)({},ne),Te));var st=oe(Ue.stem);st&&(ne=(0,o.pi)((0,o.pi)({},ne),st))}return ne}var J={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function G(I,ne){for(var Oe="",Me=0;Me>1),dt="a",vt=E(ne);for((vt=="H"||vt=="k")&&(st=0);st-- >0;)Oe+=dt;for(;Te-- >0;)Oe=vt+Oe}else Ue==="J"?Oe+="H":Oe+=Ue}return Oe}function E(I){var ne=I.hourCycle;if(ne===void 0&&I.hourCycles&&I.hourCycles.length&&(ne=I.hourCycles[0]),ne)switch(ne){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var Oe=I.language,Me;Oe!=="root"&&(Me=I.maximize().region);var Ue=J[Me||""]||J[Oe||""]||J["".concat(Oe,"-001")]||J["001"];return Ue[0]}var O,$=new RegExp("^".concat(_.source,"*")),K=new RegExp("".concat(_.source,"*$"));function W(I,ne){return{start:I,end:ne}}var T=!!String.prototype.startsWith&&"_a".startsWith("a",1),Z=!!String.fromCodePoint,H=!!Object.fromEntries,X=!!String.prototype.codePointAt,q=!!String.prototype.trimStart,Pe=!!String.prototype.trimEnd,je=!!Number.isSafeInteger,Xe=je?Number.isSafeInteger:function(I){return typeof I=="number"&&isFinite(I)&&Math.floor(I)===I&&Math.abs(I)<=9007199254740991},Qe=!0;try{var He=ue("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Qe=((O=He.exec("a"))===null||O===void 0?void 0:O[0])==="a"}catch(I){Qe=!1}var et=T?function(ne,Oe,Me){return ne.startsWith(Oe,Me)}:function(ne,Oe,Me){return ne.slice(Me,Me+Oe.length)===Oe},re=Z?String.fromCodePoint:function(){for(var ne=[],Oe=0;OeGe;){if(Te=ne[Ge++],Te>1114111)throw RangeError(Te+" is not a valid code point");Me+=Te<65536?String.fromCharCode(Te):String.fromCharCode(((Te-=65536)>>10)+55296,Te%1024+56320)}return Me},de=H?Object.fromEntries:function(ne){for(var Oe={},Me=0,Ue=ne;Me=Me)){var Ue=ne.charCodeAt(Oe),Ge;return Ue<55296||Ue>56319||Oe+1===Me||(Ge=ne.charCodeAt(Oe+1))<56320||Ge>57343?Ue:(Ue-55296<<10)+(Ge-56320)+65536}},ye=q?function(ne){return ne.trimStart()}:function(ne){return ne.replace($,"")},we=Pe?function(ne){return ne.trimEnd()}:function(ne){return ne.replace(K,"")};function ue(I,ne){return new RegExp(I,ne)}var he;if(Qe){var Ie=ue("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");he=function(ne,Oe){var Me;Ie.lastIndex=Oe;var Ue=Ie.exec(ne);return(Me=Ue[1])!==null&&Me!==void 0?Me:""}}else he=function(ne,Oe){for(var Me=[];;){var Ue=pe(ne,Oe);if(Ue===void 0||_e(Ue)||We(Ue))break;Me.push(Ue),Oe+=Ue>=65536?2:1}return re.apply(void 0,Me)};var le=function(){function I(ne,Oe){Oe===void 0&&(Oe={}),this.message=ne,this.position={offset:0,line:1,column:1},this.ignoreTag=!!Oe.ignoreTag,this.locale=Oe.locale,this.requiresOtherClause=!!Oe.requiresOtherClause,this.shouldParseSkeletons=!!Oe.shouldParseSkeletons}return I.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},I.prototype.parseMessage=function(ne,Oe,Me){for(var Ue=[];!this.isEOF();){var Ge=this.char();if(Ge===123){var Te=this.parseArgument(ne,Me);if(Te.err)return Te;Ue.push(Te.val)}else{if(Ge===125&&ne>0)break;if(Ge===35&&(Oe==="plural"||Oe==="selectordinal")){var st=this.clonePosition();this.bump(),Ue.push({type:n.pound,location:W(st,this.clonePosition())})}else if(Ge===60&&!this.ignoreTag&&this.peek()===47){if(Me)break;return this.error(a.UNMATCHED_CLOSING_TAG,W(this.clonePosition(),this.clonePosition()))}else if(Ge===60&&!this.ignoreTag&&Ee(this.peek()||0)){var Te=this.parseTag(ne,Oe);if(Te.err)return Te;Ue.push(Te.val)}else{var Te=this.parseLiteral(ne,Oe);if(Te.err)return Te;Ue.push(Te.val)}}}return{val:Ue,err:null}},I.prototype.parseTag=function(ne,Oe){var Me=this.clonePosition();this.bump();var Ue=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:n.literal,value:"<".concat(Ue,"/>"),location:W(Me,this.clonePosition())},err:null};if(this.bumpIf(">")){var Ge=this.parseMessage(ne+1,Oe,!0);if(Ge.err)return Ge;var Te=Ge.val,st=this.clonePosition();if(this.bumpIf("")?{val:{type:n.tag,value:Ue,children:Te,location:W(Me,this.clonePosition())},err:null}:this.error(a.INVALID_TAG,W(st,this.clonePosition())))}else return this.error(a.UNCLOSED_TAG,W(Me,this.clonePosition()))}else return this.error(a.INVALID_TAG,W(Me,this.clonePosition()))},I.prototype.parseTagName=function(){var ne=this.offset();for(this.bump();!this.isEOF()&&Le(this.char());)this.bump();return this.message.slice(ne,this.offset())},I.prototype.parseLiteral=function(ne,Oe){for(var Me=this.clonePosition(),Ue="";;){var Ge=this.tryParseQuote(Oe);if(Ge){Ue+=Ge;continue}var Te=this.tryParseUnquoted(ne,Oe);if(Te){Ue+=Te;continue}var st=this.tryParseLeftAngleBracket();if(st){Ue+=st;continue}break}var dt=W(Me,this.clonePosition());return{val:{type:n.literal,value:Ue,location:dt},err:null}},I.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Fe(this.peek()||0))?(this.bump(),"<"):null},I.prototype.tryParseQuote=function(ne){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(ne==="plural"||ne==="selectordinal")break;return null;default:return null}this.bump();var Oe=[this.char()];for(this.bump();!this.isEOF();){var Me=this.char();if(Me===39)if(this.peek()===39)Oe.push(39),this.bump();else{this.bump();break}else Oe.push(Me);this.bump()}return re.apply(void 0,Oe)},I.prototype.tryParseUnquoted=function(ne,Oe){if(this.isEOF())return null;var Me=this.char();return Me===60||Me===123||Me===35&&(Oe==="plural"||Oe==="selectordinal")||Me===125&&ne>0?null:(this.bump(),re(Me))},I.prototype.parseArgument=function(ne,Oe){var Me=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(a.EXPECT_ARGUMENT_CLOSING_BRACE,W(Me,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(a.EMPTY_ARGUMENT,W(Me,this.clonePosition()));var Ue=this.parseIdentifierIfPossible().value;if(!Ue)return this.error(a.MALFORMED_ARGUMENT,W(Me,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(a.EXPECT_ARGUMENT_CLOSING_BRACE,W(Me,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:n.argument,value:Ue,location:W(Me,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(a.EXPECT_ARGUMENT_CLOSING_BRACE,W(Me,this.clonePosition())):this.parseArgumentOptions(ne,Oe,Ue,Me);default:return this.error(a.MALFORMED_ARGUMENT,W(Me,this.clonePosition()))}},I.prototype.parseIdentifierIfPossible=function(){var ne=this.clonePosition(),Oe=this.offset(),Me=he(this.message,Oe),Ue=Oe+Me.length;this.bumpTo(Ue);var Ge=this.clonePosition(),Te=W(ne,Ge);return{value:Me,location:Te}},I.prototype.parseArgumentOptions=function(ne,Oe,Me,Ue){var Ge,Te=this.clonePosition(),st=this.parseIdentifierIfPossible().value,dt=this.clonePosition();switch(st){case"":return this.error(a.EXPECT_ARGUMENT_TYPE,W(Te,dt));case"number":case"date":case"time":{this.bumpSpace();var vt=null;if(this.bumpIf(",")){this.bumpSpace();var jt=this.clonePosition(),Ce=this.parseSimpleArgStyleIfPossible();if(Ce.err)return Ce;var tt=we(Ce.val);if(tt.length===0)return this.error(a.EXPECT_ARGUMENT_STYLE,W(this.clonePosition(),this.clonePosition()));var $e=W(jt,this.clonePosition());vt={style:tt,styleLocation:$e}}var De=this.tryParseArgumentClose(Ue);if(De.err)return De;var nt=W(Ue,this.clonePosition());if(vt&&et(vt==null?void 0:vt.style,"::",0)){var ut=ye(vt.style.slice(2));if(st==="number"){var Ce=this.parseNumberSkeletonFromString(ut,vt.styleLocation);return Ce.err?Ce:{val:{type:n.number,value:Me,location:nt,style:Ce.val},err:null}}else{if(ut.length===0)return this.error(a.EXPECT_DATE_TIME_SKELETON,nt);var Et=ut;this.locale&&(Et=G(ut,this.locale));var tt={type:s.dateTime,pattern:Et,location:vt.styleLocation,parsedOptions:this.shouldParseSkeletons?A(Et):{}},Nt=st==="date"?n.date:n.time;return{val:{type:Nt,value:Me,location:nt,style:tt},err:null}}}return{val:{type:st==="number"?n.number:st==="date"?n.date:n.time,value:Me,location:nt,style:(Ge=vt==null?void 0:vt.style)!==null&&Ge!==void 0?Ge:null},err:null}}case"plural":case"selectordinal":case"select":{var Vt=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(a.EXPECT_SELECT_ARGUMENT_OPTIONS,W(Vt,(0,o.pi)({},Vt)));this.bumpSpace();var mr=this.parseIdentifierIfPossible(),sr=0;if(st!=="select"&&mr.value==="offset"){if(!this.bumpIf(":"))return this.error(a.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,W(this.clonePosition(),this.clonePosition()));this.bumpSpace();var Ce=this.tryParseDecimalInteger(a.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,a.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(Ce.err)return Ce;this.bumpSpace(),mr=this.parseIdentifierIfPossible(),sr=Ce.val}var yr=this.tryParsePluralOrSelectOptions(ne,st,Oe,mr);if(yr.err)return yr;var De=this.tryParseArgumentClose(Ue);if(De.err)return De;var Br=W(Ue,this.clonePosition());return st==="select"?{val:{type:n.select,value:Me,options:de(yr.val),location:Br},err:null}:{val:{type:n.plural,value:Me,options:de(yr.val),offset:sr,pluralType:st==="plural"?"cardinal":"ordinal",location:Br},err:null}}default:return this.error(a.INVALID_ARGUMENT_TYPE,W(Te,dt))}},I.prototype.tryParseArgumentClose=function(ne){return this.isEOF()||this.char()!==125?this.error(a.EXPECT_ARGUMENT_CLOSING_BRACE,W(ne,this.clonePosition())):(this.bump(),{val:!0,err:null})},I.prototype.parseSimpleArgStyleIfPossible=function(){for(var ne=0,Oe=this.clonePosition();!this.isEOF();){var Me=this.char();switch(Me){case 39:{this.bump();var Ue=this.clonePosition();if(!this.bumpUntil("'"))return this.error(a.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,W(Ue,this.clonePosition()));this.bump();break}case 123:{ne+=1,this.bump();break}case 125:{if(ne>0)ne-=1;else return{val:this.message.slice(Oe.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(Oe.offset,this.offset()),err:null}},I.prototype.parseNumberSkeletonFromString=function(ne,Oe){var Me=[];try{Me=z(ne)}catch(Ue){return this.error(a.INVALID_NUMBER_SKELETON,Oe)}return{val:{type:s.number,tokens:Me,location:Oe,parsedOptions:this.shouldParseSkeletons?V(Me):{}},err:null}},I.prototype.tryParsePluralOrSelectOptions=function(ne,Oe,Me,Ue){for(var Ge,Te=!1,st=[],dt=new Set,vt=Ue.value,jt=Ue.location;;){if(vt.length===0){var Ce=this.clonePosition();if(Oe!=="select"&&this.bumpIf("=")){var tt=this.tryParseDecimalInteger(a.EXPECT_PLURAL_ARGUMENT_SELECTOR,a.INVALID_PLURAL_ARGUMENT_SELECTOR);if(tt.err)return tt;jt=W(Ce,this.clonePosition()),vt=this.message.slice(Ce.offset,this.offset())}else break}if(dt.has(vt))return this.error(Oe==="select"?a.DUPLICATE_SELECT_ARGUMENT_SELECTOR:a.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,jt);vt==="other"&&(Te=!0),this.bumpSpace();var $e=this.clonePosition();if(!this.bumpIf("{"))return this.error(Oe==="select"?a.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:a.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,W(this.clonePosition(),this.clonePosition()));var De=this.parseMessage(ne+1,Oe,Me);if(De.err)return De;var nt=this.tryParseArgumentClose($e);if(nt.err)return nt;st.push([vt,{value:De.val,location:W($e,this.clonePosition())}]),dt.add(vt),this.bumpSpace(),Ge=this.parseIdentifierIfPossible(),vt=Ge.value,jt=Ge.location}return st.length===0?this.error(Oe==="select"?a.EXPECT_SELECT_ARGUMENT_SELECTOR:a.EXPECT_PLURAL_ARGUMENT_SELECTOR,W(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!Te?this.error(a.MISSING_OTHER_CLAUSE,W(this.clonePosition(),this.clonePosition())):{val:st,err:null}},I.prototype.tryParseDecimalInteger=function(ne,Oe){var Me=1,Ue=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(Me=-1);for(var Ge=!1,Te=0;!this.isEOF();){var st=this.char();if(st>=48&&st<=57)Ge=!0,Te=Te*10+(st-48),this.bump();else break}var dt=W(Ue,this.clonePosition());return Ge?(Te*=Me,Xe(Te)?{val:Te,err:null}:this.error(Oe,dt)):this.error(ne,dt)},I.prototype.offset=function(){return this.position.offset},I.prototype.isEOF=function(){return this.offset()===this.message.length},I.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},I.prototype.char=function(){var ne=this.position.offset;if(ne>=this.message.length)throw Error("out of bound");var Oe=pe(this.message,ne);if(Oe===void 0)throw Error("Offset ".concat(ne," is at invalid UTF-16 code unit boundary"));return Oe},I.prototype.error=function(ne,Oe){return{val:null,err:{kind:ne,message:this.message,location:Oe}}},I.prototype.bump=function(){if(!this.isEOF()){var ne=this.char();ne===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=ne<65536?1:2)}},I.prototype.bumpIf=function(ne){if(et(this.message,ne,this.offset())){for(var Oe=0;Oe=0?(this.bumpTo(Me),!0):(this.bumpTo(this.message.length),!1)},I.prototype.bumpTo=function(ne){if(this.offset()>ne)throw Error("targetOffset ".concat(ne," must be greater than or equal to the current offset ").concat(this.offset()));for(ne=Math.min(ne,this.message.length);;){var Oe=this.offset();if(Oe===ne)break;if(Oe>ne)throw Error("targetOffset ".concat(ne," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},I.prototype.bumpSpace=function(){for(;!this.isEOF()&&_e(this.char());)this.bump()},I.prototype.peek=function(){if(this.isEOF())return null;var ne=this.char(),Oe=this.offset(),Me=this.message.charCodeAt(Oe+(ne>=65536?2:1));return Me!=null?Me:null},I}();function Ee(I){return I>=97&&I<=122||I>=65&&I<=90}function Fe(I){return Ee(I)||I===47}function Le(I){return I===45||I===46||I>=48&&I<=57||I===95||I>=97&&I<=122||I>=65&&I<=90||I==183||I>=192&&I<=214||I>=216&&I<=246||I>=248&&I<=893||I>=895&&I<=8191||I>=8204&&I<=8205||I>=8255&&I<=8256||I>=8304&&I<=8591||I>=11264&&I<=12271||I>=12289&&I<=55295||I>=63744&&I<=64975||I>=65008&&I<=65533||I>=65536&&I<=983039}function _e(I){return I>=9&&I<=13||I===32||I===133||I>=8206&&I<=8207||I===8232||I===8233}function We(I){return I>=33&&I<=35||I===36||I>=37&&I<=39||I===40||I===41||I===42||I===43||I===44||I===45||I>=46&&I<=47||I>=58&&I<=59||I>=60&&I<=62||I>=63&&I<=64||I===91||I===92||I===93||I===94||I===96||I===123||I===124||I===125||I===126||I===161||I>=162&&I<=165||I===166||I===167||I===169||I===171||I===172||I===174||I===176||I===177||I===182||I===187||I===191||I===215||I===247||I>=8208&&I<=8213||I>=8214&&I<=8215||I===8216||I===8217||I===8218||I>=8219&&I<=8220||I===8221||I===8222||I===8223||I>=8224&&I<=8231||I>=8240&&I<=8248||I===8249||I===8250||I>=8251&&I<=8254||I>=8257&&I<=8259||I===8260||I===8261||I===8262||I>=8263&&I<=8273||I===8274||I===8275||I>=8277&&I<=8286||I>=8592&&I<=8596||I>=8597&&I<=8601||I>=8602&&I<=8603||I>=8604&&I<=8607||I===8608||I>=8609&&I<=8610||I===8611||I>=8612&&I<=8613||I===8614||I>=8615&&I<=8621||I===8622||I>=8623&&I<=8653||I>=8654&&I<=8655||I>=8656&&I<=8657||I===8658||I===8659||I===8660||I>=8661&&I<=8691||I>=8692&&I<=8959||I>=8960&&I<=8967||I===8968||I===8969||I===8970||I===8971||I>=8972&&I<=8991||I>=8992&&I<=8993||I>=8994&&I<=9e3||I===9001||I===9002||I>=9003&&I<=9083||I===9084||I>=9085&&I<=9114||I>=9115&&I<=9139||I>=9140&&I<=9179||I>=9180&&I<=9185||I>=9186&&I<=9254||I>=9255&&I<=9279||I>=9280&&I<=9290||I>=9291&&I<=9311||I>=9472&&I<=9654||I===9655||I>=9656&&I<=9664||I===9665||I>=9666&&I<=9719||I>=9720&&I<=9727||I>=9728&&I<=9838||I===9839||I>=9840&&I<=10087||I===10088||I===10089||I===10090||I===10091||I===10092||I===10093||I===10094||I===10095||I===10096||I===10097||I===10098||I===10099||I===10100||I===10101||I>=10132&&I<=10175||I>=10176&&I<=10180||I===10181||I===10182||I>=10183&&I<=10213||I===10214||I===10215||I===10216||I===10217||I===10218||I===10219||I===10220||I===10221||I===10222||I===10223||I>=10224&&I<=10239||I>=10240&&I<=10495||I>=10496&&I<=10626||I===10627||I===10628||I===10629||I===10630||I===10631||I===10632||I===10633||I===10634||I===10635||I===10636||I===10637||I===10638||I===10639||I===10640||I===10641||I===10642||I===10643||I===10644||I===10645||I===10646||I===10647||I===10648||I>=10649&&I<=10711||I===10712||I===10713||I===10714||I===10715||I>=10716&&I<=10747||I===10748||I===10749||I>=10750&&I<=11007||I>=11008&&I<=11055||I>=11056&&I<=11076||I>=11077&&I<=11078||I>=11079&&I<=11084||I>=11085&&I<=11123||I>=11124&&I<=11125||I>=11126&&I<=11157||I===11158||I>=11159&&I<=11263||I>=11776&&I<=11777||I===11778||I===11779||I===11780||I===11781||I>=11782&&I<=11784||I===11785||I===11786||I===11787||I===11788||I===11789||I>=11790&&I<=11798||I===11799||I>=11800&&I<=11801||I===11802||I===11803||I===11804||I===11805||I>=11806&&I<=11807||I===11808||I===11809||I===11810||I===11811||I===11812||I===11813||I===11814||I===11815||I===11816||I===11817||I>=11818&&I<=11822||I===11823||I>=11824&&I<=11833||I>=11834&&I<=11835||I>=11836&&I<=11839||I===11840||I===11841||I===11842||I>=11843&&I<=11855||I>=11856&&I<=11857||I===11858||I>=11859&&I<=11903||I>=12289&&I<=12291||I===12296||I===12297||I===12298||I===12299||I===12300||I===12301||I===12302||I===12303||I===12304||I===12305||I>=12306&&I<=12307||I===12308||I===12309||I===12310||I===12311||I===12312||I===12313||I===12314||I===12315||I===12316||I===12317||I>=12318&&I<=12319||I===12320||I===12336||I===64830||I===64831||I>=65093&&I<=65094}function mt(I){I.forEach(function(ne){if(delete ne.location,p(ne)||y(ne))for(var Oe in ne.options)delete ne.options[Oe].location,mt(ne.options[Oe].value);else c(ne)&&w(ne.style)||(m(ne)||h(ne))&&b(ne.style)?delete ne.style.location:S(ne)&&mt(ne.children)})}function ot(I,ne){ne===void 0&&(ne={}),ne=(0,o.pi)({shouldParseSkeletons:!0,requiresOtherClause:!0},ne);var Oe=new le(I,ne).parse();if(Oe.err){var Me=SyntaxError(a[Oe.err.kind]);throw Me.location=Oe.err.location,Me.originalMessage=Oe.err.message,Me}return ne!=null&&ne.captureLocation||mt(Oe.val),Oe.val}var St=null},33725:function(l,d,e){"use strict";e.d(d,{$6:function(){return h},OV:function(){return u},Qe:function(){return c},X9:function(){return m},gb:function(){return v},wI:function(){return s}});var o=e(99938),a;(function(p){p.FORMAT_ERROR="FORMAT_ERROR",p.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",p.INVALID_CONFIG="INVALID_CONFIG",p.MISSING_DATA="MISSING_DATA",p.MISSING_TRANSLATION="MISSING_TRANSLATION"})(a||(a={}));var n=function(p){(0,o.ZT)(y,p);function y(g,S,w){var b=this,N=w?w instanceof Error?w:new Error(String(w)):void 0;return b=p.call(this,"[@formatjs/intl Error ".concat(g,"] ").concat(S,` +!(function(){var yf=Object.defineProperty,gf=Object.defineProperties;var If=Object.getOwnPropertyDescriptors;var $c=Object.getOwnPropertySymbols;var xf=Object.prototype.hasOwnProperty,Sf=Object.prototype.propertyIsEnumerable;var Hc=(l,d,e)=>d in l?yf(l,d,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[d]=e,Zc=(l,d)=>{for(var e in d||(d={}))xf.call(d,e)&&Hc(l,e,d[e]);if($c)for(var e of $c(d))Sf.call(d,e)&&Hc(l,e,d[e]);return l},Wc=(l,d)=>gf(l,If(d));(function(){var __webpack_modules__={86622:function(l,d,e){"use strict";e.d(d,{kG:function(){return p}});function o(y){return Math.floor(Math.log(y)*Math.LOG10E)}function a(y,g){if(typeof y.repeat=="function")return y.repeat(g);for(var E=new Array(g),w=0;w0}),Oe=[],Me=0,Ue=ne;Me1)throw new RangeError("integer-width stems only accept a single optional option");Ue.options[0].replace(fe,function(dt,vt,jt,Ce,tt,$e){if(vt)ne.minimumIntegerDigits=jt.length;else{if(Ce&&tt)throw new Error("We currently do not support maximum integer digits");if($e)throw new Error("We currently do not support exact integer digits")}return""});continue}if(be.test(Ue.stem)){ne.minimumIntegerDigits=Ue.stem.length;continue}if(te.test(Ue.stem)){if(Ue.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");Ue.stem.replace(te,function(dt,vt,jt,Ce,tt,$e){return jt==="*"?ne.minimumFractionDigits=vt.length:Ce&&Ce[0]==="#"?ne.maximumFractionDigits=Ce.length:tt&&$e?(ne.minimumFractionDigits=tt.length,ne.maximumFractionDigits=tt.length+$e.length):(ne.minimumFractionDigits=vt.length,ne.maximumFractionDigits=vt.length),""});var Ge=Ue.options[0];Ge==="w"?ne=(0,o.pi)((0,o.pi)({},ne),{trailingZeroDisplay:"stripIfInteger"}):Ge&&(ne=(0,o.pi)((0,o.pi)({},ne),Ae(Ge)));continue}if(ee.test(Ue.stem)){ne=(0,o.pi)((0,o.pi)({},ne),Ae(Ue.stem));continue}var Te=se(Ue.stem);Te&&(ne=(0,o.pi)((0,o.pi)({},ne),Te));var st=oe(Ue.stem);st&&(ne=(0,o.pi)((0,o.pi)({},ne),st))}return ne}var J={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function G(I,ne){for(var Oe="",Me=0;Me>1),dt="a",vt=S(ne);for((vt=="H"||vt=="k")&&(st=0);st-- >0;)Oe+=dt;for(;Te-- >0;)Oe=vt+Oe}else Ue==="J"?Oe+="H":Oe+=Ue}return Oe}function S(I){var ne=I.hourCycle;if(ne===void 0&&I.hourCycles&&I.hourCycles.length&&(ne=I.hourCycles[0]),ne)switch(ne){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var Oe=I.language,Me;Oe!=="root"&&(Me=I.maximize().region);var Ue=J[Me||""]||J[Oe||""]||J["".concat(Oe,"-001")]||J["001"];return Ue[0]}var O,$=new RegExp("^".concat(_.source,"*")),K=new RegExp("".concat(_.source,"*$"));function W(I,ne){return{start:I,end:ne}}var T=!!String.prototype.startsWith&&"_a".startsWith("a",1),Z=!!String.fromCodePoint,H=!!Object.fromEntries,X=!!String.prototype.codePointAt,q=!!String.prototype.trimStart,Re=!!String.prototype.trimEnd,je=!!Number.isSafeInteger,Xe=je?Number.isSafeInteger:function(I){return typeof I=="number"&&isFinite(I)&&Math.floor(I)===I&&Math.abs(I)<=9007199254740991},Qe=!0;try{var He=ue("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Qe=((O=He.exec("a"))===null||O===void 0?void 0:O[0])==="a"}catch(I){Qe=!1}var et=T?function(ne,Oe,Me){return ne.startsWith(Oe,Me)}:function(ne,Oe,Me){return ne.slice(Me,Me+Oe.length)===Oe},re=Z?String.fromCodePoint:function(){for(var ne=[],Oe=0;OeGe;){if(Te=ne[Ge++],Te>1114111)throw RangeError(Te+" is not a valid code point");Me+=Te<65536?String.fromCharCode(Te):String.fromCharCode(((Te-=65536)>>10)+55296,Te%1024+56320)}return Me},de=H?Object.fromEntries:function(ne){for(var Oe={},Me=0,Ue=ne;Me=Me)){var Ue=ne.charCodeAt(Oe),Ge;return Ue<55296||Ue>56319||Oe+1===Me||(Ge=ne.charCodeAt(Oe+1))<56320||Ge>57343?Ue:(Ue-55296<<10)+(Ge-56320)+65536}},ye=q?function(ne){return ne.trimStart()}:function(ne){return ne.replace($,"")},we=Re?function(ne){return ne.trimEnd()}:function(ne){return ne.replace(K,"")};function ue(I,ne){return new RegExp(I,ne)}var he;if(Qe){var Ie=ue("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");he=function(ne,Oe){var Me;Ie.lastIndex=Oe;var Ue=Ie.exec(ne);return(Me=Ue[1])!==null&&Me!==void 0?Me:""}}else he=function(ne,Oe){for(var Me=[];;){var Ue=pe(ne,Oe);if(Ue===void 0||_e(Ue)||We(Ue))break;Me.push(Ue),Oe+=Ue>=65536?2:1}return re.apply(void 0,Me)};var le=function(){function I(ne,Oe){Oe===void 0&&(Oe={}),this.message=ne,this.position={offset:0,line:1,column:1},this.ignoreTag=!!Oe.ignoreTag,this.locale=Oe.locale,this.requiresOtherClause=!!Oe.requiresOtherClause,this.shouldParseSkeletons=!!Oe.shouldParseSkeletons}return I.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},I.prototype.parseMessage=function(ne,Oe,Me){for(var Ue=[];!this.isEOF();){var Ge=this.char();if(Ge===123){var Te=this.parseArgument(ne,Me);if(Te.err)return Te;Ue.push(Te.val)}else{if(Ge===125&&ne>0)break;if(Ge===35&&(Oe==="plural"||Oe==="selectordinal")){var st=this.clonePosition();this.bump(),Ue.push({type:n.pound,location:W(st,this.clonePosition())})}else if(Ge===60&&!this.ignoreTag&&this.peek()===47){if(Me)break;return this.error(a.UNMATCHED_CLOSING_TAG,W(this.clonePosition(),this.clonePosition()))}else if(Ge===60&&!this.ignoreTag&&Se(this.peek()||0)){var Te=this.parseTag(ne,Oe);if(Te.err)return Te;Ue.push(Te.val)}else{var Te=this.parseLiteral(ne,Oe);if(Te.err)return Te;Ue.push(Te.val)}}}return{val:Ue,err:null}},I.prototype.parseTag=function(ne,Oe){var Me=this.clonePosition();this.bump();var Ue=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:n.literal,value:"<".concat(Ue,"/>"),location:W(Me,this.clonePosition())},err:null};if(this.bumpIf(">")){var Ge=this.parseMessage(ne+1,Oe,!0);if(Ge.err)return Ge;var Te=Ge.val,st=this.clonePosition();if(this.bumpIf("")?{val:{type:n.tag,value:Ue,children:Te,location:W(Me,this.clonePosition())},err:null}:this.error(a.INVALID_TAG,W(st,this.clonePosition())))}else return this.error(a.UNCLOSED_TAG,W(Me,this.clonePosition()))}else return this.error(a.INVALID_TAG,W(Me,this.clonePosition()))},I.prototype.parseTagName=function(){var ne=this.offset();for(this.bump();!this.isEOF()&&Le(this.char());)this.bump();return this.message.slice(ne,this.offset())},I.prototype.parseLiteral=function(ne,Oe){for(var Me=this.clonePosition(),Ue="";;){var Ge=this.tryParseQuote(Oe);if(Ge){Ue+=Ge;continue}var Te=this.tryParseUnquoted(ne,Oe);if(Te){Ue+=Te;continue}var st=this.tryParseLeftAngleBracket();if(st){Ue+=st;continue}break}var dt=W(Me,this.clonePosition());return{val:{type:n.literal,value:Ue,location:dt},err:null}},I.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Fe(this.peek()||0))?(this.bump(),"<"):null},I.prototype.tryParseQuote=function(ne){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(ne==="plural"||ne==="selectordinal")break;return null;default:return null}this.bump();var Oe=[this.char()];for(this.bump();!this.isEOF();){var Me=this.char();if(Me===39)if(this.peek()===39)Oe.push(39),this.bump();else{this.bump();break}else Oe.push(Me);this.bump()}return re.apply(void 0,Oe)},I.prototype.tryParseUnquoted=function(ne,Oe){if(this.isEOF())return null;var Me=this.char();return Me===60||Me===123||Me===35&&(Oe==="plural"||Oe==="selectordinal")||Me===125&&ne>0?null:(this.bump(),re(Me))},I.prototype.parseArgument=function(ne,Oe){var Me=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(a.EXPECT_ARGUMENT_CLOSING_BRACE,W(Me,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(a.EMPTY_ARGUMENT,W(Me,this.clonePosition()));var Ue=this.parseIdentifierIfPossible().value;if(!Ue)return this.error(a.MALFORMED_ARGUMENT,W(Me,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(a.EXPECT_ARGUMENT_CLOSING_BRACE,W(Me,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:n.argument,value:Ue,location:W(Me,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(a.EXPECT_ARGUMENT_CLOSING_BRACE,W(Me,this.clonePosition())):this.parseArgumentOptions(ne,Oe,Ue,Me);default:return this.error(a.MALFORMED_ARGUMENT,W(Me,this.clonePosition()))}},I.prototype.parseIdentifierIfPossible=function(){var ne=this.clonePosition(),Oe=this.offset(),Me=he(this.message,Oe),Ue=Oe+Me.length;this.bumpTo(Ue);var Ge=this.clonePosition(),Te=W(ne,Ge);return{value:Me,location:Te}},I.prototype.parseArgumentOptions=function(ne,Oe,Me,Ue){var Ge,Te=this.clonePosition(),st=this.parseIdentifierIfPossible().value,dt=this.clonePosition();switch(st){case"":return this.error(a.EXPECT_ARGUMENT_TYPE,W(Te,dt));case"number":case"date":case"time":{this.bumpSpace();var vt=null;if(this.bumpIf(",")){this.bumpSpace();var jt=this.clonePosition(),Ce=this.parseSimpleArgStyleIfPossible();if(Ce.err)return Ce;var tt=we(Ce.val);if(tt.length===0)return this.error(a.EXPECT_ARGUMENT_STYLE,W(this.clonePosition(),this.clonePosition()));var $e=W(jt,this.clonePosition());vt={style:tt,styleLocation:$e}}var De=this.tryParseArgumentClose(Ue);if(De.err)return De;var nt=W(Ue,this.clonePosition());if(vt&&et(vt==null?void 0:vt.style,"::",0)){var ut=ye(vt.style.slice(2));if(st==="number"){var Ce=this.parseNumberSkeletonFromString(ut,vt.styleLocation);return Ce.err?Ce:{val:{type:n.number,value:Me,location:nt,style:Ce.val},err:null}}else{if(ut.length===0)return this.error(a.EXPECT_DATE_TIME_SKELETON,nt);var St=ut;this.locale&&(St=G(ut,this.locale));var tt={type:s.dateTime,pattern:St,location:vt.styleLocation,parsedOptions:this.shouldParseSkeletons?A(St):{}},Nt=st==="date"?n.date:n.time;return{val:{type:Nt,value:Me,location:nt,style:tt},err:null}}}return{val:{type:st==="number"?n.number:st==="date"?n.date:n.time,value:Me,location:nt,style:(Ge=vt==null?void 0:vt.style)!==null&&Ge!==void 0?Ge:null},err:null}}case"plural":case"selectordinal":case"select":{var Vt=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(a.EXPECT_SELECT_ARGUMENT_OPTIONS,W(Vt,(0,o.pi)({},Vt)));this.bumpSpace();var mr=this.parseIdentifierIfPossible(),sr=0;if(st!=="select"&&mr.value==="offset"){if(!this.bumpIf(":"))return this.error(a.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,W(this.clonePosition(),this.clonePosition()));this.bumpSpace();var Ce=this.tryParseDecimalInteger(a.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,a.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(Ce.err)return Ce;this.bumpSpace(),mr=this.parseIdentifierIfPossible(),sr=Ce.val}var yr=this.tryParsePluralOrSelectOptions(ne,st,Oe,mr);if(yr.err)return yr;var De=this.tryParseArgumentClose(Ue);if(De.err)return De;var Br=W(Ue,this.clonePosition());return st==="select"?{val:{type:n.select,value:Me,options:de(yr.val),location:Br},err:null}:{val:{type:n.plural,value:Me,options:de(yr.val),offset:sr,pluralType:st==="plural"?"cardinal":"ordinal",location:Br},err:null}}default:return this.error(a.INVALID_ARGUMENT_TYPE,W(Te,dt))}},I.prototype.tryParseArgumentClose=function(ne){return this.isEOF()||this.char()!==125?this.error(a.EXPECT_ARGUMENT_CLOSING_BRACE,W(ne,this.clonePosition())):(this.bump(),{val:!0,err:null})},I.prototype.parseSimpleArgStyleIfPossible=function(){for(var ne=0,Oe=this.clonePosition();!this.isEOF();){var Me=this.char();switch(Me){case 39:{this.bump();var Ue=this.clonePosition();if(!this.bumpUntil("'"))return this.error(a.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,W(Ue,this.clonePosition()));this.bump();break}case 123:{ne+=1,this.bump();break}case 125:{if(ne>0)ne-=1;else return{val:this.message.slice(Oe.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(Oe.offset,this.offset()),err:null}},I.prototype.parseNumberSkeletonFromString=function(ne,Oe){var Me=[];try{Me=z(ne)}catch(Ue){return this.error(a.INVALID_NUMBER_SKELETON,Oe)}return{val:{type:s.number,tokens:Me,location:Oe,parsedOptions:this.shouldParseSkeletons?V(Me):{}},err:null}},I.prototype.tryParsePluralOrSelectOptions=function(ne,Oe,Me,Ue){for(var Ge,Te=!1,st=[],dt=new Set,vt=Ue.value,jt=Ue.location;;){if(vt.length===0){var Ce=this.clonePosition();if(Oe!=="select"&&this.bumpIf("=")){var tt=this.tryParseDecimalInteger(a.EXPECT_PLURAL_ARGUMENT_SELECTOR,a.INVALID_PLURAL_ARGUMENT_SELECTOR);if(tt.err)return tt;jt=W(Ce,this.clonePosition()),vt=this.message.slice(Ce.offset,this.offset())}else break}if(dt.has(vt))return this.error(Oe==="select"?a.DUPLICATE_SELECT_ARGUMENT_SELECTOR:a.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,jt);vt==="other"&&(Te=!0),this.bumpSpace();var $e=this.clonePosition();if(!this.bumpIf("{"))return this.error(Oe==="select"?a.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:a.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,W(this.clonePosition(),this.clonePosition()));var De=this.parseMessage(ne+1,Oe,Me);if(De.err)return De;var nt=this.tryParseArgumentClose($e);if(nt.err)return nt;st.push([vt,{value:De.val,location:W($e,this.clonePosition())}]),dt.add(vt),this.bumpSpace(),Ge=this.parseIdentifierIfPossible(),vt=Ge.value,jt=Ge.location}return st.length===0?this.error(Oe==="select"?a.EXPECT_SELECT_ARGUMENT_SELECTOR:a.EXPECT_PLURAL_ARGUMENT_SELECTOR,W(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!Te?this.error(a.MISSING_OTHER_CLAUSE,W(this.clonePosition(),this.clonePosition())):{val:st,err:null}},I.prototype.tryParseDecimalInteger=function(ne,Oe){var Me=1,Ue=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(Me=-1);for(var Ge=!1,Te=0;!this.isEOF();){var st=this.char();if(st>=48&&st<=57)Ge=!0,Te=Te*10+(st-48),this.bump();else break}var dt=W(Ue,this.clonePosition());return Ge?(Te*=Me,Xe(Te)?{val:Te,err:null}:this.error(Oe,dt)):this.error(ne,dt)},I.prototype.offset=function(){return this.position.offset},I.prototype.isEOF=function(){return this.offset()===this.message.length},I.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},I.prototype.char=function(){var ne=this.position.offset;if(ne>=this.message.length)throw Error("out of bound");var Oe=pe(this.message,ne);if(Oe===void 0)throw Error("Offset ".concat(ne," is at invalid UTF-16 code unit boundary"));return Oe},I.prototype.error=function(ne,Oe){return{val:null,err:{kind:ne,message:this.message,location:Oe}}},I.prototype.bump=function(){if(!this.isEOF()){var ne=this.char();ne===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=ne<65536?1:2)}},I.prototype.bumpIf=function(ne){if(et(this.message,ne,this.offset())){for(var Oe=0;Oe=0?(this.bumpTo(Me),!0):(this.bumpTo(this.message.length),!1)},I.prototype.bumpTo=function(ne){if(this.offset()>ne)throw Error("targetOffset ".concat(ne," must be greater than or equal to the current offset ").concat(this.offset()));for(ne=Math.min(ne,this.message.length);;){var Oe=this.offset();if(Oe===ne)break;if(Oe>ne)throw Error("targetOffset ".concat(ne," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},I.prototype.bumpSpace=function(){for(;!this.isEOF()&&_e(this.char());)this.bump()},I.prototype.peek=function(){if(this.isEOF())return null;var ne=this.char(),Oe=this.offset(),Me=this.message.charCodeAt(Oe+(ne>=65536?2:1));return Me!=null?Me:null},I}();function Se(I){return I>=97&&I<=122||I>=65&&I<=90}function Fe(I){return Se(I)||I===47}function Le(I){return I===45||I===46||I>=48&&I<=57||I===95||I>=97&&I<=122||I>=65&&I<=90||I==183||I>=192&&I<=214||I>=216&&I<=246||I>=248&&I<=893||I>=895&&I<=8191||I>=8204&&I<=8205||I>=8255&&I<=8256||I>=8304&&I<=8591||I>=11264&&I<=12271||I>=12289&&I<=55295||I>=63744&&I<=64975||I>=65008&&I<=65533||I>=65536&&I<=983039}function _e(I){return I>=9&&I<=13||I===32||I===133||I>=8206&&I<=8207||I===8232||I===8233}function We(I){return I>=33&&I<=35||I===36||I>=37&&I<=39||I===40||I===41||I===42||I===43||I===44||I===45||I>=46&&I<=47||I>=58&&I<=59||I>=60&&I<=62||I>=63&&I<=64||I===91||I===92||I===93||I===94||I===96||I===123||I===124||I===125||I===126||I===161||I>=162&&I<=165||I===166||I===167||I===169||I===171||I===172||I===174||I===176||I===177||I===182||I===187||I===191||I===215||I===247||I>=8208&&I<=8213||I>=8214&&I<=8215||I===8216||I===8217||I===8218||I>=8219&&I<=8220||I===8221||I===8222||I===8223||I>=8224&&I<=8231||I>=8240&&I<=8248||I===8249||I===8250||I>=8251&&I<=8254||I>=8257&&I<=8259||I===8260||I===8261||I===8262||I>=8263&&I<=8273||I===8274||I===8275||I>=8277&&I<=8286||I>=8592&&I<=8596||I>=8597&&I<=8601||I>=8602&&I<=8603||I>=8604&&I<=8607||I===8608||I>=8609&&I<=8610||I===8611||I>=8612&&I<=8613||I===8614||I>=8615&&I<=8621||I===8622||I>=8623&&I<=8653||I>=8654&&I<=8655||I>=8656&&I<=8657||I===8658||I===8659||I===8660||I>=8661&&I<=8691||I>=8692&&I<=8959||I>=8960&&I<=8967||I===8968||I===8969||I===8970||I===8971||I>=8972&&I<=8991||I>=8992&&I<=8993||I>=8994&&I<=9e3||I===9001||I===9002||I>=9003&&I<=9083||I===9084||I>=9085&&I<=9114||I>=9115&&I<=9139||I>=9140&&I<=9179||I>=9180&&I<=9185||I>=9186&&I<=9254||I>=9255&&I<=9279||I>=9280&&I<=9290||I>=9291&&I<=9311||I>=9472&&I<=9654||I===9655||I>=9656&&I<=9664||I===9665||I>=9666&&I<=9719||I>=9720&&I<=9727||I>=9728&&I<=9838||I===9839||I>=9840&&I<=10087||I===10088||I===10089||I===10090||I===10091||I===10092||I===10093||I===10094||I===10095||I===10096||I===10097||I===10098||I===10099||I===10100||I===10101||I>=10132&&I<=10175||I>=10176&&I<=10180||I===10181||I===10182||I>=10183&&I<=10213||I===10214||I===10215||I===10216||I===10217||I===10218||I===10219||I===10220||I===10221||I===10222||I===10223||I>=10224&&I<=10239||I>=10240&&I<=10495||I>=10496&&I<=10626||I===10627||I===10628||I===10629||I===10630||I===10631||I===10632||I===10633||I===10634||I===10635||I===10636||I===10637||I===10638||I===10639||I===10640||I===10641||I===10642||I===10643||I===10644||I===10645||I===10646||I===10647||I===10648||I>=10649&&I<=10711||I===10712||I===10713||I===10714||I===10715||I>=10716&&I<=10747||I===10748||I===10749||I>=10750&&I<=11007||I>=11008&&I<=11055||I>=11056&&I<=11076||I>=11077&&I<=11078||I>=11079&&I<=11084||I>=11085&&I<=11123||I>=11124&&I<=11125||I>=11126&&I<=11157||I===11158||I>=11159&&I<=11263||I>=11776&&I<=11777||I===11778||I===11779||I===11780||I===11781||I>=11782&&I<=11784||I===11785||I===11786||I===11787||I===11788||I===11789||I>=11790&&I<=11798||I===11799||I>=11800&&I<=11801||I===11802||I===11803||I===11804||I===11805||I>=11806&&I<=11807||I===11808||I===11809||I===11810||I===11811||I===11812||I===11813||I===11814||I===11815||I===11816||I===11817||I>=11818&&I<=11822||I===11823||I>=11824&&I<=11833||I>=11834&&I<=11835||I>=11836&&I<=11839||I===11840||I===11841||I===11842||I>=11843&&I<=11855||I>=11856&&I<=11857||I===11858||I>=11859&&I<=11903||I>=12289&&I<=12291||I===12296||I===12297||I===12298||I===12299||I===12300||I===12301||I===12302||I===12303||I===12304||I===12305||I>=12306&&I<=12307||I===12308||I===12309||I===12310||I===12311||I===12312||I===12313||I===12314||I===12315||I===12316||I===12317||I>=12318&&I<=12319||I===12320||I===12336||I===64830||I===64831||I>=65093&&I<=65094}function mt(I){I.forEach(function(ne){if(delete ne.location,p(ne)||y(ne))for(var Oe in ne.options)delete ne.options[Oe].location,mt(ne.options[Oe].value);else c(ne)&&w(ne.style)||(m(ne)||h(ne))&&b(ne.style)?delete ne.style.location:E(ne)&&mt(ne.children)})}function ot(I,ne){ne===void 0&&(ne={}),ne=(0,o.pi)({shouldParseSkeletons:!0,requiresOtherClause:!0},ne);var Oe=new le(I,ne).parse();if(Oe.err){var Me=SyntaxError(a[Oe.err.kind]);throw Me.location=Oe.err.location,Me.originalMessage=Oe.err.message,Me}return ne!=null&&ne.captureLocation||mt(Oe.val),Oe.val}var Et=null},33725:function(l,d,e){"use strict";e.d(d,{$6:function(){return h},OV:function(){return u},Qe:function(){return c},X9:function(){return m},gb:function(){return v},wI:function(){return s}});var o=e(99938),a;(function(p){p.FORMAT_ERROR="FORMAT_ERROR",p.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",p.INVALID_CONFIG="INVALID_CONFIG",p.MISSING_DATA="MISSING_DATA",p.MISSING_TRANSLATION="MISSING_TRANSLATION"})(a||(a={}));var n=function(p){(0,o.ZT)(y,p);function y(g,E,w){var b=this,N=w?w instanceof Error?w:new Error(String(w)):void 0;return b=p.call(this,"[@formatjs/intl Error ".concat(g,"] ").concat(E,` `).concat(N?` `.concat(N.message,` -`).concat(N.stack):""))||this,b.code=g,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(b,y),b}return y}(Error),s=function(p){(0,o.ZT)(y,p);function y(g,S){return p.call(this,a.UNSUPPORTED_FORMATTER,g,S)||this}return y}(n),u=function(p){(0,o.ZT)(y,p);function y(g,S){return p.call(this,a.INVALID_CONFIG,g,S)||this}return y}(n),v=function(p){(0,o.ZT)(y,p);function y(g,S){return p.call(this,a.MISSING_DATA,g,S)||this}return y}(n),c=function(p){(0,o.ZT)(y,p);function y(g,S,w){var b=p.call(this,a.FORMAT_ERROR,"".concat(g,` -Locale: `).concat(S,` -`),w)||this;return b.locale=S,b}return y}(n),m=function(p){(0,o.ZT)(y,p);function y(g,S,w,b){var N=p.call(this,"".concat(g,` +`).concat(N.stack):""))||this,b.code=g,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(b,y),b}return y}(Error),s=function(p){(0,o.ZT)(y,p);function y(g,E){return p.call(this,a.UNSUPPORTED_FORMATTER,g,E)||this}return y}(n),u=function(p){(0,o.ZT)(y,p);function y(g,E){return p.call(this,a.INVALID_CONFIG,g,E)||this}return y}(n),v=function(p){(0,o.ZT)(y,p);function y(g,E){return p.call(this,a.MISSING_DATA,g,E)||this}return y}(n),c=function(p){(0,o.ZT)(y,p);function y(g,E,w){var b=p.call(this,a.FORMAT_ERROR,"".concat(g,` +Locale: `).concat(E,` +`),w)||this;return b.locale=E,b}return y}(n),m=function(p){(0,o.ZT)(y,p);function y(g,E,w,b){var N=p.call(this,"".concat(g,` MessageID: `).concat(w==null?void 0:w.id,` Default Message: `).concat(w==null?void 0:w.defaultMessage,` Description: `).concat(w==null?void 0:w.description,` -`),S,b)||this;return N.descriptor=w,N.locale=S,N}return y}(c),h=function(p){(0,o.ZT)(y,p);function y(g,S){var w=p.call(this,a.MISSING_TRANSLATION,'Missing message: "'.concat(g.id,'" for locale "').concat(S,'", using ').concat(g.defaultMessage?"default message (".concat(typeof g.defaultMessage=="string"?g.defaultMessage:g.defaultMessage.map(function(b){var N;return(N=b.value)!==null&&N!==void 0?N:JSON.stringify(b)}).join(),")"):"id"," as fallback."))||this;return w.descriptor=g,w}return y}(n)},94543:function(l,d,e){"use strict";e.d(d,{L6:function(){return u},Sn:function(){return h},TB:function(){return g},Z0:function(){return m},ax:function(){return y}});var o=e(99938),a=e(58974),n=e(75344),s=e(33725);function u(S,w,b){return b===void 0&&(b={}),w.reduce(function(N,R){return R in S?N[R]=S[R]:R in b&&(N[R]=b[R]),N},{})}var v=function(S){},c=function(S){},m={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:v,onWarn:c};function h(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function p(S){return{create:function(){return{get:function(w){return S[w]},set:function(w,b){S[w]=b}}}}}function y(S){S===void 0&&(S=h());var w=Intl.RelativeTimeFormat,b=Intl.ListFormat,N=Intl.DisplayNames,R=(0,n.H)(function(){for(var B,A=[],L=0;L0&&arguments[0]!==void 0?arguments[0]:[],D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return M.length!==D.length||M.some((j,ce)=>!Object.is(j,D[ce]))}function k(M){if(M==null||typeof M.didCatch!="boolean"||typeof M.resetErrorBoundary!="function")throw new Error("ErrorBoundaryContext not found");return!0}function B(){const M=useContext(b);k(M);const[D,j]=useState({error:null,hasError:!1}),ce=useMemo(()=>({resetBoundary:()=>{M==null||M.resetErrorBoundary(),j({error:null,hasError:!1})},showBoundary:Se=>j({error:Se,hasError:!0})}),[M==null?void 0:M.resetErrorBoundary]);if(D.hasError)throw D.error;return ce}function A(M,D){const j=forwardRef((Se,Ke)=>createElement(R,D,createElement(M,Wc(Zc({},Se),{ref:Ke})))),ce=M.displayName||M.name||"Unknown";return j.displayName="withErrorBoundary(".concat(ce,")"),j}function L(){return L=Object.assign?Object.assign.bind():function(M){for(var D=1;DM.length)&&(D=M.length);for(var j=0,ce=new Array(D);j1&&(typeof window=="undefined"||window.innerWidth>1024)){for(var ir=0;irM.length)&&(D=M.length);for(var j=0,ce=new Array(D);jM.length)&&(D=M.length);for(var j=0,ce=new Array(D);jM.length)&&(D=M.length);for(var j=0,ce=new Array(D);j',isBinary:!1},at[kt]={content:(0,re.AM)(ct.react),isBinary:!1};var tr=re.EV.applyPlugins({type:o.Ac.modify,key:"modifyCodeSandboxData",initialValue:{files:at},args:M});return(0,et.Z)(tr)}var Ee=function(D,j){var ce,Se=document.createElement("form"),Ke=document.createElement("input"),Ve=le(D);Se.method="POST",Se.target="_blank",Se.style.display="none",Se.action=(j==null?void 0:j.api)||Ie,Se.appendChild(Ke),Se.setAttribute("data-demo",((ce=D.assets)===null||ce===void 0?void 0:ce.id)||""),Ke.name="parameters",Ke.value=Ve,document.body.appendChild(Se),Se.submit(),Se.remove()},Fe=e(77117),Le=e.n(Fe),_e=e(15033),We=e.n(_e),mt=e(96345),ot=e.n(mt),St=e(27566),I=e.n(St),ne=e(28152),Oe=e.n(ne),Me=500,Ue=20,Ge=300,Te="https://stackblitz.com",st=["angular-cli","create-react-app","html","javascript","node","polymer","typescript","vue"],dt=["project","search","ports","settings"],vt=["light","dark"],jt=["editor","preview"],Ce={clickToLoad:function(D){return $e("ctl",D)},devToolsHeight:function(D){return nt("devtoolsheight",D)},forceEmbedLayout:function(D){return $e("embed",D)},hideDevTools:function(D){return $e("hidedevtools",D)},hideExplorer:function(D){return $e("hideExplorer",D)},hideNavigation:function(D){return $e("hideNavigation",D)},openFile:function(D){return Et("file",D)},showSidebar:function(D){return De("showSidebar",D)},sidebarView:function(D){return ut("sidebarView",D,dt)},startScript:function(D){return Et("startScript",D)},terminalHeight:function(D){return nt("terminalHeight",D)},theme:function(D){return ut("theme",D,vt)},view:function(D){return ut("view",D,jt)},zenMode:function(D){return $e("zenMode",D)}};function tt(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=Object.entries(M).map(function(j){var ce=Oe()(j,2),Se=ce[0],Ke=ce[1];return Ke!=null&&Ce.hasOwnProperty(Se)?Ce[Se](Ke):""}).filter(Boolean);return D.length?"?".concat(D.join("&")):""}function $e(M,D){return D===!0?"".concat(M,"=1"):""}function De(M,D){return typeof D=="boolean"?"".concat(M,"=").concat(D?"1":"0"):""}function nt(M,D){if(typeof D=="number"&&!Number.isNaN(D)){var j=Math.min(100,Math.max(0,D));return"".concat(M,"=").concat(encodeURIComponent(Math.round(j)))}return""}function ut(M){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return j.includes(D)?"".concat(M,"=").concat(encodeURIComponent(D)):""}function Et(M,D){var j=Array.isArray(D)?D:[D];return j.filter(function(ce){return typeof ce=="string"&&ce.trim()!==""}).map(function(ce){return"".concat(M,"=").concat(encodeURIComponent(ce))}).join("&")}function Nt(){return Math.random().toString(36).slice(2,6)+Math.random().toString(36).slice(2,6)}function Vt(M,D){return"".concat(sr(D)).concat(M).concat(tt(D))}function mr(M,D){var j={forceEmbedLayout:!0};return D&&I()(D)==="object"&&Object.assign(j,D),"".concat(sr(j)).concat(M).concat(tt(j))}function sr(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=typeof M.origin=="string"?M.origin:Te;return D.replace(/\/$/,"")}function yr(M,D,j){if(!D||!M||!M.parentNode)throw new Error("Invalid Element");M.id&&(D.id=M.id),M.className&&(D.className=M.className),Un(D,j),M.replaceWith(D)}function Br(M){if(typeof M=="string"){var D=document.getElementById(M);if(!D)throw new Error("Could not find element with id '".concat(M,"'"));return D}else if(M instanceof HTMLElement)return M;throw new Error("Invalid element: ".concat(M))}function Mn(M){return M&&M.newWindow===!1?"_self":"_blank"}function Un(M){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=Object.hasOwnProperty.call(D,"height")?"".concat(D.height):"".concat(Ge),ce=Object.hasOwnProperty.call(D,"width")?"".concat(D.width):void 0;M.setAttribute("height",j),ce?M.setAttribute("width",ce):M.setAttribute("style","width:100%;")}var gn=function(){function M(D){We()(this,M),this.pending={},this.port=D,this.port.onmessage=this.messageListener.bind(this)}return ot()(M,[{key:"request",value:function(j){var ce=this,Se=j.type,Ke=j.payload;return new Promise(function(Ve,rt){var at=Nt();ce.pending[at]={resolve:Ve,reject:rt},ce.port.postMessage({type:Se,payload:Le()(Le()({},Ke),{},{__reqid:at})})})}},{key:"messageListener",value:function(j){var ce;if(typeof((ce=j.data.payload)===null||ce===void 0?void 0:ce.__reqid)=="string"){var Se=j.data,Ke=Se.type,Ve=Se.payload,rt=Ve.__reqid,at=Ve.__success,ct=Ve.__error;this.pending[rt]&&(at?this.pending[rt].resolve(this.cleanResult(Ve)):this.pending[rt].reject(ct?"".concat(Ke,": ").concat(ct):Ke),delete this.pending[rt])}}},{key:"cleanResult",value:function(j){var ce=Le()({},j);return delete ce.__reqid,delete ce.__success,delete ce.__error,Object.keys(ce).length?ce:null}}]),M}(),cn=function(){function M(D,j){var ce=this;We()(this,M),this.editor={openFile:function(Ke){return ce._rdc.request({type:"SDK_OPEN_FILE",payload:{path:Ke}})},setCurrentFile:function(Ke){return ce._rdc.request({type:"SDK_SET_CURRENT_FILE",payload:{path:Ke}})},setTheme:function(Ke){return ce._rdc.request({type:"SDK_SET_UI_THEME",payload:{theme:Ke}})},setView:function(Ke){return ce._rdc.request({type:"SDK_SET_UI_VIEW",payload:{view:Ke}})},showSidebar:function(){var Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return ce._rdc.request({type:"SDK_TOGGLE_SIDEBAR",payload:{visible:Ke}})}},this.preview={origin:"",getUrl:function(){return ce._rdc.request({type:"SDK_GET_PREVIEW_URL",payload:{}}).then(function(Ke){var Ve;return(Ve=Ke==null?void 0:Ke.url)!==null&&Ve!==void 0?Ve:null})},setUrl:function(){var Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"/";if(typeof Ke!="string"||!Ke.startsWith("/"))throw new Error("Invalid argument: expected a path starting with '/', got '".concat(Ke,"'"));return ce._rdc.request({type:"SDK_SET_PREVIEW_URL",payload:{path:Ke}})}},this._rdc=new gn(D),Object.defineProperty(this.preview,"origin",{value:typeof j.previewOrigin=="string"?j.previewOrigin:null,writable:!1})}return ot()(M,[{key:"applyFsDiff",value:function(j){var ce=function(Ke){return Ke!==null&&I()(Ke)==="object"};if(!ce(j)||!ce(j.create))throw new Error("Invalid diff object: expected diff.create to be an object.");if(!Array.isArray(j.destroy))throw new Error("Invalid diff object: expected diff.destroy to be an array.");return this._rdc.request({type:"SDK_APPLY_FS_DIFF",payload:j})}},{key:"getDependencies",value:function(){return this._rdc.request({type:"SDK_GET_DEPS_SNAPSHOT",payload:{}})}},{key:"getFsSnapshot",value:function(){return this._rdc.request({type:"SDK_GET_FS_SNAPSHOT",payload:{}})}}]),M}(),Rr=[],fn=ot()(function M(D){var j=this;We()(this,M),this.id=Nt(),this.element=D,this.pending=new Promise(function(ce,Se){var Ke=function(tr){var $t=tr.data,Ut=tr.ports;($t==null?void 0:$t.action)==="SDK_INIT_SUCCESS"&&$t.id===j.id&&(j.vm=new cn(Ut[0],$t.payload),ce(j.vm),rt())},Ve=function(){var tr;(tr=j.element.contentWindow)===null||tr===void 0||tr.postMessage({action:"SDK_INIT",id:j.id},"*")};function rt(){window.clearInterval(ct),window.removeEventListener("message",Ke)}window.addEventListener("message",Ke),Ve();var at=0,ct=window.setInterval(function(){if(j.vm){rt();return}if(at>=Ue){rt(),Se("Timeout: Unable to establish a connection with the StackBlitz VM"),Rr.forEach(function(kt,tr){kt.id===j.id&&Rr.splice(tr,1)});return}at++,Ve()},Me)}),Rr.push(this)}),ca=function(D){var j,ce=D instanceof Element?"element":"id";return(j=Rr.find(function(Se){return Se[ce]===D}))!==null&&j!==void 0?j:null};function fa(M,D){var j=document.createElement("input");return j.type="hidden",j.name=M,j.value=D,j}function na(M){return M.replace(/\[/g,"%5B").replace(/\]/g,"%5D")}function aa(M){var D=M.template,j=M.title,ce=M.description,Se=M.dependencies,Ke=M.files,Ve=M.settings;if(!st.includes(D)){var rt=st.map(function(tr){return"'".concat(tr,"'")}).join(", ");console.warn("Unsupported project.template: must be one of ".concat(rt))}var at=[],ct=function($t,Ut){var ir=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";at.push(fa($t,typeof Ut=="string"?Ut:ir))};ct("project[title]",j),typeof ce=="string"&&ce.length>0&&ct("project[description]",ce),ct("project[template]",D,"javascript"),Se&&(D==="node"?console.warn("Invalid project.dependencies: dependencies must be provided as a 'package.json' file when using the 'node' template."):ct("project[dependencies]",JSON.stringify(Se))),Ve&&ct("project[settings]",JSON.stringify(Ve)),Object.entries(Ke).forEach(function(tr){var $t=Oe()(tr,2),Ut=$t[0],ir=$t[1];ct("project[files][".concat(na(Ut),"]"),ir)});var kt=document.createElement("form");return kt.method="POST",kt.setAttribute("style","display:none!important;"),kt.append.apply(kt,at),kt}function jn(M,D){var j=aa(M);j.action=mr("/run",D),j.id="sb_run";var ce=` +For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function we(Ce,tt){var $e=(0,B.ax)(tt),De=(0,A.pi)((0,A.pi)({},B.Z0),Ce),nt=De.locale,ut=De.defaultLocale,St=De.onError;return nt?!Intl.NumberFormat.supportedLocalesOf(nt).length&&St?St(new Q.gb('Missing locale data for locale: "'.concat(nt,'" in Intl.NumberFormat. Using default locale: "').concat(ut,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(nt).length&&St&&St(new Q.gb('Missing locale data for locale: "'.concat(nt,'" in Intl.DateTimeFormat. Using default locale: "').concat(ut,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(St&&St(new Q.OV('"locale" was not configured, using "'.concat(ut,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),De.locale=De.defaultLocale||"en"),ye(De),(0,A.pi)((0,A.pi)({},De),{formatters:$e,formatNumber:ve.bind(null,De,$e.getNumberFormat),formatNumberToParts:V.bind(null,De,$e.getNumberFormat),formatRelativeTime:O.bind(null,De,$e.getRelativeTimeFormat),formatDate:W.bind(null,De,$e.getDateTimeFormat),formatDateToParts:H.bind(null,De,$e.getDateTimeFormat),formatTime:T.bind(null,De,$e.getDateTimeFormat),formatDateTimeRange:Z.bind(null,De,$e.getDateTimeFormat),formatTimeToParts:X.bind(null,De,$e.getDateTimeFormat),formatPlural:Re.bind(null,De,$e.getPluralRules),formatMessage:Ae.bind(null,De,$e),$t:Ae.bind(null,De,$e),formatList:He.bind(null,De,$e.getListFormat),formatListToParts:et.bind(null,De,$e.getListFormat),formatDisplayName:de.bind(null,De,$e.getDisplayNames)})}var ue=e(85030),he=e(76853),Ie=e(59370);function le(Ce){return{locale:Ce.locale,timeZone:Ce.timeZone,fallbackOnEmptyString:Ce.fallbackOnEmptyString,formats:Ce.formats,textComponent:Ce.textComponent,messages:Ce.messages,defaultLocale:Ce.defaultLocale,defaultFormats:Ce.defaultFormats,onError:Ce.onError,onWarn:Ce.onWarn,wrapRichTextChunksInFragment:Ce.wrapRichTextChunksInFragment,defaultRichTextElements:Ce.defaultRichTextElements}}function Se(Ce){return Ce&&Object.keys(Ce).reduce(function(tt,$e){var De=Ce[$e];return tt[$e]=(0,Ie.Gt)(De)?(0,ue.dt)(De):De,tt},{})}var Fe=function(Ce,tt,$e,De){for(var nt=[],ut=4;ut0&&arguments[0]!==void 0?arguments[0]:[],D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return M.length!==D.length||M.some((j,ce)=>!Object.is(j,D[ce]))}function k(M){if(M==null||typeof M.didCatch!="boolean"||typeof M.resetErrorBoundary!="function")throw new Error("ErrorBoundaryContext not found");return!0}function B(){const M=useContext(b);k(M);const[D,j]=useState({error:null,hasError:!1}),ce=useMemo(()=>({resetBoundary:()=>{M==null||M.resetErrorBoundary(),j({error:null,hasError:!1})},showBoundary:Ee=>j({error:Ee,hasError:!0})}),[M==null?void 0:M.resetErrorBoundary]);if(D.hasError)throw D.error;return ce}function A(M,D){const j=forwardRef((Ee,Ke)=>createElement(P,D,createElement(M,Wc(Zc({},Ee),{ref:Ke})))),ce=M.displayName||M.name||"Unknown";return j.displayName="withErrorBoundary(".concat(ce,")"),j}function L(){return L=Object.assign?Object.assign.bind():function(M){for(var D=1;DM.length)&&(D=M.length);for(var j=0,ce=new Array(D);j1&&(typeof window=="undefined"||window.innerWidth>1024)){for(var ir=0;irM.length)&&(D=M.length);for(var j=0,ce=new Array(D);jM.length)&&(D=M.length);for(var j=0,ce=new Array(D);jM.length)&&(D=M.length);for(var j=0,ce=new Array(D);j',isBinary:!1},at[kt]={content:(0,re.AM)(ct.react),isBinary:!1};var tr=re.EV.applyPlugins({type:o.Ac.modify,key:"modifyCodeSandboxData",initialValue:{files:at},args:M});return(0,et.Z)(tr)}var Se=function(D,j){var ce,Ee=document.createElement("form"),Ke=document.createElement("input"),Ve=le(D);Ee.method="POST",Ee.target="_blank",Ee.style.display="none",Ee.action=(j==null?void 0:j.api)||Ie,Ee.appendChild(Ke),Ee.setAttribute("data-demo",((ce=D.assets)===null||ce===void 0?void 0:ce.id)||""),Ke.name="parameters",Ke.value=Ve,document.body.appendChild(Ee),Ee.submit(),Ee.remove()},Fe=e(77117),Le=e.n(Fe),_e=e(15033),We=e.n(_e),mt=e(96345),ot=e.n(mt),Et=e(27566),I=e.n(Et),ne=e(28152),Oe=e.n(ne),Me=500,Ue=20,Ge=300,Te="https://stackblitz.com",st=["angular-cli","create-react-app","html","javascript","node","polymer","typescript","vue"],dt=["project","search","ports","settings"],vt=["light","dark"],jt=["editor","preview"],Ce={clickToLoad:function(D){return $e("ctl",D)},devToolsHeight:function(D){return nt("devtoolsheight",D)},forceEmbedLayout:function(D){return $e("embed",D)},hideDevTools:function(D){return $e("hidedevtools",D)},hideExplorer:function(D){return $e("hideExplorer",D)},hideNavigation:function(D){return $e("hideNavigation",D)},openFile:function(D){return St("file",D)},showSidebar:function(D){return De("showSidebar",D)},sidebarView:function(D){return ut("sidebarView",D,dt)},startScript:function(D){return St("startScript",D)},terminalHeight:function(D){return nt("terminalHeight",D)},theme:function(D){return ut("theme",D,vt)},view:function(D){return ut("view",D,jt)},zenMode:function(D){return $e("zenMode",D)}};function tt(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=Object.entries(M).map(function(j){var ce=Oe()(j,2),Ee=ce[0],Ke=ce[1];return Ke!=null&&Ce.hasOwnProperty(Ee)?Ce[Ee](Ke):""}).filter(Boolean);return D.length?"?".concat(D.join("&")):""}function $e(M,D){return D===!0?"".concat(M,"=1"):""}function De(M,D){return typeof D=="boolean"?"".concat(M,"=").concat(D?"1":"0"):""}function nt(M,D){if(typeof D=="number"&&!Number.isNaN(D)){var j=Math.min(100,Math.max(0,D));return"".concat(M,"=").concat(encodeURIComponent(Math.round(j)))}return""}function ut(M){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return j.includes(D)?"".concat(M,"=").concat(encodeURIComponent(D)):""}function St(M,D){var j=Array.isArray(D)?D:[D];return j.filter(function(ce){return typeof ce=="string"&&ce.trim()!==""}).map(function(ce){return"".concat(M,"=").concat(encodeURIComponent(ce))}).join("&")}function Nt(){return Math.random().toString(36).slice(2,6)+Math.random().toString(36).slice(2,6)}function Vt(M,D){return"".concat(sr(D)).concat(M).concat(tt(D))}function mr(M,D){var j={forceEmbedLayout:!0};return D&&I()(D)==="object"&&Object.assign(j,D),"".concat(sr(j)).concat(M).concat(tt(j))}function sr(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=typeof M.origin=="string"?M.origin:Te;return D.replace(/\/$/,"")}function yr(M,D,j){if(!D||!M||!M.parentNode)throw new Error("Invalid Element");M.id&&(D.id=M.id),M.className&&(D.className=M.className),Un(D,j),M.replaceWith(D)}function Br(M){if(typeof M=="string"){var D=document.getElementById(M);if(!D)throw new Error("Could not find element with id '".concat(M,"'"));return D}else if(M instanceof HTMLElement)return M;throw new Error("Invalid element: ".concat(M))}function Mn(M){return M&&M.newWindow===!1?"_self":"_blank"}function Un(M){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=Object.hasOwnProperty.call(D,"height")?"".concat(D.height):"".concat(Ge),ce=Object.hasOwnProperty.call(D,"width")?"".concat(D.width):void 0;M.setAttribute("height",j),ce?M.setAttribute("width",ce):M.setAttribute("style","width:100%;")}var gn=function(){function M(D){We()(this,M),this.pending={},this.port=D,this.port.onmessage=this.messageListener.bind(this)}return ot()(M,[{key:"request",value:function(j){var ce=this,Ee=j.type,Ke=j.payload;return new Promise(function(Ve,rt){var at=Nt();ce.pending[at]={resolve:Ve,reject:rt},ce.port.postMessage({type:Ee,payload:Le()(Le()({},Ke),{},{__reqid:at})})})}},{key:"messageListener",value:function(j){var ce;if(typeof((ce=j.data.payload)===null||ce===void 0?void 0:ce.__reqid)=="string"){var Ee=j.data,Ke=Ee.type,Ve=Ee.payload,rt=Ve.__reqid,at=Ve.__success,ct=Ve.__error;this.pending[rt]&&(at?this.pending[rt].resolve(this.cleanResult(Ve)):this.pending[rt].reject(ct?"".concat(Ke,": ").concat(ct):Ke),delete this.pending[rt])}}},{key:"cleanResult",value:function(j){var ce=Le()({},j);return delete ce.__reqid,delete ce.__success,delete ce.__error,Object.keys(ce).length?ce:null}}]),M}(),cn=function(){function M(D,j){var ce=this;We()(this,M),this.editor={openFile:function(Ke){return ce._rdc.request({type:"SDK_OPEN_FILE",payload:{path:Ke}})},setCurrentFile:function(Ke){return ce._rdc.request({type:"SDK_SET_CURRENT_FILE",payload:{path:Ke}})},setTheme:function(Ke){return ce._rdc.request({type:"SDK_SET_UI_THEME",payload:{theme:Ke}})},setView:function(Ke){return ce._rdc.request({type:"SDK_SET_UI_VIEW",payload:{view:Ke}})},showSidebar:function(){var Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return ce._rdc.request({type:"SDK_TOGGLE_SIDEBAR",payload:{visible:Ke}})}},this.preview={origin:"",getUrl:function(){return ce._rdc.request({type:"SDK_GET_PREVIEW_URL",payload:{}}).then(function(Ke){var Ve;return(Ve=Ke==null?void 0:Ke.url)!==null&&Ve!==void 0?Ve:null})},setUrl:function(){var Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"/";if(typeof Ke!="string"||!Ke.startsWith("/"))throw new Error("Invalid argument: expected a path starting with '/', got '".concat(Ke,"'"));return ce._rdc.request({type:"SDK_SET_PREVIEW_URL",payload:{path:Ke}})}},this._rdc=new gn(D),Object.defineProperty(this.preview,"origin",{value:typeof j.previewOrigin=="string"?j.previewOrigin:null,writable:!1})}return ot()(M,[{key:"applyFsDiff",value:function(j){var ce=function(Ke){return Ke!==null&&I()(Ke)==="object"};if(!ce(j)||!ce(j.create))throw new Error("Invalid diff object: expected diff.create to be an object.");if(!Array.isArray(j.destroy))throw new Error("Invalid diff object: expected diff.destroy to be an array.");return this._rdc.request({type:"SDK_APPLY_FS_DIFF",payload:j})}},{key:"getDependencies",value:function(){return this._rdc.request({type:"SDK_GET_DEPS_SNAPSHOT",payload:{}})}},{key:"getFsSnapshot",value:function(){return this._rdc.request({type:"SDK_GET_FS_SNAPSHOT",payload:{}})}}]),M}(),Pr=[],vn=ot()(function M(D){var j=this;We()(this,M),this.id=Nt(),this.element=D,this.pending=new Promise(function(ce,Ee){var Ke=function(tr){var $t=tr.data,Ut=tr.ports;($t==null?void 0:$t.action)==="SDK_INIT_SUCCESS"&&$t.id===j.id&&(j.vm=new cn(Ut[0],$t.payload),ce(j.vm),rt())},Ve=function(){var tr;(tr=j.element.contentWindow)===null||tr===void 0||tr.postMessage({action:"SDK_INIT",id:j.id},"*")};function rt(){window.clearInterval(ct),window.removeEventListener("message",Ke)}window.addEventListener("message",Ke),Ve();var at=0,ct=window.setInterval(function(){if(j.vm){rt();return}if(at>=Ue){rt(),Ee("Timeout: Unable to establish a connection with the StackBlitz VM"),Pr.forEach(function(kt,tr){kt.id===j.id&&Pr.splice(tr,1)});return}at++,Ve()},Me)}),Pr.push(this)}),fa=function(D){var j,ce=D instanceof Element?"element":"id";return(j=Pr.find(function(Ee){return Ee[ce]===D}))!==null&&j!==void 0?j:null};function Sa(M,D){var j=document.createElement("input");return j.type="hidden",j.name=M,j.value=D,j}function aa(M){return M.replace(/\[/g,"%5B").replace(/\]/g,"%5D")}function oa(M){var D=M.template,j=M.title,ce=M.description,Ee=M.dependencies,Ke=M.files,Ve=M.settings;if(!st.includes(D)){var rt=st.map(function(tr){return"'".concat(tr,"'")}).join(", ");console.warn("Unsupported project.template: must be one of ".concat(rt))}var at=[],ct=function($t,Ut){var ir=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";at.push(Sa($t,typeof Ut=="string"?Ut:ir))};ct("project[title]",j),typeof ce=="string"&&ce.length>0&&ct("project[description]",ce),ct("project[template]",D,"javascript"),Ee&&(D==="node"?console.warn("Invalid project.dependencies: dependencies must be provided as a 'package.json' file when using the 'node' template."):ct("project[dependencies]",JSON.stringify(Ee))),Ve&&ct("project[settings]",JSON.stringify(Ve)),Object.entries(Ke).forEach(function(tr){var $t=Oe()(tr,2),Ut=$t[0],ir=$t[1];ct("project[files][".concat(aa(Ut),"]"),ir)});var kt=document.createElement("form");return kt.method="POST",kt.setAttribute("style","display:none!important;"),kt.append.apply(kt,at),kt}function jn(M,D){var j=oa(M);j.action=mr("/run",D),j.id="sb_run";var ce=` `.concat(j.outerHTML,` + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-boolean-demo-example/index.html b/~demos/packages-hooks-src-use-boolean-demo-example/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-boolean-demo-example/index.html +++ b/~demos/packages-hooks-src-use-boolean-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-callback-ref-demo-example/index.html b/~demos/packages-hooks-src-use-callback-ref-demo-example/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-callback-ref-demo-example/index.html +++ b/~demos/packages-hooks-src-use-callback-ref-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-clipboard-demo-example/index.html b/~demos/packages-hooks-src-use-clipboard-demo-example/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-clipboard-demo-example/index.html +++ b/~demos/packages-hooks-src-use-clipboard-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-color-schema-demo-example/index.html b/~demos/packages-hooks-src-use-color-schema-demo-example/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-color-schema-demo-example/index.html +++ b/~demos/packages-hooks-src-use-color-schema-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-counter-demo-example/index.html b/~demos/packages-hooks-src-use-counter-demo-example/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-counter-demo-example/index.html +++ b/~demos/packages-hooks-src-use-counter-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-creation-index-demo-example/index.html b/~demos/packages-hooks-src-use-creation-index-demo-example/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-creation-index-demo-example/index.html +++ b/~demos/packages-hooks-src-use-creation-index-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-debounce-demo-example/index.html b/~demos/packages-hooks-src-use-debounce-demo-example/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-debounce-demo-example/index.html +++ b/~demos/packages-hooks-src-use-debounce-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-debounce-fn-demo-example/index.html b/~demos/packages-hooks-src-use-debounce-fn-demo-example/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-debounce-fn-demo-example/index.html +++ b/~demos/packages-hooks-src-use-debounce-fn-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-latest-demo-example/index.html b/~demos/packages-hooks-src-use-latest-demo-example/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-latest-demo-example/index.html +++ b/~demos/packages-hooks-src-use-latest-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-memoized-fn-demo-example/index.html b/~demos/packages-hooks-src-use-memoized-fn-demo-example/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-memoized-fn-demo-example/index.html +++ b/~demos/packages-hooks-src-use-memoized-fn-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-memoized-fn-demo-example2/index.html b/~demos/packages-hooks-src-use-memoized-fn-demo-example2/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-memoized-fn-demo-example2/index.html +++ b/~demos/packages-hooks-src-use-memoized-fn-demo-example2/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-mount-demo-example/index.html b/~demos/packages-hooks-src-use-mount-demo-example/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-mount-demo-example/index.html +++ b/~demos/packages-hooks-src-use-mount-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-os-demo-example/index.html b/~demos/packages-hooks-src-use-os-demo-example/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-os-demo-example/index.html +++ b/~demos/packages-hooks-src-use-os-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-cancel/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-cancel/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-cancel/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-cancel/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-default/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-default/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-default/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-default/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-lifecycle/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-lifecycle/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-lifecycle/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-lifecycle/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-run/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-run/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-run/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-run/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-runasync/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-runasync/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-runasync/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-runasync/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-mutate/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-mutate/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-mutate/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-mutate/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-params/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-params/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-params/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-params/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-refresh/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-refresh/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-refresh/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-refresh/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-index-demo-default/index.html b/~demos/packages-hooks-src-use-request-doc-index-demo-default/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-request-doc-index-demo-default/index.html +++ b/~demos/packages-hooks-src-use-request-doc-index-demo-default/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-index-demo-manual/index.html b/~demos/packages-hooks-src-use-request-doc-index-demo-manual/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-request-doc-index-demo-manual/index.html +++ b/~demos/packages-hooks-src-use-request-doc-index-demo-manual/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-reset-state-demo-example/index.html b/~demos/packages-hooks-src-use-reset-state-demo-example/index.html new file mode 100644 index 0000000..ac69dae --- /dev/null +++ b/~demos/packages-hooks-src-use-reset-state-demo-example/index.html @@ -0,0 +1,12 @@ + + + + +Etcetera hooks + + + +
+ + + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-set-demo-example/index.html b/~demos/packages-hooks-src-use-set-demo-example/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-set-demo-example/index.html +++ b/~demos/packages-hooks-src-use-set-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-title-demo-example/index.html b/~demos/packages-hooks-src-use-title-demo-example/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-title-demo-example/index.html +++ b/~demos/packages-hooks-src-use-title-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-toggle-demo-example/index.html b/~demos/packages-hooks-src-use-toggle-demo-example/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-toggle-demo-example/index.html +++ b/~demos/packages-hooks-src-use-toggle-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-toggle-demo-example2/index.html b/~demos/packages-hooks-src-use-toggle-demo-example2/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-toggle-demo-example2/index.html +++ b/~demos/packages-hooks-src-use-toggle-demo-example2/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-unmount-demo-example/index.html b/~demos/packages-hooks-src-use-unmount-demo-example/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-unmount-demo-example/index.html +++ b/~demos/packages-hooks-src-use-unmount-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-unmount-ref-demo-example/index.html b/~demos/packages-hooks-src-use-unmount-ref-demo-example/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-unmount-ref-demo-example/index.html +++ b/~demos/packages-hooks-src-use-unmount-ref-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-update-demo-example/index.html b/~demos/packages-hooks-src-use-update-demo-example/index.html index 7dd747f..ac69dae 100644 --- a/~demos/packages-hooks-src-use-update-demo-example/index.html +++ b/~demos/packages-hooks-src-use-update-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file