@abtnode/blocklet-services 1.16.15-beta-e3a24907 → 1.16.15-beta-18951729
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/fonts/noto-sans-sc-regular.otf +0 -0
- package/api/index.js +2 -1
- package/api/libs/fetch.js +11 -0
- package/api/libs/open-graph/index.js +155 -0
- package/api/libs/open-graph/template.js +212 -0
- package/api/routes/blocklet.js +46 -6
- package/build/asset-manifest.json +11 -11
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/static/js/5355.2eaad302.chunk.js +2 -0
- package/build/static/js/5541.581f1db7.chunk.js +2 -0
- package/build/static/js/6186.e711ab85.chunk.js +2 -0
- package/build/static/js/6737.6432760e.chunk.js +2 -0
- package/build/static/js/main.e29a7133.js +3 -0
- package/package.json +21 -18
- package/build/static/js/5355.4b07ad55.chunk.js +0 -2
- package/build/static/js/5541.1d065ac6.chunk.js +0 -2
- package/build/static/js/6186.2a5f97da.chunk.js +0 -2
- package/build/static/js/6737.5aef67e7.chunk.js +0 -2
- package/build/static/js/main.1b821566.js +0 -3
- /package/build/static/js/{main.1b821566.js.LICENSE.txt → main.e29a7133.js.LICENSE.txt} +0 -0
package/build/service-worker.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see service-worker.js.LICENSE.txt */
|
|
2
|
-
!function(){"use strict";var e={838:function(){try{self["workbox:core:6.5.3"]&&_()}catch(e){}},404:function(){try{self["workbox:expiration:6.5.3"]&&_()}catch(e){}},362:function(){try{self["workbox:precaching:6.5.3"]&&_()}catch(e){}},161:function(){try{self["workbox:routing:6.5.3"]&&_()}catch(e){}},880:function(){try{self["workbox:strategies:6.5.3"]&&_()}catch(e){}}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}!function(){r(838);var e=null;function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e){var r=function(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,r||"default");if("object"!==t(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===t(r)?r:String(r)}function a(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,n(a.key),a)}}function i(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function h(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function l(e,r){if(r&&("object"===t(r)||"function"===typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){var t=h();return function(){var r,n=u(e);if(t){var a=u(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return l(this,r)}}function p(e,t,r){return p=h()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n));return r&&c(a,r.prototype),a},p.apply(null,arguments)}function v(e){var t="function"===typeof Map?new Map:void 0;return v=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return p(e,arguments,u(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,e)},v(e)}var d=function(e){for(var t=e,r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return n.length>0&&(t+=" :: ".concat(JSON.stringify(n))),t},y=function(e){o(r,e);var t=f(r);function r(e,n){var a;s(this,r);var i=d(e,n);return(a=t.call(this,i)).name=e,a.details=n,a}return i(r)}(v(Error)),b=new Set;var g,m={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!==typeof registration?registration.scope:""},x=function(e){return[m.prefix,e,m.suffix].filter((function(e){return e&&e.length>0})).join("-")},w=function(e){return e||x(m.precache)},k=function(e){return e||x(m.runtime)};function _(){_=function(){return e};var e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",o=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(S){u=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var i=t&&t.prototype instanceof p?t:p,s=Object.create(i.prototype),c=new C(n||[]);return a(s,"_invoke",{value:k(e,r,c)}),s}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(S){return{type:"throw",arg:S}}}e.wrap=h;var f={};function p(){}function v(){}function d(){}var y={};u(y,s,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(O([])));g&&g!==r&&n.call(g,s)&&(y=g);var m=d.prototype=p.prototype=Object.create(y);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,r){function i(a,s,c,o){var u=l(e[a],e,s);if("throw"!==u.type){var h=u.arg,f=h.value;return f&&"object"==t(f)&&n.call(f,"__await")?r.resolve(f.__await).then((function(e){i("next",e,c,o)}),(function(e){i("throw",e,c,o)})):r.resolve(f).then((function(e){h.value=e,c(h)}),(function(e){return i("throw",e,c,o)}))}o(u.arg)}var s;a(this,"_invoke",{value:function(e,t){function n(){return new r((function(r,n){i(e,t,r,n)}))}return s=s?s.then(n,n):n()}})}function k(e,t,r){var n="suspendedStart";return function(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return j()}for(r.method=a,r.arg=i;;){var s=r.delegate;if(s){var c=R(s,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var o=l(e,t,r);if("normal"===o.type){if(n=r.done?"completed":"suspendedYield",o.arg===f)continue;return{value:o.arg,done:r.done}}"throw"===o.type&&(n="completed",r.method="throw",r.arg=o.arg)}}}function R(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,R(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var a=l(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:j}}function j(){return{value:void 0,done:!0}}return v.prototype=d,a(m,"constructor",{value:d,configurable:!0}),a(d,"constructor",{value:v,configurable:!0}),v.displayName=u(d,o,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,u(e,o,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},x(w.prototype),u(w.prototype,c,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,a,i){void 0===i&&(i=Promise);var s=new w(h(t,r,n,a),i);return e.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},x(m),u(m,o,"Generator"),u(m,s,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=O,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return s.type="throw",s.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),o=n.call(i,"finallyLoc");if(c&&o){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!o)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function R(e,t,r,n,a,i,s){try{var c=e[i](s),o=c.value}catch(u){return void r(u)}c.done?t(o):Promise.resolve(o).then(n,a)}function E(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function s(e){R(i,n,a,s,c,"next",e)}function c(e){R(i,n,a,s,c,"throw",e)}s(void 0)}))}}function L(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 C(e,t){if(e){if("string"===typeof e)return L(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)?L(e,t):void 0}}function O(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=C(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw i}}}}function j(e,t){var r,n=new URL(e),a=O(t);try{for(a.s();!(r=a.n()).done;){var i=r.value;n.searchParams.delete(i)}}catch(s){a.e(s)}finally{a.f()}return n.href}function S(e,t,r,n){return P.apply(this,arguments)}function P(){return(P=E(_().mark((function e(t,r,n,a){var i,s,c,o,u,h,l;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=j(r.url,n),r.url!==i){e.next=3;break}return e.abrupt("return",t.match(r,a));case 3:return s=Object.assign(Object.assign({},a),{ignoreSearch:!0}),e.next=6,t.keys(r,s);case 6:c=e.sent,o=O(c),e.prev=8,o.s();case 10:if((u=o.n()).done){e.next=17;break}if(h=u.value,l=j(h.url,n),i!==l){e.next=15;break}return e.abrupt("return",t.match(h,a));case 15:e.next=10;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(8),o.e(e.t0);case 22:return e.prev=22,o.f(),e.finish(22);case 25:return e.abrupt("return");case 26:case"end":return e.stop()}}),e,null,[[8,19,22,25]])})))).apply(this,arguments)}function T(){if(void 0===g){var e=new Response("");if("body"in e)try{new Response(e.body),g=!0}catch(t){g=!1}g=!1}return g}function q(e){e.then((function(){}))}var D=i((function e(){var t=this;s(this,e),this.promise=new Promise((function(e,r){t.resolve=e,t.reject=r}))}));function U(){return N.apply(this,arguments)}function N(){return(N=E(_().mark((function e(){var t,r,n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,t=O(b),e.prev=2,t.s();case 4:if((r=t.n()).done){e.next=11;break}return n=r.value,e.next=8,n();case 8:0;case 9:e.next=4;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(2),t.e(e.t0);case 16:return e.prev=16,t.f(),e.finish(16);case 19:0;case 20:case"end":return e.stop()}}),e,null,[[2,13,16,19]])})))).apply(this,arguments)}var I=function(e){return new URL(String(e),location.href).href.replace(new RegExp("^".concat(location.origin)),"")};function A(e){return new Promise((function(t){return setTimeout(t,e)}))}function M(e,t){var r=t();return e.waitUntil(r),r}function K(e,t){return W.apply(this,arguments)}function W(){return(W=E(_().mark((function e(t,r){var n,a,i,s,c,o;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=null,t.url&&(a=new URL(t.url),n=a.origin),n===self.location.origin){e.next=4;break}throw new y("cross-origin-copy-response",{origin:n});case 4:if(i=t.clone(),s={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},c=r?r(s):s,!T()){e.next=11;break}e.t0=i.body,e.next=14;break;case 11:return e.next=13,i.blob();case 13:e.t0=e.sent;case 14:return o=e.t0,e.abrupt("return",new Response(o,c));case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,s,c=[],o=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;o=!1}else for(;!(o=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);o=!0);}catch(h){u=!0,a=h}finally{try{if(!o&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}(e,t)||C(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e){return function(e){if(Array.isArray(e))return L(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||C(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(362);function H(e){if(!e)throw new y("add-to-cache-list-unexpected-type",{entry:e});if("string"===typeof e){var t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}var r=e.revision,n=e.url;if(!n)throw new y("add-to-cache-list-unexpected-type",{entry:e});if(!r){var a=new URL(n,location.href);return{cacheKey:a.href,url:a.href}}var i=new URL(n,location.href),s=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",r),{cacheKey:i.href,url:s.href}}var V=i((function e(){var t=this;s(this,e),this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=function(){var e=E(_().mark((function e(t){var r,n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.request,(n=t.state)&&(n.originalRequest=r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.cachedResponseWillBeUsed=function(){var e=E(_().mark((function e(r){var n,a,i,s;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.event,a=r.state,i=r.cachedResponse,"install"===n.type&&a&&a.originalRequest&&a.originalRequest instanceof Request&&(s=a.originalRequest.url,i?t.notUpdatedURLs.push(s):t.updatedURLs.push(s)),e.abrupt("return",i);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()})),G=i((function e(t){var r=this,n=t.precacheController;s(this,e),this.cacheKeyWillBeUsed=function(){var e=E(_().mark((function e(t){var n,a,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.request,a=t.params,i=(null===a||void 0===a?void 0:a.cacheKey)||r._precacheController.getCacheKeyForURL(n.url),e.abrupt("return",i?new Request(i,{headers:n.headers}):n);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this._precacheController=n}));r(880);function Y(e){return"string"===typeof e?new Request(e):e}var $=function(){function t(e,r){s(this,t),this._cacheKeys={},Object.assign(this,r),this.event=r.event,this._strategy=e,this._handlerDeferred=new D,this._extendLifetimePromises=[],this._plugins=F(e.plugins),this._pluginStateMap=new Map;var n,a=O(this._plugins);try{for(a.s();!(n=a.n()).done;){var i=n.value;this._pluginStateMap.set(i,{})}}catch(c){a.e(c)}finally{a.f()}this.event.waitUntil(this._handlerDeferred.promise)}return i(t,[{key:"fetch",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=E(_().mark((function e(t){var r,n,a,i,s,c,o,u,h,l,f,p;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.event,!("navigate"===(n=Y(t)).mode&&r instanceof FetchEvent&&r.preloadResponse)){e.next=9;break}return e.next=5,r.preloadResponse;case 5:if(!(a=e.sent)){e.next=9;break}return e.abrupt("return",a);case 9:i=this.hasCallback("fetchDidFail")?n.clone():null,e.prev=10,s=O(this.iterateCallbacks("requestWillFetch")),e.prev=12,s.s();case 14:if((c=s.n()).done){e.next=21;break}return o=c.value,e.next=18,o({request:n.clone(),event:r});case 18:n=e.sent;case 19:e.next=14;break;case 21:e.next=26;break;case 23:e.prev=23,e.t0=e.catch(12),s.e(e.t0);case 26:return e.prev=26,s.f(),e.finish(26);case 29:e.next=35;break;case 31:if(e.prev=31,e.t1=e.catch(10),!(e.t1 instanceof Error)){e.next=35;break}throw new y("plugin-error-request-will-fetch",{thrownErrorMessage:e.t1.message});case 35:return u=n.clone(),e.prev=36,e.next=39,fetch(n,"navigate"===n.mode?void 0:this._strategy.fetchOptions);case 39:h=e.sent,l=O(this.iterateCallbacks("fetchDidSucceed")),e.prev=42,l.s();case 44:if((f=l.n()).done){e.next=51;break}return p=f.value,e.next=48,p({event:r,request:u,response:h});case 48:h=e.sent;case 49:e.next=44;break;case 51:e.next=56;break;case 53:e.prev=53,e.t2=e.catch(42),l.e(e.t2);case 56:return e.prev=56,l.f(),e.finish(56);case 59:return e.abrupt("return",h);case 62:if(e.prev=62,e.t3=e.catch(36),!i){e.next=68;break}return e.next=68,this.runCallbacks("fetchDidFail",{error:e.t3,event:r,originalRequest:i.clone(),request:u.clone()});case 68:throw e.t3;case 69:case"end":return e.stop()}}),e,this,[[10,31],[12,23,26,29],[36,62],[42,53,56,59]])})));return function(t){return e.apply(this,arguments)}}())},{key:"fetchAndCachePut",value:function(){var e=E(_().mark((function e(t){var r,n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetch(t);case 2:return r=e.sent,n=r.clone(),this.waitUntil(this.cachePut(t,n)),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"cacheMatch",value:function(){var e=E(_().mark((function e(t){var r,n,a,i,s,c,o,u,h,l;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Y(t),a=this._strategy,i=a.cacheName,s=a.matchOptions,e.next=4,this.getCacheKey(r,"read");case 4:return c=e.sent,o=Object.assign(Object.assign({},s),{cacheName:i}),e.next=8,caches.match(c,o);case 8:n=e.sent,u=O(this.iterateCallbacks("cachedResponseWillBeUsed")),e.prev=11,u.s();case 13:if((h=u.n()).done){e.next=23;break}return l=h.value,e.next=17,l({cacheName:i,matchOptions:s,cachedResponse:n,request:c,event:this.event});case 17:if(e.t0=e.sent,e.t0){e.next=20;break}e.t0=void 0;case 20:n=e.t0;case 21:e.next=13;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(11),u.e(e.t1);case 28:return e.prev=28,u.f(),e.finish(28);case 31:return e.abrupt("return",n);case 32:case"end":return e.stop()}}),e,this,[[11,25,28,31]])})));return function(t){return e.apply(this,arguments)}}()},{key:"cachePut",value:function(){var t=E(_().mark((function t(r,n){var a,i,s,c,o,u,h,l,f,p,v,d,b;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=Y(r),t.next=3,A(0);case 3:return t.next=5,this.getCacheKey(a,"write");case 5:i=t.sent,t.next=11;break;case 9:(s=n.headers.get("Vary"))&&e.debug("The response for ".concat(I(i.url)," ")+"has a 'Vary: ".concat(s,"' header. ")+"Consider setting the {ignoreVary: true} option on your strategy to ensure cache matching and deletion works as expected.");case 11:if(n){t.next=14;break}throw new y("cache-put-with-no-response",{url:I(i.url)});case 14:return t.next=16,this._ensureResponseSafeToCache(n);case 16:if(c=t.sent){t.next=20;break}return t.abrupt("return",!1);case 20:return o=this._strategy,u=o.cacheName,h=o.matchOptions,t.next=23,self.caches.open(u);case 23:if(l=t.sent,!(f=this.hasCallback("cacheDidUpdate"))){t.next=31;break}return t.next=28,S(l,i.clone(),["__WB_REVISION__"],h);case 28:t.t0=t.sent,t.next=32;break;case 31:t.t0=null;case 32:return p=t.t0,t.prev=34,t.next=37,l.put(i,f?c.clone():c);case 37:t.next=46;break;case 39:if(t.prev=39,t.t1=t.catch(34),!(t.t1 instanceof Error)){t.next=46;break}if("QuotaExceededError"!==t.t1.name){t.next=45;break}return t.next=45,U();case 45:throw t.t1;case 46:v=O(this.iterateCallbacks("cacheDidUpdate")),t.prev=47,v.s();case 49:if((d=v.n()).done){t.next=55;break}return b=d.value,t.next=53,b({cacheName:u,oldResponse:p,newResponse:c.clone(),request:i,event:this.event});case 53:t.next=49;break;case 55:t.next=60;break;case 57:t.prev=57,t.t2=t.catch(47),v.e(t.t2);case 60:return t.prev=60,v.f(),t.finish(60);case 63:return t.abrupt("return",!0);case 64:case"end":return t.stop()}}),t,this,[[34,39],[47,57,60,63]])})));return function(e,r){return t.apply(this,arguments)}}()},{key:"getCacheKey",value:function(){var e=E(_().mark((function e(t,r){var n,a,i,s,c;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n="".concat(t.url," | ").concat(r),this._cacheKeys[n]){e.next=24;break}a=t,i=O(this.iterateCallbacks("cacheKeyWillBeUsed")),e.prev=4,i.s();case 6:if((s=i.n()).done){e.next=15;break}return c=s.value,e.t0=Y,e.next=11,c({mode:r,request:a,event:this.event,params:this.params});case 11:e.t1=e.sent,a=(0,e.t0)(e.t1);case 13:e.next=6;break;case 15:e.next=20;break;case 17:e.prev=17,e.t2=e.catch(4),i.e(e.t2);case 20:return e.prev=20,i.f(),e.finish(20);case 23:this._cacheKeys[n]=a;case 24:return e.abrupt("return",this._cacheKeys[n]);case 25:case"end":return e.stop()}}),e,this,[[4,17,20,23]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"hasCallback",value:function(e){var t,r=O(this._strategy.plugins);try{for(r.s();!(t=r.n()).done;){if(e in t.value)return!0}}catch(n){r.e(n)}finally{r.f()}return!1}},{key:"runCallbacks",value:function(){var e=E(_().mark((function e(t,r){var n,a,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=O(this.iterateCallbacks(t)),e.prev=1,n.s();case 3:if((a=n.n()).done){e.next=9;break}return i=a.value,e.next=7,i(r);case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"iterateCallbacks",value:_().mark((function e(t){var r,n,a,i=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=O(this._strategy.plugins),e.prev=1,a=_().mark((function e(){var r,a,s;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!==typeof(r=n.value)[t]){e.next=6;break}return a=i._pluginStateMap.get(r),s=function(e){var n=Object.assign(Object.assign({},e),{state:a});return r[t](n)},e.next=6,s;case 6:case"end":return e.stop()}}),e)})),r.s();case 4:if((n=r.n()).done){e.next=8;break}return e.delegateYield(a(),"t0",6);case 6:e.next=4;break;case 8:e.next=13;break;case 10:e.prev=10,e.t1=e.catch(1),r.e(e.t1);case 13:return e.prev=13,r.f(),e.finish(13);case 16:case"end":return e.stop()}}),e,this,[[1,10,13,16]])}))},{key:"waitUntil",value:function(e){return this._extendLifetimePromises.push(e),e}},{key:"doneWaiting",value:function(){var e=E(_().mark((function e(){var t;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this._extendLifetimePromises.shift())){e.next=5;break}return e.next=3,t;case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"destroy",value:function(){this._handlerDeferred.resolve(null)}},{key:"_ensureResponseSafeToCache",value:function(){var e=E(_().mark((function e(t){var r,n,a,i,s;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t,n=!1,a=O(this.iterateCallbacks("cacheWillUpdate")),e.prev=3,a.s();case 5:if((i=a.n()).done){e.next=18;break}return s=i.value,e.next=9,s({request:this.request,response:r,event:this.event});case 9:if(e.t0=e.sent,e.t0){e.next=12;break}e.t0=void 0;case 12:if(r=e.t0,n=!0,r){e.next=16;break}return e.abrupt("break",18);case 16:e.next=5;break;case 18:e.next=23;break;case 20:e.prev=20,e.t1=e.catch(3),a.e(e.t1);case 23:return e.prev=23,a.f(),e.finish(23);case 26:return n||r&&200!==r.status&&(r=void 0),e.abrupt("return",r);case 28:case"end":return e.stop()}}),e,this,[[3,20,23,26]])})));return function(t){return e.apply(this,arguments)}}()}]),t}(),Q=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s(this,e),this.cacheName=k(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}return i(e,[{key:"handle",value:function(e){return B(this.handleAll(e),1)[0]}},{key:"handleAll",value:function(e){e instanceof FetchEvent&&(e={event:e,request:e.request});var t=e.event,r="string"===typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new $(this,{event:t,request:r,params:n}),i=this._getResponse(a,r,t);return[i,this._awaitComplete(i,a,r,t)]}},{key:"_getResponse",value:function(){var e=E(_().mark((function e(t,r,n){var a,i,s,c,o,u,h;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.runCallbacks("handlerWillStart",{event:n,request:r});case 2:return a=void 0,e.prev=3,e.next=6,this._handle(r,t);case 6:if((a=e.sent)&&"error"!==a.type){e.next=9;break}throw new y("no-response",{url:r.url});case 9:e.next=39;break;case 11:if(e.prev=11,e.t0=e.catch(3),!(e.t0 instanceof Error)){e.next=34;break}i=O(t.iterateCallbacks("handlerDidError")),e.prev=15,i.s();case 17:if((s=i.n()).done){e.next=26;break}return c=s.value,e.next=21,c({error:e.t0,event:n,request:r});case 21:if(!(a=e.sent)){e.next=24;break}return e.abrupt("break",26);case 24:e.next=17;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(15),i.e(e.t1);case 31:return e.prev=31,i.f(),e.finish(31);case 34:if(a){e.next=38;break}throw e.t0;case 38:0;case 39:o=O(t.iterateCallbacks("handlerWillRespond")),e.prev=40,o.s();case 42:if((u=o.n()).done){e.next=49;break}return h=u.value,e.next=46,h({event:n,request:r,response:a});case 46:a=e.sent;case 47:e.next=42;break;case 49:e.next=54;break;case 51:e.prev=51,e.t2=e.catch(40),o.e(e.t2);case 54:return e.prev=54,o.f(),e.finish(54);case 57:return e.abrupt("return",a);case 58:case"end":return e.stop()}}),e,this,[[3,11],[15,28,31,34],[40,51,54,57]])})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"_awaitComplete",value:function(){var e=E(_().mark((function e(t,r,n,a){var i,s;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t;case 3:i=e.sent,e.next=8;break;case 6:e.prev=6,e.t0=e.catch(0);case 8:return e.prev=8,e.next=11,r.runCallbacks("handlerDidRespond",{event:a,request:n,response:i});case 11:return e.next=13,r.doneWaiting();case 13:e.next=18;break;case 15:e.prev=15,e.t1=e.catch(8),e.t1 instanceof Error&&(s=e.t1);case 18:return e.next=20,r.runCallbacks("handlerDidComplete",{event:a,request:n,response:i,error:s});case 20:if(r.destroy(),!s){e.next=23;break}throw s;case 23:case"end":return e.stop()}}),e,null,[[0,6],[8,15]])})));return function(t,r,n,a){return e.apply(this,arguments)}}()}]),e}(),J=function(t){o(n,t);var r=f(n);function n(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(this,n),t.cacheName=w(t.cacheName),(e=r.call(this,t))._fallbackToNetwork=!1!==t.fallbackToNetwork,e.plugins.push(n.copyRedirectedCacheableResponsesPlugin),e}return i(n,[{key:"_handle",value:function(){var e=E(_().mark((function e(t,r){var n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.cacheMatch(t);case 2:if(!(n=e.sent)){e.next=5;break}return e.abrupt("return",n);case 5:if(!r.event||"install"!==r.event.type){e.next=9;break}return e.next=8,this._handleInstall(t,r);case 8:case 11:return e.abrupt("return",e.sent);case 9:return e.next=11,this._handleFetch(t,r);case 12:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_handleFetch",value:function(){var t=E(_().mark((function t(r,n){var a,i,s,c,o,u;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=n.params||{},!this._fallbackToNetwork){t.next=17;break}return s=i.integrity,c=r.integrity,o=!c||c===s,t.next=8,n.fetch(new Request(r,{integrity:"no-cors"!==r.mode?c||s:void 0}));case 8:if(a=t.sent,!s||!o||"no-cors"===r.mode){t.next=15;break}return this._useDefaultCacheabilityPluginIfNeeded(),t.next=13,n.cachePut(r,a.clone());case 13:t.sent;case 15:t.next=18;break;case 17:throw new y("missing-precache-entry",{cacheName:this.cacheName,url:r.url});case 18:t.next=34;break;case 23:t.t0=t.sent;case 24:u=t.t0,e.groupCollapsed("Precaching is responding to: "+I(r.url)),e.log("Serving the precached url: ".concat(I(u instanceof Request?u.url:u))),e.groupCollapsed("View request details here."),e.log(r),e.groupEnd(),e.groupCollapsed("View response details here."),e.log(a),e.groupEnd(),e.groupEnd();case 34:return t.abrupt("return",a);case 35:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}()},{key:"_handleInstall",value:function(){var e=E(_().mark((function e(t,r){var n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._useDefaultCacheabilityPluginIfNeeded(),e.next=3,r.fetch(t);case 3:return n=e.sent,e.next=6,r.cachePut(t,n.clone());case 6:if(e.sent){e.next=9;break}throw new y("bad-precaching-response",{url:t.url,status:n.status});case 9:return e.abrupt("return",n);case 10:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_useDefaultCacheabilityPluginIfNeeded",value:function(){var e,t=null,r=0,a=O(this.plugins.entries());try{for(a.s();!(e=a.n()).done;){var i=B(e.value,2),s=i[0],c=i[1];c!==n.copyRedirectedCacheableResponsesPlugin&&(c===n.defaultPrecacheCacheabilityPlugin&&(t=s),c.cacheWillUpdate&&r++)}}catch(o){a.e(o)}finally{a.f()}0===r?this.plugins.push(n.defaultPrecacheCacheabilityPlugin):r>1&&null!==t&&this.plugins.splice(t,1)}}]),n}(Q);J.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:function(e){return E(_().mark((function t(){var r;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=e.response)&&!(r.status>=400)){t.next=3;break}return t.abrupt("return",null);case 3:return t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)})))()}},J.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:function(e){return E(_().mark((function t(){var r;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e.response).redirected){t.next=7;break}return t.next=4,K(r);case 4:t.t0=t.sent,t.next=8;break;case 7:t.t0=r;case 8:return t.abrupt("return",t.t0);case 9:case"end":return t.stop()}}),t)})))()}};var z,X=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.cacheName,n=t.plugins,a=void 0===n?[]:n,i=t.fallbackToNetwork,c=void 0===i||i;s(this,e),this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new J({cacheName:w(r),plugins:[].concat(F(a),[new G({precacheController:this})]),fallbackToNetwork:c}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}return i(e,[{key:"strategy",get:function(){return this._strategy}},{key:"precache",value:function(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}},{key:"addToCacheList",value:function(e){var t,r=[],n=O(e);try{for(n.s();!(t=n.n()).done;){var a=t.value;"string"===typeof a?r.push(a):a&&void 0===a.revision&&r.push(a.url);var i=H(a),s=i.cacheKey,c=i.url,o="string"!==typeof a&&a.revision?"reload":"default";if(this._urlsToCacheKeys.has(c)&&this._urlsToCacheKeys.get(c)!==s)throw new y("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(c),secondEntry:s});if("string"!==typeof a&&a.integrity){if(this._cacheKeysToIntegrities.has(s)&&this._cacheKeysToIntegrities.get(s)!==a.integrity)throw new y("add-to-cache-list-conflicting-integrities",{url:c});this._cacheKeysToIntegrities.set(s,a.integrity)}if(this._urlsToCacheKeys.set(c,s),this._urlsToCacheModes.set(c,o),r.length>0){var u="Workbox is precaching URLs without revision "+"info: ".concat(r.join(", "),"\nThis is generally NOT safe. ")+"Learn more at https://bit.ly/wb-precache";console.warn(u)}}}catch(h){n.e(h)}finally{n.f()}}},{key:"install",value:function(e){var t=this;return M(e,E(_().mark((function r(){var n,a,i,s,c,o,u,h,l,f,p;return _().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=new V,t.strategy.plugins.push(n),a=O(t._urlsToCacheKeys),r.prev=3,a.s();case 5:if((i=a.n()).done){r.next=14;break}return s=B(i.value,2),c=s[0],o=s[1],u=t._cacheKeysToIntegrities.get(o),h=t._urlsToCacheModes.get(c),l=new Request(c,{integrity:u,cache:h,credentials:"same-origin"}),r.next=12,Promise.all(t.strategy.handleAll({params:{cacheKey:o},request:l,event:e}));case 12:r.next=5;break;case 14:r.next=19;break;case 16:r.prev=16,r.t0=r.catch(3),a.e(r.t0);case 19:return r.prev=19,a.f(),r.finish(19);case 22:return f=n.updatedURLs,p=n.notUpdatedURLs,r.abrupt("return",{updatedURLs:f,notUpdatedURLs:p});case 25:case"end":return r.stop()}}),r,null,[[3,16,19,22]])}))))}},{key:"activate",value:function(e){var t=this;return M(e,E(_().mark((function e(){var r,n,a,i,s,c,o;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,self.caches.open(t.strategy.cacheName);case 2:return r=e.sent,e.next=5,r.keys();case 5:n=e.sent,a=new Set(t._urlsToCacheKeys.values()),i=[],s=O(n),e.prev=9,s.s();case 11:if((c=s.n()).done){e.next=19;break}if(o=c.value,a.has(o.url)){e.next=17;break}return e.next=16,r.delete(o);case 16:i.push(o.url);case 17:e.next=11;break;case 19:e.next=24;break;case 21:e.prev=21,e.t0=e.catch(9),s.e(e.t0);case 24:return e.prev=24,s.f(),e.finish(24);case 27:return e.abrupt("return",{deletedURLs:i});case 29:case"end":return e.stop()}}),e,null,[[9,21,24,27]])}))))}},{key:"getURLsToCacheKeys",value:function(){return this._urlsToCacheKeys}},{key:"getCachedURLs",value:function(){return F(this._urlsToCacheKeys.keys())}},{key:"getCacheKeyForURL",value:function(e){var t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}},{key:"getIntegrityForCacheKey",value:function(e){return this._cacheKeysToIntegrities.get(e)}},{key:"matchPrecache",value:function(){var e=E(_().mark((function e(t){var r,n,a;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t instanceof Request?t.url:t,!(n=this.getCacheKeyForURL(r))){e.next=7;break}return e.next=5,self.caches.open(this.strategy.cacheName);case 5:return a=e.sent,e.abrupt("return",a.match(n));case 7:return e.abrupt("return",void 0);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"createHandlerBoundToURL",value:function(e){var t=this,r=this.getCacheKeyForURL(e);if(!r)throw new y("non-precached-url",{url:e});return function(n){return n.request=new Request(e),n.params=Object.assign({cacheKey:r},n.params),t.strategy.handle(n)}}}]),e}(),Z=function(){return z||(z=new X),z};r(161);var ee,te=function(e){return e&&"object"===typeof e?e:{handle:e}},re=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GET";s(this,e),this.handler=te(r),this.match=t,this.method=n}return i(e,[{key:"setCatchHandler",value:function(e){this.catchHandler=te(e)}}]),e}(),ne=function(e){o(r,e);var t=f(r);function r(e,n,a){s(this,r);return t.call(this,(function(t){var r=t.url,n=e.exec(r.href);if(n&&(r.origin===location.origin||0===n.index))return n.slice(1)}),n,a)}return i(r)}(re),ae=function(){function e(){s(this,e),this._routes=new Map,this._defaultHandlerMap=new Map}return i(e,[{key:"routes",get:function(){return this._routes}},{key:"addFetchListener",value:function(){var e=this;self.addEventListener("fetch",(function(t){var r=t.request,n=e.handleRequest({request:r,event:t});n&&t.respondWith(n)}))}},{key:"addCacheListener",value:function(){var e=this;self.addEventListener("message",(function(t){if(t.data&&"CACHE_URLS"===t.data.type){var r=t.data.payload;0;var n=Promise.all(r.urlsToCache.map((function(r){"string"===typeof r&&(r=[r]);var n=p(Request,F(r));return e.handleRequest({request:n,event:t})})));t.waitUntil(n),t.ports&&t.ports[0]&&n.then((function(){return t.ports[0].postMessage(!0)}))}}))}},{key:"handleRequest",value:function(e){var t=this,r=e.request,n=e.event;var a=new URL(r.url,location.href);if(a.protocol.startsWith("http")){var i=a.origin===location.origin,s=this.findMatchingRoute({event:n,request:r,sameOrigin:i,url:a}),c=s.params,o=s.route,u=o&&o.handler;0;var h=r.method;if(!u&&this._defaultHandlerMap.has(h)&&(u=this._defaultHandlerMap.get(h)),u){var l;0;try{l=u.handle({url:a,request:r,event:n,params:c})}catch(p){l=Promise.reject(p)}var f=o&&o.catchHandler;return l instanceof Promise&&(this._catchHandler||f)&&(l=l.catch(function(){var e=E(_().mark((function e(i){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!f){e.next=11;break}return e.prev=2,e.next=5,f.handle({url:a,request:r,event:n,params:c});case 5:return e.abrupt("return",e.sent);case 8:e.prev=8,e.t0=e.catch(2),e.t0 instanceof Error&&(i=e.t0);case 11:if(!t._catchHandler){e.next=14;break}return e.abrupt("return",t._catchHandler.handle({url:a,request:r,event:n}));case 14:throw i;case 15:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}())),l}}}},{key:"findMatchingRoute",value:function(e){var t,r=e.url,n=e.sameOrigin,a=e.request,i=e.event,s=O(this._routes.get(a.method)||[]);try{for(s.s();!(t=s.n()).done;){var c=t.value,o=void 0,u=c.match({url:r,sameOrigin:n,request:a,event:i});if(u)return o=u,(Array.isArray(o)&&0===o.length||u.constructor===Object&&0===Object.keys(u).length||"boolean"===typeof u)&&(o=void 0),{route:c,params:o}}}catch(h){s.e(h)}finally{s.f()}return{}}},{key:"setDefaultHandler",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";this._defaultHandlerMap.set(t,te(e))}},{key:"setCatchHandler",value:function(e){this._catchHandler=te(e)}},{key:"registerRoute",value:function(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}},{key:"unregisterRoute",value:function(e){if(!this._routes.has(e.method))throw new y("unregister-route-but-not-found-with-method",{method:e.method});var t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new y("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}]),e}(),ie=function(){return ee||((ee=new ae).addFetchListener(),ee.addCacheListener()),ee};function se(e,t,r){var n;if("string"===typeof e){var a=new URL(e,location.href);n=new re((function(e){return e.url.href===a.href}),t,r)}else if(e instanceof RegExp)n=new ne(e,t,r);else if("function"===typeof e)n=new re(e,t,r);else{if(!(e instanceof re))throw new y("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});n=e}return ie().registerRoute(n),n}function ce(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=function(){var r=a[n];t.some((function(e){return e.test(r)}))&&e.searchParams.delete(r)},n=0,a=F(e.searchParams.keys());n<a.length;n++)r();return e}var oe=function(e){o(r,e);var t=f(r);function r(e,n){s(this,r);return t.call(this,(function(t){var r,a=t.request,i=e.getURLsToCacheKeys(),s=O(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.ignoreURLParametersMatching,n=void 0===r?[/^utm_/,/^fbclid$/]:r,a=t.directoryIndex,i=void 0===a?"index.html":a,s=t.cleanURLs,c=void 0===s||s,o=t.urlManipulation;return _().mark((function t(){var r,a,s,u,h,l,f,p;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new URL(e,location.href)).hash="",t.next=4,r.href;case 4:return a=ce(r,n),t.next=7,a.href;case 7:if(!i||!a.pathname.endsWith("/")){t.next=12;break}return(s=new URL(a.href)).pathname+=i,t.next=12,s.href;case 12:if(!c){t.next=17;break}return(u=new URL(a.href)).pathname+=".html",t.next=17,u.href;case 17:if(!o){t.next=36;break}h=o({url:r}),l=O(h),t.prev=20,l.s();case 22:if((f=l.n()).done){t.next=28;break}return p=f.value,t.next=26,p.href;case 26:t.next=22;break;case 28:t.next=33;break;case 30:t.prev=30,t.t0=t.catch(20),l.e(t.t0);case 33:return t.prev=33,l.f(),t.finish(33);case 36:case"end":return t.stop()}}),t,null,[[20,30,33,36]])}))()}(a.url,n));try{for(s.s();!(r=s.n()).done;){var c=r.value,o=i.get(c);if(o)return{cacheKey:o,integrity:e.getIntegrityForCacheKey(o)}}}catch(u){s.e(u)}finally{s.f()}}),e.strategy)}return i(r)}(re);function ue(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function he(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function le(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?he(Object(r),!0).forEach((function(t){ue(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):he(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var fe,pe,ve=function(e,t){return t.some((function(t){return e instanceof t}))};var de=new WeakMap,ye=new WeakMap,be=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={get:function(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return ye.get(e);if("objectStoreNames"===t)return e.objectStoreNames||be.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return _e(e[t])},set:function(e,t,r){return e[t]=r,!0},has:function(e,t){return e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e}};function we(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(pe||(pe=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.apply(Re(this),r),_e(de.get(this))}:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _e(e.apply(Re(this),r))}:function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];var i=e.call.apply(e,[Re(this),t].concat(n));return be.set(i,t.sort?t.sort():[t]),_e(i)}}function ke(e){return"function"===typeof e?we(e):(e instanceof IDBTransaction&&function(e){if(!ye.has(e)){var t=new Promise((function(t,r){var n=function(){e.removeEventListener("complete",a),e.removeEventListener("error",i),e.removeEventListener("abort",i)},a=function(){t(),n()},i=function(){r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",i),e.addEventListener("abort",i)}));ye.set(e,t)}}(e),ve(e,fe||(fe=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,xe):e)}function _e(e){if(e instanceof IDBRequest)return function(e){var t=new Promise((function(t,r){var n=function(){e.removeEventListener("success",a),e.removeEventListener("error",i)},a=function(){t(_e(e.result)),n()},i=function(){r(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",i)}));return t.then((function(t){t instanceof IDBCursor&&de.set(t,e)})).catch((function(){})),me.set(t,e),t}(e);if(ge.has(e))return ge.get(e);var t=ke(e);return t!==e&&(ge.set(e,t),me.set(t,e)),t}var Re=function(e){return me.get(e)};function Ee(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.blocked,a=r.upgrade,i=r.blocking,s=r.terminated,c=indexedDB.open(e,t),o=_e(c);return a&&c.addEventListener("upgradeneeded",(function(e){a(_e(c.result),e.oldVersion,e.newVersion,_e(c.transaction),e)})),n&&c.addEventListener("blocked",(function(e){return n(e.oldVersion,e.newVersion,e)})),o.then((function(e){s&&e.addEventListener("close",(function(){return s()})),i&&e.addEventListener("versionchange",(function(e){return i(e.oldVersion,e.newVersion,e)}))})).catch((function(){})),o}var Le=["get","getKey","getAll","getAllKeys","count"],Ce=["put","add","delete","clear"],Oe=new Map;function je(e,t){if(e instanceof IDBDatabase&&!(t in e)&&"string"===typeof t){if(Oe.get(t))return Oe.get(t);var r=t.replace(/FromIndex$/,""),n=t!==r,a=Ce.includes(r);if(r in(n?IDBIndex:IDBObjectStore).prototype&&(a||Le.includes(r))){var i=function(){var e=E(_().mark((function e(t){var i,s,c,o,u,h,l=arguments;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(s=this.transaction(t,a?"readwrite":"readonly"),c=s.store,o=l.length,u=new Array(o>1?o-1:0),h=1;h<o;h++)u[h-1]=l[h];return n&&(c=c.index(u.shift())),e.next=6,Promise.all([(i=c)[r].apply(i,u),a&&s.done]);case 6:return e.abrupt("return",e.sent[0]);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}();return Oe.set(t,i),i}}}xe=function(e){return le(le({},e),{},{get:function(t,r,n){return je(t,r)||e.get(t,r,n)},has:function(t,r){return!!je(t,r)||e.has(t,r)}})}(xe);r(404);var Se="cache-entries",Pe=function(e){var t=new URL(e,location.href);return t.hash="",t.href},Te=function(){function e(t){s(this,e),this._db=null,this._cacheName=t}return i(e,[{key:"_upgradeDb",value:function(e){var t=e.createObjectStore(Se,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}},{key:"_upgradeDbAndDeleteOldDbs",value:function(e){this._upgradeDb(e),this._cacheName&&function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).blocked,r=indexedDB.deleteDatabase(e);t&&r.addEventListener("blocked",(function(e){return t(e.oldVersion,e)})),_e(r).then((function(){}))}(this._cacheName)}},{key:"setTimestamp",value:function(){var e=E(_().mark((function e(t,r){var n,a,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Pe(t),n={url:t,timestamp:r,cacheName:this._cacheName,id:this._getId(t)},e.next=4,this.getDb();case 4:return a=e.sent,i=a.transaction(Se,"readwrite",{durability:"relaxed"}),e.next=8,i.store.put(n);case 8:return e.next=10,i.done;case 10:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"getTimestamp",value:function(){var e=E(_().mark((function e(t){var r,n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getDb();case 2:return r=e.sent,e.next=5,r.get(Se,this._getId(t));case 5:return n=e.sent,e.abrupt("return",null===n||void 0===n?void 0:n.timestamp);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"expireEntries",value:function(){var e=E(_().mark((function e(t,r){var n,a,i,s,c,o,u,h,l;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getDb();case 2:return n=e.sent,e.next=5,n.transaction(Se).store.index("timestamp").openCursor(null,"prev");case 5:a=e.sent,i=[],s=0;case 8:if(!a){e.next=16;break}return(c=a.value).cacheName===this._cacheName&&(t&&c.timestamp<t||r&&s>=r?i.push(a.value):s++),e.next=13,a.continue();case 13:a=e.sent,e.next=8;break;case 16:o=[],u=0,h=i;case 18:if(!(u<h.length)){e.next=26;break}return l=h[u],e.next=22,n.delete(Se,l.id);case 22:o.push(l.url);case 23:u++,e.next=18;break;case 26:return e.abrupt("return",o);case 27:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_getId",value:function(e){return this._cacheName+"|"+Pe(e)}},{key:"getDb",value:function(){var e=E(_().mark((function e(){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._db){e.next=4;break}return e.next=3,Ee("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)});case 3:this._db=e.sent;case 4:return e.abrupt("return",this._db);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),qe=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s(this,e),this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=r.maxEntries,this._maxAgeSeconds=r.maxAgeSeconds,this._matchOptions=r.matchOptions,this._cacheName=t,this._timestampModel=new Te(t)}return i(e,[{key:"expireEntries",value:function(){var e=E(_().mark((function e(){var t,r,n,a,i,s;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isRunning){e.next=3;break}return this._rerunRequested=!0,e.abrupt("return");case 3:return this._isRunning=!0,t=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,e.next=7,this._timestampModel.expireEntries(t,this._maxEntries);case 7:return r=e.sent,e.next=10,self.caches.open(this._cacheName);case 10:n=e.sent,a=O(r),e.prev=12,a.s();case 14:if((i=a.n()).done){e.next=20;break}return s=i.value,e.next=18,n.delete(s,this._matchOptions);case 18:e.next=14;break;case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(12),a.e(e.t0);case 25:return e.prev=25,a.f(),e.finish(25);case 28:0,this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,q(this.expireEntries()));case 31:case"end":return e.stop()}}),e,this,[[12,22,25,28]])})));return function(){return e.apply(this,arguments)}}()},{key:"updateTimestamp",value:function(){var e=E(_().mark((function e(t){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,this._timestampModel.setTimestamp(t,Date.now());case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"isURLExpired",value:function(){var e=E(_().mark((function e(t){var r,n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._maxAgeSeconds){e.next=6;break}e.next=3;break;case 3:return e.abrupt("return",!1);case 6:return e.next=8,this._timestampModel.getTimestamp(t);case 8:return r=e.sent,n=Date.now()-1e3*this._maxAgeSeconds,e.abrupt("return",void 0===r||r<n);case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"delete",value:function(){var e=E(_().mark((function e(){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._rerunRequested=!1,e.next=3,this._timestampModel.expireEntries(1/0);case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),De=function(){function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s(this,e),this.cachedResponseWillBeUsed=function(){var e=E(_().mark((function e(r){var n,a,i,s,c,o,u;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.event,a=r.request,i=r.cacheName,s=r.cachedResponse){e.next=3;break}return e.abrupt("return",null);case 3:if(c=t._isResponseDateFresh(s),q((o=t._getCacheExpiration(i)).expireEntries()),u=o.updateTimestamp(a.url),n)try{n.waitUntil(u)}catch(h){0}return e.abrupt("return",c?s:null);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.cacheDidUpdate=function(){var e=E(_().mark((function e(r){var n,a,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.cacheName,a=r.request,i=t._getCacheExpiration(n),e.next=5,i.updateTimestamp(a.url);case 5:return e.next=7,i.expireEntries();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this._config=r,this._maxAgeSeconds=r.maxAgeSeconds,this._cacheExpirations=new Map,r.purgeOnQuotaError&&function(e){b.add(e)}((function(){return t.deleteCacheAndMetadata()}))}return i(e,[{key:"_getCacheExpiration",value:function(e){if(e===k())throw new y("expire-custom-caches-only");var t=this._cacheExpirations.get(e);return t||(t=new qe(e,this._config),this._cacheExpirations.set(e,t)),t}},{key:"_isResponseDateFresh",value:function(e){if(!this._maxAgeSeconds)return!0;var t=this._getDateHeaderTimestamp(e);return null===t||t>=Date.now()-1e3*this._maxAgeSeconds}},{key:"_getDateHeaderTimestamp",value:function(e){if(!e.headers.has("date"))return null;var t=e.headers.get("date"),r=new Date(t).getTime();return isNaN(r)?null:r}},{key:"deleteCacheAndMetadata",value:function(){var e=E(_().mark((function e(){var t,r,n,a,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=O(this._cacheExpirations),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=11;break}return n=B(r.value,2),a=n[0],i=n[1],e.next=7,self.caches.delete(a);case 7:return e.next=9,i.delete();case 9:e.next=3;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),t.e(e.t0);case 16:return e.prev=16,t.f(),e.finish(16);case 19:this._cacheExpirations=new Map;case 20:case"end":return e.stop()}}),e,this,[[1,13,16,19]])})));return function(){return e.apply(this,arguments)}}()}]),e}();var Ue,Ne=function(e){o(r,e);var t=f(r);function r(){return s(this,r),t.apply(this,arguments)}return i(r,[{key:"_handle",value:function(){var e=E(_().mark((function e(t,r){var n,a;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return[],e.next=4,r.cacheMatch(t);case 4:if(n=e.sent,a=void 0,n){e.next=20;break}return e.prev=8,e.next=11,r.fetchAndCachePut(t);case 11:n=e.sent,e.next=17;break;case 14:e.prev=14,e.t0=e.catch(8),e.t0 instanceof Error&&(a=e.t0);case 17:0,e.next=21;break;case 20:0;case 21:if(n){e.next=24;break}throw new y("no-response",{url:t.url,error:a});case 24:return e.abrupt("return",n);case 25:case"end":return e.stop()}}),e,this,[[8,14]])})));return function(t,r){return e.apply(this,arguments)}}()}]),r}(Q),Ie={cacheWillUpdate:function(){var e=E(_().mark((function e(t){var r;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(200!==(r=t.response).status&&0!==r.status){e.next=3;break}return e.abrupt("return",r);case 3:return e.abrupt("return",null);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},Ae=function(e){o(r,e);var t=f(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(this,r),(e=t.call(this,n)).plugins.some((function(e){return"cacheWillUpdate"in e}))||e.plugins.unshift(Ie),e}return i(r,[{key:"_handle",value:function(){var e=E(_().mark((function e(t,r){var n,a,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return[],n=r.fetchAndCachePut(t).catch((function(){})),r.waitUntil(n),e.next=6,r.cacheMatch(t);case 6:if(!(a=e.sent)){e.next=11;break}0,e.next=21;break;case 11:return e.prev=12,e.next=15,n;case 15:a=e.sent,e.next=21;break;case 18:e.prev=18,e.t0=e.catch(12),e.t0 instanceof Error&&(i=e.t0);case 21:if(a){e.next=24;break}throw new y("no-response",{url:t.url,error:i});case 24:return e.abrupt("return",a);case 25:case"end":return e.stop()}}),e,this,[[12,18]])})));return function(t,r){return e.apply(this,arguments)}}()}]),r}(Q);(function(e){Z().precache(e)})(([{'revision':'284133bd44057b104d838d862e9b9e00','url':'/.well-known/service/static/index.html'},{'revision':'0e898c13dd6acc261bd8e1c685957057','url':'/.well-known/service/static/router-template-styles/fonts/lato-latin-400-normal.woff'},{'revision':'e1b3b5908c9cf23dfb2b9c52b9a023ab','url':'/.well-known/service/static/router-template-styles/fonts/lato-latin-400-normal.woff2'},{'revision':'cf01af70a3ae9a494a729f504c43804e','url':'/.well-known/service/static/router-template-styles/fonts/lato-latin-ext-400-normal.woff'},{'revision':'4bde07f991ba6af69a1e009fd7ce9d1a','url':'/.well-known/service/static/router-template-styles/fonts/lato-latin-ext-400-normal.woff2'},{'revision':'6a0b64dd716576afb1ef9217bfe20439','url':'/.well-known/service/static/router-template-styles/styles.css'},{'revision':null,'url':'/.well-known/service/static/static/css/3154.e954fcda.chunk.css'},{'revision':null,'url':'/.well-known/service/static/static/css/5355.c4fb5c4a.chunk.css'},{'revision':null,'url':'/.well-known/service/static/static/css/5982.ac464505.chunk.css'},{'revision':null,'url':'/.well-known/service/static/static/css/7272.0ae9f678.chunk.css'},{'revision':null,'url':'/.well-known/service/static/static/css/main.7ea79dc8.css'},{'revision':null,'url':'/.well-known/service/static/static/js/1132.c008fe16.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/1480.f89236fc.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/1546.05fce5c0.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/1565.f2e6e45e.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/1614.80ddb35a.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/1660.e2ff5a21.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/1760.3318c7ca.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/1980.79862e88.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/2291.80adfd96.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/2393.9c045444.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/252.8dd19212.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/2631.54f86f84.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/2653.58a5430b.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/2664.a42cbb96.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/2686.3a7c583a.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/3179.03c92dcb.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/3551.a3cfa6aa.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/3593.98d9341a.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/3595.d4510796.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/4023.f88d8f4b.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/4164.5adbbbba.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/4212.d2a239de.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/4319.8d9e189e.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/445.90a9dfcd.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/4682.23dd054e.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/4716.58477c5c.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/4764.51208c0d.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5176.9f08e927.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5355.4b07ad55.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5434.523d071d.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5465.f32033e1.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5541.1d065ac6.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5645.3c5c0f93.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5683.46331372.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/576.d7d4814e.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5848.487098c8.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5859.b3338b24.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5960.6c234993.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5982.19c5663f.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/617.ecc73170.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6186.2a5f97da.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6326.3a3cb154.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6378.29466d9e.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6700.e22cc266.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6711.38948be4.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6737.5aef67e7.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6771.583c16c9.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6856.163537c7.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6869.08bd3d6f.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6921.2f39f974.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/7.b3c58209.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/7006.b21fb368.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/7272.608c5875.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/7606.25231f8c.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/8143.6b921364.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/8365.f20d6e52.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/8437.0d88b9db.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/8527.437a8769.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/861.a19bf499.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/878.4424e6e9.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/9102.7087c66c.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/9107.967c2ac1.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/926.d1421ce1.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/9260.d8f59a75.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/9409.0d5d4de2.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/9620.4b7c9e8b.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/9657.e974d577.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/9899.18509ac9.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/main.1b821566.js'},{'revision':'e3bc0515e1d125463e42435a231a6aa2','url':'/.well-known/service/static/static/media/empty-space-nft.3878bc5c8ba6490ef5075fdda24be921.svg'},{'revision':null,'url':'/.well-known/service/static/static/media/lato-all-400-normal.3dc1eff492ab1f598560.woff'},{'revision':null,'url':'/.well-known/service/static/static/media/lato-all-700-normal.1e7707c9ec98d9b97e7f.woff'},{'revision':null,'url':'/.well-known/service/static/static/media/lato-latin-400-normal.be36596da218e1eec01c.woff2'},{'revision':null,'url':'/.well-known/service/static/static/media/lato-latin-700-normal.8f28e0e1fdb195149f1c.woff2'},{'revision':null,'url':'/.well-known/service/static/static/media/lato-latin-ext-400-normal.361f3dbb9db6a5980326.woff2'},{'revision':null,'url':'/.well-known/service/static/static/media/lato-latin-ext-700-normal.9c8812eaec45956201e1.woff2'},{'revision':'893e153699e6c3cbf74132eacdb77fa6','url':'/.well-known/service/static/static/media/space-connected.9a4e18fd2bc7d065191b0d241a131c28.svg'},{'revision':'1eb1b65118c541eb7f5453294a9d8e77','url':'/.well-known/service/static/static/media/studio.f849ff5763d19a78ada7fdeea249f819.svg'},{'revision':null,'url':'/.well-known/service/static/static/media/ubuntu-mono-all-400-normal.c879328bc62e9c68268f.woff'},{'revision':null,'url':'/.well-known/service/static/static/media/ubuntu-mono-cyrillic-400-normal.c367f416832eb8f1b846.woff2'},{'revision':null,'url':'/.well-known/service/static/static/media/ubuntu-mono-cyrillic-ext-400-normal.eda1c4946b1f7bf58386.woff2'},{'revision':null,'url':'/.well-known/service/static/static/media/ubuntu-mono-greek-400-normal.22f3bfc91f79c342bdf4.woff2'},{'revision':null,'url':'/.well-known/service/static/static/media/ubuntu-mono-greek-ext-400-normal.b3459900ea8a25d1f7c2.woff2'},{'revision':null,'url':'/.well-known/service/static/static/media/ubuntu-mono-latin-400-normal.18e32d9d743af28f913e.woff2'},{'revision':null,'url':'/.well-known/service/static/static/media/ubuntu-mono-latin-ext-400-normal.b56e2315611d10838ad5.woff2'}]||[]).filter((function(e){return"/"!==e.url&&!e.url.includes("index.html")}))),function(e){var t=Z();se(new oe(t,e))}(Ue),self.addEventListener("activate",(function(){return self.clients.claim()})),self.addEventListener("activate",(function(){console.log("Service Worker activated")})),self.addEventListener("install",(function(e){console.log("Service Worker installed"),e.waitUntil(self.skipWaiting())}));var Me=function(e){return"GET"!==e.method||(!!e.url.includes("/api")||(!!e.url.includes("__meta__.js")||!!e.url.includes("__blocklet__.js")))};se((function(e){var t=e.request;return!Me(t)&&t.url.includes("/static/")}),new Ne({cacheName:"static",plugins:[new De({maxEntries:200})]})),se((function(e){var t=e.request;return!Me(t)&&(t.url.includes("/images/")||t.url.includes("/router/-template-styles/"))}),new Ae)}()}();
|
|
2
|
+
!function(){"use strict";var e={838:function(){try{self["workbox:core:6.5.3"]&&_()}catch(e){}},404:function(){try{self["workbox:expiration:6.5.3"]&&_()}catch(e){}},362:function(){try{self["workbox:precaching:6.5.3"]&&_()}catch(e){}},161:function(){try{self["workbox:routing:6.5.3"]&&_()}catch(e){}},880:function(){try{self["workbox:strategies:6.5.3"]&&_()}catch(e){}}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}!function(){r(838);var e=null;function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e){var r=function(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,r||"default");if("object"!==t(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===t(r)?r:String(r)}function a(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,n(a.key),a)}}function i(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function h(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function l(e,r){if(r&&("object"===t(r)||"function"===typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){var t=h();return function(){var r,n=u(e);if(t){var a=u(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return l(this,r)}}function p(e,t,r){return p=h()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n));return r&&c(a,r.prototype),a},p.apply(null,arguments)}function v(e){var t="function"===typeof Map?new Map:void 0;return v=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return p(e,arguments,u(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,e)},v(e)}var d=function(e){for(var t=e,r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return n.length>0&&(t+=" :: ".concat(JSON.stringify(n))),t},y=function(e){o(r,e);var t=f(r);function r(e,n){var a;s(this,r);var i=d(e,n);return(a=t.call(this,i)).name=e,a.details=n,a}return i(r)}(v(Error)),b=new Set;var g,m={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!==typeof registration?registration.scope:""},x=function(e){return[m.prefix,e,m.suffix].filter((function(e){return e&&e.length>0})).join("-")},w=function(e){return e||x(m.precache)},k=function(e){return e||x(m.runtime)};function _(){_=function(){return e};var e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",o=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(S){u=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var i=t&&t.prototype instanceof p?t:p,s=Object.create(i.prototype),c=new C(n||[]);return a(s,"_invoke",{value:k(e,r,c)}),s}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(S){return{type:"throw",arg:S}}}e.wrap=h;var f={};function p(){}function v(){}function d(){}var y={};u(y,s,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(O([])));g&&g!==r&&n.call(g,s)&&(y=g);var m=d.prototype=p.prototype=Object.create(y);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,r){function i(a,s,c,o){var u=l(e[a],e,s);if("throw"!==u.type){var h=u.arg,f=h.value;return f&&"object"==t(f)&&n.call(f,"__await")?r.resolve(f.__await).then((function(e){i("next",e,c,o)}),(function(e){i("throw",e,c,o)})):r.resolve(f).then((function(e){h.value=e,c(h)}),(function(e){return i("throw",e,c,o)}))}o(u.arg)}var s;a(this,"_invoke",{value:function(e,t){function n(){return new r((function(r,n){i(e,t,r,n)}))}return s=s?s.then(n,n):n()}})}function k(e,t,r){var n="suspendedStart";return function(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return j()}for(r.method=a,r.arg=i;;){var s=r.delegate;if(s){var c=R(s,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var o=l(e,t,r);if("normal"===o.type){if(n=r.done?"completed":"suspendedYield",o.arg===f)continue;return{value:o.arg,done:r.done}}"throw"===o.type&&(n="completed",r.method="throw",r.arg=o.arg)}}}function R(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,R(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var a=l(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:j}}function j(){return{value:void 0,done:!0}}return v.prototype=d,a(m,"constructor",{value:d,configurable:!0}),a(d,"constructor",{value:v,configurable:!0}),v.displayName=u(d,o,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,u(e,o,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},x(w.prototype),u(w.prototype,c,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,a,i){void 0===i&&(i=Promise);var s=new w(h(t,r,n,a),i);return e.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},x(m),u(m,o,"Generator"),u(m,s,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=O,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return s.type="throw",s.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),o=n.call(i,"finallyLoc");if(c&&o){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!o)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function R(e,t,r,n,a,i,s){try{var c=e[i](s),o=c.value}catch(u){return void r(u)}c.done?t(o):Promise.resolve(o).then(n,a)}function E(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function s(e){R(i,n,a,s,c,"next",e)}function c(e){R(i,n,a,s,c,"throw",e)}s(void 0)}))}}function L(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 C(e,t){if(e){if("string"===typeof e)return L(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)?L(e,t):void 0}}function O(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=C(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw i}}}}function j(e,t){var r,n=new URL(e),a=O(t);try{for(a.s();!(r=a.n()).done;){var i=r.value;n.searchParams.delete(i)}}catch(s){a.e(s)}finally{a.f()}return n.href}function S(e,t,r,n){return P.apply(this,arguments)}function P(){return(P=E(_().mark((function e(t,r,n,a){var i,s,c,o,u,h,l;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=j(r.url,n),r.url!==i){e.next=3;break}return e.abrupt("return",t.match(r,a));case 3:return s=Object.assign(Object.assign({},a),{ignoreSearch:!0}),e.next=6,t.keys(r,s);case 6:c=e.sent,o=O(c),e.prev=8,o.s();case 10:if((u=o.n()).done){e.next=17;break}if(h=u.value,l=j(h.url,n),i!==l){e.next=15;break}return e.abrupt("return",t.match(h,a));case 15:e.next=10;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(8),o.e(e.t0);case 22:return e.prev=22,o.f(),e.finish(22);case 25:return e.abrupt("return");case 26:case"end":return e.stop()}}),e,null,[[8,19,22,25]])})))).apply(this,arguments)}function T(){if(void 0===g){var e=new Response("");if("body"in e)try{new Response(e.body),g=!0}catch(t){g=!1}g=!1}return g}function q(e){e.then((function(){}))}var D=i((function e(){var t=this;s(this,e),this.promise=new Promise((function(e,r){t.resolve=e,t.reject=r}))}));function U(){return N.apply(this,arguments)}function N(){return(N=E(_().mark((function e(){var t,r,n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,t=O(b),e.prev=2,t.s();case 4:if((r=t.n()).done){e.next=11;break}return n=r.value,e.next=8,n();case 8:0;case 9:e.next=4;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(2),t.e(e.t0);case 16:return e.prev=16,t.f(),e.finish(16);case 19:0;case 20:case"end":return e.stop()}}),e,null,[[2,13,16,19]])})))).apply(this,arguments)}var I=function(e){return new URL(String(e),location.href).href.replace(new RegExp("^".concat(location.origin)),"")};function A(e){return new Promise((function(t){return setTimeout(t,e)}))}function M(e,t){var r=t();return e.waitUntil(r),r}function K(e,t){return W.apply(this,arguments)}function W(){return(W=E(_().mark((function e(t,r){var n,a,i,s,c,o;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=null,t.url&&(a=new URL(t.url),n=a.origin),n===self.location.origin){e.next=4;break}throw new y("cross-origin-copy-response",{origin:n});case 4:if(i=t.clone(),s={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},c=r?r(s):s,!T()){e.next=11;break}e.t0=i.body,e.next=14;break;case 11:return e.next=13,i.blob();case 13:e.t0=e.sent;case 14:return o=e.t0,e.abrupt("return",new Response(o,c));case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,s,c=[],o=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;o=!1}else for(;!(o=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);o=!0);}catch(h){u=!0,a=h}finally{try{if(!o&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}(e,t)||C(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e){return function(e){if(Array.isArray(e))return L(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||C(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(362);function H(e){if(!e)throw new y("add-to-cache-list-unexpected-type",{entry:e});if("string"===typeof e){var t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}var r=e.revision,n=e.url;if(!n)throw new y("add-to-cache-list-unexpected-type",{entry:e});if(!r){var a=new URL(n,location.href);return{cacheKey:a.href,url:a.href}}var i=new URL(n,location.href),s=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",r),{cacheKey:i.href,url:s.href}}var V=i((function e(){var t=this;s(this,e),this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=function(){var e=E(_().mark((function e(t){var r,n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.request,(n=t.state)&&(n.originalRequest=r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.cachedResponseWillBeUsed=function(){var e=E(_().mark((function e(r){var n,a,i,s;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.event,a=r.state,i=r.cachedResponse,"install"===n.type&&a&&a.originalRequest&&a.originalRequest instanceof Request&&(s=a.originalRequest.url,i?t.notUpdatedURLs.push(s):t.updatedURLs.push(s)),e.abrupt("return",i);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()})),G=i((function e(t){var r=this,n=t.precacheController;s(this,e),this.cacheKeyWillBeUsed=function(){var e=E(_().mark((function e(t){var n,a,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.request,a=t.params,i=(null===a||void 0===a?void 0:a.cacheKey)||r._precacheController.getCacheKeyForURL(n.url),e.abrupt("return",i?new Request(i,{headers:n.headers}):n);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this._precacheController=n}));r(880);function Y(e){return"string"===typeof e?new Request(e):e}var $=function(){function t(e,r){s(this,t),this._cacheKeys={},Object.assign(this,r),this.event=r.event,this._strategy=e,this._handlerDeferred=new D,this._extendLifetimePromises=[],this._plugins=F(e.plugins),this._pluginStateMap=new Map;var n,a=O(this._plugins);try{for(a.s();!(n=a.n()).done;){var i=n.value;this._pluginStateMap.set(i,{})}}catch(c){a.e(c)}finally{a.f()}this.event.waitUntil(this._handlerDeferred.promise)}return i(t,[{key:"fetch",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=E(_().mark((function e(t){var r,n,a,i,s,c,o,u,h,l,f,p;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.event,!("navigate"===(n=Y(t)).mode&&r instanceof FetchEvent&&r.preloadResponse)){e.next=9;break}return e.next=5,r.preloadResponse;case 5:if(!(a=e.sent)){e.next=9;break}return e.abrupt("return",a);case 9:i=this.hasCallback("fetchDidFail")?n.clone():null,e.prev=10,s=O(this.iterateCallbacks("requestWillFetch")),e.prev=12,s.s();case 14:if((c=s.n()).done){e.next=21;break}return o=c.value,e.next=18,o({request:n.clone(),event:r});case 18:n=e.sent;case 19:e.next=14;break;case 21:e.next=26;break;case 23:e.prev=23,e.t0=e.catch(12),s.e(e.t0);case 26:return e.prev=26,s.f(),e.finish(26);case 29:e.next=35;break;case 31:if(e.prev=31,e.t1=e.catch(10),!(e.t1 instanceof Error)){e.next=35;break}throw new y("plugin-error-request-will-fetch",{thrownErrorMessage:e.t1.message});case 35:return u=n.clone(),e.prev=36,e.next=39,fetch(n,"navigate"===n.mode?void 0:this._strategy.fetchOptions);case 39:h=e.sent,l=O(this.iterateCallbacks("fetchDidSucceed")),e.prev=42,l.s();case 44:if((f=l.n()).done){e.next=51;break}return p=f.value,e.next=48,p({event:r,request:u,response:h});case 48:h=e.sent;case 49:e.next=44;break;case 51:e.next=56;break;case 53:e.prev=53,e.t2=e.catch(42),l.e(e.t2);case 56:return e.prev=56,l.f(),e.finish(56);case 59:return e.abrupt("return",h);case 62:if(e.prev=62,e.t3=e.catch(36),!i){e.next=68;break}return e.next=68,this.runCallbacks("fetchDidFail",{error:e.t3,event:r,originalRequest:i.clone(),request:u.clone()});case 68:throw e.t3;case 69:case"end":return e.stop()}}),e,this,[[10,31],[12,23,26,29],[36,62],[42,53,56,59]])})));return function(t){return e.apply(this,arguments)}}())},{key:"fetchAndCachePut",value:function(){var e=E(_().mark((function e(t){var r,n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetch(t);case 2:return r=e.sent,n=r.clone(),this.waitUntil(this.cachePut(t,n)),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"cacheMatch",value:function(){var e=E(_().mark((function e(t){var r,n,a,i,s,c,o,u,h,l;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Y(t),a=this._strategy,i=a.cacheName,s=a.matchOptions,e.next=4,this.getCacheKey(r,"read");case 4:return c=e.sent,o=Object.assign(Object.assign({},s),{cacheName:i}),e.next=8,caches.match(c,o);case 8:n=e.sent,u=O(this.iterateCallbacks("cachedResponseWillBeUsed")),e.prev=11,u.s();case 13:if((h=u.n()).done){e.next=23;break}return l=h.value,e.next=17,l({cacheName:i,matchOptions:s,cachedResponse:n,request:c,event:this.event});case 17:if(e.t0=e.sent,e.t0){e.next=20;break}e.t0=void 0;case 20:n=e.t0;case 21:e.next=13;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(11),u.e(e.t1);case 28:return e.prev=28,u.f(),e.finish(28);case 31:return e.abrupt("return",n);case 32:case"end":return e.stop()}}),e,this,[[11,25,28,31]])})));return function(t){return e.apply(this,arguments)}}()},{key:"cachePut",value:function(){var t=E(_().mark((function t(r,n){var a,i,s,c,o,u,h,l,f,p,v,d,b;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=Y(r),t.next=3,A(0);case 3:return t.next=5,this.getCacheKey(a,"write");case 5:i=t.sent,t.next=11;break;case 9:(s=n.headers.get("Vary"))&&e.debug("The response for ".concat(I(i.url)," ")+"has a 'Vary: ".concat(s,"' header. ")+"Consider setting the {ignoreVary: true} option on your strategy to ensure cache matching and deletion works as expected.");case 11:if(n){t.next=14;break}throw new y("cache-put-with-no-response",{url:I(i.url)});case 14:return t.next=16,this._ensureResponseSafeToCache(n);case 16:if(c=t.sent){t.next=20;break}return t.abrupt("return",!1);case 20:return o=this._strategy,u=o.cacheName,h=o.matchOptions,t.next=23,self.caches.open(u);case 23:if(l=t.sent,!(f=this.hasCallback("cacheDidUpdate"))){t.next=31;break}return t.next=28,S(l,i.clone(),["__WB_REVISION__"],h);case 28:t.t0=t.sent,t.next=32;break;case 31:t.t0=null;case 32:return p=t.t0,t.prev=34,t.next=37,l.put(i,f?c.clone():c);case 37:t.next=46;break;case 39:if(t.prev=39,t.t1=t.catch(34),!(t.t1 instanceof Error)){t.next=46;break}if("QuotaExceededError"!==t.t1.name){t.next=45;break}return t.next=45,U();case 45:throw t.t1;case 46:v=O(this.iterateCallbacks("cacheDidUpdate")),t.prev=47,v.s();case 49:if((d=v.n()).done){t.next=55;break}return b=d.value,t.next=53,b({cacheName:u,oldResponse:p,newResponse:c.clone(),request:i,event:this.event});case 53:t.next=49;break;case 55:t.next=60;break;case 57:t.prev=57,t.t2=t.catch(47),v.e(t.t2);case 60:return t.prev=60,v.f(),t.finish(60);case 63:return t.abrupt("return",!0);case 64:case"end":return t.stop()}}),t,this,[[34,39],[47,57,60,63]])})));return function(e,r){return t.apply(this,arguments)}}()},{key:"getCacheKey",value:function(){var e=E(_().mark((function e(t,r){var n,a,i,s,c;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n="".concat(t.url," | ").concat(r),this._cacheKeys[n]){e.next=24;break}a=t,i=O(this.iterateCallbacks("cacheKeyWillBeUsed")),e.prev=4,i.s();case 6:if((s=i.n()).done){e.next=15;break}return c=s.value,e.t0=Y,e.next=11,c({mode:r,request:a,event:this.event,params:this.params});case 11:e.t1=e.sent,a=(0,e.t0)(e.t1);case 13:e.next=6;break;case 15:e.next=20;break;case 17:e.prev=17,e.t2=e.catch(4),i.e(e.t2);case 20:return e.prev=20,i.f(),e.finish(20);case 23:this._cacheKeys[n]=a;case 24:return e.abrupt("return",this._cacheKeys[n]);case 25:case"end":return e.stop()}}),e,this,[[4,17,20,23]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"hasCallback",value:function(e){var t,r=O(this._strategy.plugins);try{for(r.s();!(t=r.n()).done;){if(e in t.value)return!0}}catch(n){r.e(n)}finally{r.f()}return!1}},{key:"runCallbacks",value:function(){var e=E(_().mark((function e(t,r){var n,a,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=O(this.iterateCallbacks(t)),e.prev=1,n.s();case 3:if((a=n.n()).done){e.next=9;break}return i=a.value,e.next=7,i(r);case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"iterateCallbacks",value:_().mark((function e(t){var r,n,a,i=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=O(this._strategy.plugins),e.prev=1,a=_().mark((function e(){var r,a,s;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!==typeof(r=n.value)[t]){e.next=6;break}return a=i._pluginStateMap.get(r),s=function(e){var n=Object.assign(Object.assign({},e),{state:a});return r[t](n)},e.next=6,s;case 6:case"end":return e.stop()}}),e)})),r.s();case 4:if((n=r.n()).done){e.next=8;break}return e.delegateYield(a(),"t0",6);case 6:e.next=4;break;case 8:e.next=13;break;case 10:e.prev=10,e.t1=e.catch(1),r.e(e.t1);case 13:return e.prev=13,r.f(),e.finish(13);case 16:case"end":return e.stop()}}),e,this,[[1,10,13,16]])}))},{key:"waitUntil",value:function(e){return this._extendLifetimePromises.push(e),e}},{key:"doneWaiting",value:function(){var e=E(_().mark((function e(){var t;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this._extendLifetimePromises.shift())){e.next=5;break}return e.next=3,t;case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"destroy",value:function(){this._handlerDeferred.resolve(null)}},{key:"_ensureResponseSafeToCache",value:function(){var e=E(_().mark((function e(t){var r,n,a,i,s;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t,n=!1,a=O(this.iterateCallbacks("cacheWillUpdate")),e.prev=3,a.s();case 5:if((i=a.n()).done){e.next=18;break}return s=i.value,e.next=9,s({request:this.request,response:r,event:this.event});case 9:if(e.t0=e.sent,e.t0){e.next=12;break}e.t0=void 0;case 12:if(r=e.t0,n=!0,r){e.next=16;break}return e.abrupt("break",18);case 16:e.next=5;break;case 18:e.next=23;break;case 20:e.prev=20,e.t1=e.catch(3),a.e(e.t1);case 23:return e.prev=23,a.f(),e.finish(23);case 26:return n||r&&200!==r.status&&(r=void 0),e.abrupt("return",r);case 28:case"end":return e.stop()}}),e,this,[[3,20,23,26]])})));return function(t){return e.apply(this,arguments)}}()}]),t}(),Q=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s(this,e),this.cacheName=k(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}return i(e,[{key:"handle",value:function(e){return B(this.handleAll(e),1)[0]}},{key:"handleAll",value:function(e){e instanceof FetchEvent&&(e={event:e,request:e.request});var t=e.event,r="string"===typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new $(this,{event:t,request:r,params:n}),i=this._getResponse(a,r,t);return[i,this._awaitComplete(i,a,r,t)]}},{key:"_getResponse",value:function(){var e=E(_().mark((function e(t,r,n){var a,i,s,c,o,u,h;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.runCallbacks("handlerWillStart",{event:n,request:r});case 2:return a=void 0,e.prev=3,e.next=6,this._handle(r,t);case 6:if((a=e.sent)&&"error"!==a.type){e.next=9;break}throw new y("no-response",{url:r.url});case 9:e.next=39;break;case 11:if(e.prev=11,e.t0=e.catch(3),!(e.t0 instanceof Error)){e.next=34;break}i=O(t.iterateCallbacks("handlerDidError")),e.prev=15,i.s();case 17:if((s=i.n()).done){e.next=26;break}return c=s.value,e.next=21,c({error:e.t0,event:n,request:r});case 21:if(!(a=e.sent)){e.next=24;break}return e.abrupt("break",26);case 24:e.next=17;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(15),i.e(e.t1);case 31:return e.prev=31,i.f(),e.finish(31);case 34:if(a){e.next=38;break}throw e.t0;case 38:0;case 39:o=O(t.iterateCallbacks("handlerWillRespond")),e.prev=40,o.s();case 42:if((u=o.n()).done){e.next=49;break}return h=u.value,e.next=46,h({event:n,request:r,response:a});case 46:a=e.sent;case 47:e.next=42;break;case 49:e.next=54;break;case 51:e.prev=51,e.t2=e.catch(40),o.e(e.t2);case 54:return e.prev=54,o.f(),e.finish(54);case 57:return e.abrupt("return",a);case 58:case"end":return e.stop()}}),e,this,[[3,11],[15,28,31,34],[40,51,54,57]])})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"_awaitComplete",value:function(){var e=E(_().mark((function e(t,r,n,a){var i,s;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t;case 3:i=e.sent,e.next=8;break;case 6:e.prev=6,e.t0=e.catch(0);case 8:return e.prev=8,e.next=11,r.runCallbacks("handlerDidRespond",{event:a,request:n,response:i});case 11:return e.next=13,r.doneWaiting();case 13:e.next=18;break;case 15:e.prev=15,e.t1=e.catch(8),e.t1 instanceof Error&&(s=e.t1);case 18:return e.next=20,r.runCallbacks("handlerDidComplete",{event:a,request:n,response:i,error:s});case 20:if(r.destroy(),!s){e.next=23;break}throw s;case 23:case"end":return e.stop()}}),e,null,[[0,6],[8,15]])})));return function(t,r,n,a){return e.apply(this,arguments)}}()}]),e}(),J=function(t){o(n,t);var r=f(n);function n(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(this,n),t.cacheName=w(t.cacheName),(e=r.call(this,t))._fallbackToNetwork=!1!==t.fallbackToNetwork,e.plugins.push(n.copyRedirectedCacheableResponsesPlugin),e}return i(n,[{key:"_handle",value:function(){var e=E(_().mark((function e(t,r){var n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.cacheMatch(t);case 2:if(!(n=e.sent)){e.next=5;break}return e.abrupt("return",n);case 5:if(!r.event||"install"!==r.event.type){e.next=9;break}return e.next=8,this._handleInstall(t,r);case 8:case 11:return e.abrupt("return",e.sent);case 9:return e.next=11,this._handleFetch(t,r);case 12:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_handleFetch",value:function(){var t=E(_().mark((function t(r,n){var a,i,s,c,o,u;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=n.params||{},!this._fallbackToNetwork){t.next=17;break}return s=i.integrity,c=r.integrity,o=!c||c===s,t.next=8,n.fetch(new Request(r,{integrity:"no-cors"!==r.mode?c||s:void 0}));case 8:if(a=t.sent,!s||!o||"no-cors"===r.mode){t.next=15;break}return this._useDefaultCacheabilityPluginIfNeeded(),t.next=13,n.cachePut(r,a.clone());case 13:t.sent;case 15:t.next=18;break;case 17:throw new y("missing-precache-entry",{cacheName:this.cacheName,url:r.url});case 18:t.next=34;break;case 23:t.t0=t.sent;case 24:u=t.t0,e.groupCollapsed("Precaching is responding to: "+I(r.url)),e.log("Serving the precached url: ".concat(I(u instanceof Request?u.url:u))),e.groupCollapsed("View request details here."),e.log(r),e.groupEnd(),e.groupCollapsed("View response details here."),e.log(a),e.groupEnd(),e.groupEnd();case 34:return t.abrupt("return",a);case 35:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}()},{key:"_handleInstall",value:function(){var e=E(_().mark((function e(t,r){var n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._useDefaultCacheabilityPluginIfNeeded(),e.next=3,r.fetch(t);case 3:return n=e.sent,e.next=6,r.cachePut(t,n.clone());case 6:if(e.sent){e.next=9;break}throw new y("bad-precaching-response",{url:t.url,status:n.status});case 9:return e.abrupt("return",n);case 10:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_useDefaultCacheabilityPluginIfNeeded",value:function(){var e,t=null,r=0,a=O(this.plugins.entries());try{for(a.s();!(e=a.n()).done;){var i=B(e.value,2),s=i[0],c=i[1];c!==n.copyRedirectedCacheableResponsesPlugin&&(c===n.defaultPrecacheCacheabilityPlugin&&(t=s),c.cacheWillUpdate&&r++)}}catch(o){a.e(o)}finally{a.f()}0===r?this.plugins.push(n.defaultPrecacheCacheabilityPlugin):r>1&&null!==t&&this.plugins.splice(t,1)}}]),n}(Q);J.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:function(e){return E(_().mark((function t(){var r;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=e.response)&&!(r.status>=400)){t.next=3;break}return t.abrupt("return",null);case 3:return t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)})))()}},J.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:function(e){return E(_().mark((function t(){var r;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e.response).redirected){t.next=7;break}return t.next=4,K(r);case 4:t.t0=t.sent,t.next=8;break;case 7:t.t0=r;case 8:return t.abrupt("return",t.t0);case 9:case"end":return t.stop()}}),t)})))()}};var z,X=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.cacheName,n=t.plugins,a=void 0===n?[]:n,i=t.fallbackToNetwork,c=void 0===i||i;s(this,e),this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new J({cacheName:w(r),plugins:[].concat(F(a),[new G({precacheController:this})]),fallbackToNetwork:c}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}return i(e,[{key:"strategy",get:function(){return this._strategy}},{key:"precache",value:function(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}},{key:"addToCacheList",value:function(e){var t,r=[],n=O(e);try{for(n.s();!(t=n.n()).done;){var a=t.value;"string"===typeof a?r.push(a):a&&void 0===a.revision&&r.push(a.url);var i=H(a),s=i.cacheKey,c=i.url,o="string"!==typeof a&&a.revision?"reload":"default";if(this._urlsToCacheKeys.has(c)&&this._urlsToCacheKeys.get(c)!==s)throw new y("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(c),secondEntry:s});if("string"!==typeof a&&a.integrity){if(this._cacheKeysToIntegrities.has(s)&&this._cacheKeysToIntegrities.get(s)!==a.integrity)throw new y("add-to-cache-list-conflicting-integrities",{url:c});this._cacheKeysToIntegrities.set(s,a.integrity)}if(this._urlsToCacheKeys.set(c,s),this._urlsToCacheModes.set(c,o),r.length>0){var u="Workbox is precaching URLs without revision "+"info: ".concat(r.join(", "),"\nThis is generally NOT safe. ")+"Learn more at https://bit.ly/wb-precache";console.warn(u)}}}catch(h){n.e(h)}finally{n.f()}}},{key:"install",value:function(e){var t=this;return M(e,E(_().mark((function r(){var n,a,i,s,c,o,u,h,l,f,p;return _().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=new V,t.strategy.plugins.push(n),a=O(t._urlsToCacheKeys),r.prev=3,a.s();case 5:if((i=a.n()).done){r.next=14;break}return s=B(i.value,2),c=s[0],o=s[1],u=t._cacheKeysToIntegrities.get(o),h=t._urlsToCacheModes.get(c),l=new Request(c,{integrity:u,cache:h,credentials:"same-origin"}),r.next=12,Promise.all(t.strategy.handleAll({params:{cacheKey:o},request:l,event:e}));case 12:r.next=5;break;case 14:r.next=19;break;case 16:r.prev=16,r.t0=r.catch(3),a.e(r.t0);case 19:return r.prev=19,a.f(),r.finish(19);case 22:return f=n.updatedURLs,p=n.notUpdatedURLs,r.abrupt("return",{updatedURLs:f,notUpdatedURLs:p});case 25:case"end":return r.stop()}}),r,null,[[3,16,19,22]])}))))}},{key:"activate",value:function(e){var t=this;return M(e,E(_().mark((function e(){var r,n,a,i,s,c,o;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,self.caches.open(t.strategy.cacheName);case 2:return r=e.sent,e.next=5,r.keys();case 5:n=e.sent,a=new Set(t._urlsToCacheKeys.values()),i=[],s=O(n),e.prev=9,s.s();case 11:if((c=s.n()).done){e.next=19;break}if(o=c.value,a.has(o.url)){e.next=17;break}return e.next=16,r.delete(o);case 16:i.push(o.url);case 17:e.next=11;break;case 19:e.next=24;break;case 21:e.prev=21,e.t0=e.catch(9),s.e(e.t0);case 24:return e.prev=24,s.f(),e.finish(24);case 27:return e.abrupt("return",{deletedURLs:i});case 29:case"end":return e.stop()}}),e,null,[[9,21,24,27]])}))))}},{key:"getURLsToCacheKeys",value:function(){return this._urlsToCacheKeys}},{key:"getCachedURLs",value:function(){return F(this._urlsToCacheKeys.keys())}},{key:"getCacheKeyForURL",value:function(e){var t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}},{key:"getIntegrityForCacheKey",value:function(e){return this._cacheKeysToIntegrities.get(e)}},{key:"matchPrecache",value:function(){var e=E(_().mark((function e(t){var r,n,a;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t instanceof Request?t.url:t,!(n=this.getCacheKeyForURL(r))){e.next=7;break}return e.next=5,self.caches.open(this.strategy.cacheName);case 5:return a=e.sent,e.abrupt("return",a.match(n));case 7:return e.abrupt("return",void 0);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"createHandlerBoundToURL",value:function(e){var t=this,r=this.getCacheKeyForURL(e);if(!r)throw new y("non-precached-url",{url:e});return function(n){return n.request=new Request(e),n.params=Object.assign({cacheKey:r},n.params),t.strategy.handle(n)}}}]),e}(),Z=function(){return z||(z=new X),z};r(161);var ee,te=function(e){return e&&"object"===typeof e?e:{handle:e}},re=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GET";s(this,e),this.handler=te(r),this.match=t,this.method=n}return i(e,[{key:"setCatchHandler",value:function(e){this.catchHandler=te(e)}}]),e}(),ne=function(e){o(r,e);var t=f(r);function r(e,n,a){s(this,r);return t.call(this,(function(t){var r=t.url,n=e.exec(r.href);if(n&&(r.origin===location.origin||0===n.index))return n.slice(1)}),n,a)}return i(r)}(re),ae=function(){function e(){s(this,e),this._routes=new Map,this._defaultHandlerMap=new Map}return i(e,[{key:"routes",get:function(){return this._routes}},{key:"addFetchListener",value:function(){var e=this;self.addEventListener("fetch",(function(t){var r=t.request,n=e.handleRequest({request:r,event:t});n&&t.respondWith(n)}))}},{key:"addCacheListener",value:function(){var e=this;self.addEventListener("message",(function(t){if(t.data&&"CACHE_URLS"===t.data.type){var r=t.data.payload;0;var n=Promise.all(r.urlsToCache.map((function(r){"string"===typeof r&&(r=[r]);var n=p(Request,F(r));return e.handleRequest({request:n,event:t})})));t.waitUntil(n),t.ports&&t.ports[0]&&n.then((function(){return t.ports[0].postMessage(!0)}))}}))}},{key:"handleRequest",value:function(e){var t=this,r=e.request,n=e.event;var a=new URL(r.url,location.href);if(a.protocol.startsWith("http")){var i=a.origin===location.origin,s=this.findMatchingRoute({event:n,request:r,sameOrigin:i,url:a}),c=s.params,o=s.route,u=o&&o.handler;0;var h=r.method;if(!u&&this._defaultHandlerMap.has(h)&&(u=this._defaultHandlerMap.get(h)),u){var l;0;try{l=u.handle({url:a,request:r,event:n,params:c})}catch(p){l=Promise.reject(p)}var f=o&&o.catchHandler;return l instanceof Promise&&(this._catchHandler||f)&&(l=l.catch(function(){var e=E(_().mark((function e(i){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!f){e.next=11;break}return e.prev=2,e.next=5,f.handle({url:a,request:r,event:n,params:c});case 5:return e.abrupt("return",e.sent);case 8:e.prev=8,e.t0=e.catch(2),e.t0 instanceof Error&&(i=e.t0);case 11:if(!t._catchHandler){e.next=14;break}return e.abrupt("return",t._catchHandler.handle({url:a,request:r,event:n}));case 14:throw i;case 15:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}())),l}}}},{key:"findMatchingRoute",value:function(e){var t,r=e.url,n=e.sameOrigin,a=e.request,i=e.event,s=O(this._routes.get(a.method)||[]);try{for(s.s();!(t=s.n()).done;){var c=t.value,o=void 0,u=c.match({url:r,sameOrigin:n,request:a,event:i});if(u)return o=u,(Array.isArray(o)&&0===o.length||u.constructor===Object&&0===Object.keys(u).length||"boolean"===typeof u)&&(o=void 0),{route:c,params:o}}}catch(h){s.e(h)}finally{s.f()}return{}}},{key:"setDefaultHandler",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";this._defaultHandlerMap.set(t,te(e))}},{key:"setCatchHandler",value:function(e){this._catchHandler=te(e)}},{key:"registerRoute",value:function(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}},{key:"unregisterRoute",value:function(e){if(!this._routes.has(e.method))throw new y("unregister-route-but-not-found-with-method",{method:e.method});var t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new y("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}]),e}(),ie=function(){return ee||((ee=new ae).addFetchListener(),ee.addCacheListener()),ee};function se(e,t,r){var n;if("string"===typeof e){var a=new URL(e,location.href);n=new re((function(e){return e.url.href===a.href}),t,r)}else if(e instanceof RegExp)n=new ne(e,t,r);else if("function"===typeof e)n=new re(e,t,r);else{if(!(e instanceof re))throw new y("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});n=e}return ie().registerRoute(n),n}function ce(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=function(){var r=a[n];t.some((function(e){return e.test(r)}))&&e.searchParams.delete(r)},n=0,a=F(e.searchParams.keys());n<a.length;n++)r();return e}var oe=function(e){o(r,e);var t=f(r);function r(e,n){s(this,r);return t.call(this,(function(t){var r,a=t.request,i=e.getURLsToCacheKeys(),s=O(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.ignoreURLParametersMatching,n=void 0===r?[/^utm_/,/^fbclid$/]:r,a=t.directoryIndex,i=void 0===a?"index.html":a,s=t.cleanURLs,c=void 0===s||s,o=t.urlManipulation;return _().mark((function t(){var r,a,s,u,h,l,f,p;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new URL(e,location.href)).hash="",t.next=4,r.href;case 4:return a=ce(r,n),t.next=7,a.href;case 7:if(!i||!a.pathname.endsWith("/")){t.next=12;break}return(s=new URL(a.href)).pathname+=i,t.next=12,s.href;case 12:if(!c){t.next=17;break}return(u=new URL(a.href)).pathname+=".html",t.next=17,u.href;case 17:if(!o){t.next=36;break}h=o({url:r}),l=O(h),t.prev=20,l.s();case 22:if((f=l.n()).done){t.next=28;break}return p=f.value,t.next=26,p.href;case 26:t.next=22;break;case 28:t.next=33;break;case 30:t.prev=30,t.t0=t.catch(20),l.e(t.t0);case 33:return t.prev=33,l.f(),t.finish(33);case 36:case"end":return t.stop()}}),t,null,[[20,30,33,36]])}))()}(a.url,n));try{for(s.s();!(r=s.n()).done;){var c=r.value,o=i.get(c);if(o)return{cacheKey:o,integrity:e.getIntegrityForCacheKey(o)}}}catch(u){s.e(u)}finally{s.f()}}),e.strategy)}return i(r)}(re);function ue(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function he(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function le(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?he(Object(r),!0).forEach((function(t){ue(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):he(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var fe,pe,ve=function(e,t){return t.some((function(t){return e instanceof t}))};var de=new WeakMap,ye=new WeakMap,be=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={get:function(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return ye.get(e);if("objectStoreNames"===t)return e.objectStoreNames||be.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return _e(e[t])},set:function(e,t,r){return e[t]=r,!0},has:function(e,t){return e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e}};function we(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(pe||(pe=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.apply(Re(this),r),_e(de.get(this))}:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _e(e.apply(Re(this),r))}:function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];var i=e.call.apply(e,[Re(this),t].concat(n));return be.set(i,t.sort?t.sort():[t]),_e(i)}}function ke(e){return"function"===typeof e?we(e):(e instanceof IDBTransaction&&function(e){if(!ye.has(e)){var t=new Promise((function(t,r){var n=function(){e.removeEventListener("complete",a),e.removeEventListener("error",i),e.removeEventListener("abort",i)},a=function(){t(),n()},i=function(){r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",i),e.addEventListener("abort",i)}));ye.set(e,t)}}(e),ve(e,fe||(fe=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,xe):e)}function _e(e){if(e instanceof IDBRequest)return function(e){var t=new Promise((function(t,r){var n=function(){e.removeEventListener("success",a),e.removeEventListener("error",i)},a=function(){t(_e(e.result)),n()},i=function(){r(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",i)}));return t.then((function(t){t instanceof IDBCursor&&de.set(t,e)})).catch((function(){})),me.set(t,e),t}(e);if(ge.has(e))return ge.get(e);var t=ke(e);return t!==e&&(ge.set(e,t),me.set(t,e)),t}var Re=function(e){return me.get(e)};function Ee(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.blocked,a=r.upgrade,i=r.blocking,s=r.terminated,c=indexedDB.open(e,t),o=_e(c);return a&&c.addEventListener("upgradeneeded",(function(e){a(_e(c.result),e.oldVersion,e.newVersion,_e(c.transaction),e)})),n&&c.addEventListener("blocked",(function(e){return n(e.oldVersion,e.newVersion,e)})),o.then((function(e){s&&e.addEventListener("close",(function(){return s()})),i&&e.addEventListener("versionchange",(function(e){return i(e.oldVersion,e.newVersion,e)}))})).catch((function(){})),o}var Le=["get","getKey","getAll","getAllKeys","count"],Ce=["put","add","delete","clear"],Oe=new Map;function je(e,t){if(e instanceof IDBDatabase&&!(t in e)&&"string"===typeof t){if(Oe.get(t))return Oe.get(t);var r=t.replace(/FromIndex$/,""),n=t!==r,a=Ce.includes(r);if(r in(n?IDBIndex:IDBObjectStore).prototype&&(a||Le.includes(r))){var i=function(){var e=E(_().mark((function e(t){var i,s,c,o,u,h,l=arguments;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(s=this.transaction(t,a?"readwrite":"readonly"),c=s.store,o=l.length,u=new Array(o>1?o-1:0),h=1;h<o;h++)u[h-1]=l[h];return n&&(c=c.index(u.shift())),e.next=6,Promise.all([(i=c)[r].apply(i,u),a&&s.done]);case 6:return e.abrupt("return",e.sent[0]);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}();return Oe.set(t,i),i}}}xe=function(e){return le(le({},e),{},{get:function(t,r,n){return je(t,r)||e.get(t,r,n)},has:function(t,r){return!!je(t,r)||e.has(t,r)}})}(xe);r(404);var Se="cache-entries",Pe=function(e){var t=new URL(e,location.href);return t.hash="",t.href},Te=function(){function e(t){s(this,e),this._db=null,this._cacheName=t}return i(e,[{key:"_upgradeDb",value:function(e){var t=e.createObjectStore(Se,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}},{key:"_upgradeDbAndDeleteOldDbs",value:function(e){this._upgradeDb(e),this._cacheName&&function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).blocked,r=indexedDB.deleteDatabase(e);t&&r.addEventListener("blocked",(function(e){return t(e.oldVersion,e)})),_e(r).then((function(){}))}(this._cacheName)}},{key:"setTimestamp",value:function(){var e=E(_().mark((function e(t,r){var n,a,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Pe(t),n={url:t,timestamp:r,cacheName:this._cacheName,id:this._getId(t)},e.next=4,this.getDb();case 4:return a=e.sent,i=a.transaction(Se,"readwrite",{durability:"relaxed"}),e.next=8,i.store.put(n);case 8:return e.next=10,i.done;case 10:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"getTimestamp",value:function(){var e=E(_().mark((function e(t){var r,n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getDb();case 2:return r=e.sent,e.next=5,r.get(Se,this._getId(t));case 5:return n=e.sent,e.abrupt("return",null===n||void 0===n?void 0:n.timestamp);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"expireEntries",value:function(){var e=E(_().mark((function e(t,r){var n,a,i,s,c,o,u,h,l;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getDb();case 2:return n=e.sent,e.next=5,n.transaction(Se).store.index("timestamp").openCursor(null,"prev");case 5:a=e.sent,i=[],s=0;case 8:if(!a){e.next=16;break}return(c=a.value).cacheName===this._cacheName&&(t&&c.timestamp<t||r&&s>=r?i.push(a.value):s++),e.next=13,a.continue();case 13:a=e.sent,e.next=8;break;case 16:o=[],u=0,h=i;case 18:if(!(u<h.length)){e.next=26;break}return l=h[u],e.next=22,n.delete(Se,l.id);case 22:o.push(l.url);case 23:u++,e.next=18;break;case 26:return e.abrupt("return",o);case 27:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_getId",value:function(e){return this._cacheName+"|"+Pe(e)}},{key:"getDb",value:function(){var e=E(_().mark((function e(){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._db){e.next=4;break}return e.next=3,Ee("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)});case 3:this._db=e.sent;case 4:return e.abrupt("return",this._db);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),qe=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s(this,e),this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=r.maxEntries,this._maxAgeSeconds=r.maxAgeSeconds,this._matchOptions=r.matchOptions,this._cacheName=t,this._timestampModel=new Te(t)}return i(e,[{key:"expireEntries",value:function(){var e=E(_().mark((function e(){var t,r,n,a,i,s;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isRunning){e.next=3;break}return this._rerunRequested=!0,e.abrupt("return");case 3:return this._isRunning=!0,t=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,e.next=7,this._timestampModel.expireEntries(t,this._maxEntries);case 7:return r=e.sent,e.next=10,self.caches.open(this._cacheName);case 10:n=e.sent,a=O(r),e.prev=12,a.s();case 14:if((i=a.n()).done){e.next=20;break}return s=i.value,e.next=18,n.delete(s,this._matchOptions);case 18:e.next=14;break;case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(12),a.e(e.t0);case 25:return e.prev=25,a.f(),e.finish(25);case 28:0,this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,q(this.expireEntries()));case 31:case"end":return e.stop()}}),e,this,[[12,22,25,28]])})));return function(){return e.apply(this,arguments)}}()},{key:"updateTimestamp",value:function(){var e=E(_().mark((function e(t){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,this._timestampModel.setTimestamp(t,Date.now());case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"isURLExpired",value:function(){var e=E(_().mark((function e(t){var r,n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._maxAgeSeconds){e.next=6;break}e.next=3;break;case 3:return e.abrupt("return",!1);case 6:return e.next=8,this._timestampModel.getTimestamp(t);case 8:return r=e.sent,n=Date.now()-1e3*this._maxAgeSeconds,e.abrupt("return",void 0===r||r<n);case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"delete",value:function(){var e=E(_().mark((function e(){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._rerunRequested=!1,e.next=3,this._timestampModel.expireEntries(1/0);case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),De=function(){function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s(this,e),this.cachedResponseWillBeUsed=function(){var e=E(_().mark((function e(r){var n,a,i,s,c,o,u;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.event,a=r.request,i=r.cacheName,s=r.cachedResponse){e.next=3;break}return e.abrupt("return",null);case 3:if(c=t._isResponseDateFresh(s),q((o=t._getCacheExpiration(i)).expireEntries()),u=o.updateTimestamp(a.url),n)try{n.waitUntil(u)}catch(h){0}return e.abrupt("return",c?s:null);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.cacheDidUpdate=function(){var e=E(_().mark((function e(r){var n,a,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.cacheName,a=r.request,i=t._getCacheExpiration(n),e.next=5,i.updateTimestamp(a.url);case 5:return e.next=7,i.expireEntries();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this._config=r,this._maxAgeSeconds=r.maxAgeSeconds,this._cacheExpirations=new Map,r.purgeOnQuotaError&&function(e){b.add(e)}((function(){return t.deleteCacheAndMetadata()}))}return i(e,[{key:"_getCacheExpiration",value:function(e){if(e===k())throw new y("expire-custom-caches-only");var t=this._cacheExpirations.get(e);return t||(t=new qe(e,this._config),this._cacheExpirations.set(e,t)),t}},{key:"_isResponseDateFresh",value:function(e){if(!this._maxAgeSeconds)return!0;var t=this._getDateHeaderTimestamp(e);return null===t||t>=Date.now()-1e3*this._maxAgeSeconds}},{key:"_getDateHeaderTimestamp",value:function(e){if(!e.headers.has("date"))return null;var t=e.headers.get("date"),r=new Date(t).getTime();return isNaN(r)?null:r}},{key:"deleteCacheAndMetadata",value:function(){var e=E(_().mark((function e(){var t,r,n,a,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=O(this._cacheExpirations),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=11;break}return n=B(r.value,2),a=n[0],i=n[1],e.next=7,self.caches.delete(a);case 7:return e.next=9,i.delete();case 9:e.next=3;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),t.e(e.t0);case 16:return e.prev=16,t.f(),e.finish(16);case 19:this._cacheExpirations=new Map;case 20:case"end":return e.stop()}}),e,this,[[1,13,16,19]])})));return function(){return e.apply(this,arguments)}}()}]),e}();var Ue,Ne=function(e){o(r,e);var t=f(r);function r(){return s(this,r),t.apply(this,arguments)}return i(r,[{key:"_handle",value:function(){var e=E(_().mark((function e(t,r){var n,a;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return[],e.next=4,r.cacheMatch(t);case 4:if(n=e.sent,a=void 0,n){e.next=20;break}return e.prev=8,e.next=11,r.fetchAndCachePut(t);case 11:n=e.sent,e.next=17;break;case 14:e.prev=14,e.t0=e.catch(8),e.t0 instanceof Error&&(a=e.t0);case 17:0,e.next=21;break;case 20:0;case 21:if(n){e.next=24;break}throw new y("no-response",{url:t.url,error:a});case 24:return e.abrupt("return",n);case 25:case"end":return e.stop()}}),e,this,[[8,14]])})));return function(t,r){return e.apply(this,arguments)}}()}]),r}(Q),Ie={cacheWillUpdate:function(){var e=E(_().mark((function e(t){var r;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(200!==(r=t.response).status&&0!==r.status){e.next=3;break}return e.abrupt("return",r);case 3:return e.abrupt("return",null);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},Ae=function(e){o(r,e);var t=f(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(this,r),(e=t.call(this,n)).plugins.some((function(e){return"cacheWillUpdate"in e}))||e.plugins.unshift(Ie),e}return i(r,[{key:"_handle",value:function(){var e=E(_().mark((function e(t,r){var n,a,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return[],n=r.fetchAndCachePut(t).catch((function(){})),r.waitUntil(n),e.next=6,r.cacheMatch(t);case 6:if(!(a=e.sent)){e.next=11;break}0,e.next=21;break;case 11:return e.prev=12,e.next=15,n;case 15:a=e.sent,e.next=21;break;case 18:e.prev=18,e.t0=e.catch(12),e.t0 instanceof Error&&(i=e.t0);case 21:if(a){e.next=24;break}throw new y("no-response",{url:t.url,error:i});case 24:return e.abrupt("return",a);case 25:case"end":return e.stop()}}),e,this,[[12,18]])})));return function(t,r){return e.apply(this,arguments)}}()}]),r}(Q);(function(e){Z().precache(e)})(([{'revision':'c0a18d47eab63501394f522e60397014','url':'/.well-known/service/static/index.html'},{'revision':'0e898c13dd6acc261bd8e1c685957057','url':'/.well-known/service/static/router-template-styles/fonts/lato-latin-400-normal.woff'},{'revision':'e1b3b5908c9cf23dfb2b9c52b9a023ab','url':'/.well-known/service/static/router-template-styles/fonts/lato-latin-400-normal.woff2'},{'revision':'cf01af70a3ae9a494a729f504c43804e','url':'/.well-known/service/static/router-template-styles/fonts/lato-latin-ext-400-normal.woff'},{'revision':'4bde07f991ba6af69a1e009fd7ce9d1a','url':'/.well-known/service/static/router-template-styles/fonts/lato-latin-ext-400-normal.woff2'},{'revision':'6a0b64dd716576afb1ef9217bfe20439','url':'/.well-known/service/static/router-template-styles/styles.css'},{'revision':null,'url':'/.well-known/service/static/static/css/3154.e954fcda.chunk.css'},{'revision':null,'url':'/.well-known/service/static/static/css/5355.c4fb5c4a.chunk.css'},{'revision':null,'url':'/.well-known/service/static/static/css/5982.ac464505.chunk.css'},{'revision':null,'url':'/.well-known/service/static/static/css/7272.0ae9f678.chunk.css'},{'revision':null,'url':'/.well-known/service/static/static/css/main.7ea79dc8.css'},{'revision':null,'url':'/.well-known/service/static/static/js/1132.c008fe16.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/1480.f89236fc.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/1546.05fce5c0.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/1565.f2e6e45e.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/1614.80ddb35a.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/1660.e2ff5a21.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/1760.3318c7ca.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/1980.79862e88.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/2291.80adfd96.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/2393.9c045444.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/252.8dd19212.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/2631.54f86f84.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/2653.58a5430b.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/2664.a42cbb96.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/2686.3a7c583a.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/3179.03c92dcb.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/3551.a3cfa6aa.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/3593.98d9341a.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/3595.d4510796.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/4023.f88d8f4b.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/4164.5adbbbba.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/4212.d2a239de.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/4319.8d9e189e.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/445.90a9dfcd.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/4682.23dd054e.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/4716.58477c5c.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/4764.51208c0d.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5176.9f08e927.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5355.2eaad302.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5434.523d071d.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5465.f32033e1.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5541.581f1db7.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5645.3c5c0f93.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5683.46331372.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/576.d7d4814e.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5848.487098c8.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5859.b3338b24.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5960.6c234993.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/5982.19c5663f.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/617.ecc73170.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6186.e711ab85.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6326.3a3cb154.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6378.29466d9e.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6700.e22cc266.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6711.38948be4.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6737.6432760e.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6771.583c16c9.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6856.163537c7.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6869.08bd3d6f.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/6921.2f39f974.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/7.b3c58209.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/7006.b21fb368.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/7272.608c5875.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/7606.25231f8c.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/8143.6b921364.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/8365.f20d6e52.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/8437.0d88b9db.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/8527.437a8769.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/861.a19bf499.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/878.4424e6e9.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/9102.7087c66c.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/9107.967c2ac1.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/926.d1421ce1.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/9260.d8f59a75.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/9409.0d5d4de2.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/9620.4b7c9e8b.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/9657.e974d577.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/9899.18509ac9.chunk.js'},{'revision':null,'url':'/.well-known/service/static/static/js/main.e29a7133.js'},{'revision':'e3bc0515e1d125463e42435a231a6aa2','url':'/.well-known/service/static/static/media/empty-space-nft.3878bc5c8ba6490ef5075fdda24be921.svg'},{'revision':null,'url':'/.well-known/service/static/static/media/lato-all-400-normal.3dc1eff492ab1f598560.woff'},{'revision':null,'url':'/.well-known/service/static/static/media/lato-all-700-normal.1e7707c9ec98d9b97e7f.woff'},{'revision':null,'url':'/.well-known/service/static/static/media/lato-latin-400-normal.be36596da218e1eec01c.woff2'},{'revision':null,'url':'/.well-known/service/static/static/media/lato-latin-700-normal.8f28e0e1fdb195149f1c.woff2'},{'revision':null,'url':'/.well-known/service/static/static/media/lato-latin-ext-400-normal.361f3dbb9db6a5980326.woff2'},{'revision':null,'url':'/.well-known/service/static/static/media/lato-latin-ext-700-normal.9c8812eaec45956201e1.woff2'},{'revision':'893e153699e6c3cbf74132eacdb77fa6','url':'/.well-known/service/static/static/media/space-connected.9a4e18fd2bc7d065191b0d241a131c28.svg'},{'revision':'1eb1b65118c541eb7f5453294a9d8e77','url':'/.well-known/service/static/static/media/studio.f849ff5763d19a78ada7fdeea249f819.svg'},{'revision':null,'url':'/.well-known/service/static/static/media/ubuntu-mono-all-400-normal.c879328bc62e9c68268f.woff'},{'revision':null,'url':'/.well-known/service/static/static/media/ubuntu-mono-cyrillic-400-normal.c367f416832eb8f1b846.woff2'},{'revision':null,'url':'/.well-known/service/static/static/media/ubuntu-mono-cyrillic-ext-400-normal.eda1c4946b1f7bf58386.woff2'},{'revision':null,'url':'/.well-known/service/static/static/media/ubuntu-mono-greek-400-normal.22f3bfc91f79c342bdf4.woff2'},{'revision':null,'url':'/.well-known/service/static/static/media/ubuntu-mono-greek-ext-400-normal.b3459900ea8a25d1f7c2.woff2'},{'revision':null,'url':'/.well-known/service/static/static/media/ubuntu-mono-latin-400-normal.18e32d9d743af28f913e.woff2'},{'revision':null,'url':'/.well-known/service/static/static/media/ubuntu-mono-latin-ext-400-normal.b56e2315611d10838ad5.woff2'}]||[]).filter((function(e){return"/"!==e.url&&!e.url.includes("index.html")}))),function(e){var t=Z();se(new oe(t,e))}(Ue),self.addEventListener("activate",(function(){return self.clients.claim()})),self.addEventListener("activate",(function(){console.log("Service Worker activated")})),self.addEventListener("install",(function(e){console.log("Service Worker installed"),e.waitUntil(self.skipWaiting())}));var Me=function(e){return"GET"!==e.method||(!!e.url.includes("/api")||(!!e.url.includes("__meta__.js")||!!e.url.includes("__blocklet__.js")))};se((function(e){var t=e.request;return!Me(t)&&t.url.includes("/static/")}),new Ne({cacheName:"static",plugins:[new De({maxEntries:200})]})),se((function(e){var t=e.request;return!Me(t)&&(t.url.includes("/images/")||t.url.includes("/router/-template-styles/"))}),new Ae)}()}();
|
|
3
3
|
//# sourceMappingURL=service-worker.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[5355],{92746:function(e,n,t){var r,i=t(71171),o=t(33028),a=t(59740),s=t(16380),l=t(50442),c=t(37574),d=["labelProps","className","style"];function u(e){var n=e.labelProps,t=e.className,r=e.style,i=(0,a.Z)(e,d),s=(0,o.Z)((0,o.Z)({},n),{},{labelPlacement:(null===n||void 0===n?void 0:n.labelPlacement)||"start"});return(0,c.jsx)(p,{className:t,style:r,children:(0,c.jsx)(l.Z,(0,o.Z)({labelProps:s},i))})}u.propTypes=l.Z.propTypes,u.defaultProps=l.Z.defaultProps;var p=s.default.div(r||(r=(0,i.Z)(["\n max-width: 300px;\n > label {\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n }\n "," {\n max-width: 100%;\n }\n"])),(function(e){return e.theme.breakpoints.down("sm")}));n.Z=u},29733:function(e,n,t){t.r(n),t.d(n,{default:function(){return St}});var r=t(71171),i=t(33028),o=t(96234),a=t(59740),s=t(68079),l=t(30969),c=t(16380),d=t(24974),u=t.n(d),p=t(95973),f=t(19611),m=t.n(f),h=t(20244),x=t(38361),v=t(3994),Z=t(79823),g=t(64689),j=t(99254),b=t(76527),y=t(85385),k=t(52838),C=t(23038),w=t(86822),S=t(47333),L=t(19865),E=t(7017),P=t(70998),A=t(84802),_=t(32723),T=t(34795),O=t(46292),R=t.n(O),N=t(15888),I=t.n(N),B=t(94702),D=t(34159),F=t(75295),z=t(3715),U=t(94551),K=t(6779),W=t(29996),q=t(78789),G=t(87862),V=t(13134),M=t(59505),H=t(94984),Y=t(67019),J=t(94308),Q=t(88581),X=t(27724),$=t(2689),ee=t(39130),ne=t(7173),te=t(14458),re=t(28412),ie=t(76934),oe=t(37574),ae=["label","disabled","required","initialValue","onChange","style","onSubmit","triggers","options","formatterBeforeSubmit"],se={PaperProps:{style:{maxHeight:224,width:250}}},le=function(e,n,t){return{fontWeight:-1===n.indexOf(e)?t.typography.fontWeightRegular:t.typography.fontWeightMedium}};function ce(e){var n=e.label,t=e.disabled,r=e.required,s=e.initialValue,c=e.onChange,d=e.style,u=e.onSubmit,p=e.triggers,f=e.options,m=e.formatterBeforeSubmit,h=(0,a.Z)(e,ae),v=(0,B.Z)(),Z=(0,l.useState)(!1),g=(0,o.Z)(Z,2),j=g[0],b=g[1],y=(0,l.useState)(!1),k=(0,o.Z)(y,2),C=k[0],w=k[1],S=(0,l.useState)(s),L=(0,o.Z)(S,2),E=L[0],P=L[1],A=(0,l.useState)(E),O=(0,o.Z)(A,2),R=O[0],N=O[1],I=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(){return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(!0),e.prev=1,e.next=4,u("function"===typeof m?m(R):R);case 4:!1===e.sent?N(E):(N(R),P(R)),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),N(E);case 11:return e.prev=11,w(!1),b(!1),e.finish(11);case 15:case"end":return e.stop()}}),e,null,[[1,8,11,15]])})));return function(){return e.apply(this,arguments)}}(),D=j?(0,oe.jsx)(ee.Z,(0,i.Z)((0,i.Z)({value:R,onChange:function(e){var n=e.target.value;n="string"===typeof n?n.split(","):n,N(n),c(n)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",renderValue:function(e){return(0,oe.jsx)(x.Z,{sx:{display:"flex",flexWrap:"wrap"},children:e.filter((function(e){return f.some((function(n){return n.code===e}))})).map((function(e){return(0,oe.jsx)(ne.Z,{label:f.find((function(n){return n.code===e})).name,style:{marginRight:8},size:"small"},e)}))})},MenuProps:se},h),{},{children:f.map((function(e){return(0,oe.jsx)($.Z,{value:e.code,style:le(e.code,R,v),children:e.name},e.code)}))})):(0,oe.jsx)(x.Z,{px:1,className:"form-item-input slot",style:{whiteSpace:"pre-wrap"},children:R.filter((function(e){return f.some((function(n){return n.code===e}))})).map((function(e){return(0,oe.jsx)(ne.Z,{label:f.find((function(n){return n.code===e})).name,style:{marginRight:8},size:"small"},e)}))});return(0,oe.jsx)(re.Z,{className:"form",style:d,children:(0,oe.jsxs)(x.Z,{className:"form-item",children:[(0,oe.jsxs)(x.Z,{className:"form-item-label",children:[n,r&&(0,oe.jsx)(te.Z,{})]}),(0,oe.jsxs)(x.Z,{className:"form-item-body",children:[(0,oe.jsx)(x.Z,{className:"form-item-input",children:D}),(0,oe.jsx)(x.Z,{className:"form-item-action",children:j?(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(U.Z,{"data-cy":"schema-form-item-confirm",onClick:I,disabled:t||C,size:"large",children:C?(0,oe.jsx)(J.Z,{size:24}):(0,oe.jsx)(X.Z,{})}),(0,oe.jsx)(U.Z,{"data-cy":"schema-form-item-cancel",onClick:function(){N(E),b(!1)},disabled:t||C,size:"large",children:(0,oe.jsx)(Q.default,{})})]}):(0,oe.jsx)(ie.Z,{triggers:p,onEnterEdit:function(){return b(!0)},disabled:t})})]})]})})}ce.propTypes={style:u().object,onSubmit:u().func,onChange:u().func,label:u().string,initialValue:u().string,required:u().bool,disabled:u().bool,triggers:u().array,options:u().array,formatterBeforeSubmit:u().func},ce.defaultProps={style:{},onSubmit:function(){},onChange:function(){},label:"",initialValue:"",required:!1,disabled:!1,triggers:[],options:[],formatterBeforeSubmit:function(e){return e.join(",")}};var de=t(41395),ue=t(24891),pe=t(19066),fe=t(22572),me=t(51531),he=t(33359),xe=t(87006),ve=t(8479),Ze=t(52654);function ge(e){var n=e.id,t=e.children,r=e.title,a=e.teamDid,s=(0,S.PE)().t,c=(0,de.h6)().api,d=(0,l.useState)(!1),u=(0,o.Z)(d,2),p=u[0],f=u[1],m=(0,l.useState)(null),h=(0,o.Z)(m,2),x=h[0],v=h[1],Z=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(t){return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!p){e.next=2;break}return e.abrupt("return");case 2:return f(!0),e.prev=3,e.next=6,c.addDomainAlias({input:{id:n,domainAlias:(0,Ze.sf)(t.domain),teamDid:a}});case 6:return e.next=8,(0,ue._v)(2e3);case 8:v(null);case 9:return e.prev=9,f(!1),e.finish(9);case 12:case"end":return e.stop()}}),e,null,[[3,,9,12]])})));return function(n){return e.apply(this,arguments)}}(),g=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(n,t,r){return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t(n);case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),r((0,ue.Z)(e.t0));case 8:return e.prev=8,f(!1),e.finish(8);case 11:case"end":return e.stop()}}),e,null,[[0,5,8,11]])})));return function(n,t,r){return e.apply(this,arguments)}}(),j={title:r||s("router.domainAlias.add.title"),description:function(e,n,t){return(0,oe.jsx)(he.Z,{component:"div",children:(0,oe.jsx)(xe.Z,{label:s("router.domainAlias.add.domainDescription"),helperText:s("router.domainAlias.add.helperText"),autoComplete:"off",variant:"outlined",name:"domain","data-cy":"add-domain",fullWidth:!0,autoFocus:!0,inputProps:{"data-cy":"domain-name-input"},value:e.domain,style:{marginBottom:8},margin:"dense",onChange:function(r){var o=r.target.value.trim(),a=(0,Ze.ub)(o,s);n((0,i.Z)((0,i.Z)({},e),{},{domain:o,__disableConfirm:!!a})),t(a||"")},onKeyPress:function(n){if("Enter"===n.key){n.preventDefault();var r=n.target.value.trim(),i=(0,Ze.ub)(r,s);i?t(i):g(e,Z,t)}}})})},confirm:s("common.confirm"),cancel:s("common.cancel"),params:{domain:"",__disableConfirm:!0},onConfirm:Z,onCancel:function(){f(!1),v(null)}},b=function(e){e.stopPropagation(),v(j)};return(0,oe.jsxs)(oe.Fragment,{children:["function"===typeof t?t({loading:p,open:b}):(0,oe.jsxs)($.Z,{onClick:b,className:"rule-action","data-cy":"action-add-domain-alias",children:[p?(0,oe.jsx)(J.Z,{size:16}):(0,oe.jsx)(me.Z,{style:{fontSize:18,marginRight:5}}),s("router.domainAlias.add.title")]}),x&&(0,oe.jsx)(ve.Z,{title:x.title,description:x.description,confirm:x.confirm,cancel:x.cancel,params:x.params,onConfirm:x.onConfirm,onCancel:x.onCancel,color:"primary",loading:p})]})}ge.propTypes={id:u().string.isRequired,children:u().any,title:u().string,teamDid:u().string},ge.defaultProps={children:null,title:"",teamDid:""};var je=t(89308),be=t(93310),ye=t(86008),ke=t(10814),Ce=t(80714);function we(e){var n=(0,S.PE)().t,t=(0,l.useState)(!1),r=(0,o.Z)(t,2),i=r[0],a=r[1],s=(0,l.useState)(null),c=(0,o.Z)(s,2),d=c[0],u=c[1],p=e.id,f=e.domain,m=e.children,h=e.teamDid,x=(0,de.h6)().api,v=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(){return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a(!0),e.prev=1,e.next=4,x.deleteDomainAlias({input:{id:p,domainAlias:f,teamDid:h}});case 4:return e.next=6,(0,ue._v)(2e3);case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),H.Z.error(e.t0.message);case 11:return e.prev=11,u(null),a(!1),e.finish(11);case 15:case"end":return e.stop()}}),e,null,[[1,8,11,15]])})));return function(){return e.apply(this,arguments)}}(),Z={title:n("router.domainAlias.delete.title"),description:n("router.domainAlias.delete.description"),confirm:n("common.confirm"),onConfirm:v,onCancel:function(){a(!1),u(null)}},g=function(e){e.stopPropagation(),u(Z)};return(0,oe.jsxs)(oe.Fragment,{children:["function"===typeof m?m({loading:i,open:g}):(0,oe.jsxs)(W.Z,{edge:"end",onClick:g,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[i?(0,oe.jsx)(J.Z,{size:16}):(0,oe.jsx)(ke.default,{style:{fontSize:16}}),n("router.domainAlias.delete.title")]}),d&&(0,oe.jsx)(ve.Z,{title:d.title,description:d.description,confirm:d.confirm,params:d.params,onConfirm:d.onConfirm,onCancel:d.onCancel})]})}function Se(e){var n=e.site,t=e.domain,r=e.blocklet,i=(0,S.PE)().t,o=t.value===window.location.hostname;return(0,oe.jsx)(Ce.Z,{"data-cy":"domain-actions",actions:[function(e){var a,s=e.close;return(0,oe.jsx)(we,{id:n.id,domain:t.value,teamDid:null===r||void 0===r||null===(a=r.meta)||void 0===a?void 0:a.did,children:function(e){var n=e.open;return(0,oe.jsx)(K.Z,{title:o?i("blocklet.router.currentDomainTip"):"",children:(0,oe.jsx)("span",{children:(0,oe.jsxs)($.Z,{disabled:t.isProtected||o,dense:!0,onClick:function(e){s(),n(e)},"data-cy":"action-toggle-block",children:[(0,oe.jsx)(be.Z,{style:{minWidth:24,marginRight:8},children:(0,oe.jsx)(ke.default,{})}),(0,oe.jsx)(ye.Z,{primary:i("common.delete")})]},"remove")})})}})}]})}we.propTypes={id:u().string.isRequired,domain:u().string.isRequired,children:u().any,teamDid:u().string},we.defaultProps={children:null,teamDid:""},Se.propTypes={site:u().object.isRequired,domain:u().object.isRequired,blocklet:u().object.isRequired},Se.defaultProps={};var Le,Ee=t(43178),Pe=t(50007),Ae=t(77370),_e=t(45008);function Te(e){var n=e.initialValue,t=e.onChange,r=e.disabled,i=e.loading,a=(0,S.PE)().t,s=(0,Ae.T)().api,l=(0,_e.y0)().blocklet,c=(0,Ee.Z)({newAppSk:"",isConnectOpen:!1}),d=(0,o.Z)(c,2),u=d[0],p=d[1],f=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(n){return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t(n);case 3:return e.prev=3,p({newAppSk:""}),e.finish(3);case 6:case"end":return e.stop()}}),e,null,[[0,,3,6]])})));return function(n){return e.apply(this,arguments)}}(),m=function(){return p({isConnectOpen:!1})},v=l.structVersion===h.APP_STRUCT_VERSION?[{key:"rotate-with-did-wallet",title:"Migrate with DID Wallet",handler:function(){(0,ue.An)(l.status)?H.Z.error(a("blocklet.error.isRunning")):(0,E.isInProgress)(l.status)?H.Z.error(a("blocklet.error.isInProgress")):p({isConnectOpen:!0})}}]:[];return[(0,oe.jsx)(Y.Z,{disabled:r,loading:i,initialValue:n,onSubmit:function(e){return p({newAppSk:e}),!1},triggers:v,secure:!0}),u.newAppSk&&(0,oe.jsx)(ve.Z,{title:a("blocklet.config.appSkTitle"),description:(0,oe.jsxs)(x.Z,{children:[(0,oe.jsx)(x.Z,{children:a("blocklet.config.appSkChangeTip")}),(0,oe.jsx)(x.Z,{fontWeight:"bold",mt:2,children:a("blocklet.config.appDidChangeTip")}),(0,oe.jsxs)(Oe,{children:[(0,oe.jsx)("li",{children:a("blocklet.config.appDidChangeTipL1")}),(0,oe.jsx)("li",{children:a("blocklet.config.appDidChangeTipL2")})]})]}),confirm:a("confirm"),cancel:a("cancel"),onConfirm:function(){return f(u.newAppSk)},onCancel:function(){return p({newAppSk:""})}}),(0,oe.jsx)(Pe.default,{popup:!0,open:u.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:s.get,checkTimeout:3e5,onSuccess:m,extraParams:{appDid:l.appDid},messages:{title:a("setup.keyPair.title"),scan:a("setup.keyPair.scan"),confirm:a("setup.keyPair.confirm"),success:a("setup.keyPair.success")},onClose:m})]}Te.propTypes={initialValue:u().string,onChange:u().func,disabled:u().bool,loading:u().bool},Te.defaultProps={initialValue:"default",onChange:function(){},disabled:!1,loading:!1};var Oe=(0,c.default)("ul")(Le||(Le=(0,r.Z)(["\n padding-left: 16px;\n li {\n margin-top: 8px;\n list-style: disk;\n font-weight: bold;\n }\n"]))),Re=t(22073),Ne=t(23299),Ie=["domain","domainStatus"],Be=function(e){return["waiting","creating","renewaling"].includes(e)};function De(e){var n,t=(0,S.PE)().t,r=(0,l.useState)(!1),i=(0,o.Z)(r,2),a=i[0],s=i[1],c=(0,l.useState)(null),d=(0,o.Z)(c,2),u=d[0],p=d[1],f=e.domain,m=e.onAdd,h=e.children,x=e.did,v=(0,de.h6)(),Z=v.api,g=v.ws.useSubscription,j=(0,l.useState)(!1),b=(0,o.Z)(j,2),y=b[0],k=b[1],C=(0,_e.y0)().actions.refreshDomainStatus,w=(0,Re.Z)((0,T.Z)((0,_.Z)().mark((function e(){var n,t;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z.findCertificateByDomain({input:{domain:f,did:x}});case 2:return n=e.sent,t=n.cert,e.abrupt("return",t);case 5:case"end":return e.stop()}}),e)})))),L=function(e,n){e.domain===f&&(k(!1),"success"===n?H.Z.success("The ".concat(e.domain," certificate is issued successfully")):"error"===n&&H.Z.error("Failed to issue certificate for ".concat(e.domain)))};if((0,l.useEffect)((function(){var e;!w.loading&&Be(null===(e=w.value)||void 0===e?void 0:e.status)&&k(!0)}),[w]),g(M.BlockletEvents.certError,(function(e){return L(e,"error")})),g(M.BlockletEvents.certIssued,(function(e){w.retry(),C(e.domain),L(e,"success")})),w.loading)return"";if("normal"===(null===(n=w.value)||void 0===n?void 0:n.status))return"";var E=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(){return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(!0),e.prev=1,e.next=4,Z.issueLetsEncryptCert({input:{domain:f,did:x}});case 4:m(),k(!0),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error(e.t0),k(!1);case 12:return e.prev=12,s(!1),p(null),e.finish(12);case 16:case"end":return e.stop()}}),e,null,[[1,8,12,16]])})));return function(){return e.apply(this,arguments)}}(),P={title:t("router.cert.genLetsEncryptCert.title"),description:(0,oe.jsxs)("div",{children:[(0,oe.jsx)(Ne.Z,{type:"success",children:t("router.cert.genLetsEncryptCert.dnsTip")}),t("router.cert.genLetsEncryptCert.description")]}),confirm:t("common.confirm"),onConfirm:E,onCancel:function(){s(!1),p(null)}};return(0,oe.jsxs)(oe.Fragment,{children:[y?(0,oe.jsx)(K.Z,{title:t("router.cert.issuing"),children:(0,oe.jsx)(J.Z,{size:12})}):h({loading:a,open:function(e){e.stopPropagation(),p(P)}}),u&&(0,oe.jsx)(ve.Z,{color:"primary",title:u.title,description:u.description,confirm:u.confirm,params:u.params,onConfirm:u.onConfirm,onCancel:u.onCancel})]})}function Fe(e){var n=e.domain,t=e.domainStatus,r=(0,a.Z)(e,Ie);return!(0,ue.rM)(n)||null!==t&&void 0!==t&&t.isHttps?"":(0,oe.jsx)(De,(0,i.Z)({domain:n},r))}De.propTypes={domain:u().string.isRequired,did:u().string.isRequired,onAdd:u().func,children:u().any},De.defaultProps={onAdd:function(){},children:null},Fe.propTypes={domain:u().string.isRequired,domainStatus:u().shape({isHttps:u().bool}).isRequired,did:u().string.isRequired,onAdd:u().func,children:u().any},Fe.defaultProps={onAdd:function(){},children:null};var ze,Ue=t(50496),Ke=t(43207),We=t(49884),qe=t(88876),Ge=t(73820),Ve=t(80670);function Me(e){var n=e.onCancel,t=e.onSuccess,r=e.onError,i=(0,l.useContext)(Ae.B).api,a=(0,l.useState)(!1),s=(0,o.Z)(a,2),c=s[0],d=s[1],u=(0,S.PE)(),p=u.t,f=u.locale,m=(0,l.useState)(""),h=(0,o.Z)(m,2),v=h[0],Z=h[1],g=(0,l.useState)(!1),j=(0,o.Z)(g,2),b=j[0],y=j[1],k=(0,l.useState)(0),C=(0,o.Z)(k,2),w=C[0],L=C[1],E=(0,l.useState)(""),P=(0,o.Z)(E,2),A=P[0],_=P[1],T=(0,Ve.DJ)().endpoint,O=(0,l.useState)(!1),R=(0,o.Z)(O,2),N=R[0],I=R[1],B=function(e){Z(null),d(!0);try{_(e.result),L(F.length-1)}catch(t){var n=(0,ue.Z)(t);Z(n),r(t)}finally{d(!1)}},D=function(){y(!1),L(0)},F=[{body:(0,oe.jsxs)(x.Z,{children:[(0,oe.jsx)(he.Z,{children:p("team.transferApp.transferDialog.tips.progress")}),(0,oe.jsx)(he.Z,{mt:3,mb:2,children:p("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:p("common.cancel"),confirm:p("team.transferApp.transferDialog.createTransferLink"),onCancel:n,onConfirm:function(){y(!0),L(1)}},{body:function(){return(0,oe.jsx)(Pe.default,{action:"transfer-app-owner",open:b,locale:f,checkFn:i.get,onClose:D,onSuccess:B,checkTimeout:3e5,extraParams:{},messages:{title:p("team.transferApp.connectDialog.title"),scan:p("team.transferApp.connectDialog.scan"),confirm:p("team.transferApp.connectDialog.confirm"),success:p("team.transferApp.connectDialog.success")},popup:!0})}},{body:function(){var e=(0,ue.VP)({transferId:A.transferId,endpoint:T});return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(x.Z,{component:Ye,dangerouslySetInnerHTML:{__html:p("team.transferApp.transferDialog.createSuccessTip1")}}),(0,oe.jsx)(x.Z,{component:Ye,mt:2,children:(0,oe.jsx)(Ye,{children:p("team.transferApp.transferDialog.createSuccessTip3")})}),(0,oe.jsxs)(x.Z,{children:[(0,oe.jsx)(x.Z,{component:Ye,mt:2,children:(0,oe.jsx)(Ye,{children:p("team.transferApp.transferDialog.createSuccessTip2",{expireDate:(0,ue.B2)(A.expireDate,f)})})}),(0,oe.jsx)(x.Z,{my:1,children:(0,oe.jsx)(Ge.Z,{children:e})})]}),(0,oe.jsx)("div",{children:(0,oe.jsx)(We.Z,{value:"end",control:(0,oe.jsx)(qe.Z,{checked:N,onChange:function(e){return I(e.target.checked)}}),label:p("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:p("common.confirm"),onConfirm:t}],z=F[w];return(0,oe.jsxs)(Ue.Z,{title:(0,oe.jsx)(Ye,{className:"title",children:p("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:(0,oe.jsxs)(oe.Fragment,{children:[z.cancel&&(0,oe.jsx)(W.Z,{onClick:z.onCancel,color:"inherit",children:z.cancel}),(0,oe.jsxs)(W.Z,{onClick:z.onConfirm,color:"error",disabled:c||w===F.length-1&&!N,variant:"contained",autoFocus:!0,children:[c&&(0,oe.jsx)(J.Z,{size:16}),z.confirm]})]}),children:[(0,oe.jsx)(Ke.Z,{component:"div",children:"function"===typeof z.body?z.body():z.body}),!!v&&(0,oe.jsx)(Ne.Z,{type:"error",variant:"icon",children:v})]})}Me.propTypes={onCancel:u().func.isRequired,onSuccess:u().func.isRequired,onError:u().func},Me.defaultProps={onError:function(){}};var He,Ye=c.default.div(ze||(ze=(0,r.Z)(["\n font-size: 16px;\n font-weight: bold;\n &.title {\n font-size: 20px;\n }\n"]))),Je=["blocklet","onUpdate","hasPermission"],Qe=Object.keys(M.SUPPORTED_LANGUAGES).map((function(e){return{code:e,name:M.SUPPORTED_LANGUAGES[e].nativeName}}));function Xe(e){var n,t=e.blocklet,r=e.onUpdate,s=e.hasPermission,c=(0,a.Z)(e,Je),d=(0,de.h6)(),u=(0,l.useContext)(S.RD).t,p=(0,l.useState)(""),f=(0,o.Z)(p,2),m=f[0],v=f[1],Z=(0,l.useState)(""),g=(0,o.Z)(Z,2),j=g[0],b=g[1],y=(0,l.useState)(!1),k=(0,o.Z)(y,2),C=k[0],w=k[1],L=(0,E.getWhoCanAccess)(t),P=null===t||void 0===t||null===(n=t.settings)||void 0===n?void 0:n.publicToStore,A=(0,B.Z)(),O=j||!s,N=d.inService,J=d.ws.useSubscription,Q=t.meta.did,X=t.site,$=(0,ue.oE)(null===X||void 0===X?void 0:X.domainAliases),ee=R()(t.meta,"capabilities.clusterMode",!1);if(J(h.EVENTS.NODE_RUNTIME_INFO,(function(e){ee&&v(R()(e,"cpu.physicalCores",""))})),(0,ue.wS)(t.status))return null;var ne=t.environments.find((function(e){return"BLOCKLET_DELETABLE"===e.key})),te=!ne||"yes"===ne.value,re=t.environments.find((function(e){return"BLOCKLET_APP_LANGUAGES"===e.key})),ie=t.environments.find((function(e){return"BLOCKLET_APP_URL"===e.key})),ae=t.environments.find((function(e){return"BLOCKLET_APP_LOGO_SQUARE"===e.key})),se=t.environments.find((function(e){return"BLOCKLET_APP_LOGO_RECT"===e.key})),le=t.environments.find((function(e){return"BLOCKLET_APP_LOGO_FAVICON"===e.key})),me=t.environments.find((function(e){return"BLOCKLET_APP_LOGO"===e.key})),he=[{key:M.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,description:u("blocklet.config.name"),value:t.environments.find((function(e){return"BLOCKLET_APP_NAME"===e.key})).value},{key:M.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,description:u("blocklet.config.description"),value:t.environments.find((function(e){return"BLOCKLET_APP_DESCRIPTION"===e.key})).value},{key:M.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL,description:u("blocklet.config.appUrl"),value:ie?ie.value:""},{key:M.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE,description:u("blocklet.config.logoSquare"),value:ae?ae.value:""},{key:M.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT,description:u("blocklet.config.logoRect"),value:se?se.value:""},{key:M.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON,description:u("blocklet.config.logoFavicon"),value:le?le.value:""},{key:M.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO,description:u("blocklet.config.logo"),value:me?me.value:""}];if(ee){var xe=t.configs.find((function(e){return e.key===M.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE})),ve=xe?xe.value:m;he.push({key:M.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE,description:u("blocklet.config.clusterSize"),value:ve,cpuCores:m})}var Ze=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(n){var i,o,a;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!j){e.next=2;break}return e.abrupt("return");case 2:return b(!0),e.prev=3,i=n.target.checked,e.next=7,d.api.configPublicToStore({input:{did:t.meta.did,publicToStore:i}});case 7:o=e.sent,a=o.blocklet,r(a),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),H.Z.error(e.t0.message);case 15:return e.prev=15,b(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[3,12,15,18]])})));return function(n){return e.apply(this,arguments)}}(),be=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(n,i){var o,a,s,l;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n!==M.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){e.next=5;break}if(!(o=(0,ue.I)({value:i,cpuCores:m}))){e.next=5;break}return H.Z.error(o),e.abrupt("return");case 5:return a=[{key:n,value:i}],e.prev=6,b(!0),e.next=10,d.api.configBlocklet({input:{did:t.meta.did,configs:a}});case 10:s=e.sent,l=s.blocklet,r(l),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(6),H.Z.error(e.t0.message);case 18:return e.prev=18,b(!1),e.finish(18);case 21:case"end":return e.stop()}}),e,null,[[6,15,18,21]])})));return function(n,t){return e.apply(this,arguments)}}(),ye=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(n){var i,o,a;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!j){e.next=2;break}return e.abrupt("return");case 2:return b(!0),e.prev=3,i=n.target.checked,e.next=7,d.api.configBlocklet({input:{did:t.meta.did,configs:[{key:M.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE,value:i?"no":"yes"}]}});case 7:o=e.sent,a=o.blocklet,r(a),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),H.Z.error(e.t0.message);case 15:return e.prev=15,b(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[3,12,15,18]])})));return function(n){return e.apply(this,arguments)}}(),ke=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(n){var r,i,o;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=X.corsAllowedOrigins||[],i=n.split(",").map((function(e){return e.trim()})).filter(Boolean),!I()(r,i)){e.next=4;break}return e.abrupt("return",!1);case 4:return e.prev=4,b(!0),o=i.length?i:["__none__"],e.next=9,d.api.updateRoutingSite({input:{id:X.id,corsAllowedOrigins:o,teamDid:t.meta.did}});case 9:b(!1),e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(4),H.Z.error(e.t0.message),b(!1),e.abrupt("return",!1);case 17:return e.abrupt("return",!0);case 18:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(n){return e.apply(this,arguments)}}(),Ce=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(n){var i,o;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!j){e.next=2;break}return e.abrupt("return");case 2:return b(!0),e.prev=3,e.next=6,d.api.configBlocklet({input:{did:t.meta.did,configs:[{key:M.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SK,value:n}]}});case 6:i=e.sent,o=i.blocklet,r(o),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(3),H.Z.error(e.t0.message);case 14:return e.prev=14,b(!1),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[3,11,14,17]])})));return function(n){return e.apply(this,arguments)}}();return(0,oe.jsxs)(tn,(0,i.Z)((0,i.Z)({},c),{},{children:[he.map((function(e){return(0,oe.jsxs)(x.Z,{className:"config-form",mt:2,children:[(0,oe.jsx)(x.Z,{className:"config-label",fontSize:14,mb:0,children:e.description}),(0,oe.jsx)(Y.Z,{style:{marginTop:0},disabled:j||O,loading:j,initialValue:e.value,onSubmit:function(n){return be(e.key,n)}})]})})),(0,oe.jsx)(x.Z,{className:"config-form",children:"all"===L&&"registry"===t.source&&(0,oe.jsxs)(x.Z,{className:"config-item",children:[(0,oe.jsxs)(x.Z,{className:"config-label",children:[u("blocklet.config.access.publicToStore"),(0,oe.jsx)(x.Z,{className:"config-desc",children:u("blocklet.config.access.publicInstanceTip")})]}),(0,oe.jsx)(D.Z,{disabled:O,checked:P,defaultChecked:!0,onChange:Ze})]})}),(0,oe.jsx)(x.Z,{className:"config-form",component:F.Z,my:3}),(0,oe.jsxs)(x.Z,{className:"config-form",mt:2,children:[(0,oe.jsx)(x.Z,{className:"config-label",fontSize:14,mb:0,children:u("blocklet.config.languages")}),(0,oe.jsx)(ce,{style:{marginTop:0},disabled:j||O,loading:j,options:Qe,initialValue:re?re.value.split(","):["en","zh"],onSubmit:function(e){return be("BLOCKLET_APP_LANGUAGES",e)}})]}),(0,oe.jsx)(x.Z,{className:"config-form",component:F.Z,my:3}),(0,oe.jsxs)(x.Z,{className:"config-form",children:[(0,oe.jsxs)(x.Z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,oe.jsx)("div",{className:"config-label",children:u("common.domain")}),(0,oe.jsx)(x.Z,{display:"flex",alignItems:"center",children:(0,oe.jsx)(ge,{id:X.id,title:u("router.domain.add.title"),teamDid:Q,children:function(e){var n=e.open;return(0,oe.jsxs)(W.Z,{style:{marginLeft:16},variant:"contained",color:"primary","data-cy":"add-domain-alias",onClick:n,disabled:(0,E.isInProgress)(t.status),children:[(0,oe.jsx)(z.Z,{style:{fontSize:"1.3em",marginRight:4}}),u("common.add")]})}})})]}),$.map((function(e,n){return(0,oe.jsxs)(x.Z,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:n?0:1,children:[(0,oe.jsxs)(x.Z,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,oe.jsx)(je.Z,{domain:e,filters:["domain"]},"".concat(e.value,"-domain")),(0,oe.jsx)(x.Z,{ml:2,mr:.5,children:e.value}),(0,oe.jsx)(je.Z,{domain:e,filters:["http"]},"".concat(e.value,"-http")),(0,oe.jsx)("span",{style:{marginLeft:12}}),(0,oe.jsx)(Fe,{domain:e.value,domainStatus:e.domainStatus,did:t.meta.did,children:function(e){var n=e.open;return(0,oe.jsx)(W.Z,{size:"small",onClick:function(e){return n(e)},children:u("router.cert.genLetsEncryptCert.title")})}})]}),s&&!e.isProtected?(0,oe.jsx)(Se,{site:X,domain:e,blocklet:t}):(0,oe.jsx)(K.Z,{title:u("blocklet.router.domainLockTooltip"),placement:"top",children:(0,oe.jsx)(U.Z,{disabled:!0,size:"large",style:{pointerEvents:"auto",paddingTop:0,paddingBottom:0,margin:"12px 0"},children:(0,oe.jsx)(G.Z,{style:{fill:A.palette.text.disabled}})})})]},e.value)})),!$.length&&(0,oe.jsx)(x.Z,{mt:4,children:(0,oe.jsx)(q.Z,{children:u("common.empty")})})]}),(0,oe.jsx)(x.Z,{className:"config-form",component:F.Z,my:3}),(0,oe.jsx)(x.Z,{className:"config-form",mt:2,children:(0,oe.jsx)(x.Z,{className:"config-label",mb:0,children:u("common.security")})}),(0,oe.jsxs)(x.Z,{className:"config-form",mt:2,children:[(0,oe.jsx)(x.Z,{className:"config-label",fontSize:14,mb:0,children:u("router.domainSecurity.cors.title")}),(0,oe.jsx)(x.Z,{mb:1.5,className:"config-desc",children:u("router.domainSecurity.cors.description",{name:"the blocklet"})}),(0,oe.jsx)(Y.Z,{style:{marginTop:0},disabled:j||O,loading:j,initialValue:(X.corsAllowedOrigins||[]).join(", "),onSubmit:ke})]}),(0,oe.jsx)(x.Z,{className:"config-form",component:F.Z,my:3}),(0,oe.jsx)(x.Z,{mb:2,className:"config-label",fontSize:20,children:u("blocklet.config.dangerZone")}),(0,oe.jsxs)(x.Z,{px:2,py:1,sx:{border:"1px solid red",borderRadius:2},children:[(0,oe.jsx)(x.Z,{className:"config-form",mt:2,children:!N&&(0,oe.jsxs)(x.Z,{className:"config-item",children:[(0,oe.jsxs)(x.Z,{className:"config-label",children:[u("blocklet.config.deletable.name"),(0,oe.jsx)(x.Z,{className:"config-desc",children:u(te?"blocklet.config.deletable.disable":"blocklet.config.deletable.enable")})]}),(0,oe.jsx)(D.Z,{disabled:O,checked:!te,defaultChecked:!0,onChange:ye})]})}),(0,oe.jsxs)(x.Z,{className:"config-form",mt:2,children:[(0,oe.jsx)(x.Z,{className:"config-label",fontSize:14,mb:0,children:u("blocklet.config.sk")}),(0,oe.jsx)(Te,{disabled:j||O,loading:j,initialValue:t.environments.find((function(e){return"BLOCKLET_APP_SK"===e.key})).value,onChange:Ce})]}),N&&(0,oe.jsx)(fe.Z,{role:"owner",children:function(e){return(e||pe.C)&&(0,oe.jsxs)(x.Z,{className:"config-form",mt:2,children:[(0,oe.jsxs)(x.Z,{className:"config-item",children:[(0,oe.jsx)(x.Z,{className:"config-label",mb:0,children:u("team.transferApp.name")}),(0,oe.jsxs)(W.Z,{style:{flexShrink:0},variant:"contained",edge:"end",color:"error",size:"small","data-cy":"transfer-app",onClick:function(){return w(!0)},children:[(0,oe.jsx)(V.Z,{style:{fontSize:"1.3em",marginRight:4}}),u("team.transferApp.name")]})]}),C&&(0,oe.jsx)(Me,{onCancel:function(){return w(!1)},onSuccess:function(){return w(!1)}})]})}})]})]}))}var $e=(0,fe.V)(Xe,"mutate_blocklets"),en=(0,fe.V)(Xe,"",ue.Wf);function nn(e){return(0,de.h6)().inService?(0,oe.jsx)(en,(0,i.Z)({},e)):(0,oe.jsx)($e,(0,i.Z)({},e))}Xe.propTypes={blocklet:u().object.isRequired,onUpdate:u().func,hasPermission:u().bool},Xe.defaultProps={onUpdate:function(){},hasPermission:!1};var tn=c.default.div(He||(He=(0,r.Z)(["\n padding-top: 24px;\n .config-form {\n flex-grow: 1;\n overflow-y: auto;\n "," {\n width: 100%;\n flex-shrink: 0;\n padding: 0 24px;\n transform: translate(0, 0);\n max-height: 60vh;\n }\n }\n\n .config-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 16px 0;\n }\n\n .config-label {\n font-weight: bold;\n }\n\n .config-desc {\n font-weight: normal;\n font-size: 12px;\n color: #666;\n }\n\n .form-item {\n margin-top: 0;\n }\n"])),(function(e){return e.theme.breakpoints.down("md")})),rn=t(46121),on=t(87535),an=t(72097),sn=t(49735),ln=t.n(sn),cn=t(35147),dn=t(14764),un=t(52553),pn=t.n(un),fn=t(27021),mn=t.n(fn),hn=t(44632),xn=t.n(hn),vn={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:""};var Zn=function(){var e,n,t,r=(0,de.h6)().api,o=(0,_e.y0)().blocklet,a=(0,S.PE)().t,s=null===o||void 0===o||null===(e=o.meta)||void 0===e?void 0:e.did,l=Object.assign((0,i.Z)({},vn),(null===o||void 0===o||null===(n=o.settings)||void 0===n||null===(t=n.notification)||void 0===t?void 0:t.email)||{}),c=(0,dn.cI)({defaultValues:ln()(l,Object.keys(vn))}),d=c.handleSubmit,u=c.control,p=c.formState,f=c.watch,m=c.reset,h=f("enabled"),v=(0,cn.Z)(function(){var e=(0,T.Z)((0,_.Z)().mark((function e(n){var t,o,l,c,d;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.configNotification({input:{did:s,notification:JSON.stringify({email:n})}});case 3:l=e.sent,c=l.blocklet,d=Object.assign((0,i.Z)({},vn),(null===c||void 0===c||null===(t=c.settings)||void 0===t||null===(o=t.notification)||void 0===o?void 0:o.email)||{}),m(d),H.Z.success(a("oauth.saveSuccess")),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),H.Z.error(e.t0.message||a("oauth.saveFailed"));case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(n){return e.apply(this,arguments)}}()),Z=(0,cn.Z)((function(e){var n=null===e||void 0===e?void 0:e.trim();return n?!!pn()(n)||a("notification.email.fromInvalid"):a("notification.email.fromRequired")})),g=(0,cn.Z)((function(e){var n=null===e||void 0===e?void 0:e.trim();return n?!!mn()(n,{require_host:!1,protocols:[]})||a("notification.email.hostInvalid"):a("notification.email.hostRequired")})),j=(0,cn.Z)((function(e){return e?!!xn()(e)||a("notification.email.portInvalid"):a("notification.email.portRequired")})),b=(0,cn.Z)((function(e){return!(null===e||void 0===e||!e.trim())||a("notification.email.userRequired")})),y=(0,cn.Z)((function(e){return!(null===e||void 0===e||!e.trim())||a("notification.email.passwordRequired")})),k=(0,cn.Z)((function(){return!0}));return(0,oe.jsx)(x.Z,{children:(0,oe.jsxs)("form",{onSubmit:d(v),disabled:!0,children:[(0,oe.jsx)(dn.Qr,{name:"enabled",control:u,render:function(e){var n=e.field;return(0,oe.jsx)(We.Z,{control:(0,oe.jsx)(D.Z,(0,i.Z)({checked:n.value},n)),label:a("notification.email.enable"),sx:{marginBottom:"8px"}})}}),(0,oe.jsx)(dn.Qr,{name:"from",control:u,rules:{validate:h?Z:k},render:function(e){var n,t=e.field;return(0,oe.jsx)(on.Z,{fullWidth:!0,children:(0,oe.jsx)(xe.Z,(0,i.Z)((0,i.Z)({},t),{},{label:a("notification.email.from"),error:!!p.errors[t.name],helperText:(null===(n=p.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!h}))})}}),(0,oe.jsx)(dn.Qr,{name:"host",control:u,rules:{validate:h?g:k},render:function(e){var n,t=e.field;return(0,oe.jsx)(on.Z,{fullWidth:!0,children:(0,oe.jsx)(xe.Z,(0,i.Z)((0,i.Z)({},t),{},{error:!!p.errors[t.name],label:a("notification.email.host"),helperText:(null===(n=p.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!h}))})}}),(0,oe.jsx)(dn.Qr,{name:"port",control:u,rules:{validate:h?j:k},render:function(e){var n,t=e.field;return(0,oe.jsx)(on.Z,{fullWidth:!0,children:(0,oe.jsx)(xe.Z,(0,i.Z)((0,i.Z)({},t),{},{type:"number",error:!!p.errors[t.name],label:a("notification.email.port"),helperText:(null===(n=p.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!h}))})}}),(0,oe.jsx)(dn.Qr,{name:"user",control:u,rules:{validate:h?b:k},render:function(e){var n,t=e.field;return(0,oe.jsx)(on.Z,{fullWidth:!0,children:(0,oe.jsx)(xe.Z,(0,i.Z)((0,i.Z)({},t),{},{error:!!p.errors[t.name],label:a("notification.email.user"),helperText:(null===(n=p.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!h}))})}}),(0,oe.jsx)(dn.Qr,{name:"password",control:u,rules:{validate:h?y:k},render:function(e){var n,t=e.field;return(0,oe.jsx)(on.Z,{fullWidth:!0,children:(0,oe.jsx)(xe.Z,(0,i.Z)((0,i.Z)({},t),{},{type:"password",error:!!p.errors[t.name],label:a("notification.email.password"),helperText:(null===(n=p.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!h}))})}}),(0,oe.jsx)(dn.Qr,{name:"secure",control:u,rules:{validate:k},render:function(e){var n=e.field;return(0,oe.jsx)(on.Z,{fullWidth:!0,children:(0,oe.jsx)(We.Z,{control:(0,oe.jsx)(D.Z,(0,i.Z)((0,i.Z)({checked:n.value},n),{},{disabled:!h})),label:a("notification.email.secure"),style:{marginBottom:16}})})}}),(0,oe.jsx)(an.Z,{type:"submit",variant:"contained",onSubmit:d(v),disabled:!p.isDirty,children:a("oauth.save")})]})})},gn=[{label:(0,oe.jsx)(x.Z,{textAlign:"center",width:"100%",children:"Email"}),value:"email"},{label:(0,oe.jsx)(x.Z,{textAlign:"center",width:"100%",children:"More"}),value:"more"}];var jn,bn,yn=function(){var e=(0,l.useState)(gn[0].value),n=(0,o.Z)(e,2),t=n[0],r=n[1],i=(0,l.useContext)(S.RD).t,a=(0,rn.Z)((function(){return{email:(0,oe.jsx)(Zn,{}),more:(0,oe.jsx)(x.Z,{children:(0,oe.jsx)(q.Z,{children:i("notification.comingSoon")})})}}),[i]);return(0,oe.jsxs)(x.Z,{children:[(0,oe.jsx)(L.Z,{tabs:gn,current:t,onChange:r}),(0,oe.jsx)(x.Z,{marginTop:"10px",children:a[t]})]})},kn=t(6698),Cn=t(11909),wn=t(1484),Sn=t(2569),Ln=t(88356),En=t(98127),Pn=t(70115),An="roles",_n=[].concat((0,s.Z)(Pn.Z),[{value:An,icon:En.Z,title:{zh:"\u6307\u5b9a\u901a\u884c\u8bc1\u53ef\u8bbf\u95ee",en:"Accessible to selected passports"},description:{zh:"\u53ea\u6709\u6307\u5b9a\u7684\u901a\u884c\u8bc1\u53ef\u4ee5\u8bbf\u95ee",en:"Only specified passports can access"}}]),Tn=function(e,n){if(e&&e.startsWith(h.WHO_CAN_ACCESS_PREFIX_ROLES)){var t=(0,E.getRolesFromAuthConfig)({whoCanAccess:e}),r=n.filter((function(e){return t.includes(e.name)}));return{access:An,roles:r}}return{access:e,roles:[]}},On=function(e,n){var t=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).roles,r=void 0===t?[]:t,i=(e.configs||[]).find((function(e){return e.key===M.BLOCKLET_CONFIGURABLE_KEY.COMPONENT_ACCESS_WHO}));if(i)return Tn(i.value,r);if(n&&R()(n,"settings.whoCanAccess")&&R()(n,"settings.whoCanAccess")!==h.WHO_CAN_ACCESS.ALL)return Tn(R()(n,"settings.whoCanAccess"),r);var o=(0,E.findServiceFromMeta)(e.meta,h.NODE_SERVICES.AUTH);return R()(o,"config.whoCanAccess")?Tn(o.config.whoCanAccess,r):{access:h.WHO_CAN_ACCESS.ALL,roles:[]}};function Rn(e){var n=e.blocklet,t=e.ancestors,r=e.children,i=(0,B.Z)(),a=(0,l.useState)(""),c=(0,o.Z)(a,2),d=c[0],u=c[1],p=(0,S.PE)(),f=p.t,m=p.locale,v=(0,de.h6)().api,Z=(0,Ve.DJ)().roles,g=(0,l.useState)(""),j=(0,o.Z)(g,2),b=j[0],y=j[1],k=t[0]||n,C=On(n,k,{roles:Z}),w=C.access,L=C.roles,P=(0,l.useState)(w),A=(0,o.Z)(P,2),O=A[0],R=A[1],N=(0,l.useState)(L),I=(0,o.Z)(N,2),D=I[0],F=I[1],z=[].concat((0,s.Z)(t.map((function(e){return e.meta.did}))),[n.meta.did]),K={marginRight:4,fontSize:18,verticalAlign:"text-bottom",color:i.palette.text.secondary},q=t.concat(n).map((function(e){return(0,E.getDisplayName)(e,!0)})).join(" / ");if((0,ue.wS)(n.status))return null;if("unknown"===n.status&&(0,ue.wS)(n.status))return null;var G=function(){u(!1)},V=function(e){e.stopPropagation(),u(!0)},M=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(){var n;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!b){e.next=2;break}return e.abrupt("return");case 2:return y(!0),e.prev=3,(n=O)===An&&(n="".concat(h.WHO_CAN_ACCESS_PREFIX_ROLES).concat(D.map((function(e){return e.name})).join(","))),e.next=8,v.updateWhoCanAccess({input:{did:z,whoCanAccess:n}});case 8:H.Z.success(f("blocklet.config.access.updatedTip")),G(),y(!1),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(3),y(!1),H.Z.error((0,ue.Z)(e.t0));case 17:case"end":return e.stop()}}),e,null,[[3,13]])})));return function(){return e.apply(this,arguments)}}(),Y=b||O===An&&!D.length;return["function"===typeof r?r({open:V}):(0,oe.jsx)(U.Z,{onClick:V,"data-cy":"action-config-component",children:(0,oe.jsx)(Ln.default,{})}),d&&(0,oe.jsxs)(In,{open:!0,fullWidth:!0,title:q,onClose:G,PaperProps:{style:{minHeight:"auto"}},actions:(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(W.Z,{onClick:G,color:"inherit","data-cy":"config-access-cancel",children:f("common.cancel")}),(0,oe.jsxs)(W.Z,{onClick:M,color:"primary",disabled:Y,variant:"contained",autoFocus:!0,"data-cy":"config-access-confirm",children:[b&&(0,oe.jsx)(J.Z,{size:16}),f("common.confirm")]})]}),children:[(0,oe.jsx)(x.Z,{mt:4,mb:3,children:(0,oe.jsx)(xe.Z,{label:f("blocklet.config.access.description"),select:!0,fullWidth:!0,value:O,onChange:function(e){var n=e.target.value;R(n)},"data-cy":"config-access-select",SelectProps:{renderValue:function(e){var n=_n.find((function(n){return n.value===e}));return n?(0,oe.jsxs)(x.Z,{children:[(0,oe.jsx)(n.icon,{style:K}),n.title[m]]}):null}},children:_n.map((function(e){return(0,oe.jsxs)(Bn,{value:e.value,sx:{display:"block"},"data-cy":"config-access-opt-".concat(e.value),children:[(0,oe.jsxs)(x.Z,{display:"flex",alignItems:"center",children:[(0,oe.jsx)(e.icon,{style:K}),(0,oe.jsx)(x.Z,{children:e.title[m]})]}),(0,oe.jsx)(x.Z,{children:(0,oe.jsx)(x.Z,{className:"tip",children:e.description[m]})})]})}))})}),O===An&&(0,oe.jsx)(x.Z,{mt:4,mb:3,children:(0,oe.jsx)(xe.Z,{label:f("blocklet.config.access.description"),select:!0,fullWidth:!0,value:D.map((function(e){return e.name})),onChange:function(e){F(Z.filter((function(n){return(e.target.value||[]).includes(n.name)})))},SelectProps:{multiple:!0,renderValue:function(e){return(0,oe.jsx)(x.Z,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:e.map((function(e){var n=Z.find((function(n){return n.name===e}));return(0,oe.jsx)(ne.Z,{label:n.title},n.text)}))})}},children:Z.map((function(e){var n=e.name,t=e.title;return(0,oe.jsxs)($.Z,{value:n,children:[(0,oe.jsx)(qe.Z,{checked:D.some((function(e){return e.name===n}))}),(0,oe.jsx)(ye.Z,{primary:t})]},n)}))})})]})]}Rn.propTypes={blocklet:u().object.isRequired,ancestors:u().array,children:u().any},Rn.defaultProps={ancestors:[],children:null};var Nn,In=(0,c.default)(Ue.Z)(jn||(jn=(0,r.Z)(["\n .MuiDialogContent-root {\n padding-top: 0;\n margin-top: -32px;\n }\n .MuiToolbar-root {\n padding-right: 12px;\n }\n .ux-dialog_right {\n padding-right: 20px;\n }\n"]))),Bn=(0,c.default)($.Z)(bn||(bn=(0,r.Z)(["\n .tip {\n font-size: 12px;\n color: ",";\n }\n"])),(function(e){return e.theme.palette.text.secondary}));function Dn(e){var n,t,r=e.blocklet,i=e.ancestors,a=e.depth,c=(0,B.Z)(),d=(0,S.PE)(),u=d.t,p=d.locale,f=(0,Ve.DJ)().roles,m=(0,l.useState)(!0),h=(0,o.Z)(m,2),v=h[0],Z=h[1],g=(0,_e.y0)().recommendedDomain,j=i[0]||r,b="/".concat(i.map((function(e){return e.mountPoint||"/"})).join("/"),"/").concat(r.mountPoint||"/").replace(/\/+/g,"/"),y=(0,ue.vH)({blocklet:j,domain:{value:g},mountPoint:b,params:(0,ue.f0)(j,p)}),w={fill:c.palette.text.secondary},L=a>0&&r.children.length>0,A=(0,oe.jsx)(U.Z,{size:"small",children:v?(0,oe.jsx)(C.Z,{fontSize:"inherit"}):(0,oe.jsx)(k.default,{fontSize:"inherit"})}),_=On(r,j,{roles:f}),T=_.access,O=_.roles;if("roles"!==T)t=Pn.Z.find((function(e){return e.value===T}))||Pn.Z[2];else{var R=O.map((function(e){return e.title})).join("/");t={title:{zh:"\u53ea\u6709 ".concat(R," \u53ef\u4ee5\u8bbf\u95ee"),en:"Only ".concat(R," can access")}}}return[(a>0||"gateway"!==r.meta.group)&&(0,oe.jsxs)(x.Z,{display:"flex",py:2,className:"component-item",justifyContent:"space-between",alignItems:"center",children:[(0,oe.jsxs)(x.Z,{pl:Math.max(2*(a-1),0),width:{xs:300,md:400},display:"flex",alignItems:"center",style:{cursor:L?"pointer":"cursor"},onClick:function(){return L&&Z(!v)},children:[L?A:(0,oe.jsx)(x.Z,{width:28}),(0,oe.jsx)(P.Z,{blocklet:r,ancestors:i}),(0,oe.jsxs)(x.Z,{ml:"16px",children:[(0,oe.jsx)(x.Z,{style:{color:"#222",fontSize:18},children:(0,E.getDisplayName)(r,!0)}),(0,oe.jsx)(x.Z,{display:"flex",alignItems:"center",children:(0,oe.jsx)(x.Z,{color:"text.secondary",children:t.title[p]})})]})]},r),(0,oe.jsxs)(x.Z,{children:[(0,oe.jsx)(K.Z,{title:u("common.visit"),children:(0,oe.jsx)("a",{target:"_blank",href:y,rel:"noopener noreferrer",title:y,children:(0,oe.jsx)(U.Z,{children:(0,oe.jsx)(Cn.Z,{})})})}),(0,oe.jsx)(Rn,{blocklet:r,ancestors:i,children:function(e){var n=e.open;return(0,oe.jsx)(K.Z,{title:u("common.edit"),children:(0,oe.jsx)(U.Z,{onClick:n,"data-cy":"btn-edit-".concat(r.meta.did),children:(0,oe.jsx)(wn.Z,{style:w})})})}})]},"actions")]},"group-not-gateway-box"),(0,oe.jsx)(Sn.Z,{depth:a}),null!==(n=r.children)&&void 0!==n&&n.length?(0,oe.jsx)(kn.Z,{in:v,children:r.children.map((function(e){return(0,oe.jsx)(Dn,{blocklet:e,ancestors:[].concat((0,s.Z)(i),[r]),depth:a+1},"".concat(a+1,"-").concat(e.meta.did))}))},"blocklet-collapse"):null]}function Fn(){var e=(0,S.PE)().t,n=(0,_e.y0)().blocklet,t=(0,s.Z)(n.children)||[];return"gateway"!==n.meta.group&&t.unshift(n),(0,oe.jsx)(zn,{component:"div",children:t&&t.length?[(0,oe.jsx)(x.Z,{mt:2,ml:{xs:"-12px",md:"-24px"},style:{maxWidth:1080},children:(0,oe.jsx)(Dn,{blocklet:n},"0-".concat(n.meta.did))},"top-blocklet-".concat(n.meta.did))]:(0,oe.jsx)(x.Z,{mt:8,children:(0,oe.jsx)(q.Z,{children:e("blocklet.component.noComponent")})})})}Dn.propTypes={blocklet:u().object.isRequired,ancestors:u().array,depth:u().number},Dn.defaultProps={ancestors:[],depth:0},Fn.propTypes={};var zn=(0,c.default)(x.Z)(Nn||(Nn=(0,r.Z)(["\n .title {\n font-size: 1.2rem;\n font-weight: bold;\n margin-top: ",";\n margin-bottom: ",";\n &.first {\n margin-top: 0;\n }\n }\n"])),(function(e){return e.theme.spacing(5)}),(function(e){return e.theme.spacing(3)})),Un=t(92746);var Kn=function(){var e,n,t,r=(0,de.h6)().api,o=(0,_e.y0)().blocklet,a=(0,S.PE)().t,s=null===o||void 0===o||null===(e=o.meta)||void 0===e?void 0:e.did,l=Object.assign({enabled:!1,domain:"",clientId:""},(null===o||void 0===o||null===(n=o.settings)||void 0===n||null===(t=n.oauth)||void 0===t?void 0:t.auth0)||{}),c=(0,dn.cI)({defaultValues:ln()(l,["domain","clientId","enabled"])}),d=c.handleSubmit,u=c.control,p=c.formState,f=c.watch,m=c.reset,h=f("enabled"),v=(0,cn.Z)(function(){var e=(0,T.Z)((0,_.Z)().mark((function e(n){var t,i,o,l,c;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.configOAuth({input:{did:s,oauth:JSON.stringify({auth0:n})}});case 3:o=e.sent,l=o.blocklet,c=Object.assign({enabled:!1,domain:"",clientId:""},(null===l||void 0===l||null===(t=l.settings)||void 0===t||null===(i=t.oauth)||void 0===i?void 0:i.auth0)||{}),m(c),H.Z.success(a("oauth.saveSuccess")),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),H.Z.error(e.t0.message||a("oauth.saveFailed"));case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(n){return e.apply(this,arguments)}}()),Z=(0,cn.Z)((function(e){return!(null===e||void 0===e||!e.trim())||a("oauth.auth0.domainDescribe")})),g=(0,cn.Z)((function(e){return!(null===e||void 0===e||!e.trim())||a("oauth.auth0.clientIdDescribe")})),j=(0,cn.Z)((function(){return!0}));return(0,oe.jsx)(x.Z,{children:(0,oe.jsxs)("form",{onSubmit:d(v),disabled:!0,children:[(0,oe.jsx)(dn.Qr,{name:"enabled",control:u,render:function(e){var n=e.field;return(0,oe.jsx)(We.Z,{control:(0,oe.jsx)(Un.Z,(0,i.Z)({checked:n.value,style:{marginRight:"6px"}},n)),label:a("oauth.auth0.enable"),sx:{marginBottom:2,ml:1}})}}),(0,oe.jsx)(dn.Qr,{name:"domain",control:u,rules:{validate:h?Z:j},render:function(e){var n,t=e.field;return(0,oe.jsx)(on.Z,{fullWidth:!0,children:(0,oe.jsx)(xe.Z,(0,i.Z)((0,i.Z)({},t),{},{label:a("oauth.auth0.domain"),error:!!p.errors[t.name],helperText:(null===(n=p.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!h}))})}}),(0,oe.jsx)(dn.Qr,{name:"clientId",control:u,rules:{validate:h?g:j},render:function(e){var n,t=e.field;return(0,oe.jsx)(on.Z,{fullWidth:!0,children:(0,oe.jsx)(xe.Z,(0,i.Z)((0,i.Z)({},t),{},{error:!!p.errors[t.name],label:a("oauth.auth0.clientId"),helperText:(null===(n=p.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!h}))})}}),(0,oe.jsx)(an.Z,{type:"submit",variant:"contained",onSubmit:d(v),disabled:!p.isDirty,children:a("oauth.save")})]})})},Wn=t(29529),qn=t(25139),Gn={ttl:604800};function Vn(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?86400*e.ttl:e.ttl/86400;return(0,i.Z)((0,i.Z)({},e),{},{ttl:n})}function Mn(){var e,n,t=(0,de.h6)().api,r=(0,_e.y0)().blocklet,o=null===r||void 0===r||null===(e=r.meta)||void 0===e?void 0:e.did,a=Object.assign({},Gn,(null===r||void 0===r||null===(n=r.settings)||void 0===n?void 0:n.session)||{}),s=(0,dn.cI)({defaultValues:ln()(Vn(a),["ttl"])}),l=s.handleSubmit,c=s.control,d=s.formState,u=s.reset,p=(0,S.PE)().t,f=(0,cn.Z)(function(){var e=(0,T.Z)((0,_.Z)().mark((function e(n){var r,i,a,s;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.updateAppSessionConfig({input:{did:o,config:Vn(n,!0)}});case 3:i=e.sent,a=i.blocklet,s=Object.assign({},Gn,ln()((null===a||void 0===a||null===(r=a.settings)||void 0===r?void 0:r.session)||{},["ttl"])),u(Vn(s)),H.Z.success(p("common.configSuccess")),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),H.Z.error(e.t0.message);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(n){return e.apply(this,arguments)}}());return(0,oe.jsx)(x.Z,{children:(0,oe.jsxs)("form",{onSubmit:l(f),disabled:!0,children:[(0,oe.jsx)(dn.Qr,{name:"ttl",control:c,render:function(e){var n=e.field;return(0,oe.jsx)(on.Z,{fullWidth:!0,sx:{mb:2},children:(0,oe.jsxs)(qn.Z,{px:3,children:[(0,oe.jsx)(x.Z,{mx:-3,my:.5,children:p("blocklet.config.session.ttl",{day:n.value})}),(0,oe.jsx)(Wn.ZP,(0,i.Z)((0,i.Z)({},n),{},{defaultValue:7,step:1,marks:[{value:1,label:p("blocklet.config.session.day",{day:1})},{value:7,label:p("blocklet.config.session.days",{day:7})},{value:14,label:p("blocklet.config.session.days",{day:14})},{value:21,label:p("blocklet.config.session.days",{day:21})},{value:30,label:p("blocklet.config.session.days",{day:30})}],min:1,max:30,valueLabelDisplay:"auto",style:{maxWidth:"360px"}}))]})})}}),(0,oe.jsx)(an.Z,{type:"submit",variant:"contained",onSubmit:l(f),disabled:!d.isDirty,children:p("oauth.save")})]})})}var Hn=t(95088),Yn=t(95002),Jn=t(2291),Qn=t(75260),Xn=t(28595),$n=t(61398),et=t.n($n),nt=(0,l.forwardRef)((function(e,n){var t=(0,l.useContext)(S.RD).t,r=(0,Xn.Z)({show:!1,title:"",content:"",onConfirm:et(),onCancel:et()}),i=(0,cn.Z)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r.show=!0,r.title=e.title,r.content=e.content,r.onConfirm=e.onConfirm||et(),r.onCancel=e.onCancel||et()})),o=(0,cn.Z)((function(){r.title="",r.content="",r.onConfirm=et(),r.onCancel=et()})),a=(0,cn.Z)((function(){r.show=!1,setTimeout((function(){o()}),300)})),s=(0,cn.Z)((function(){a(),null===r||void 0===r||r.onCancel()}),[]),c=(0,cn.Z)((function(){null===r||void 0===r||r.onConfirm(a)}),[]);return(0,l.useImperativeHandle)(n,(function(){return{open:i,close:a}}),[i,a]),(0,oe.jsx)(Ue.I,{open:r.show,title:r.title,onConfirm:c,onCancel:s,confirmButton:{text:t("common.confirm"),props:{variant:"contained",color:"primary"}},cancelButton:{text:t("common.cancel"),props:{variant:"outlined",color:"primary"}},children:r.content})}));var tt=t(70177),rt=t(59182),it=t.n(rt),ot=t(76032),at=t.n(ot),st=t(55581),lt=t(63531),ct=(0,l.forwardRef)((function(e,n){var t,r,i=(0,l.useContext)(S.RD).t,o=(0,_e.y0)().blocklet,a=(0,de.h6)().api,s=(0,Xn.Z)({mode:"view",show:!1,data:{},callback:et()}),c=(0,st.Fg)(),d=(null===c||void 0===c||null===(t=c.transitions)||void 0===t||null===(r=t.duration)||void 0===r?void 0:r.leavingScreen)||300,u=(0,cn.Z)((function(){s.mode="view",s.data={},s.callback=et()}),[]),p=(0,cn.Z)((function(){s.show=!1,setTimeout((function(){u()}),d)}),[]),f=(0,cn.Z)((function(e){s.mode="view",s.show=!0,s.data=e}),[]),m=(0,cn.Z)((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:et();s.mode="approve",s.show=!0,s.data=e,s.callback=n}),[]);(0,l.useImperativeHandle)(n,(function(){return{open:f,close:p,approve:m}}),[f,p,m]);var h=(0,rn.Z)((function(){s.data.migratedFrom=[s.data.appId,s.data.appPid];var e=["appName","appLogo","appId","appPid","migratedFrom","appDescription","appUrl","version","appliedAt","status","serverId","serverVersion"];return!1!==s.data.isMaster&&it()(e,"appliedAt","status"),e.map((function(e){var n=i("federated.info.".concat(e)),t=s.data[e];("appName"===e&&s.data.isMaster&&(t=(0,oe.jsxs)(x.Z,{children:[(0,oe.jsx)(Hn.Z,{component:Yn.Z}),t]})),["appId","appPid","serverId"].includes(e)&&(t=(0,oe.jsx)(lt.kL,{children:t})),["appUrl"].includes(e)&&(t=(0,oe.jsx)(x.Z,{component:"a",href:t,target:"_blank",children:t})),["appLogo"].includes(e)&&(t=(0,oe.jsx)("img",{src:"".concat(s.data.appUrl,"/").concat(t),width:"60",height:"60",alt:s.data.appName})),"status"===e&&(t=t&&i("federated.status.".concat(t))),"migratedFrom"===e)&&(t=(s.data.migratedFrom||[]).filter((function(e){return![s.data.appId,s.data.appPid].includes(e)})).map((function(e){return(0,oe.jsx)(lt.kL,{children:e})})));return at()(t)&&(t="-"),{name:n,value:t}}))}),[s.data]),v="approve"===s.mode,Z=(0,cn.Z)((0,T.Z)((0,_.Z)().mark((function e(){return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.auditFederatedLogin({input:{memberPid:s.data.appPid,did:o.appPid,status:"rejected"}});case 2:p(),null===s||void 0===s||s.callback(!1);case 4:case"end":return e.stop()}}),e)})))),g=(0,cn.Z)((0,T.Z)((0,_.Z)().mark((function e(){return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.auditFederatedLogin({input:{memberPid:s.data.appPid,did:o.appPid,status:"approved"}});case 2:p(),null===s||void 0===s||s.callback(!0);case 4:case"end":return e.stop()}}),e)}))));return(0,oe.jsx)(Ue.Z,{open:s.show,title:i(v?"federated.approveToJoinLogin":"federated.siteDetail"),onClose:p,actions:v?(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(an.Z,{color:"error",variant:"contained",onClick:Z,children:i("common.reject")}),(0,oe.jsx)(an.Z,{variant:"contained",onClick:g,children:i("common.approve")})]}):(0,oe.jsx)(an.Z,{variant:"outlined",onClick:p,children:i("common.close")}),children:h.map((function(e){return(0,oe.jsx)(tt.Z,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:180,name:e.name,children:e.value},e.name)}))})})),dt=ct,ut=t(29951),pt=t(34760),ft=t.n(pt),mt=(0,l.forwardRef)((function(e,n){var t,r,i=(0,st.Fg)(),o=(null===i||void 0===i||null===(t=i.transitions)||void 0===t||null===(r=t.duration)||void 0===r?void 0:r.leavingScreen)||300,a=(0,l.useContext)(S.RD).t,s=(0,Xn.Z)({show:!1,data:{link:""}}),c=(0,cn.Z)((function(){s.data.link=""}),[]),d=(0,cn.Z)((function(){s.show=!1,setTimeout((function(){c()}),o)}),[]),u=(0,cn.Z)((function(e){var n=e.link;s.show=!0,s.data.link=n}),[]);(0,l.useImperativeHandle)(n,(function(){return{open:u,close:d}}),[u,d]);var p=(0,cn.Z)((function(){ft()(s.data.link),d()}),[d]);return(0,oe.jsxs)(Ue.Z,{open:s.show,title:a("federated.joinFederatedLogin"),onClose:d,PaperProps:{style:{minHeight:"unset"}},actions:(0,oe.jsx)(W.Z,{color:"primary",autoFocus:!0,variant:"contained",onClick:p,children:a("common.copyAndClose")}),children:[(0,oe.jsx)(x.Z,{mb:1,children:a("federated.inviteJoinFederatedLoginDescription")}),(0,oe.jsx)(x.Z,{sx:{"& .copy-button":{display:"none !important"}},children:(0,oe.jsx)(ut.Z,{language:"shell",style:{marginBottom:0},children:s.data.link})})]})}));function ht(e){var n,t,r,i,a,s=e.mode,c=(0,l.useRef)(null),d=(0,l.useRef)(null),u=(0,l.useContext)(S.RD),p=u.t,f=u.locale,m=(0,_e.y0)(),h=m.blocklet,v=m.actions.refreshBlocklet,Z=function(){var e=(0,l.useRef)(null),n=(0,cn.Z)((function(){for(var n,t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];null===(n=e.current)||void 0===n||n.open.apply(n,r)})),t=(0,cn.Z)((function(){for(var n,t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];null===(n=e.current)||void 0===n||n.close.apply(n,r)})),r={open:n,close:t};return{confirmHolder:(0,oe.jsx)(nt,{ref:e}),confirmApi:r}}(),g=Z.confirmApi,j=Z.confirmHolder,b=(0,de.h6)().api,y=(null===(n=h.settings.federated)||void 0===n?void 0:n.sites)||[],k=(null===(t=h.settings.federated)||void 0===t?void 0:t.config)||{autoLogin:!1},C=!1!==k.isMaster,w=(0,cn.Z)((function(e){var n;null===(n=d.current)||void 0===n||n.open(e)})),L=(0,cn.Z)((function(e){var n;null===(n=d.current)||void 0===n||n.approve(e,v)})),E=(0,cn.Z)((function(e){g.open({title:p("federated.disableFederatedLogin"),content:p("federated.disableFederatedLoginDescription"),onConfirm:function(n){return(0,T.Z)((0,_.Z)().mark((function t(){return(0,_.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,b.auditFederatedLogin({input:{memberPid:e.appPid,did:h.appPid,status:"revoked"}});case 2:n();case 3:case"end":return t.stop()}}),t)})))()}})})),P=(0,cn.Z)((function(e){g.open({title:p("federated.enableFederatedLogin"),content:p("federated.enableFederatedLoginDescription"),onConfirm:function(n){return(0,T.Z)((0,_.Z)().mark((function t(){return(0,_.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,b.auditFederatedLogin({input:{memberPid:e.appPid,did:h.appPid,status:"approved"}});case 2:n();case 3:case"end":return t.stop()}}),t)})))()}})})),A=(0,rn.Z)((function(){var e=[{label:p("common.name"),name:"appName",options:{customBodyRenderLite:function(e){var n=y[e],t=!1!==n.isMaster;return(0,oe.jsx)(x.Z,{display:"inline-block",children:(0,oe.jsxs)(x.Z,{component:"a",display:"flex",alignItems:"center",href:n.appUrl,target:"_blank",onClick:function(e){e.stopPropagation()},children:[t&&(0,oe.jsx)(Hn.Z,{component:Yn.Z,style:{marginRight:"4px"}}),n.appName]})})}}},{label:p("common.did"),name:"appId",options:{customBodyRenderLite:function(e){var n=y[e];return(0,oe.jsx)(Qn.Z,{children:n.appId})}}},{label:p("common.status"),name:"status",options:{customBodyRenderLite:function(e){var n=y[e],t=!1!==n.isMaster;return(0,oe.jsx)(x.Z,{children:t?"-":p("federated.status.".concat(n.status))})}}}];return C&&e.push({label:p("common.actions"),name:"actions",options:{customBodyRenderLite:function(e){var n=y[e],t=!1!==n.isMaster;return(0,oe.jsx)(x.Z,{display:"flex",gap:1,children:t?(0,oe.jsxs)(oe.Fragment,{children:["rejected"===n.status&&(0,oe.jsx)(W.Z,{variant:"contained",color:"error",size:"small",onClick:function(e){e.stopPropagation()},children:p("federated.status.rejected")}),"revoked"===n.status&&(0,oe.jsx)(W.Z,{variant:"contained",color:"secondary",size:"small",onClick:function(e){e.stopPropagation()},children:p("federated.status.revoked")})]}):(0,oe.jsxs)(oe.Fragment,{children:["pending"===n.status&&(0,oe.jsx)(W.Z,{variant:"contained",color:"primary",size:"small",onClick:function(e){e.stopPropagation(),L(n)},children:p("federated.status.pending")}),"approved"===n.status&&(0,oe.jsx)(W.Z,{variant:"contained",color:"error",size:"small",onClick:function(e){e.stopPropagation(),E(n)},style:{whiteSpace:"nowrap"},children:p("federated.revoke")}),"revoked"===n.status&&(0,oe.jsx)(W.Z,{variant:"contained",color:"warning",size:"small",onClick:function(e){e.stopPropagation(),P(n)},style:{whiteSpace:"nowrap"},children:p("federated.approve")})]})})}}}),e}),[k.appId,y,C]),O=(0,rn.Z)((function(){return{sort:!0,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick:function(e,n){var t=n.dataIndex,r=y[t];w(r)}}}),[]),R=(0,cn.Z)((function(){var e,n,t,r=null===(e=h.site)||void 0===e||null===(n=e.domainAliases)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.href;if(r)try{var i,o=new URL(r);null===(i=c.current)||void 0===i||i.open({link:o.origin})}catch(a){H.Z.error(p("federated.failedToGetFederatedLoginLink"))}}),[null===(r=h.site)||void 0===r||null===(i=r.domainAliases)||void 0===i||null===(a=i[0])||void 0===a?void 0:a.href]),N=(0,l.useState)(k.autoLogin||!1),I=(0,o.Z)(N,2),B=I[0],D=I[1],F=(0,cn.Z)((function(){g.open({title:p(B?"federated.disableFederatedAutoLogin":"federated.enableFederatedAutoLogin"),content:p(B?"federated.disableFederatedAutoLoginDescription":"federated.enableFederatedAutoLoginDescription"),onConfirm:function(e){return(0,T.Z)((0,_.Z)().mark((function n(){return(0,_.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,b.configFederated({input:{did:h.appPid,autoLogin:!B}});case 2:D((function(e){return!e})),e();case 4:case"end":return n.stop()}}),n)})))()}})}),[D,B]),z=(0,cn.Z)((function(){g.open({title:p("federated.quitFederatedLogin"),content:p("federated.quitFederatedLoginDescription"),onConfirm:function(e){return(0,T.Z)((0,_.Z)().mark((function n(){return(0,_.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,b.quitFederatedLogin({input:{did:h.appPid}});case 2:e();case 3:case"end":return n.stop()}}),n)})))()}})})),U=[];return"master"!==s?U.push((0,oe.jsx)(W.Z,{size:"small",variant:"contained",color:"error",onClick:z,sx:{ml:1},children:p("federated.quitFederatedLogin")})):U.push((0,oe.jsx)(W.Z,{size:"small",variant:"contained",onClick:R,sx:{ml:1},children:p("federated.inviteJoinFederatedLogin")})),(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(Jn.Z,{className:"main-table",locale:f,data:y,columns:A,customButtons:U,title:(0,oe.jsx)(x.Z,{className:"table-toolbar-left",children:"master"===s?p("oauth.federated"):(0,oe.jsx)(We.Z,{sx:{ml:0,"& span.MuiSwitch-switchBase":{display:"flex"},"& span.MuiSwitch-track":{display:"block"}},control:(0,oe.jsx)(Un.Z,{checked:B,style:{marginRight:"6px"},onChange:F}),label:p("federated.enableFederatedAutoLogin")})}),options:O}),j,(0,oe.jsx)(mt,{ref:c}),(0,oe.jsx)(dt,{ref:d})]})}ht.propTypes={mode:u().oneOf(["member","master"])},ht.defaultProps={mode:"member"};var xt=ht,vt=t(92522),Zt=t.n(vt),gt=(0,l.forwardRef)((function(e,n){var t,r,i=(0,l.useContext)(S.RD).t,o=(0,de.h6)().api,a=(0,_e.y0)().blocklet,s=null===a||void 0===a?void 0:a.appPid,c=(0,st.Fg)(),d=(null===c||void 0===c||null===(t=c.transitions)||void 0===t||null===(r=t.duration)||void 0===r?void 0:r.leavingScreen)||300,u=(0,Xn.Z)({show:!1,appUrl:"",appUrlError:"",callback:et()}),p=(0,cn.Z)((function(){u.appUrl="",u.appUrlError="",u.callback=et()}),[]),f=(0,cn.Z)((function(){u.show=!1,setTimeout((function(){p()}),d)}),[]),m=(0,cn.Z)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:et();u.show=!0,u.callback=e}),[]);(0,l.useImperativeHandle)(n,(function(){return{open:m,close:f}}),[m,f]);var h=(0,cn.Z)((function(e){if(!e)throw new Error(i("federated.federatedJoinAppUrlRequired"));if(!Zt()(e))throw new Error(i("federated.federatedJoinAppUrlInvalid"))})),v=(0,cn.Z)((0,T.Z)((0,_.Z)().mark((function e(){var n;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,h(u.appUrl),e.next=4,o.joinFederatedLogin({input:{did:s,appUrl:u.appUrl}});case 4:n=e.sent,u.show=!1,f(),null===u||void 0===u||u.callback(n),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),u.appUrlError=e.t0.message;case 13:case"end":return e.stop()}}),e,null,[[0,10]])}))),[f,s]);return(0,oe.jsxs)(Ue.Z,{open:u.show,title:i("federated.joinFederatedLogin"),onClose:f,PaperProps:{style:{minHeight:"unset"}},actions:(0,oe.jsx)(W.Z,{color:"primary",autoFocus:!0,variant:"contained",onClick:v,children:i("common.confirm")}),children:[(0,oe.jsx)(x.Z,{mb:1,children:i("federated.joinFederatedLoginDescription")}),(0,oe.jsx)(xe.Z,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:i("federated.federatedJoinAppUrl"),label:i("federated.federatedJoinAppUrl"),value:u.appUrl,error:!!u.appUrlError,helperText:u.appUrlError||"eg: https://www.arcblock.io",onChange:function(e){u.appUrl=e.target.value}})]})})),jt=gt;function bt(){var e,n,t,r,i=(0,l.useRef)(null),o=(0,l.useRef)(null),a=(0,l.useContext)(S.RD).t,s=(0,_e.y0)(),c=s.blocklet,d=s.actions.refreshBlocklet,u=(0,cn.Z)((function(){var e,n,t,r=null===(e=c.site)||void 0===e||null===(n=e.domainAliases)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.href;if(r)try{var o,s=new URL(r);null===(o=i.current)||void 0===o||o.open({link:s.origin})}catch(l){H.Z.error(a("federated.failedToGetFederatedLoginLink"))}}),[null===(e=c.site)||void 0===e||null===(n=e.domainAliases)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.href]),p=(0,cn.Z)((function(){var e;null===(e=o.current)||void 0===e||e.open((function(){d()}))}),[d]);if((null===(r=c.settings.federated)||void 0===r?void 0:r.sites.length)>0){var f,m=!1!==(null===(f=c.settings.federated)||void 0===f?void 0:f.config.isMaster);return(0,oe.jsx)(xt,{mode:m?"master":"member"})}return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsxs)(x.Z,{display:"flex",flexDirection:"column",gap:2,justifyContent:"center",alignItems:"center",minHeight:"200px",children:[(0,oe.jsx)(W.Z,{variant:"contained",onClick:u,children:a("federated.inviteJoinFederatedLogin")}),(0,oe.jsx)(F.Z,{sx:{width:"150px",color:"rgba(0, 0, 0, 0.3)"},children:"OR"}),(0,oe.jsx)(W.Z,{variant:"outlined",onClick:p,children:a("federated.joinFederatedLogin")})]}),(0,oe.jsx)(mt,{ref:i}),(0,oe.jsx)(jt,{ref:o})]})}var yt,kt=function(){var e=(0,l.useContext)(S.RD).t,n=[{label:(0,oe.jsx)(x.Z,{textAlign:"center",width:"100%",children:e("oauth.commonSettings")}),value:"settings"},{label:(0,oe.jsx)(x.Z,{textAlign:"center",width:"100%",children:e("oauth.federated")}),value:"federated"},{label:(0,oe.jsx)(x.Z,{textAlign:"center",width:"100%",children:"Auth0"}),value:"auth0"},{label:(0,oe.jsx)(x.Z,{textAlign:"center",width:"100%",children:e("oauth.moreLogin")}),value:"more"}],t=(0,l.useState)(n[0].value),r=(0,o.Z)(t,2),i=r[0],a=r[1],s=(0,rn.Z)((function(){return{auth0:(0,oe.jsx)(Kn,{}),federated:(0,oe.jsx)(bt,{}),more:(0,oe.jsx)(x.Z,{children:(0,oe.jsx)(q.Z,{children:e("oauth.comingSoon")})}),settings:(0,oe.jsx)(x.Z,{children:(0,oe.jsx)(Mn,{})})}}),[e]);return(0,oe.jsxs)(x.Z,{children:[(0,oe.jsx)(L.Z,{tabs:n,current:i,onChange:a}),(0,oe.jsx)(x.Z,{marginTop:"10px",children:s[i]})]})},Ct=["blocklet","onUpdate"],wt=function e(n){var t=n.tabs,r=n.blocklet,i=n.ancestors,o=void 0===i?[]:i,a=n.depth,l=void 0===a?1:a,c=n.t,d=[].concat((0,s.Z)(o.map((function(e){return e.meta.did}))),[r.meta.did]).join("/"),u=!(null!==o&&void 0!==o&&o.length);t.push({label:(0,oe.jsxs)(x.Z,{pl:2*Math.max(1,l-1),display:"flex",alignItems:"center",justifyContent:"flex-start",children:[u?(0,oe.jsx)(A.Z,{size:24,blocklet:r}):(0,oe.jsx)(P.Z,{size:24,blocklet:r,ancestors:o}),(0,oe.jsx)(x.Z,{ml:"16px",children:(0,oe.jsx)(x.Z,{style:{color:"#222"},children:u?c("blocklet.component.container"):(0,E.getDisplayName)(r,!0)})})]},d),value:d}),r.children.length>0&&r.children.forEach((function(n){e({tabs:t,blocklet:n,ancestors:[].concat((0,s.Z)(o),[r]),depth:l+1,t:c})}))};function St(e){var n=e.blocklet,t=e.onUpdate,r=(0,a.Z)(e,Ct),s=(0,l.useContext)(S.RD).t,c=(0,de.h6)(),d=c.info,u=c.inService,f=(0,l.useState)(!0),E=(0,o.Z)(f,2),P=E[0],A=E[1],_=(0,w.lr)(),T=(0,o.Z)(_,2),O=T[0],R=T[1],N=O.get("tab")||"general",I=[{label:(0,oe.jsxs)(x.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-general",children:[(0,oe.jsx)(Z.Z,{sx:{fontSize:24}}),(0,oe.jsx)(x.Z,{ml:"16px",children:(0,oe.jsx)(x.Z,{style:{color:"#222"},children:s("common.general")})})]},"general"),value:"general"},{label:(0,oe.jsxs)(x.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-access",children:[(0,oe.jsx)(g.Z,{sx:{fontSize:24}}),(0,oe.jsx)(x.Z,{ml:"16px",children:(0,oe.jsx)(x.Z,{style:{color:"#222"},children:s("common.access")})})]},"access"),value:"access"},{label:(0,oe.jsxs)(x.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-oauth",children:[(0,oe.jsx)(j.Z,{sx:{fontSize:24}}),(0,oe.jsx)(x.Z,{ml:"16px",children:(0,oe.jsx)(x.Z,{style:{color:"#222"},children:s("common.login")})})]},"oauth"),value:"oauth"},{label:(0,oe.jsxs)(x.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-notification",children:[(0,oe.jsx)(b.Z,{sx:{fontSize:24}}),(0,oe.jsx)(x.Z,{ml:"16px",children:(0,oe.jsx)(x.Z,{style:{color:"#222"},children:s("common.notification")})})]},"notification"),value:"notification"},{label:(0,oe.jsxs)(x.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-preference",children:[(0,oe.jsx)(x.Z,{ml:-2,style:{transform:"translateY(2px)"},children:P?(0,oe.jsx)(C.Z,{fontSize:"inherit"}):(0,oe.jsx)(k.default,{fontSize:"inherit"})}),(0,oe.jsx)(y.Z,{sx:{fontSize:24}}),(0,oe.jsx)(x.Z,{ml:"16px",children:(0,oe.jsx)(x.Z,{style:{color:"#222"},children:s("common.preferences")})})]},"preference"),value:"preference"}];P&&wt({tabs:I,blocklet:n,t:s});var B=null;if("general"===N)B=(0,oe.jsx)(nn,{blocklet:n,onUpdate:t});else if("access"===N)B=(0,oe.jsx)(Fn,{});else if("oauth"===N)B=(0,oe.jsx)(kt,{});else if("notification"===N)B=(0,oe.jsx)(yn,{});else{var D=u?h.WELLKNOWN_SERVICE_PATH_PREFIX:d.routing.adminPath,F=new URLSearchParams;u||F.set("authKey","__sst"),F.set("schemaKey",m()(window.location.origin,D,"/api/preferences?id=".concat(encodeURIComponent(N)))),B=(0,oe.jsx)(p.Z,{url:"".concat(m()(window.location.origin,D,"/hosted/form-collector/"),"?").concat(F.toString()),width:"100%",height:"100%",frameBorder:0,styles:{border:0}})}return(0,oe.jsx)(Lt,(0,i.Z)((0,i.Z)({},r),{},{children:(0,oe.jsxs)(v.ZP,{container:!0,spacing:4,columns:24,children:[(0,oe.jsx)(v.ZP,{item:!0,sm:7,md:5,children:(0,oe.jsx)(L.Z,{tabs:I,current:N,orientation:"vertical",onChange:function(e){"preference"===e?A(!P):R((function(n){return"general"===e?n.delete("tab"):n.set("tab",e),n}))},sx:{borderRight:1,height:"100%",borderColor:"divider"}})}),(0,oe.jsx)(v.ZP,{item:!0,sm:17,md:19,children:(0,oe.jsx)(x.Z,{style:{minHeight:"66vh",height:"100%",position:"relative",overflow:"hidden"},children:B})})]})}))}St.propTypes={blocklet:u().object.isRequired,onUpdate:u().func},St.defaultProps={onUpdate:function(){}};var Lt=c.default.div(yt||(yt=(0,r.Z)(["\n .MuiTab-root {\n text-align: left;\n align-items: flex-start;\n font-weight: normal;\n }\n .Mui-selected {\n font-weight: bold;\n }\n"])))},89308:function(e,n,t){t.d(n,{Z:function(){return k}});var r=t(68079),i=t(30969),o=t(24974),a=t.n(o),s=t(90222),l=t(6779),c=t(47333),d=t(19708),u=t(33394),p=t(24891),f=t(96234),m=t(46292),h=t.n(m),x=t(83176),v=t(22994),Z=t(42846),g=t(33359),j=t(41395),b=t(37574);function y(e){var n=e.certificate,t=(0,i.useState)(null),r=(0,f.Z)(t,2),o=r[0],a=r[1],l=(0,j.h6)(),d=(0,c.PE)(),u=d.t,m=d.locale,y=function(){a(null)},k=Boolean(o);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s.Z,{"aria-owns":k?"mouse-over-popover":void 0,onMouseEnter:function(e){a(e.currentTarget)},onMouseLeave:y,style:{color:"#44cdc6",fontSize:20,marginLeft:8,cursor:"pointer"}}),(0,b.jsx)(x.ZP,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:k,anchorEl:o,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:y,disableRestoreFocus:!0,children:(0,b.jsx)(v.Z,{children:(0,b.jsxs)(Z.Z,{style:{display:"flex"},children:[(0,b.jsx)("div",{children:(0,b.jsx)("img",{src:"".concat(l.imgPrefix,"/https-certificate-icon.png"),alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),(0,b.jsxs)(g.Z,{component:"div",style:{marginLeft:"16px"},children:[(0,b.jsx)(g.Z,{component:"div",style:{fontWeight:"bold"},children:n.domain}),(0,b.jsx)(g.Z,{component:"div",children:"".concat(u("common.issuer"),": ").concat(h()(n,"issuer.commonName",""))}),(0,b.jsx)(g.Z,{component:"div",children:"".concat(u("router.cert.issuedOn"),": ").concat((0,p.pz)(n.validFrom,m))}),(0,b.jsx)(g.Z,{component:"div",children:"".concat(u("router.cert.expiryOn"),": ").concat((0,p.pz)(n.validTo,m))})]})]})})})]})}function k(e){var n=e.domain,t=e.filters,o=(0,c.PE)().t,a=n.value,u=n.domainStatus;if(!(0,p.rM)(a))return null;var f=null,m=null,h=u.isHttps,x=u.matchedCert;if(!(0,p.ao)(a)){var v=u.dns,Z=void 0===v?{}:v,g=Z.resolved,j=Z.ip;f=g||"127.0.0.1"===j?(0,b.jsx)(l.Z,{title:o("router.domain.verify.ok"),children:(0,b.jsx)(d.Z,{color:"success"})}):(0,b.jsx)(l.Z,{title:o("router.domain.verify.notResolved"),children:(0,b.jsx)(d.Z,{color:"error"})})}m=h?(0,b.jsx)(y,{certificate:x}):(0,b.jsx)(l.Z,{title:o("router.domain.https.bad"),children:(0,b.jsx)(s.Z,{style:{color:"#D0021B",fontSize:20,marginLeft:8,cursor:"pointer"}})});var k=t.map((function(e){return"domain"===e?f:"http"===e?m:null}));return i.createElement.apply(void 0,[i.Fragment,null].concat((0,r.Z)(k)))}y.propTypes={certificate:a().object},y.defaultProps={certificate:{}},k.propTypes={domain:u.Y.isRequired,filters:a().array},k.defaultProps={filters:["domain","http"]}},33394:function(e,n,t){t.d(n,{Y:function(){return o}});var r=t(24974),i=t.n(r),o=i().shape({href:i().string,accessibility:i().shape({loading:i().bool,accessible:i().bool}),domainStatus:i().shape({isHttps:i().bool,matchedCert:i().object}),dns:i().shape({resolved:i().bool,ip:i().string})})},19066:function(e,n,t){t.d(n,{C:function(){return r}});var r="true"===localStorage.getItem("enableDebug")},70115:function(e,n,t){var r=t(39517),i=t(87642),o=t(64076),a=t(20244);n.Z=[{value:a.WHO_CAN_ACCESS.ALL,icon:o.Z,title:{zh:"\u6240\u6709\u4eba\u53ef\u8bbf\u95ee",en:"Accessible to all"},description:{zh:"\u5411\u6240\u6709\u4eba\u5f00\u653e\uff0c\u65e0\u9700\u901a\u884c\u8bc1\u5373\u53ef\u8bbf\u95ee\u5e94\u7528",en:"Open to the world anyone can access without passport"}},{value:a.WHO_CAN_ACCESS.INVITED,icon:i.Z,title:{zh:"\u53ea\u6709\u88ab\u9080\u8bf7\u7684\u4eba\u53ef\u4ee5\u8bbf\u95ee",en:"Only invited people can access"},description:{zh:"\u7a0d\u540e\u60a8\u53ef\u4ee5\u5728\u7ba1\u7406\u9875\u9762\u4e2d\u9080\u8bf7\u6210\u5458",en:"You can invite members later in the admin page"}},{value:a.WHO_CAN_ACCESS.OWNER,icon:r.Z,title:{zh:"\u53ea\u6709\u5e94\u7528\u6240\u6709\u8005\u53ef\u4ee5\u8bbf\u95ee",en:"Only Owner of the blocklet can access"},description:{zh:"\u5fc5\u987b\u63d0\u4f9b\u6240\u6709\u8005\u901a\u884c\u8bc1\u624d\u80fd\u8bbf\u95ee\u5e94\u7528",en:"You must provide owner passport to access this application"}}]}}]);
|
|
2
|
+
//# sourceMappingURL=5355.2eaad302.chunk.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[5541],{60966:function(e,n,t){var r=t(6399);e.exports=function(e,n){return r(e)===r(n)}},80714:function(e,n,t){"use strict";t.d(n,{Z:function(){return j}});var r,i=t(71171),o=t(32723),a=t(34795),s=t(33028),l=t(96234),c=t(59740),u=t(30969),d=t(24974),f=t.n(d),p=t(16380),m=t(94551),h=t(48082),x=t(2689),g=t(28722),b=t(93310),v=t(86008),y=t(37574),Z=["actions"],w=["icon","text","onClick","disabled"];function j(e){var n=e.actions,t=(0,c.Z)(e,Z),r=(0,u.useState)(null),i=(0,l.Z)(r,2),d=i[0],f=i[1],p=Boolean(d),j=function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}f(null)};return(0,y.jsxs)(k,(0,s.Z)((0,s.Z)({},t),{},{children:[(0,y.jsx)(m.Z,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"actions-menu-icon",onClick:function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}f(e.currentTarget)},size:"small",children:(0,y.jsx)(g.Z,{})}),(0,y.jsx)(h.Z,{id:"actions-menu","data-cy":"actions-menu",anchorEl:d,keepMounted:!0,open:p,onClose:j,PaperProps:{},children:n.map((function(e,n){if("function"===typeof e)return e({close:j});var t=e.icon,r=e.text,i=e.onClick,l=e.disabled,d=void 0!==l&&l,f=(0,c.Z)(e,w);return(0,u.createElement)(x.Z,(0,s.Z)((0,s.Z)({},f),{},{disabled:d,dense:!0,onClick:function(){var e=(0,a.Z)((0,o.Z)().mark((function e(n){return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i(n);case 2:j();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),key:n,"data-cy":"actions-menu-".concat(n)}),(0,y.jsx)(b.Z,{style:{minWidth:24,marginRight:8},children:t}),(0,y.jsx)(v.Z,{primary:r}))}))})]}))}j.propTypes={actions:f().array},j.defaultProps={actions:[]};var k=p.default.div(r||(r=(0,i.Z)([""])))},70998:function(e,n,t){"use strict";t.d(n,{Z:function(){return x}});var r=t(33028),i=t(59740),o=t(24974),a=t.n(o),s=t(59467),l=t(62399),c=t(19611),u=t.n(c),d=t(20244),f=t(41395),p=t(24891);var m=t(37574),h=["blocklet","style","size","ancestors"];function x(e){var n=e.blocklet,t=e.style,o=e.size,a=e.ancestors,c=(0,i.Z)(e,h),x=(0,f.h6)(),g=function(e){var n,t=e.blocklet,r=e.ancestors,i=void 0===r?[]:r,o=(0,f.h6)(),a=o.inService,s="?v=".concat(null===t||void 0===t||null===(n=t.meta)||void 0===n?void 0:n.version).concat((0,p.XN)(null===t||void 0===t?void 0:t.status)?"~":""),l=a?u()(p.zn,d.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle",s):u()(o.imgPrefix,"blocklet.png");if("registry"===t.source&&t.deployedFrom&&t.meta.logo)l=u()(t.deployedFrom,(0,p.lk)(t.meta.bundleDid,t.meta.logo),s);else{var c=window.env.apiPrefix||"/",m=i.concat(t),h=a?m.slice(1):m;l=u()(c,"/blocklet/logo-bundle".concat(h.map((function(e){return"/".concat(e.meta.did)})).join("")),s)}return{logoUrl:l,inService:a}}({blocklet:n,ancestors:a}),b=g.logoUrl,v=g.inService,y=c.variant,Z=v?function(){}:function(e){e.target.src="".concat(x.imgPrefix,"/blocklet.png")},w=(0,m.jsx)("img",{src:b,onError:Z,alt:n.meta.name,style:{width:o}});return n.meta.logo||(w=(0,m.jsx)(l.Z,{did:n.meta.did||"",responsive:!0})),(0,m.jsx)(s.Z,(0,r.Z)((0,r.Z)({variant:y||"square",style:Object.assign({backgroundColor:"transparent",width:o,height:o,borderRadius:10},t)},c),{},{children:w}))}x.propTypes={blocklet:a().object.isRequired,style:a().object,size:a().oneOfType([a().number,a().string]),ancestors:a().array},x.defaultProps={style:{},size:40,ancestors:[]}},2569:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});var r=t(24974),i=t.n(r),o=t(38361),a=t(37574);function s(e){var n=e.depth;return(0,a.jsx)(o.Z,{ml:Math.max(2*(n-1),0),sx:{borderBottom:1,borderColor:"rgba(0,0,0,0.12)"}},"group-collapse-box")}s.propTypes={depth:i().number},s.defaultProps={depth:1}},52654:function(e,n,t){"use strict";t.d(n,{Rw:function(){return u},fX:function(){return c},sf:function(){return d},ub:function(){return l}});var r=t(20244),i=t(60966),o=t.n(i),a=t(59505),s=function(e,n){if(e.type===r.ROUTING_RULE_TYPES.REDIRECT){if(!e.url)return new Error("".concat(n("router.validation.redirectUrlRequired")));if(!e.redirectCode)return new Error("redirect ".concat(n("router.validation.redirectCodeRequired")))}else if(e.type===r.ROUTING_RULE_TYPES.BLOCKLET&&!e.did)return new Error(n("router.validation.didRequired"));return null},l=function(e,n){return e?e.endsWith(r.DEFAULT_IP_DOMAIN_SUFFIX)?n("router.domain.validate.suffixTip",{suffix:r.DEFAULT_IP_DOMAIN_SUFFIX}):null:n("router.domain.validate.emptyTip")},c=function(e,n){var t=s(e,n);return t||(e.pathPrefix.length?e.pathPrefix.length>150?new Error(n("router.validation.pathPrefixTooLong",{length:150})):null:new Error(n("router.validation.pathPrefixCannotBeEmpty")))},u=function(e){var n=e.params,t=e.blocklets,r=e.blocklet,i=e.locale,s=void 0===i?"en":i;if(r){var l=(r.children||[]).find((function(e){return o()(e.mountPoint,n.pathPrefix)}));if("gateway"!==r.meta.group&&"/"===n.pathPrefix&&(l="/"),l)return{zh:"\u6302\u8f7d\u70b9 ".concat(n.pathPrefix," \u5df2\u5b58\u5728\uff0c\u8bf7\u4f7f\u7528\u5176\u4ed6\u6302\u8f7d\u70b9"),en:"The mount point ".concat(n.pathPrefix," already exist, please use another mount point")}[s]}var c=t.find((function(e){return e.meta.did===n.did}));if(!c)return"";var u=c.meta.interfaces.find((function(e){return"web"===e.type}));return u&&u.prefix!==a.BLOCKLET_DYNAMIC_PATH_PREFIX&&n.pathPrefix!==u.prefix?{zh:"\u8be5 blocklet \u53ea\u80fd\u6302\u8f7d\u5728 ".concat(u.prefix),en:"This blocklet can only be mounted on ".concat(u.prefix)}[s]:""},d=function(e){if(!e||"string"!==typeof e)return e;var n=e.trim();try{return(n=n.toLowerCase()).startsWith("http://")||n.startsWith("https://")?new URL(n).hostname:n}catch(t){return console.error("format domain failed",t),n}}},73820:function(e,n,t){"use strict";t.d(n,{Z:function(){return f}});var r=t(33028),i=t(59740),o=t(30969),a=t(24974),s=t.n(a),l=t(99631),c=t(47333),u=t(37574),d=["children"];function f(e){var n=e.children,t=(0,i.Z)(e,d),a=(0,o.useContext)(c.RD).t;return(0,u.jsx)(l.Z,(0,r.Z)((0,r.Z)({tip:a("common.copyTip"),copiedTip:a("common.copiedTip")},t),{},{children:n}))}f.propTypes={children:s().any.isRequired}},67019:function(e,n,t){"use strict";t.d(n,{Z:function(){return j}});var r=t(33028),i=t(32723),o=t(34795),a=t(96234),s=t(59740),l=t(30969),c=t(24974),u=t.n(c),d=t(38361),f=t(87006),p=t(94308),m=t(88581),h=t(27724),x=t(94551),g=t(14458),b=t(28412),v=t(76934),y=t(37574),Z=["label","disabled","required","initialValue","onChange","placeholder","style","onSubmit","secure","triggers","formatterBeforeSubmit"],w=function(e,n,t){return null===e&&n&&t?"******":e?n?"******":e:""};function j(e){var n=e.label,t=e.disabled,c=e.required,u=e.initialValue,j=e.onChange,k=e.placeholder,T=e.style,C=e.onSubmit,E=e.secure,P=e.triggers,_=e.formatterBeforeSubmit,R=(0,s.Z)(e,Z),S=(0,l.useState)(!1),z=(0,a.Z)(S,2),I=z[0],O=z[1],q=(0,l.useState)(!1),N=(0,a.Z)(q,2),F=N[0],L=N[1],B=(0,l.useState)(E&&"__encrypted__"===u?null:u),U=(0,a.Z)(B,2),D=U[0],M=U[1],A=(0,l.useState)(D),W=(0,a.Z)(A,2),V=W[0],X=W[1],K=function(){var e=(0,o.Z)((0,i.Z)().mark((function e(){var n;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return L(!0),e.prev=1,e.next=4,C(V);case 4:!1===e.sent?X(D):(n=V,"function"===typeof _&&(n=_(V)),X(n),M(n)),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),X(D);case 11:return e.prev=11,L(!1),O(!1),e.finish(11);case 15:case"end":return e.stop()}}),e,null,[[1,8,11,15]])})));return function(){return e.apply(this,arguments)}}(),Y=function(e){X(e),j(e)},G=I?(0,y.jsx)(f.Z,(0,r.Z)({style:{flex:1},fullWidth:!0,value:V,onChange:function(e){Y(e.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:k,onKeyDown:function(e){"Enter"===e.key&&K()},disabled:t,type:E?"password":"text"},R)):(0,y.jsx)(d.Z,{px:1,className:"form-item-input slot",style:{whiteSpace:"pre-wrap"},children:w(V,E,u)});return(0,y.jsx)(b.Z,{className:"form",style:T,children:(0,y.jsxs)(d.Z,{className:"form-item",children:[(0,y.jsxs)(d.Z,{className:"form-item-label",children:[n,c&&(0,y.jsx)(g.Z,{})]}),(0,y.jsxs)(d.Z,{className:"form-item-body",children:[(0,y.jsx)(d.Z,{className:"form-item-input",children:G}),(0,y.jsx)(d.Z,{className:"form-item-action",children:I?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(x.Z,{"data-cy":"schema-form-item-confirm",onClick:K,disabled:t||F,size:"large",children:F?(0,y.jsx)(p.Z,{size:24}):(0,y.jsx)(h.Z,{})}),(0,y.jsx)(x.Z,{"data-cy":"schema-form-item-cancel",onClick:function(){X(D),O(!1)},disabled:t||F,size:"large",children:(0,y.jsx)(m.default,{})})]}):(0,y.jsx)(v.Z,{triggers:P,onEnterEdit:function(){return O(!0)},disabled:t})})]})]})})}j.propTypes={style:u().object,onSubmit:u().func,onChange:u().func,label:u().string,initialValue:u().string,placeholder:u().string,required:u().bool,disabled:u().bool,secure:u().bool,triggers:u().array,formatterBeforeSubmit:u().func},j.defaultProps={style:{},onSubmit:function(){},onChange:function(){},label:"",initialValue:"",placeholder:"",required:!1,disabled:!1,secure:!1,triggers:[],formatterBeforeSubmit:null}},28412:function(e,n,t){"use strict";var r,i=t(71171),o=t(16380),a=t(38361);n.Z=(0,o.default)(a.Z)(r||(r=(0,i.Z)(["\n width: 100%;\n flex-grow: 1;\n overflow-y: auto;\n "," {\n width: 100%;\n flex-shrink: 0;\n padding: 0 24px;\n transform: translate(0, 0);\n /* max-height: 60vh; */\n }\n\n .form-item {\n width: 100%;\n margin-bottom: 24px;\n position: relative;\n "," {\n flex-wrap: wrap;\n justify-content: space-between;\n width: 100%;\n flex-shrink: 0;\n }\n }\n\n .form-item-body {\n display: flex;\n align-items: center;\n width: 100%;\n margin-top: 4px;\n }\n\n .form-item-label {\n line-height: 1.2;\n font-size: 14px;\n color: #888;\n font-weight: bold;\n\n "," {\n text-align: left;\n width: auto;\n flex-grow: 1;\n }\n }\n\n .form-item-input {\n flex-grow: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n &.slot {\n height: 40px;\n line-height: 40px;\n background: #f8f8f8;\n font-size: 16px;\n\n .MuiChip-root {\n margin-top: -4px;\n }\n }\n\n .MuiSelect-select {\n padding: 8px;\n }\n }\n\n .form-item-action {\n // width: 100px;\n text-align: left;\n margin-left: 12px;\n flex-shrink: 0;\n "," {\n width: auto;\n margin-left: 0px;\n }\n .MuiIconButton-root {\n padding: 8px;\n svg {\n fill: #888;\n }\n &.Mui-disabled {\n opacity: 0.4;\n }\n }\n }\n"])),(function(e){return e.theme.breakpoints.down("md")}),(function(e){return e.theme.breakpoints.down("md")}),(function(e){return e.theme.breakpoints.down("md")}),(function(e){return e.theme.breakpoints.down("md")}))},76934:function(e,n,t){"use strict";t.d(n,{Z:function(){return b}});var r=t(96234),i=t(30969),o=t(24974),a=t.n(o),s=t(1484),l=t(94551),c=t(72097),u=t(89667),d=t(97475),f=t(38589),p=t(46672),m=t(4850),h=t(2689),x=t(23484),g=t(37574);function b(e){var n=e.triggers,t=e.onEnterEdit,o=e.disabled,a=i.useRef(null),b=i.useState(!1),v=(0,r.Z)(b,2),y=v[0],Z=v[1];return 0===n.length?(0,g.jsx)(l.Z,{"data-cy":"schema-form-item-edit",onClick:t,disabled:o,size:"large",children:(0,g.jsx)(s.Z,{})}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(u.Z,{variant:"outlined",ref:a,"aria-label":"split button",children:[(0,g.jsx)(c.Z,{"data-cy":"schema-form-item-edit",onClick:t,disabled:o,size:"large",children:(0,g.jsx)(s.Z,{})}),(0,g.jsx)(c.Z,{size:"small","aria-controls":y?"split-button-menu":void 0,"aria-expanded":y?"true":void 0,onClick:function(){Z((function(e){return!e}))},children:(0,g.jsx)(d.Z,{})})]}),(0,g.jsx)(m.Z,{sx:{zIndex:9999},open:y,anchorEl:a.current,role:void 0,placement:"bottom-end",children:(0,g.jsx)(p.Z,{children:(0,g.jsx)(f.Z,{onClickAway:function(e){a.current&&a.current.contains(e.target)||Z(!1)},children:(0,g.jsx)(x.Z,{id:"split-button-menu",autoFocusItem:!0,children:n.map((function(e){return(0,g.jsx)(h.Z,{onClick:function(){return n=e.handler,Z(!1),void n();var n},children:e.title},e.key)}))})})})})]})}b.propTypes={triggers:a().arrayOf(a().shape({key:a().string.isRequired,title:a().string.isRequired,handler:a().func.isRequired})),onEnterEdit:a().func.isRequired,disabled:a().bool.isRequired},b.defaultProps={triggers:[]}},14458:function(e,n,t){"use strict";var r,i=t(71171),o=t(16380).default.span(r||(r=(0,i.Z)(["\n color: ",";\n &::before {\n content: '*';\n }\n"])),(function(e){return e.theme.palette.error.main}));n.Z=o},22572:function(e,n,t){"use strict";t.d(n,{V:function(){return c},Z:function(){return l}});var r=t(33028),i=t(24974),o=t.n(i),a=t(77370),s=t(37574);function l(e){var n=e.permission,t=e.role,r=e.component,i=e.children,o=(0,a.T)().session,s=!0,l=[].concat(n).filter(Boolean),c=[].concat(t).filter(Boolean);if(l.length){var u=o.user&&o.user.permissions||[];s=l.some((function(e){return u.includes(e)}))}return s&&c.length&&(s=c.includes(o.user.role)),"function"===typeof r?r(s):"function"===typeof i?i(s):s&&(r||i)||null}function c(e,n,t){return function(i){return(0,s.jsx)(l,{permission:n,role:t,children:function(n){return(0,s.jsx)(e,(0,r.Z)((0,r.Z)({},i),{},{hasPermission:n}))}})}}l.propTypes={permission:o().oneOfType([o().string,o().arrayOf(o().string)]),role:o().oneOfType([o().string,o().arrayOf(o().string)]),component:o().oneOfType([o().func,o().node]),children:o().oneOfType([o().func,o().node])},l.defaultProps={permission:"",role:"",component:null,children:null}}}]);
|
|
2
|
+
//# sourceMappingURL=5541.581f1db7.chunk.js.map
|