You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
24 KiB
1 lines
24 KiB
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[370],{3258:function(e,t,r){r.d(t,{Z:function(){return g}});var n=r(7462),i=r(5987),o=r(7294),a=(r(5697),r(6010)),c=r(130),u=r(5209),s=(0,u.Z)(o.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),l=(0,u.Z)(o.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),d=r(9693),f=(0,u.Z)(o.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox"),p=r(3871),h=r(4670),m=o.createElement(l,null),b=o.createElement(s,null),v=o.createElement(f,null),y=o.forwardRef((function(e,t){var r=e.checkedIcon,u=void 0===r?m:r,s=e.classes,l=e.color,d=void 0===l?"secondary":l,f=e.icon,h=void 0===f?b:f,y=e.indeterminate,g=void 0!==y&&y,k=e.indeterminateIcon,w=void 0===k?v:k,x=e.inputProps,C=e.size,Z=void 0===C?"medium":C,E=(0,i.Z)(e,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps","size"]),O=g?w:h,S=g?w:u;return o.createElement(c.Z,(0,n.Z)({type:"checkbox",classes:{root:(0,a.Z)(s.root,s["color".concat((0,p.Z)(d))],g&&s.indeterminate),checked:s.checked,disabled:s.disabled},color:d,inputProps:(0,n.Z)({"data-indeterminate":g},x),icon:o.cloneElement(O,{fontSize:void 0===O.props.fontSize&&"small"===Z?Z:O.props.fontSize}),checkedIcon:o.cloneElement(S,{fontSize:void 0===S.props.fontSize&&"small"===Z?Z:S.props.fontSize}),ref:t},E))})),g=(0,h.Z)((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,d.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,d.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiCheckbox"})(y)},3681:function(e,t,r){var n=r(7462),i=r(5987),o=r(7294),a=(r(5697),r(6010)),c=r(3871),u=r(4670),s=r(9693),l=r(8920),d=o.forwardRef((function(e,t){var r=e.classes,u=e.className,s=e.color,d=void 0===s?"primary":s,f=e.value,p=e.valueBuffer,h=e.variant,m=void 0===h?"indeterminate":h,b=(0,i.Z)(e,["classes","className","color","value","valueBuffer","variant"]),v=(0,l.Z)(),y={},g={bar1:{},bar2:{}};if("determinate"===m||"buffer"===m)if(void 0!==f){y["aria-valuenow"]=Math.round(f),y["aria-valuemin"]=0,y["aria-valuemax"]=100;var k=f-100;"rtl"===v.direction&&(k=-k),g.bar1.transform="translateX(".concat(k,"%)")}else 0;if("buffer"===m)if(void 0!==p){var w=(p||0)-100;"rtl"===v.direction&&(w=-w),g.bar2.transform="translateX(".concat(w,"%)")}else 0;return o.createElement("div",(0,n.Z)({className:(0,a.Z)(r.root,r["color".concat((0,c.Z)(d))],u,{determinate:r.determinate,indeterminate:r.indeterminate,buffer:r.buffer,query:r.query}[m]),role:"progressbar"},y,{ref:t},b),"buffer"===m?o.createElement("div",{className:(0,a.Z)(r.dashed,r["dashedColor".concat((0,c.Z)(d))])}):null,o.createElement("div",{className:(0,a.Z)(r.bar,r["barColor".concat((0,c.Z)(d))],("indeterminate"===m||"query"===m)&&r.bar1Indeterminate,{determinate:r.bar1Determinate,buffer:r.bar1Buffer}[m]),style:g.bar1}),"determinate"===m?null:o.createElement("div",{className:(0,a.Z)(r.bar,("indeterminate"===m||"query"===m)&&r.bar2Indeterminate,"buffer"===m?[r["color".concat((0,c.Z)(d))],r.bar2Buffer]:r["barColor".concat((0,c.Z)(d))]),style:g.bar2}))}));t.Z=(0,u.Z)((function(e){var t=function(t){return"light"===e.palette.type?(0,s.$n)(t,.62):(0,s._j)(t,.5)},r=t(e.palette.primary.main),n=t(e.palette.secondary.main);return{root:{position:"relative",overflow:"hidden",height:4,"@media print":{colorAdjust:"exact"}},colorPrimary:{backgroundColor:r},colorSecondary:{backgroundColor:n},determinate:{},indeterminate:{},buffer:{backgroundColor:"transparent"},query:{transform:"rotate(180deg)"},dashed:{position:"absolute",marginTop:0,height:"100%",width:"100%",animation:"$buffer 3s infinite linear"},dashedColorPrimary:{backgroundImage:"radial-gradient(".concat(r," 0%, ").concat(r," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"},dashedColorSecondary:{backgroundImage:"radial-gradient(".concat(n," 0%, ").concat(n," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"},bar:{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},barColorPrimary:{backgroundColor:e.palette.primary.main},barColorSecondary:{backgroundColor:e.palette.secondary.main},bar1Indeterminate:{width:"auto",animation:"$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite"},bar1Determinate:{transition:"transform .".concat(4,"s linear")},bar1Buffer:{zIndex:1,transition:"transform .".concat(4,"s linear")},bar2Indeterminate:{width:"auto",animation:"$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite"},bar2Buffer:{transition:"transform .".concat(4,"s linear")},"@keyframes indeterminate1":{"0%":{left:"-35%",right:"100%"},"60%":{left:"100%",right:"-90%"},"100%":{left:"100%",right:"-90%"}},"@keyframes indeterminate2":{"0%":{left:"-200%",right:"100%"},"60%":{left:"107%",right:"-8%"},"100%":{left:"107%",right:"-8%"}},"@keyframes buffer":{"0%":{opacity:1,backgroundPosition:"0 -23px"},"50%":{opacity:0,backgroundPosition:"0 -23px"},"100%":{opacity:1,backgroundPosition:"-200px -23px"}}}}),{name:"MuiLinearProgress"})(d)},9570:function(e,t,r){var n=r(7462),i=r(5987),o=r(7294),a=(r(5697),r(6010)),c=r(4670),u=r(9693),s=r(3871),l=r(130),d=o.forwardRef((function(e,t){var r=e.classes,c=e.className,u=e.color,d=void 0===u?"secondary":u,f=e.edge,p=void 0!==f&&f,h=e.size,m=void 0===h?"medium":h,b=(0,i.Z)(e,["classes","className","color","edge","size"]),v=o.createElement("span",{className:r.thumb});return o.createElement("span",{className:(0,a.Z)(r.root,c,{start:r.edgeStart,end:r.edgeEnd}[p],"small"===m&&r["size".concat((0,s.Z)(m))])},o.createElement(l.Z,(0,n.Z)({type:"checkbox",icon:v,checkedIcon:v,classes:{root:(0,a.Z)(r.switchBase,r["color".concat((0,s.Z)(d))]),input:r.input,checked:r.checked,disabled:r.disabled},ref:t},b)),o.createElement("span",{className:r.track}))}));t.Z=(0,c.Z)((function(e){return{root:{display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.type?e.palette.grey[50]:e.palette.grey[400],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),"&$checked":{transform:"translateX(20px)"},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:"light"===e.palette.type?.12:.1}},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,u.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.primary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,u.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.secondary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4,"&$checked":{transform:"translateX(16px)"}}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"},track:{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.type?.38:.3}}}),{name:"MuiSwitch"})(d)},130:function(e,t,r){r.d(t,{Z:function(){return h}});var n=r(7462),i=r(731),o=r(5987),a=r(7294),c=(r(5697),r(6010)),u=r(2775),s=a.createContext();var l=s;var d=r(4670),f=r(7812),p=a.forwardRef((function(e,t){var r=e.autoFocus,s=e.checked,d=e.checkedIcon,p=e.classes,h=e.className,m=e.defaultChecked,b=e.disabled,v=e.icon,y=e.id,g=e.inputProps,k=e.inputRef,w=e.name,x=e.onBlur,C=e.onChange,Z=e.onFocus,E=e.readOnly,O=e.required,S=e.tabIndex,z=e.type,B=e.value,I=(0,o.Z)(e,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),P=(0,u.Z)({controlled:s,default:Boolean(m),name:"SwitchBase",state:"checked"}),$=(0,i.Z)(P,2),M=$[0],R=$[1],F=a.useContext(l),T=b;F&&"undefined"===typeof T&&(T=F.disabled);var V="checkbox"===z||"radio"===z;return a.createElement(f.Z,(0,n.Z)({component:"span",className:(0,c.Z)(p.root,h,M&&p.checked,T&&p.disabled),disabled:T,tabIndex:null,role:void 0,onFocus:function(e){Z&&Z(e),F&&F.onFocus&&F.onFocus(e)},onBlur:function(e){x&&x(e),F&&F.onBlur&&F.onBlur(e)},ref:t},I),a.createElement("input",(0,n.Z)({autoFocus:r,checked:s,defaultChecked:m,className:p.input,disabled:T,id:V&&y,name:w,onChange:function(e){var t=e.target.checked;R(t),C&&C(e,t)},readOnly:E,ref:k,required:O,tabIndex:S,type:z,value:B},g)),M?d:v)})),h=(0,d.Z)({root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}},{name:"PrivateSwitchBase"})(p)},1959:function(e,t,r){var n=r(5318),i=r(862);t.Z=void 0;var o=i(r(7294)),a=(0,n(r(2108)).default)(o.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");t.Z=a},9067:function(e,t,r){var n=r(5318),i=r(862);t.Z=void 0;var o=i(r(7294)),a=(0,n(r(2108)).default)(o.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");t.Z=a},8513:function(e,t,r){var n=r(5318),i=r(862);t.Z=void 0;var o=i(r(7294)),a=(0,n(r(2108)).default)(o.createElement("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert");t.Z=a},8600:function(e){const t=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],r=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],n=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],i=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],o=(e,t,r)=>{let n=e;return"string"===typeof t||Array.isArray(t)?n=e.toLocaleString(t,r):!0!==t&&void 0===r||(n=e.toLocaleString(void 0,r)),n};e.exports=(e,a)=>{if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);const c=(a=Object.assign({bits:!1,binary:!1},a)).bits?a.binary?i:n:a.binary?r:t;if(a.signed&&0===e)return` 0 ${c[0]}`;const u=e<0,s=u?"-":a.signed?"+":"";let l;if(u&&(e=-e),void 0!==a.minimumFractionDigits&&(l={minimumFractionDigits:a.minimumFractionDigits}),void 0!==a.maximumFractionDigits&&(l=Object.assign({maximumFractionDigits:a.maximumFractionDigits},l)),e<1){return s+o(e,a.locale,l)+" "+c[0]}const d=Math.min(Math.floor(a.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),c.length-1);e/=Math.pow(a.binary?1024:1e3,d),l||(e=e.toPrecision(3));return s+o(Number(e),a.locale,l)+" "+c[d]}},3549:function(e,t,r){r.d(t,{ZP:function(){return M}});var n=r(7294),i=Object.prototype.hasOwnProperty;var o=new WeakMap,a=0;var c=function(){function e(e){void 0===e&&(e={}),this.cache=new Map(Object.entries(e)),this.subs=[]}return e.prototype.get=function(e){var t=this.serializeKey(e)[0];return this.cache.get(t)},e.prototype.set=function(e,t){var r=this.serializeKey(e)[0];this.cache.set(r,t),this.notify()},e.prototype.keys=function(){return Array.from(this.cache.keys())},e.prototype.has=function(e){var t=this.serializeKey(e)[0];return this.cache.has(t)},e.prototype.clear=function(){this.cache.clear(),this.notify()},e.prototype.delete=function(e){var t=this.serializeKey(e)[0];this.cache.delete(t),this.notify()},e.prototype.serializeKey=function(e){var t=null;if("function"===typeof e)try{e=e()}catch(r){e=""}return Array.isArray(e)?(t=e,e=function(e){if(!e.length)return"";for(var t="arg",r=0;r<e.length;++r)if(null!==e[r]){var n=void 0;"object"!==typeof e[r]&&"function"!==typeof e[r]?n="string"===typeof e[r]?'"'+e[r]+'"':String(e[r]):o.has(e[r])?n=o.get(e[r]):(n=a,o.set(e[r],a++)),t+="@"+n}else t+="@null";return t}(e)):e=String(e||""),[e,t,e?"err@"+e:"",e?"validating@"+e:""]},e.prototype.subscribe=function(e){var t=this;if("function"!==typeof e)throw new Error("Expected the listener to be a function.");var r=!0;return this.subs.push(e),function(){if(r){r=!1;var n=t.subs.indexOf(e);n>-1&&(t.subs[n]=t.subs[t.subs.length-1],t.subs.length--)}}},e.prototype.notify=function(){for(var e=0,t=this.subs;e<t.length;e++){(0,t[e])()}},e}(),u=!0,s={isOnline:function(){return u},isDocumentVisible:function(){return"undefined"===typeof document||void 0===document.visibilityState||"hidden"!==document.visibilityState},fetcher:function(e){return fetch(e).then((function(e){return e.json()}))},registerOnFocus:function(e){"undefined"!==typeof window&&void 0!==window.addEventListener&&"undefined"!==typeof document&&void 0!==document.addEventListener&&(document.addEventListener("visibilitychange",(function(){return e()}),!1),window.addEventListener("focus",(function(){return e()}),!1))},registerOnReconnect:function(e){"undefined"!==typeof window&&void 0!==window.addEventListener&&(window.addEventListener("online",(function(){u=!0,e()}),!1),window.addEventListener("offline",(function(){return u=!1}),!1))}},l=function(){return(l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},d=new c;var f="undefined"!==typeof window&&navigator.connection&&-1!==["slow-2g","2g"].indexOf(navigator.connection.effectiveType),p=l({onLoadingSlow:function(){},onSuccess:function(){},onError:function(){},onErrorRetry:function(e,t,r,n,i){if(r.isDocumentVisible()&&!("number"===typeof r.errorRetryCount&&i.retryCount>r.errorRetryCount)){var o=Math.min(i.retryCount,8),a=~~((Math.random()+.5)*(1<<o))*r.errorRetryInterval;setTimeout(n,a,i)}},errorRetryInterval:1e3*(f?10:5),focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:1e3*(f?5:3),refreshInterval:0,revalidateOnFocus:!0,revalidateOnReconnect:!0,refreshWhenHidden:!1,refreshWhenOffline:!1,shouldRetryOnError:!0,suspense:!1,compare:function e(t,r){var n,o;if(t===r)return!0;if(t&&r&&(n=t.constructor)===r.constructor){if(n===Date)return t.getTime()===r.getTime();if(n===RegExp)return t.toString()===r.toString();if(n===Array){if((o=t.length)===r.length)for(;o--&&e(t[o],r[o]););return-1===o}if(!n||"object"===typeof t){for(n in o=0,t){if(i.call(t,n)&&++o&&!i.call(r,n))return!1;if(!(n in r)||!e(t[n],r[n]))return!1}return Object.keys(r).length===o}}return t!==t&&r!==r},isPaused:function(){return!1}},s),h="undefined"===typeof window||!!("undefined"!==typeof Deno&&Deno&&Deno.version&&Deno.version.deno),m=h?null:window.requestAnimationFrame?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout(e,1)},b=h?n.useEffect:n.useLayoutEffect,v=(0,n.createContext)({});v.displayName="SWRConfigContext";var y=v,g=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function c(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,c)}u((n=n.apply(e,t||[])).next())}))},k=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(c){o=[6,c],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}},w={},x={},C={},Z={},E={},O={},S={},z=function(){var e=0;return function(){return++e}}();if(!h){var B=function(e){if(p.isDocumentVisible()&&p.isOnline())for(var t in e)e[t][0]&&e[t][0]()};"function"===typeof p.registerOnFocus&&p.registerOnFocus((function(){return B(C)})),"function"===typeof p.registerOnReconnect&&p.registerOnReconnect((function(){return B(Z)}))}var I=function(e,t){void 0===t&&(t=!0);var r=d.serializeKey(e),n=r[0],i=r[2],o=r[3];if(!n)return Promise.resolve();var a=E[n];if(n&&a){for(var c=d.get(n),u=d.get(i),s=d.get(o),l=[],f=0;f<a.length;++f)l.push(a[f](t,c,u,s,f>0));return Promise.all(l).then((function(){return d.get(n)}))}return Promise.resolve(d.get(n))},P=function(e,t,r,n){var i=E[e];if(e&&i)for(var o=0;o<i.length;++o)i[o](!1,t,r,n)},$=function(e,t,r){return void 0===r&&(r=!0),g(void 0,void 0,void 0,(function(){var n,i,o,a,c,u,s,l,f,p,h,m,b;return k(this,(function(v){switch(v.label){case 0:if(n=d.serializeKey(e),i=n[0],o=n[2],!i)return[2];if("undefined"===typeof t)return[2,I(e,r)];if(O[i]=z()-1,S[i]=0,a=O[i],c=x[i],l=!1,t&&"function"===typeof t)try{t=t(d.get(i))}catch(y){t=void 0,s=y}if(!t||"function"!==typeof t.then)return[3,5];l=!0,v.label=1;case 1:return v.trys.push([1,3,,4]),[4,t];case 2:return u=v.sent(),[3,4];case 3:return f=v.sent(),s=f,[3,4];case 4:return[3,6];case 5:u=t,v.label=6;case 6:if((p=function(){if(a!==O[i]||c!==x[i]){if(s)throw s;return!0}})())return[2,u];if("undefined"!==typeof u&&d.set(i,u),d.set(o,s),S[i]=z()-1,!l&&p())return[2,u];if(h=E[i]){for(m=[],b=0;b<h.length;++b)m.push(h[b](!!r,u,s,void 0,b>0));return[2,Promise.all(m).then((function(){if(s)throw s;return d.get(i)}))]}if(s)throw s;return[2,u]}}))}))};Object.defineProperty(y.Provider,"default",{value:p});y.Provider;var M=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=t[0],o=Object.assign({},p,(0,n.useContext)(y),t.length>2?t[2]:2===t.length&&"object"===typeof t[1]?t[1]:{}),a=t.length>2||2===t.length&&"function"===typeof t[1]||null===t[1]?t[1]:o.fetcher,c=d.serializeKey(i),u=c[0],s=c[1],l=c[2],f=c[3],v=(0,n.useRef)(o);b((function(){v.current=o}));var B=function(){return o.revalidateOnMount||!o.initialData&&void 0===o.revalidateOnMount},I=function(){var e=d.get(u);return"undefined"===typeof e?o.initialData:e},M=function(){return!!d.get(f)||u&&B()},R=I(),F=d.get(l),T=M(),V=(0,n.useRef)({data:!1,error:!1,isValidating:!1}),j=(0,n.useRef)({data:R,error:F,isValidating:T});(0,n.useDebugValue)(j.current.data);var D,L,N=(0,n.useState)({})[1],A=(0,n.useCallback)((function(e){var t=!1;for(var r in e)j.current[r]!==e[r]&&(j.current[r]=e[r],V.current[r]&&(t=!0));if(t){if(q.current||!K.current)return;N({})}}),[]),q=(0,n.useRef)(!1),H=(0,n.useRef)(u),K=(0,n.useRef)(!1),W=(0,n.useCallback)((function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];q.current||K.current&&u===H.current&&(t=v.current)[e].apply(t,r)}),[u]),G=(0,n.useCallback)((function(e,t){return $(H.current,e,t)}),[]),_=function(e,t){return e[u]?e[u].push(t):e[u]=[t],function(){var r=e[u],n=r.indexOf(t);n>=0&&(r[n]=r[r.length-1],r.pop())}},X=(0,n.useCallback)((function(t){return void 0===t&&(t={}),g(e,void 0,void 0,(function(){var e,r,n,i,c,p,h,m,b,y;return k(this,(function(g){switch(g.label){case 0:if(!u||!a)return[2,!1];if(q.current)return[2,!1];if(v.current.isPaused())return[2,!1];e=t.retryCount,r=void 0===e?0:e,n=t.dedupe,i=void 0!==n&&n,c=!0,p="undefined"!==typeof w[u]&&i,g.label=1;case 1:return g.trys.push([1,6,,7]),A({isValidating:!0}),d.set(f,!0),p||P(u,j.current.data,j.current.error,!0),h=void 0,m=void 0,p?(m=x[u],[4,w[u]]):[3,3];case 2:return h=g.sent(),[3,5];case 3:return o.loadingTimeout&&!d.get(u)&&setTimeout((function(){c&&W("onLoadingSlow",u,o)}),o.loadingTimeout),w[u]=null!==s?a.apply(void 0,s):a(u),x[u]=m=z(),[4,w[u]];case 4:h=g.sent(),setTimeout((function(){delete w[u],delete x[u]}),o.dedupingInterval),W("onSuccess",h,u,o),g.label=5;case 5:return x[u]>m?[2,!1]:O[u]&&(m<=O[u]||m<=S[u]||0===S[u])?(A({isValidating:!1}),[2,!1]):(d.set(l,void 0),d.set(f,!1),b={isValidating:!1},"undefined"!==typeof j.current.error&&(b.error=void 0),o.compare(j.current.data,h)||(b.data=h),o.compare(d.get(u),h)||d.set(u,h),A(b),p||P(u,h,b.error,!1),[3,7]);case 6:return y=g.sent(),delete w[u],delete x[u],v.current.isPaused()?(A({isValidating:!1}),[2,!1]):(d.set(l,y),j.current.error!==y&&(A({isValidating:!1,error:y}),p||P(u,void 0,y,!1)),W("onError",y,u,o),o.shouldRetryOnError&&W("onErrorRetry",y,u,o,X,{retryCount:r+1,dedupe:!0}),[3,7]);case 7:return c=!1,[2,!0]}}))}))}),[u]);if(b((function(){if(u){q.current=!1;var e=K.current;K.current=!0;var t=j.current.data,r=I();H.current=u,o.compare(t,r)||A({data:r});var n=function(){return X({dedupe:!0})};(e||B())&&("undefined"===typeof r||h?n():m(n));var i=!1,a=_(C,(function(){!i&&v.current.revalidateOnFocus&&(i=!0,n(),setTimeout((function(){return i=!1}),v.current.focusThrottleInterval))})),c=_(Z,(function(){v.current.revalidateOnReconnect&&n()})),s=_(E,(function(e,t,r,i,a){void 0===e&&(e=!0),void 0===a&&(a=!0);var c={},u=!1;return"undefined"===typeof t||o.compare(j.current.data,t)||(c.data=t,u=!0),j.current.error!==r&&(c.error=r,u=!0),"undefined"!==typeof i&&j.current.isValidating!==i&&(c.isValidating=i,u=!0),u&&A(c),!!e&&(a?n():X())}));return function(){A=function(){return null},q.current=!0,a(),c(),s()}}}),[u,X]),b((function(){var t=null,r=function(){return g(e,void 0,void 0,(function(){return k(this,(function(e){switch(e.label){case 0:return j.current.error||!v.current.refreshWhenHidden&&!v.current.isDocumentVisible()||!v.current.refreshWhenOffline&&!v.current.isOnline()?[3,2]:[4,X({dedupe:!0})];case 1:e.sent(),e.label=2;case 2:return v.current.refreshInterval&&t&&(t=setTimeout(r,v.current.refreshInterval)),[2]}}))}))};return v.current.refreshInterval&&(t=setTimeout(r,v.current.refreshInterval)),function(){t&&(clearTimeout(t),t=null)}}),[o.refreshInterval,o.refreshWhenHidden,o.refreshWhenOffline,X]),o.suspense){if(D=d.get(u),L=d.get(l),"undefined"===typeof D&&(D=R),"undefined"===typeof L&&(L=F),"undefined"===typeof D&&"undefined"===typeof L){if(w[u]||X(),w[u]&&"function"===typeof w[u].then)throw w[u];D=w[u]}if("undefined"===typeof D&&L)throw L}var Y=(0,n.useMemo)((function(){var e={revalidate:X,mutate:G};return Object.defineProperties(e,{error:{get:function(){return V.current.error=!0,o.suspense?L:H.current===u?j.current.error:F},enumerable:!0},data:{get:function(){return V.current.data=!0,o.suspense?D:H.current===u?j.current.data:R},enumerable:!0},isValidating:{get:function(){return V.current.isValidating=!0,!!u&&j.current.isValidating},enumerable:!0}}),e}),[X,R,F,G,u,o.suspense,L,D]);return Y}},2710:function(e,t,r){function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"===typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}r.d(t,{Z:function(){return i}})}}]); |