1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
|
"use strict";(self.webpackChunk_npwd_nui=self.webpackChunk_npwd_nui||[]).push([[8221],{93850:function(e,n,t){t.d(n,{K:function(){return h}});var r=t(83001),o=t(3635),a=t(84782),i=t(9833),l=t(23347),c=t(46236),u=t(78386),s=function(){return s=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},s.apply(this,arguments)},f=function(e,n,t,r){return new(t||(t=Promise))((function(o,a){function i(e){try{c(r.next(e))}catch(e){a(e)}}function l(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(i,l)}c((r=r.apply(e,n||[])).next())}))},p=function(e,n){var t,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(c){return function(l){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=n.call(e,i)}catch(e){l=[6,e],r=0}finally{t=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}},d=function(){return f(void 0,void 0,void 0,(function(){var e,n;return p(this,(function(t){switch(t.label){case 0:return e=[s({},a.defaultSettings)],n={},[4,(r=void 0,o=void 0,i=void 0,l=function(){var e,n,t;return function(e,n){var t,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(c){return function(l){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=n.call(e,i)}catch(e){l=[6,e],r=0}finally{t=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}(this,(function(r){switch(r.label){case 0:return[4,(0,u.Q)()];case 1:return e=r.sent(),[2,null!=(n=null===(t=null==a?void 0:a.languages)||void 0===t?void 0:t.find((function(n){return n.value===(null==e?void 0:e.general.defaultLanguage)})))?n:a.defaultSettings.language]}}))},new(i||(i=Promise))((function(e,n){function t(e){try{c(l.next(e))}catch(e){n(e)}}function a(e){try{c(l.throw(e))}catch(e){n(e)}}function c(n){var r;n.done?e(n.value):(r=n.value,r instanceof i?r:new i((function(e){e(r)}))).then(t,a)}c((l=l.apply(r,o||[])).next())})))];case 1:return[2,s.apply(void 0,e.concat([(n.language=t.sent(),n)]))]}var r,o,i,l}))}))},h=(0,r.atom)({key:"settings",default:d(),effects:[function(e){var n=e.setSelf,t=e.onSet,a=c._,u=localStorage.getItem(a);u||n(new r.DefaultValue),n(f(void 0,void 0,Promise,(function(){var e,n,t;return p(this,(function(r){switch(r.label){case 0:return[4,d()];case 1:e=r.sent();try{return n=(0,l.S)(u),t=n?JSON.parse(u):e,n||console.error("Settings Schema was invali
|