@openmrs/esm-app-shell 6.0.1 → 6.0.2
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/.turbo/turbo-build.log +16 -13
- package/dist/index.html +1 -1
- package/dist/{openmrs.a8a8ffd63ae9183f.js → openmrs.f8f34d1e7caf6da9.js} +1 -1
- package/dist/{openmrs.a8a8ffd63ae9183f.js.map → openmrs.f8f34d1e7caf6da9.js.map} +1 -1
- package/dist/service-worker.js +1 -1
- package/lib/esm-implementer-tools-app/main.js +1 -1
- package/lib/esm-implementer-tools-app/openmrs-esm-implementer-tools-app.js +1 -1
- package/lib/esm-implementer-tools-app/openmrs-esm-implementer-tools-app.js.buildmanifest.json +2 -2
- package/lib/esm-implementer-tools-app/routes.json +1 -1
- package/lib/esm-login-app/202.js +2 -0
- package/lib/esm-login-app/202.js.LICENSE.txt +9 -0
- package/lib/esm-login-app/202.js.map +1 -0
- package/lib/esm-login-app/211.js +1 -0
- package/lib/esm-login-app/211.js.map +1 -0
- package/lib/esm-login-app/236.js +1 -0
- package/lib/esm-login-app/240.js +1 -0
- package/lib/esm-login-app/261.js +1 -0
- package/lib/esm-login-app/271.js +1 -0
- package/lib/esm-login-app/272.js +1 -0
- package/lib/esm-login-app/319.js +1 -0
- package/lib/esm-login-app/336.js +1 -0
- package/lib/esm-login-app/378.js +1 -0
- package/lib/esm-login-app/415.js +2 -0
- package/lib/esm-login-app/415.js.LICENSE.txt +9 -0
- package/lib/esm-login-app/415.js.map +1 -0
- package/lib/esm-login-app/460.js +1 -0
- package/lib/esm-login-app/539.js +1 -0
- package/lib/esm-login-app/566.js +1 -0
- package/lib/esm-login-app/574.js +1 -0
- package/lib/esm-login-app/593.js +2 -0
- package/lib/{esm-devtools-app → esm-login-app}/593.js.map +1 -1
- package/lib/esm-login-app/625.js +1 -0
- package/lib/esm-login-app/63.js +2 -0
- package/lib/esm-login-app/63.js.LICENSE.txt +32 -0
- package/lib/esm-login-app/63.js.map +1 -0
- package/lib/esm-login-app/642.js +1 -0
- package/lib/{esm-devtools-app → esm-login-app}/642.js.map +1 -1
- package/lib/esm-login-app/644.js +1 -0
- package/lib/esm-login-app/652.js +1 -0
- package/lib/esm-login-app/657.js +1 -0
- package/lib/{esm-devtools-app → esm-login-app}/657.js.map +1 -1
- package/lib/esm-login-app/673.js +1 -0
- package/lib/esm-login-app/676.js +1 -0
- package/lib/esm-login-app/676.js.map +1 -0
- package/lib/esm-login-app/7.js +1 -0
- package/lib/esm-login-app/7.js.map +1 -0
- package/lib/esm-login-app/705.js +1 -0
- package/lib/esm-login-app/711.js +1 -0
- package/lib/esm-login-app/727.js +1 -0
- package/lib/esm-login-app/735.js +2 -0
- package/lib/{esm-devtools-app → esm-login-app}/735.js.map +1 -1
- package/lib/esm-login-app/737.js +1 -0
- package/lib/esm-login-app/744.js +1 -0
- package/lib/esm-login-app/755.js +2 -0
- package/lib/esm-login-app/755.js.LICENSE.txt +9 -0
- package/lib/esm-login-app/755.js.map +1 -0
- package/lib/esm-login-app/757.js +1 -0
- package/lib/esm-login-app/788.js +2 -0
- package/lib/{esm-devtools-app → esm-login-app}/788.js.map +1 -1
- package/lib/esm-login-app/807.js +1 -0
- package/lib/esm-login-app/833.js +1 -0
- package/lib/esm-login-app/859.js +1 -0
- package/lib/esm-login-app/859.js.map +1 -0
- package/lib/esm-login-app/889.js +2 -0
- package/lib/{esm-devtools-app → esm-login-app}/889.js.map +1 -1
- package/lib/esm-login-app/899.js +1 -0
- package/lib/esm-login-app/93.js +1 -0
- package/lib/esm-login-app/93.js.map +1 -0
- package/lib/esm-login-app/main.js +2 -0
- package/lib/esm-login-app/main.js.LICENSE.txt +9 -0
- package/lib/esm-login-app/main.js.map +1 -0
- package/lib/esm-login-app/openmrs-esm-login-app.js +1 -0
- package/lib/esm-login-app/openmrs-esm-login-app.js.buildmanifest.json +1053 -0
- package/lib/esm-login-app/openmrs-esm-login-app.js.map +1 -0
- package/lib/esm-login-app/routes.json +1 -0
- package/lib/esm-offline-tools-app/main.js +1 -1
- package/lib/esm-offline-tools-app/openmrs-esm-offline-tools-app.js +1 -1
- package/lib/esm-offline-tools-app/openmrs-esm-offline-tools-app.js.buildmanifest.json +2 -2
- package/lib/esm-offline-tools-app/routes.json +1 -1
- package/lib/esm-primary-navigation-app/main.js +1 -1
- package/lib/esm-primary-navigation-app/openmrs-esm-primary-navigation-app.js +1 -1
- package/lib/esm-primary-navigation-app/openmrs-esm-primary-navigation-app.js.buildmanifest.json +2 -2
- package/lib/esm-primary-navigation-app/routes.json +1 -1
- package/lib/index.html +2 -2
- package/lib/openmrs.js +10 -10
- package/lib/service-worker.js +1 -1
- package/package.json +3 -3
- package/lib/esm-devtools-app/593.js +0 -2
- package/lib/esm-devtools-app/642.js +0 -1
- package/lib/esm-devtools-app/657.js +0 -1
- package/lib/esm-devtools-app/735.js +0 -2
- package/lib/esm-devtools-app/762.js +0 -1
- package/lib/esm-devtools-app/762.js.map +0 -1
- package/lib/esm-devtools-app/788.js +0 -2
- package/lib/esm-devtools-app/875.js +0 -2
- package/lib/esm-devtools-app/875.js.LICENSE.txt +0 -5
- package/lib/esm-devtools-app/875.js.map +0 -1
- package/lib/esm-devtools-app/889.js +0 -2
- package/lib/esm-devtools-app/988.js +0 -1
- package/lib/esm-devtools-app/988.js.map +0 -1
- package/lib/esm-devtools-app/main.js +0 -1
- package/lib/esm-devtools-app/main.js.map +0 -1
- package/lib/esm-devtools-app/openmrs-esm-devtools-app.js +0 -1
- package/lib/esm-devtools-app/openmrs-esm-devtools-app.js.buildmanifest.json +0 -351
- package/lib/esm-devtools-app/openmrs-esm-devtools-app.js.map +0 -1
- package/lib/esm-devtools-app/routes.json +0 -1
- /package/lib/{esm-devtools-app → esm-login-app}/593.js.LICENSE.txt +0 -0
- /package/lib/{esm-devtools-app → esm-login-app}/735.js.LICENSE.txt +0 -0
- /package/lib/{esm-devtools-app → esm-login-app}/788.js.LICENSE.txt +0 -0
- /package/lib/{esm-devtools-app → esm-login-app}/889.js.LICENSE.txt +0 -0
package/dist/service-worker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var e={23:function(e){function t(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}e.exports=function(){"use strict";var e=6e4,n=36e5,r="millisecond",o="second",i="minute",a="hour",s="day",u="week",c="month",l="quarter",f="year",h="date",d="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},b=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},m={s:b,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+b(r,2,"0")+":"+b(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,c),i=n-o<0,a=t.clone().add(r+(i?-1:1),c);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:f,w:u,d:s,D:h,h:a,m:i,s:o,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},g="en",w={};w[g]=v;var _=function(e){return t(e,O)},x=function e(t,n,r){var o;if(!t)return g;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),n&&(w[i]=n,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;w[s]=t,o=s}return!r&&o&&(g=o),o||!r&&g},k=function(e,t){if(_(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new O(n)},S=m;S.l=x,S.i=_,S.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var O=function(){var v=function(e){this.$L=x(e.locale,null,!0),this.parse(e)},b=v.prototype;return b.parse=function(e){this.$d=function(e){var n=e.date,r=e.utc;if(null===n)return new Date(NaN);if(S.u(n))return new Date;if(t(n,Date))return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var o=n.match(p);if(o){var i=o[2]-1||0,a=(o[7]||"0").substring(0,3);return r?new Date(Date.UTC(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)):new Date(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)}}return new Date(n)}(e),this.$x=e.x||{},this.init()},b.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},b.$utils=function(){return S},b.isValid=function(){return!(this.$d.toString()===d)},b.isSame=function(e,t){var n=k(e);return this.startOf(t)<=n&&n<=this.endOf(t)},b.isAfter=function(e,t){return k(e)<this.startOf(t)},b.isBefore=function(e,t){return this.endOf(t)<k(e)},b.$g=function(e,t,n){return S.u(e)?this[t]:this.set(n,e)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(e,t){var n=this,r=!!S.u(t)||t,l=S.p(e),d=function(e,t){var o=S.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(s)},p=function(e,t){return S.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},y=this.$W,v=this.$M,b=this.$D,m="set"+(this.$u?"UTC":"");switch(l){case f:return r?d(1,0):d(31,11);case c:return r?d(1,v):d(0,v+1);case u:var g=this.$locale().weekStart||0,w=(y<g?y+7:y)-g;return d(r?b-w:b+(6-w),v);case s:case h:return p(m+"Hours",0);case a:return p(m+"Minutes",1);case i:return p(m+"Seconds",2);case o:return p(m+"Milliseconds",3);default:return this.clone()}},b.endOf=function(e){return this.startOf(e,!1)},b.$set=function(e,t){var n,u=S.p(e),l="set"+(this.$u?"UTC":""),d=(n={},n[s]=l+"Date",n[h]=l+"Date",n[c]=l+"Month",n[f]=l+"FullYear",n[a]=l+"Hours",n[i]=l+"Minutes",n[o]=l+"Seconds",n[r]=l+"Milliseconds",n)[u],p=u===s?this.$D+(t-this.$W):t;if(u===c||u===f){var y=this.clone().set(h,1);y.$d[d](p),y.init(),this.$d=y.set(h,Math.min(this.$D,y.daysInMonth())).$d}else d&&this.$d[d](p);return this.init(),this},b.set=function(e,t){return this.clone().$set(e,t)},b.get=function(e){return this[S.p(e)]()},b.add=function(t,r){var l,h=this;t=Number(t);var d=S.p(r),p=function(e){var n=k(h);return S.w(n.date(n.date()+Math.round(e*t)),h)};if(d===c)return this.set(c,this.$M+t);if(d===f)return this.set(f,this.$y+t);if(d===s)return p(1);if(d===u)return p(7);var y=(l={},l[i]=e,l[a]=n,l[o]=1e3,l)[d]||1,v=this.$d.getTime()+t*y;return S.w(v,this)},b.subtract=function(e,t){return this.add(-1*e,t)},b.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||d;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=S.z(this),i=this.$H,a=this.$m,s=this.$M,u=n.weekdays,c=n.months,l=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].slice(0,i)},f=function(e){return S.s(i%12||12,e,"0")},h=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:S.s(s+1,2,"0"),MMM:l(n.monthsShort,s,c,3),MMMM:l(c,s),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,u,2),ddd:l(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(i),HH:S.s(i,2,"0"),h:f(1),hh:f(2),a:h(i,a,!0),A:h(i,a,!1),m:String(a),mm:S.s(a,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:o};return r.replace(y,(function(e,t){return t||p[e]||o.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(t,r,h){var d,p=S.p(r),y=k(t),v=(y.utcOffset()-this.utcOffset())*e,b=this-y,m=S.m(this,y);return m=(d={},d[f]=m/12,d[c]=m,d[l]=m/3,d[u]=(b-v)/6048e5,d[s]=(b-v)/864e5,d[a]=b/n,d[i]=b/e,d[o]=b/1e3,d)[p]||b,h?m:S.a(m)},b.daysInMonth=function(){return this.endOf(c).$D},b.$locale=function(){return w[this.$L]},b.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=x(e,t,!0);return r&&(n.$L=r),n},b.clone=function(){return S.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},v}(),P=O.prototype;return k.prototype=P,[["$ms",r],["$s",o],["$m",i],["$H",a],["$W",s],["$M",c],["$y",f],["$D",h]].forEach((function(e){P[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),k.extend=function(e,t){return e.$i||(e(t,O,k),e.$i=!0),k},k.locale=x,k.isDayjs=_,k.unix=function(e){return k(1e3*e)},k.en=w[g],k.Ls=w,k.p={},k}()},774:()=>{"use strict";try{self["workbox:core:6.5.4"]&&_()}catch(e){}},585:()=>{"use strict";try{self["workbox:routing:6.5.4"]&&_()}catch(e){}},238:()=>{"use strict";try{self["workbox:strategies:6.5.4"]&&_()}catch(e){}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{n.S={};var e={},t={};n.I=(r,o)=>{o||(o=[]);var i=t[r];if(i||(i=t[r]={}),!(o.indexOf(i)>=0)){if(o.push(i),e[r])return e[r];n.o(n.S,r)||(n.S[r]={});var a=n.S[r],s="@openmrs/esm-app-shell",u=[];return"default"===r&&((e,t,r,o)=>{var i=a[e]=a[e]||{},u=i[t];(!u||!u.loaded&&(0!=!u.eager||s>u.from))&&(i[t]={get:()=>()=>n(23),from:s,eager:!0})})("dayjs","1.11.5"),e[r]=u.length?Promise.all(u).then((()=>e[r]=1)):1}}})(),(()=>{"use strict";n(774);function e(t,n,o){return e=i()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&r(i,n.prototype),i},e.apply(null,arguments)}function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(e)}function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}function o(n){var i="function"==typeof Map?new Map:void 0;return o=function(n){if(null===n||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(n))return n;if("function"!=typeof n)throw new TypeError("Super expression must either be null or a function");if(void 0!==i){if(i.has(n))return i.get(n);i.set(n,o)}function o(){return e(n,arguments,t(this).constructor)}return o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),r(o,n)},o(n)}function i(){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}}var a=function(e){!function(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}}),t&&r(e,t)}(s,e);var n,o,a=(n=s,o=i(),function(){var e,r=t(n);if(o){var i=t(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var n}(this,e)});function s(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var r=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=e;return n.length>0&&(o+=" :: ".concat(JSON.stringify(n))),o}(e,t);return(n=a.call(this,r)).name=e,n.details=t,n}return s}(o(Error)),s=new Set,u={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},c=function(e){return e||(t=u.runtime,[u.prefix,t,u.suffix].filter((function(e){return e&&e.length>0})).join("-"));var t};function l(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function f(e,t){var n=new URL(e),r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;n.searchParams.delete(u)}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n.href}function h(e,t,n,r){return d.apply(this,arguments)}function d(){return d=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){l(i,r,o,a,s,"next",e)}function s(e){l(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(e,t,n,r){var o,i,a,s,u,c,l,h,d,p;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(y){switch(y.label){case 0:return o=f(t.url,n),t.url===o?[2,e.match(t,r)]:(i=Object.assign(Object.assign({},r),{ignoreSearch:!0}),[4,e.keys(t,i)]);case 1:a=y.sent(),s=!0,u=!1,c=void 0;try{for(l=a[Symbol.iterator]();!(s=(h=l.next()).done);s=!0)if(d=h.value,p=f(d.url,n),o===p)return[2,e.match(d,r)]}catch(e){u=!0,c=e}finally{try{s||null==l.return||l.return()}finally{if(u)throw c}}return[2]}}))})),d.apply(this,arguments)}var p=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))};function y(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function v(){return b.apply(this,arguments)}function b(){return b=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){y(i,r,o,a,s,"next",e)}function s(e){y(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(){var e,t,n,r,o,i;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(a){switch(a.label){case 0:e=!0,t=!1,n=void 0,a.label=1;case 1:a.trys.push([1,6,7,8]),r=s[Symbol.iterator](),a.label=2;case 2:return(e=(o=r.next()).done)?[3,5]:[4,(0,o.value)()];case 3:a.sent(),a.label=4;case 4:return e=!0,[3,2];case 5:return[3,8];case 6:return i=a.sent(),t=!0,n=i,[3,8];case 7:try{e||null==r.return||r.return()}finally{if(t)throw n}return[7];case 8:return[2]}}))})),b.apply(this,arguments)}function m(e){return new Promise((function(t){return setTimeout(t,e)}))}const g="object"==typeof global&&global&&global.Object===Object&&global;var w="object"==typeof self&&self&&self.Object===Object&&self;const _=g||w||Function("return this")(),x=_.Symbol,k=Array.isArray;var S=Object.prototype,O=S.hasOwnProperty,P=S.toString,E=x?x.toStringTag:void 0;var j=Object.prototype.toString;var R=x?x.toStringTag:void 0;const C=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":R&&R in Object(e)?function(e){var t=O.call(e,E),n=e[E];try{e[E]=void 0;var r=!0}catch(e){}var o=P.call(e);return r&&(t?e[E]=n:delete e[E]),o}(e):function(e){return j.call(e)}(e)},T=function(e){return null!=e&&"object"==typeof e};var A=x?x.prototype:void 0,D=A?A.toString:void 0;const K=function e(t){if("string"==typeof t)return t;if(k(t))return function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}(t,e)+"";if(function(e){return"symbol"==(void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||T(e)&&"[object Symbol]"==C(e);var t}(t))return D?D.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var M=/[\\^$.*+?()[\]{}|]/g,I=RegExp(M.source);const $=function(e){return(e=null==(t=e)?"":K(t))&&I.test(e)?e.replace(M,"\\$&"):e;var t};function B(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function q(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){B(i,r,o,a,s,"next",e)}function s(e){B(i,r,o,a,s,"throw",e)}a(void 0)}))}}function F(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function N(e){return U.apply(this,arguments)}function U(){return U=q((function(e){var t,n,r,o,i,a,s,u=arguments;return F(this,(function(c){switch(c.label){case 0:n=(t=u.length>1&&void 0!==u[1]?u[1]:{}).shouldRetry,r=t.getDelay,o=t.onError,n=null!=n?n:function(e){return function(e,t){return e<=5}(e)},r=null!=r?r:function(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2]?e+1:e;return t*Math.pow(2,n)}(e,1e3)},i=0,a=void 0,c.label=1;case 1:return c.trys.push([1,4,,5]),[4,L(r(i))];case 2:return c.sent(),[4,e()];case 3:return[2,c.sent()];case 4:return s=c.sent(),null==o||o(s,i),a=s,[3,5];case 5:if(n(i++))return[3,1];c.label=6;case 6:throw a}}))})),U.apply(this,arguments)}function L(e){return W.apply(this,arguments)}function W(){return(W=q((function(e){return F(this,(function(t){return e<=0?[2]:[2,new Promise((function(t){return setTimeout(t,e)}))]}))}))).apply(this,arguments)}const H=function(e){var t,n=void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t;return null!=e&&("object"==n||"function"==n)},z=_["__core-js_shared__"];var G,Y=(G=/[^.]+$/.exec(z&&z.keys&&z.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"";var V=Function.prototype.toString;var Q=/^\[object .+?Constructor\]$/,J=Function.prototype,X=Object.prototype,Z=J.toString,ee=X.hasOwnProperty,te=RegExp("^"+Z.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const ne=function(e){return!(!H(e)||(t=e,Y&&Y in t))&&(function(e){if(!H(e))return!1;var t=C(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}(e)?te:Q).test(function(e){if(null!=e){try{return V.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t},re=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ne(n)?n:void 0},oe=re(Object,"create");var ie=Object.prototype.hasOwnProperty;var ae=Object.prototype.hasOwnProperty;function se(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}se.prototype.clear=function(){this.__data__=oe?oe(null):{},this.size=0},se.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},se.prototype.get=function(e){var t=this.__data__;if(oe){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ie.call(t,e)?t[e]:void 0},se.prototype.has=function(e){var t=this.__data__;return oe?void 0!==t[e]:ae.call(t,e)},se.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=oe&&void 0===t?"__lodash_hash_undefined__":t,this};const ue=se,ce=function(e,t){for(var n=e.length;n--;)if((r=e[n][0])===(o=t)||r!=r&&o!=o)return n;var r,o;return-1};var le=Array.prototype.splice;function fe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}fe.prototype.clear=function(){this.__data__=[],this.size=0},fe.prototype.delete=function(e){var t=this.__data__,n=ce(t,e);return!(n<0||(n==t.length-1?t.pop():le.call(t,n,1),--this.size,0))},fe.prototype.get=function(e){var t=this.__data__,n=ce(t,e);return n<0?void 0:t[n][1]},fe.prototype.has=function(e){return ce(this.__data__,e)>-1},fe.prototype.set=function(e,t){var n=this.__data__,r=ce(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const he=fe,de=re(_,"Map"),pe=function(e,t){var n,r,o,i=e.__data__;return("string"==(o=void 0===(n=t)?"undefined":(r=n)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ye.prototype.clear=function(){this.size=0,this.__data__={hash:new ue,map:new(de||he),string:new ue}},ye.prototype.delete=function(e){var t=pe(this,e).delete(e);return this.size-=t?1:0,t},ye.prototype.get=function(e){return pe(this,e).get(e)},ye.prototype.has=function(e){return pe(this,e).has(e)},ye.prototype.set=function(e,t){var n=pe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const ve=ye;function be(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ve;++t<n;)this.add(e[t])}be.prototype.add=be.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},be.prototype.has=function(e){return this.__data__.has(e)};const me=be,ge=function(e){return e!=e},we=function(e,t){return!(null==e||!e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}(e,ge,n)}(e,t,0)>-1},_e=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},xe=function(e,t){return e.has(t)},ke=re(_,"Set"),Se=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Oe=ke&&1/Se(new ke([,-0]))[1]==1/0?function(e){return new ke(e)}:function(){},Pe=function(e){return e&&e.length?function(e,t,n){var r=-1,o=we,i=e.length,a=!0,s=[],u=s;if(n)a=!1,o=_e;else if(i>=200){var c=t?null:Oe(e);if(c)return Se(c);a=!1,o=xe,u=new me}else u=t?[]:s;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue e;t&&u.push(f),s.push(l)}else o(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}(e):[]};var Ee="x-omrs-offline-response-body",je="x-omrs-offline-response-status",Re="x-omrs-offline-caching-strategy",Ce="omrs",Te="".concat(Ce,"-spa-cache-v1"),Ae=[{'revision':null,'url':'/openmrs/spa/routes.registry.json'},{'revision':null,'url':'0030f1956e452721.js'},{'revision':null,'url':'023bd53d342b7463.woff'},{'revision':null,'url':'02acc4469a2fe2e4.woff2'},{'revision':null,'url':'02af6181aebfc3a3.js'},{'revision':'e383dc21b1990707f5078248de39a136','url':'02af6181aebfc3a3.js.LICENSE.txt'},{'revision':null,'url':'033e03f8663ab9b1.woff'},{'revision':null,'url':'052607e67da262ec.woff'},{'revision':null,'url':'081587ca0db8e63f.woff2'},{'revision':null,'url':'08cf53c4e5e71cf1.woff2'},{'revision':null,'url':'090b2bc014d24ea4.woff2'},{'revision':null,'url':'0a28cd0b47497b71.woff'},{'revision':null,'url':'0a9765a89ff0437d.woff'},{'revision':null,'url':'0ae92bcea615e948.woff2'},{'revision':null,'url':'0be8520d8945b3b7.woff2'},{'revision':null,'url':'0bf5f337a1bf9187.js'},{'revision':null,'url':'0bf6b66a8b86b014.woff'},{'revision':null,'url':'0e7dd073cd8bb0ad.woff2'},{'revision':null,'url':'14869ac5d1830304.woff2'},{'revision':null,'url':'14aaceff85fc8b28.woff2'},{'revision':null,'url':'1590052e1cf8f28d.woff'},{'revision':null,'url':'16f443eed01776ca.woff2'},{'revision':null,'url':'183bae0e53a22182.woff2'},{'revision':null,'url':'19b239a0bb74b27e.woff'},{'revision':null,'url':'19c8f94ccd6289f5.woff2'},{'revision':null,'url':'1a24572453c2e538.js'},{'revision':null,'url':'1ae86565eab7451c.woff2'},{'revision':null,'url':'1af7a4d6b41cd1cd.js'},{'revision':null,'url':'1c7bf8797e0a9be6.woff2'},{'revision':null,'url':'1d9aff9a93a3bb66.woff'},{'revision':null,'url':'1f266d3619b30f16.woff2'},{'revision':null,'url':'1f8c5a4087a524fd.woff2'},{'revision':null,'url':'20ba2b23c5c0cd0b.woff2'},{'revision':null,'url':'218d03de949106fa.js'},{'revision':null,'url':'2269d45733c5cf8f.woff'},{'revision':null,'url':'258ecbd235953099.woff'},{'revision':null,'url':'283a712fa0ce77a6.js'},{'revision':null,'url':'295dd01a1fbfee6d.woff2'},{'revision':null,'url':'2d7f835ab7c7c764.woff'},{'revision':null,'url':'2ecffd6094f75ff7.js'},{'revision':null,'url':'2f66cca99eeead63.woff'},{'revision':null,'url':'2f686985e26e7107.woff2'},{'revision':null,'url':'315eff729e4ccbd9.woff2'},{'revision':null,'url':'32f1e5aadf845e08.woff'},{'revision':null,'url':'338484e1c850669c.woff'},{'revision':null,'url':'33b7a82f1e295190.woff'},{'revision':null,'url':'358c311631fbf075.js'},{'revision':null,'url':'3674d98ec4a9173d.woff'},{'revision':null,'url':'368d16e3259bf207.woff2'},{'revision':null,'url':'36c49aa341a7079a.woff2'},{'revision':null,'url':'36e1e0430475edee.woff2'},{'revision':null,'url':'38d4b8fb75f8850c.js'},{'revision':null,'url':'3b01402cd7292844.js'},{'revision':null,'url':'3bc19662b8630ee9.woff2'},{'revision':null,'url':'3f645f473b3f8fba.woff2'},{'revision':null,'url':'4095df88acae9e98.woff'},{'revision':null,'url':'4218ac9901b9d36d.woff2'},{'revision':null,'url':'4680ba68412e4da9.woff2'},{'revision':null,'url':'47d7a8698d562a0e.woff'},{'revision':null,'url':'47ec6c9dffe776a0.woff'},{'revision':null,'url':'48e37bd7ebf85a1f.woff2'},{'revision':null,'url':'48edfdf51dfb3160.woff'},{'revision':null,'url':'4a35a2746c8ad7a5.woff'},{'revision':null,'url':'4bc75ee78353dab4.js'},{'revision':null,'url':'4c46128f5543a744.js'},{'revision':null,'url':'4e11b8a7c445255f.woff2'},{'revision':null,'url':'4ea1f5c3baf89fe3.woff'},{'revision':null,'url':'4ea99f41c896bf9d.woff'},{'revision':null,'url':'5005db1d1caf70c7.woff'},{'revision':null,'url':'528a8e7c1c141a31.woff'},{'revision':null,'url':'52ca12f5b516d4ea.woff'},{'revision':null,'url':'537ddd61c5c1fce2.woff2'},{'revision':null,'url':'53baea24a93b42fc.js'},{'revision':null,'url':'5432f7541ec25c34.woff'},{'revision':null,'url':'54a95d73a9454ba3.woff'},{'revision':null,'url':'56c4118c0907f151.woff2'},{'revision':null,'url':'572e81f004cc10c5.js'},{'revision':null,'url':'58675205690e717d.js'},{'revision':null,'url':'5938bc2ae7ec60c0.woff2'},{'revision':null,'url':'594306657c4e44e8.woff'},{'revision':null,'url':'5a538aa477a66067.woff'},{'revision':null,'url':'5bd4d5d1e74e6532.js'},{'revision':null,'url':'5c6586155f0d278a.woff2'},{'revision':null,'url':'60ec587649ba812a.woff2'},{'revision':null,'url':'616567cd947eb9dd.woff'},{'revision':null,'url':'65168b59f44caab4.woff'},{'revision':null,'url':'65c0982f98374864.woff'},{'revision':null,'url':'65e6511e035870e1.woff2'},{'revision':null,'url':'661425f6798cd16a.woff2'},{'revision':null,'url':'66b864fe213caf46.woff2'},{'revision':null,'url':'6775fee945132ef9.woff'},{'revision':null,'url':'68bbd362c8e4983b.woff'},{'revision':null,'url':'68d6deec87b6b604.woff'},{'revision':null,'url':'69a7e6d31d390296.woff'},{'revision':null,'url':'69d087d970ee9455.woff2'},{'revision':null,'url':'69fa3fc7363bbc04.woff'},{'revision':null,'url':'6a1f0178b45b2e9e.woff'},{'revision':null,'url':'6c6c45e66ff54281.woff2'},{'revision':null,'url':'6f47008d9c93c1cb.js'},{'revision':'783f14fa45b10e088e68f98251448010','url':'6f47008d9c93c1cb.js.LICENSE.txt'},{'revision':null,'url':'6ffb9ed97b21fdc0.woff'},{'revision':null,'url':'7073a7323e92bd11.woff2'},{'revision':null,'url':'718c6cc31274ab1a.woff2'},{'revision':null,'url':'71ab27e0b8d1949e.js'},{'revision':'61baa3a5fc2eebeed7b52ce72e4992aa','url':'71ab27e0b8d1949e.js.LICENSE.txt'},{'revision':null,'url':'7245ef51b3517bf9.js'},{'revision':null,'url':'72cdbedfe04be9f9.woff2'},{'revision':null,'url':'7509c9f56fe9e532.woff2'},{'revision':null,'url':'75dc5c5b04adc8bf.woff2'},{'revision':null,'url':'76a7c256fc8b3490.woff'},{'revision':null,'url':'77b48bc05299ecca.woff2'},{'revision':null,'url':'787f56efa306ddbc.woff'},{'revision':null,'url':'79e0fe636d1ed41c.js'},{'revision':null,'url':'7a0a0215c248c73d.woff2'},{'revision':null,'url':'7b204450699b0daf.js'},{'revision':null,'url':'7c4463d9c84f263a.woff'},{'revision':null,'url':'7d112a556b7670d2.woff'},{'revision':null,'url':'7d52d6014b5f2bbc.woff'},{'revision':null,'url':'7f00bebb24e40167.woff2'},{'revision':null,'url':'7f2c6ea3e740417e.woff'},{'revision':null,'url':'802c6176541eeed7.woff2'},{'revision':null,'url':'8080081b3379c637.woff2'},{'revision':null,'url':'8274cc1afc7619f1.woff'},{'revision':null,'url':'8605507b7a8487c4.woff2'},{'revision':null,'url':'8a83d654702f6534.woff2'},{'revision':null,'url':'8ccee65f6cf254ee.woff'},{'revision':null,'url':'8d82a082a4aba439.woff'},{'revision':null,'url':'8de04ae985937b56.woff'},{'revision':null,'url':'8e0d11f862dfbba6.js'},{'revision':null,'url':'8fe71173a13fe571.woff2'},{'revision':null,'url':'90edccb224a51cee.woff'},{'revision':null,'url':'932785417ef383b8.js'},{'revision':null,'url':'935dd2c6ef71ecc9.js'},{'revision':null,'url':'94b292fe87831a8b.woff'},{'revision':null,'url':'95dc66c1b88745f8.woff'},{'revision':null,'url':'95fb698be77c85ef.woff'},{'revision':null,'url':'9624cec0f9bdd81e.woff2'},{'revision':null,'url':'965c9d9f6a80b848.js'},{'revision':null,'url':'9662331fa31e3f20.woff'},{'revision':null,'url':'98a3af55a1698171.woff2'},{'revision':null,'url':'9ba85996af74c5ce.woff2'},{'revision':null,'url':'9bc133b1df25cb74.woff'},{'revision':null,'url':'9c36bff0a4f1503e.js'},{'revision':null,'url':'9ddb22faa35006e7.woff2'},{'revision':null,'url':'9e97352380611b95.woff'},{'revision':null,'url':'a167fb2799dd741b.woff2'},{'revision':null,'url':'a2045a5cc4fdf94f.woff2'},{'revision':null,'url':'a246c73905a31c93.woff2'},{'revision':null,'url':'a401aa7939cb6e6f.woff2'},{'revision':null,'url':'a41a71258c38684d.woff'},{'revision':null,'url':'a528b4b01d62ed17.js'},{'revision':null,'url':'a60d94a72d615a8e.woff'},{'revision':null,'url':'a66764dd0c1fa213.woff'},{'revision':null,'url':'a6ed036f17a1ea29.woff2'},{'revision':null,'url':'a7792d6252d85b20.js'},{'revision':'6973c4dc40d031fe098d652147281cf0','url':'a7792d6252d85b20.js.LICENSE.txt'},{'revision':null,'url':'a7efa2596cd2be4f.js'},{'revision':'dbacaddfa543893ec51e7930e9eee4d1','url':'a7efa2596cd2be4f.js.LICENSE.txt'},{'revision':null,'url':'a8f635129d660202.woff'},{'revision':null,'url':'a9f25ca430709a1a.woff2'},{'revision':null,'url':'ae14d98ad8a1212c.woff'},{'revision':null,'url':'aeec4f78084adf7f.woff'},{'revision':null,'url':'af11e94b0644eba5.woff'},{'revision':null,'url':'afa9121a49e95351.woff2'},{'revision':null,'url':'afcda12d9f805543.woff2'},{'revision':null,'url':'b09ded85a7da77f1.woff2'},{'revision':null,'url':'b2f4e9d1e821b71c.woff2'},{'revision':null,'url':'b30b06698dc369b2.woff'},{'revision':null,'url':'b407f548b6fadfa3.js'},{'revision':null,'url':'b4a074bf828bb757.woff2'},{'revision':null,'url':'b500f36d715a6ea5.js'},{'revision':null,'url':'b7f447da43f6e596.woff2'},{'revision':null,'url':'b7f633b871b84820.woff'},{'revision':null,'url':'b87a5878f8961d1a.js'},{'revision':null,'url':'b88532bde74b513a.js'},{'revision':null,'url':'bb04bb60f8aa150f.js'},{'revision':null,'url':'bcca84a524572d10.woff2'},{'revision':null,'url':'bd8148abf2d524fc.js'},{'revision':null,'url':'be4d1f97b11d087c.woff2'},{'revision':null,'url':'be91def2232f6776.woff'},{'revision':null,'url':'bec14780d81164de.woff2'},{'revision':null,'url':'c285f4b15d11f172.woff'},{'revision':null,'url':'c2de24781179b3fc.js'},{'revision':null,'url':'c4673617b80801f3.woff'},{'revision':null,'url':'c553f7e0199c5084.woff2'},{'revision':null,'url':'c8470ed2c145ace7.woff'},{'revision':null,'url':'c9ba768259e8702c.js'},{'revision':null,'url':'c9bc7c77210219a8.js'},{'revision':null,'url':'c9d9ce9f465df4fe.woff2'},{'revision':null,'url':'cc0d293bb9b870d9.js'},{'revision':'61baa3a5fc2eebeed7b52ce72e4992aa','url':'cc0d293bb9b870d9.js.LICENSE.txt'},{'revision':null,'url':'ccb2870475da9fe8.woff'},{'revision':null,'url':'d04134fa33c2606d.woff'},{'revision':null,'url':'d11f9c5cd7d9ea16.woff'},{'revision':null,'url':'d188f7f036ac5779.woff2'},{'revision':null,'url':'d265d81c58525ae4.woff2'},{'revision':null,'url':'d5082a5140f450d7.js'},{'revision':null,'url':'d5942cd81663e136.woff2'},{'revision':null,'url':'d6097a5c452acf6d.woff'},{'revision':null,'url':'d66b8ff73d95cabb.woff2'},{'revision':null,'url':'d77f5bf95de8edaa.woff'},{'revision':null,'url':'d80423830df5e906.js'},{'revision':null,'url':'d80464c66e5d20d7.js'},{'revision':null,'url':'d8829a685af4f372.woff'},{'revision':null,'url':'d88899ef0fd16719.woff2'},{'revision':null,'url':'d9a5d958e69e058d.woff2'},{'revision':null,'url':'da65d9a514c628c8.woff'},{'revision':null,'url':'dac90d495be353a0.woff2'},{'revision':null,'url':'dd0262d4e75c15f8.js'},{'revision':null,'url':'dd7071bc6306585c.woff'},{'revision':null,'url':'dd8ce598529c3fab.woff2'},{'revision':null,'url':'ddef6f2dd566c2b9.woff'},{'revision':null,'url':'de013f1be25103fa.woff2'},{'revision':null,'url':'dee2ff599db31e5b.woff'},{'revision':null,'url':'dee7c6b5dd954d9b.woff'},{'revision':null,'url':'df222fceeffca849.woff2'},{'revision':null,'url':'e0d2e5b12f028b5d.woff'},{'revision':null,'url':'e33e3db8e4f7559f.woff'},{'revision':null,'url':'e419a658f4742c3e.js'},{'revision':'f7b599e3f88bf94d2af5d3f60873a311','url':'e419a658f4742c3e.js.LICENSE.txt'},{'revision':null,'url':'e62b00b9199c1ac9.woff2'},{'revision':null,'url':'e696cef1407b2610.woff2'},{'revision':null,'url':'e89ca83b24959664.woff'},{'revision':null,'url':'ea114697cfb59962.js'},{'revision':null,'url':'eb8c0ae77ad55249.woff'},{'revision':null,'url':'eccc74f925b1e148.js'},{'revision':null,'url':'ed0997bd7d221b8e.woff'},{'revision':null,'url':'eed48feba743e21c.woff2'},{'revision':null,'url':'f280bda8a6e535a6.woff'},{'revision':null,'url':'f368b00f4e1695a5.js'},{'revision':null,'url':'f543c88feb236d11.woff2'},{'revision':null,'url':'f591b0079faa93fe.woff2'},{'revision':null,'url':'f5c65190072bb3f7.js'},{'revision':null,'url':'f6ed27923769ad1d.woff2'},{'revision':null,'url':'f8803bebe640d99a.woff'},{'revision':'30de494bd9e73ae96c18fd0c06fa422b','url':'favicon.ico'},{'revision':null,'url':'fbebeb4336e67012.woff2'},{'revision':null,'url':'fcb385df17a82210.js'},{'revision':null,'url':'fd522cd7a5c646fe.woff'},{'revision':null,'url':'ff8fd36f7a9ca50a.js'},{'revision':null,'url':'https://dev3.openmrs.org/openmrs/spa/importmap.json'},{'revision':'b1b3227936fbd61f14b1dde3ea024662','url':'index.html'},{'revision':'6b758b31ea00150986994edcfb033a94','url':'logo-512.png'},{'revision':'b860db243392596e3b875bad9794b4e5','url':'logo.svg'},{'revision':null,'url':'openmrs.31b15ac64df7e8b7.css'},{'revision':null,'url':'openmrs.9696ea15df57b138.css'},{'revision':null,'url':'openmrs.a8a8ffd63ae9183f.js'}],De=Ie("index.html"),Ke=Pe(Ae.map((function(e){return Ie(e.url)}))),Me=".buildmanifest.json";function Ie(e){return new URL(e,self.location.href).href}const $e=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},Be=function(e){return T(e)&&"[object Arguments]"==C(e)};var qe=Object.prototype,Fe=qe.hasOwnProperty,Ne=qe.propertyIsEnumerable;const Ue=Be(function(){return arguments}())?Be:function(e){return T(e)&&Fe.call(e,"callee")&&!Ne.call(e,"callee")};var Le=x?x.isConcatSpreadable:void 0;const We=function(e){return k(e)||Ue(e)||!!(Le&&e&&e[Le])},He=function e(t,n,r,o,i){var a=-1,s=t.length;for(r||(r=We),i||(i=[]);++a<s;){var u=t[a];n>0&&r(u)?n>1?e(u,n-1,r,o,i):$e(i,u):o||(i[i.length]=u)}return i},ze=function(e){return null!=e&&e.length?He(e,1):[]};function Ge(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Ye(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ge(i,r,o,a,s,"next",e)}function s(e){Ge(i,r,o,a,s,"throw",e)}a(void 0)}))}}function Ve(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function Qe(e){return Je.apply(this,arguments)}function Je(){return Je=Ye((function(e){var t,n,r,o;return Ve(this,(function(i){switch(i.label){case 0:return t=e.imports,n=void 0===t?{}:t,r=Object.values(n),[4,Promise.all(r.map((a=Ye((function(e){var t,n;return Ve(this,(function(r){switch(r.label){case 0:return t=function(e){return e+Me}(e),[4,Xe(t)];case 1:return[2,(n=r.sent())?Ze(e,n):[]]}}))})),function(e){return a.apply(this,arguments)})))];case 1:return o=i.sent(),[2,ze(o)]}var a}))})),Je.apply(this,arguments)}function Xe(e){return fetch(e).then((function(e){return e.json()})).catch((function(){return null}))}function Ze(e,t){try{var n,r=[],o=((g=((m=new URL(e,self.location.href)).origin+m.pathname).split("/"))[g.length-1]="",g.join("/")),i=!0,a=!1,s=void 0;try{for(var u,c=(null!==(n=t.chunks)&&void 0!==n?n:[])[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var l,f=u.value,h=!0,d=!1,p=void 0;try{for(var y,v=(null!==(l=f.files)&&void 0!==l?l:[])[Symbol.iterator]();!(h=(y=v.next()).done);h=!0){var b=y.value;r.push(new URL(b,o).toString())}}catch(e){d=!0,p=e}finally{try{h||null==v.return||v.return()}finally{if(d)throw p}}}}catch(e){a=!0,s=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw s}}return r}catch(t){return console.error("[SW] Failed to determine the dependencies of the module with the URL %s. Not precaching any of the module's assets. Error: ",e,t),[]}var m,g}const et="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,tt=Object.keys,nt=Array.isArray;function rt(e,t){return"object"!=typeof t||tt(t).forEach((function(n){e[n]=t[n]})),e}"undefined"==typeof Promise||et.Promise||(et.Promise=Promise);const ot=Object.getPrototypeOf,it={}.hasOwnProperty;function at(e,t){return it.call(e,t)}function st(e,t){"function"==typeof t&&(t=t(ot(e))),("undefined"==typeof Reflect?tt:Reflect.ownKeys)(t).forEach((n=>{ct(e,n,t[n])}))}const ut=Object.defineProperty;function ct(e,t,n,r){ut(e,t,rt(n&&at(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function lt(e){return{from:function(t){return e.prototype=Object.create(t.prototype),ct(e.prototype,"constructor",e),{extend:st.bind(null,e.prototype)}}}}const ft=Object.getOwnPropertyDescriptor;function ht(e,t){let n;return ft(e,t)||(n=ot(e))&&ht(n,t)}const dt=[].slice;function pt(e,t,n){return dt.call(e,t,n)}function yt(e,t){return t(e)}function vt(e){if(!e)throw new Error("Assertion Failed")}function bt(e){et.setImmediate?setImmediate(e):setTimeout(e,0)}function mt(e,t){return e.reduce(((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})}function gt(e,t){if(at(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,o=t.length;r<o;++r){var i=gt(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:gt(s,t.substr(a+1))}}function wt(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){vt("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)wt(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===n?nt(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var u=e[a];u&&at(e,a)||(u=e[a]={}),wt(u,s,n)}}else void 0===n?nt(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function _t(e){var t={};for(var n in e)at(e,n)&&(t[n]=e[n]);return t}const xt=[].concat;function kt(e){return xt.apply([],e)}const St="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(kt([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>et[e])),Ot=St.map((e=>et[e]));mt(St,(e=>[e,!0]));let Pt=null;function Et(e){Pt="undefined"!=typeof WeakMap&&new WeakMap;const t=jt(e);return Pt=null,t}function jt(e){if(!e||"object"!=typeof e)return e;let t=Pt&&Pt.get(e);if(t)return t;if(nt(e)){t=[],Pt&&Pt.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(jt(e[n]))}else if(Ot.indexOf(e.constructor)>=0)t=e;else{const n=ot(e);for(var o in t=n===Object.prototype?{}:Object.create(n),Pt&&Pt.set(e,t),e)at(e,o)&&(t[o]=jt(e[o]))}return t}const{toString:Rt}={};function Ct(e){return Rt.call(e).slice(8,-1)}const Tt="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",At="symbol"==typeof Tt?function(e){var t;return null!=e&&(t=e[Tt])&&t.apply(e)}:function(){return null},Dt={};function Kt(e){var t,n,r,o;if(1===arguments.length){if(nt(e))return e.slice();if(this===Dt&&"string"==typeof e)return[e];if(o=At(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const Mt="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var It="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function $t(e,t){It=e,Bt=t}var Bt=()=>!0;const qt=!new Error("").stack;function Ft(){if(qt)try{throw Ft.arguments,new Error}catch(e){return e}return new Error}function Nt(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(Bt).map((e=>"\n"+e)).join("")):""}var Ut=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Lt=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Ut),Wt={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Ht(e,t){this._e=Ft(),this.name=e,this.message=t}function zt(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,n)=>n.indexOf(e)===t)).join("\n")}function Gt(e,t,n,r){this._e=Ft(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=zt(e,t)}function Yt(e,t){this._e=Ft(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=zt(e,t)}lt(Ht).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Nt(this._e,2))}},toString:function(){return this.name+": "+this.message}}),lt(Gt).from(Ht),lt(Yt).from(Ht);var Vt=Lt.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const Qt=Ht;var Jt=Lt.reduce(((e,t)=>{var n=t+"Error";function r(e,r){this._e=Ft(),this.name=n,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=Wt[t]||n,this.inner=null)}return lt(r).from(Qt),e[t]=r,e}),{});Jt.Syntax=SyntaxError,Jt.Type=TypeError,Jt.Range=RangeError;var Xt=Ut.reduce(((e,t)=>(e[t+"Error"]=Jt[t],e)),{}),Zt=Lt.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=Jt[t]),e)),{});function en(){}function tn(e){return e}function nn(e,t){return null==e||e===tn?t:function(n){return t(e(n))}}function rn(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function on(e,t){return e===en?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?rn(r,this.onsuccess):r),o&&(this.onerror=this.onerror?rn(o,this.onerror):o),void 0!==i?i:n}}function an(e,t){return e===en?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?rn(n,this.onsuccess):n),r&&(this.onerror=this.onerror?rn(r,this.onerror):r)}}function sn(e,t){return e===en?t:function(n){var r=e.apply(this,arguments);rt(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?rn(o,this.onsuccess):o),i&&(this.onerror=this.onerror?rn(i,this.onerror):i),void 0===r?void 0===a?void 0:a:rt(r,a)}}function un(e,t){return e===en?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function cn(e,t){return e===en?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return t.apply(r,i)}))}return t.apply(this,arguments)}}Zt.ModifyError=Gt,Zt.DexieError=Ht,Zt.BulkError=Yt;var ln={};const[fn,hn,dn]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,ot(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,ot(t),e]})(),pn=hn&&hn.then,yn=fn&&fn.constructor,vn=!!dn;var bn=!1,mn=dn?()=>{dn.then(Nn)}:et.setImmediate?setImmediate.bind(null,Nn):et.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{Nn(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(Nn,0)},gn=function(e,t){jn.push([e,t]),_n&&(mn(),_n=!1)},wn=!0,_n=!0,xn=[],kn=[],Sn=null,On=tn,Pn={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:fr,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{fr(e[0],e[1])}catch(e){}}))}},En=Pn,jn=[],Rn=0,Cn=[];function Tn(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=en,this._lib=!1;var t=this._PSD=En;if(It&&(this._stackHolder=Ft(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==ln)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Mn(this,this._value))}this._state=null,this._value=null,++t.ref,Kn(this,e)}const An={get:function(){var e=En,t=Jn;function n(n,r){var o=!e.global&&(e!==En||t!==Jn);const i=o&&!tr();var a=new Tn(((t,a)=>{$n(this,new Dn(cr(n,e,o,i),cr(r,e,o,i),t,a,e))}));return It&&Fn(a,this),a}return n.prototype=ln,n},set:function(e){ct(this,"then",e&&e.prototype===ln?An:{get:function(){return e},set:An.set})}};function Dn(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o}function Kn(e,t){try{t((t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&Un();t&&"function"==typeof t.then?Kn(e,((e,n)=>{t instanceof Tn?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,In(e)),n&&Ln()}}),Mn.bind(null,e))}catch(t){Mn(e,t)}}function Mn(e,t){if(kn.push(t),null===e._state){var n=e._lib&&Un();t=On(t),e._state=!1,e._value=t,It&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((()=>{var n=ht(t,"stack");t._promise=e,ct(t,"stack",{get:()=>bn?n&&(n.get?n.get.apply(t):n.value):e.stack})})),function(e){xn.some((t=>t._value===e._value))||xn.push(e)}(e),In(e),n&&Ln()}}function In(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)$n(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===Rn&&(++Rn,gn((()=>{0==--Rn&&Wn()}),[]))}function $n(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Rn,gn(Bn,[n,e,t])}else e._listeners.push(t)}function Bn(e,t,n){try{Sn=t;var r,o=t._value;t._state?r=e(o):(kn.length&&(kn=[]),r=e(o),-1===kn.indexOf(o)&&function(e){for(var t=xn.length;t;)if(xn[--t]._value===e._value)return void xn.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Sn=null,0==--Rn&&Wn(),--n.psd.ref||n.psd.finalize()}}function qn(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=Nt(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return It&&((r=Nt(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&qn(e._prev,t,n)),t}function Fn(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function Nn(){Un()&&Ln()}function Un(){var e=wn;return wn=!1,_n=!1,e}function Ln(){var e,t,n;do{for(;jn.length>0;)for(e=jn,jn=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(jn.length>0);wn=!0,_n=!0}function Wn(){var e=xn;xn=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=Cn.slice(0),n=t.length;n;)t[--n]()}function Hn(e){return new Tn(ln,!1,e)}function zn(e,t){var n=En;return function(){var r=Un(),o=En;try{return ir(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{ir(o,!1),r&&Ln()}}}st(Tn.prototype,{then:An,_then:function(e,t){$n(this,new Dn(null,null,e,t,En))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(e=>e instanceof t?n(e):Hn(e))):this.then(null,(e=>e&&e.name===t?n(e):Hn(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),Hn(t))))},stack:{get:function(){if(this._stack)return this._stack;try{bn=!0;var e=qn(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{bn=!1}}},timeout:function(e,t){return e<1/0?new Tn(((n,r)=>{var o=setTimeout((()=>r(new Jt.Timeout(t))),e);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&ct(Tn.prototype,Symbol.toStringTag,"Dexie.Promise"),Pn.env=ar(),st(Tn,{all:function(){var e=Kt.apply(null,arguments).map(nr);return new Tn((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach(((o,i)=>Tn.resolve(o).then((n=>{e[i]=n,--r||t(e)}),n)))}))},resolve:e=>{if(e instanceof Tn)return e;if(e&&"function"==typeof e.then)return new Tn(((t,n)=>{e.then(t,n)}));var t=new Tn(ln,!0,e);return Fn(t,Sn),t},reject:Hn,race:function(){var e=Kt.apply(null,arguments).map(nr);return new Tn(((t,n)=>{e.map((e=>Tn.resolve(e).then(t,n)))}))},PSD:{get:()=>En,set:e=>En=e},totalEchoes:{get:()=>Jn},newPSD:Zn,usePSD:sr,scheduler:{get:()=>gn,set:e=>{gn=e}},rejectionMapper:{get:()=>On,set:e=>{On=e}},follow:(e,t)=>new Tn(((n,r)=>Zn(((t,n)=>{var r=En;r.unhandleds=[],r.onunhandled=n,r.finalize=rn((function(){!function(e){Cn.push((function t(){e(),Cn.splice(Cn.indexOf(t),1)})),++Rn,gn((()=>{0==--Rn&&Wn()}),[])}((()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])}))}),r.finalize),e()}),t,n,r)))}),yn&&(yn.allSettled&&ct(Tn,"allSettled",(function(){const e=Kt.apply(null,arguments).map(nr);return new Tn((t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach(((e,o)=>Tn.resolve(e).then((e=>r[o]={status:"fulfilled",value:e}),(e=>r[o]={status:"rejected",reason:e})).then((()=>--n||t(r)))))}))})),yn.any&&"undefined"!=typeof AggregateError&&ct(Tn,"any",(function(){const e=Kt.apply(null,arguments).map(nr);return new Tn(((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach(((e,i)=>Tn.resolve(e).then((e=>t(e)),(e=>{o[i]=e,--r||n(new AggregateError(o))}))))}))})));const Gn={awaits:0,echoes:0,id:0};var Yn=0,Vn=[],Qn=0,Jn=0,Xn=0;function Zn(e,t,n,r){var o=En,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++Xn;var a=Pn.env;i.env=vn?{Promise:Tn,PromiseProp:{value:Tn,configurable:!0,writable:!0},all:Tn.all,race:Tn.race,allSettled:Tn.allSettled,any:Tn.any,resolve:Tn.resolve,reject:Tn.reject,nthen:lr(a.nthen,i),gthen:lr(a.gthen,i)}:{},t&&rt(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=sr(i,e,n,r);return 0===i.ref&&i.finalize(),s}function er(){return Gn.id||(Gn.id=++Yn),++Gn.awaits,Gn.echoes+=100,Gn.id}function tr(){return!!Gn.awaits&&(0==--Gn.awaits&&(Gn.id=0),Gn.echoes=100*Gn.awaits,!0)}function nr(e){return Gn.echoes&&e&&e.constructor===yn?(er(),e.then((e=>(tr(),e)),(e=>(tr(),hr(e))))):e}function rr(e){++Jn,Gn.echoes&&0!=--Gn.echoes||(Gn.echoes=Gn.id=0),Vn.push(En),ir(e,!0)}function or(){var e=Vn[Vn.length-1];Vn.pop(),ir(e,!1)}function ir(e,t){var n=En;if((t?!Gn.echoes||Qn++&&e===En:!Qn||--Qn&&e===En)||ur(t?rr.bind(null,e):or),e!==En&&(En=e,n===Pn&&(Pn.env=ar()),vn)){var r=Pn.env.Promise,o=e.env;hn.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(et,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function ar(){var e=et.Promise;return vn?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(et,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:hn.then,gthen:e.prototype.then}:{}}function sr(e,t,n,r,o){var i=En;try{return ir(e,!0),t(n,r,o)}finally{ir(i,!1)}}function ur(e){pn.call(fn,e)}function cr(e,t,n,r){return"function"!=typeof e?e:function(){var o=En;n&&er(),ir(t,!0);try{return e.apply(this,arguments)}finally{ir(o,!1),r&&ur(tr)}}}function lr(e,t){return function(n,r){return e.call(this,cr(n,t),cr(r,t))}}function fr(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(et.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),rt(r,o)):et.CustomEvent&&rt(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&et.dispatchEvent&&(dispatchEvent(r),!et.PromiseRejectionEvent&&et.onunhandledrejection))try{et.onunhandledrejection(r)}catch(e){}It&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+pn).indexOf("[native code]")&&(er=tr=en);var hr=Tn.reject;function dr(e,t,n,r){if(e.idbdb&&(e._state.openComplete||En.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===Vt.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>dr(e,t,n,r)))):hr(o)}return o._promise(t,((e,t)=>Zn((()=>(En.trans=o,r(e,t,o)))))).then((e=>o._completion.then((()=>e))))}if(e._state.openComplete)return hr(new Jt.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return hr(new Jt.DatabaseClosed);e.open().catch(en)}return e._state.dbReadyPromise.then((()=>dr(e,t,n,r)))}const pr=String.fromCharCode(65535),yr="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",vr=[],br="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),mr=br,gr=br,wr=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function _r(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const xr={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function kr(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=Et(t))[e],t)}class Sr{_trans(e,t,n){const r=this._tx||En.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new Jt.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}const a=Un();try{return r&&r.db===this.db?r===En.trans?r._promise(e,i,n):Zn((()=>r._promise(e,i,n)),{trans:r,transless:En.transless||En}):dr(this.db,e,[this.name],i)}finally{a&&Ln()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(t=>this.core.get({trans:t,key:e}).then((e=>this.hook.reading.fire(e))))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(nt(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=tt(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter((e=>e.compound&&t.every((t=>e.keyPath.indexOf(t)>=0))&&e.keyPath.every((e=>t.indexOf(e)>=0))))[0];if(n&&this.db._maxKey!==pr)return this.where(n.name).equals(n.keyPath.map((t=>e[t])));!n&&It&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}const[a,s]=t.reduce((([t,n],o)=>{const a=r[o],s=e[o];return[t||a,t||!a?_r(n,a&&a.multi?e=>{const t=gt(e,o);return nt(t)&&t.some((e=>i(s,e)))}:e=>i(s,gt(e,o))):n]}),[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):n?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,nt(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const n=Object.create(e.prototype);for(var r in t)if(at(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass((function(e){rt(this,e)}))}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=kr(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]}))).then((e=>e.numFailures?Tn.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{wt(e,r,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||nt(e))return this.where(":id").equals(e).modify(t);{const n=gt(e,this.schema.primKey.keyPath);if(void 0===n)return hr(new Jt.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?tt(t).forEach((n=>{wt(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=kr(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null}))).then((e=>e.numFailures?Tn.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{wt(e,r,t)}catch(e){}return t}))}delete(e){return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:[e]}))).then((e=>e.numFailures?Tn.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:xr}))).then((e=>e.numFailures?Tn.reject(e.failures[0]):void 0))}bulkGet(e){return this._trans("readonly",(t=>this.core.getMany({keys:e,trans:t}).then((e=>e.map((e=>this.hook.reading.fire(e)))))))}bulkAdd(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Jt.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Jt.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(kr(i)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new Yt(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,r)}))}))}bulkPut(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Jt.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Jt.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(kr(i)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new Yt(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,r)}))}))}bulkDelete(e){const t=e.length;return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:e}))).then((({numFailures:e,lastResult:n,failures:r})=>{if(0===e)return n;throw new Yt(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)}))}}function Or(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return a(e);r||(r=un),o||(o=en);var i={subscribers:[],fire:o,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=r(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter((function(t){return t!==e})),i.fire=i.subscribers.reduce(r,o)}};return t[e]=n[e]=i,i}function a(e){tt(e).forEach((function(t){var n=e[t];if(nt(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new Jt.InvalidArgument("Invalid event config");var r=i(t,tn,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){bt((function(){e.apply(null,t)}))}))}))}}))}}function Pr(e,t){return lt(t).from({prototype:e}),t}function Er(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function jr(e,t){e.filter=_r(e.filter,t)}function Rr(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>_r(r(),t()):t,e.justLimit=n&&!r}function Cr(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new Jt.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function Tr(e,t,n){const r=Cr(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function Ar(e,t,n,r){const o=e.replayFilter?_r(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},a=(e,n,r)=>{if(!o||o(n,r,(e=>n.stop(e)),(e=>n.fail(e)))){var a=n.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),at(i,s)||(i[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),Dr(Tr(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return Dr(Tr(e,r,n),_r(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function Dr(e,t,n,r){var o=zn(r?(e,t,o)=>n(r(e),t,o):n);return e.then((e=>{if(e)return e.start((()=>{var n=()=>e.continue();t&&!t(e,(e=>n=e),(t=>{e.stop(t),n=en}),(t=>{e.fail(t),n=en}))||o(e.value,e,(e=>n=e)),n()}))}))}function Kr(e,t){try{const n=Mr(e),r=Mr(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===r?0:n<r?-1:1}(Ir(e),Ir(t));case"Array":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=Kr(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function Mr(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=Ct(e);return"ArrayBuffer"===n?"binary":n}function Ir(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class $r{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,hr.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,hr.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=_r(t.algorithm,e)}_iterate(e,t){return Ar(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&rt(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((n=>Ar(t,e,n,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,n=t.table.core;if(Er(t,!0))return n.count({trans:e,query:{index:Cr(t,n.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var r=0;return Ar(t,(()=>(++r,!1)),e,n).then((()=>r))})).then(e)}sortBy(e,t){const n=e.split(".").reverse(),r=n[0],o=n.length-1;function i(e,t){return t?i(e[n[t]],t-1):e[r]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var n=i(e,o),r=i(t,o);return n<r?-a:n>r?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)}toArray(e){return this._read((e=>{var t=this._ctx;if("next"===t.dir&&Er(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=Cr(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:r,range:t.range}}).then((({result:e})=>n?e.map(n):e))}{const n=[];return Ar(t,(e=>n.push(e)),e,t.table.core).then((()=>n))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,Er(t)?Rr(t,(()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n((()=>{e.advance(t),t=0})),!1))})):Rr(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Rr(this._ctx,(()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}until(e,t){return jr(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}first(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}last(e){return this.reverse().first(e)}filter(e){var t,n;return jr(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=_r(t.isMatch,n),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&Er(t,!0)&&t.limit>0)return this._read((e=>{var n=Cr(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((({result:e})=>e)).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return jr(this._ctx,(function(e){var t=e.primaryKey.toString(),r=at(n,t);return n[t]=!0,!r})),this}modify(e){var t=this._ctx;return this._write((n=>{var r;if("function"==typeof e)r=e;else{var o=tt(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var a=o[r],s=e[a];gt(t,a)!==s&&(wt(t,a,s),n=!0)}return n}}const a=t.table.core,{outbound:s,extractKey:u}=a.schema.primaryKey,c=this.db._options.modifyChunkSize||200,l=[];let f=0;const h=[],d=(e,t)=>{const{failures:n,numFailures:r}=t;f+=e-r;for(let e of tt(n))l.push(n[e])};return this.clone().primaryKeys().then((o=>{const i=l=>{const f=Math.min(c,o.length-l);return a.getMany({trans:n,keys:o.slice(l,l+f),cache:"immutable"}).then((h=>{const p=[],y=[],v=s?[]:null,b=[];for(let e=0;e<f;++e){const t=h[e],n={value:Et(t),primKey:o[l+e]};!1!==r.call(n,n.value,n)&&(null==n.value?b.push(o[l+e]):s||0===Kr(u(t),u(n.value))?(y.push(n.value),s&&v.push(o[l+e])):(b.push(o[l+e]),p.push(n.value)))}const m=Er(t)&&t.limit===1/0&&("function"!=typeof e||e===Br)&&{index:t.index,range:t.range};return Promise.resolve(p.length>0&&a.mutate({trans:n,type:"add",values:p}).then((e=>{for(let t in e.failures)b.splice(parseInt(t),1);d(p.length,e)}))).then((()=>(y.length>0||m&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:v,values:y,criteria:m,changeSpec:"function"!=typeof e&&e}).then((e=>d(y.length,e))))).then((()=>(b.length>0||m&&e===Br)&&a.mutate({trans:n,type:"delete",keys:b,criteria:m}).then((e=>d(b.length,e))))).then((()=>o.length>l+f&&i(l+c)))}))};return i(0).then((()=>{if(l.length>0)throw new Gt("Error modifying one or more objects",l,f,h);return o.length}))}))}))}delete(){var e=this._ctx,t=e.range;return Er(e)&&(e.isPrimKey&&!gr||3===t.type)?this._write((n=>{const{primaryKey:r}=e.table.core.schema,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((t=>e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((({failures:e,lastResult:n,results:r,numFailures:o})=>{if(o)throw new Gt("Could not delete some values",Object.keys(e).map((t=>e[t])),t-o);return t-o}))))})):this.modify(Br)}}const Br=(e,t)=>t.value=null;function qr(e,t){return e<t?-1:e===t?0:1}function Fr(e,t){return e>t?-1:e===t?0:1}function Nr(e,t,n){var r=e instanceof Gr?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function Ur(e){return new e.Collection(e,(()=>zr(""))).limit(0)}function Lr(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),s=-1,u=0;u<a;++u){var c=t[u];if(c!==r[u])return o(e[u],n[u])<0?e.substr(0,u)+n[u]+n.substr(u+1):o(e[u],r[u])<0?e.substr(0,u)+r[u]+n.substr(u+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;o(e[u],c)<0&&(s=u)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):s<0?null:e.substr(0,s)+r[s]+n.substr(s+1)}function Wr(e,t,n,r){var o,i,a,s,u,c,l,f=n.length;if(!n.every((e=>"string"==typeof e)))return Nr(e,"String expected.");function h(e){o=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),i=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),a="next"===e?qr:Fr;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),u=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r}h("next");var d=new e.Collection(e,(()=>Hr(s[0],u[f-1]+r)));d._ondirectionchange=function(e){h(e)};var p=0;return d._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var h=i(o);if(t(h,u,p))return!0;for(var d=null,y=p;y<f;++y){var v=Lr(o,h,s[y],u[y],a,c);null===v&&null===d?p=y+1:(null===d||a(d,v)>0)&&(d=v)}return n(null!==d?function(){e.continue(d+l)}:r),!1})),d}function Hr(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function zr(e){return{type:1,lower:e,upper:e}}class Gr{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?Ur(this):new this.Collection(this,(()=>Hr(e,t,!n,!r)))}catch(e){return Nr(this,yr)}}equals(e){return null==e?Nr(this,yr):new this.Collection(this,(()=>zr(e)))}above(e){return null==e?Nr(this,yr):new this.Collection(this,(()=>Hr(e,void 0,!0)))}aboveOrEqual(e){return null==e?Nr(this,yr):new this.Collection(this,(()=>Hr(e,void 0,!1)))}below(e){return null==e?Nr(this,yr):new this.Collection(this,(()=>Hr(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?Nr(this,yr):new this.Collection(this,(()=>Hr(void 0,e)))}startsWith(e){return"string"!=typeof e?Nr(this,"String expected."):this.between(e,e+pr,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):Wr(this,((e,t)=>0===e.indexOf(t[0])),[e],pr)}equalsIgnoreCase(e){return Wr(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=Kt.apply(Dt,arguments);return 0===e.length?Ur(this):Wr(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=Kt.apply(Dt,arguments);return 0===e.length?Ur(this):Wr(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,pr)}anyOf(){const e=Kt.apply(Dt,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return Nr(this,yr)}if(0===e.length)return Ur(this);const n=new this.Collection(this,(()=>Hr(e[0],e[e.length-1])));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let r=0;return n._addAlgorithm(((n,o,i)=>{const a=n.key;for(;t(a,e[r])>0;)if(++r,r===e.length)return o(i),!1;return 0===t(a,e[r])||(o((()=>{n.continue(e[r])})),!1)})),n}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=Kt.apply(Dt,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Nr(this,yr)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return Ur(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0)))return Nr(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Jt.InvalidArgument);const s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;let c,l=r;function f(e,t){return l(e[0],t[0])}try{c=e.reduce((function(e,t){let r=0,o=e.length;for(;r<o;++r){const o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return r===o&&e.push(t),e}),[]),c.sort(f)}catch(e){return Nr(this,yr)}let h=0;const d=u?e=>r(e,c[h][1])>0:e=>r(e,c[h][1])>=0,p=s?e=>o(e,c[h][0])>0:e=>o(e,c[h][0])>=0;let y=d;const v=new this.Collection(this,(()=>Hr(c[0][0],c[c.length-1][1],!s,!u)));return v._ondirectionchange=e=>{"next"===e?(y=d,l=r):(y=p,l=o),c.sort(f)},v._addAlgorithm(((e,t,n)=>{for(var o=e.key;y(o);)if(++h,h===c.length)return t(n),!1;return!!function(e){return!d(e)&&!p(e)}(o)||(0===this._cmp(o,c[h][1])||0===this._cmp(o,c[h][0])||t((()=>{l===r?e.continue(c[h][0]):e.continue(c[h][1])})),!1)})),v}startsWithAnyOf(){const e=Kt.apply(Dt,arguments);return e.every((e=>"string"==typeof e))?0===e.length?Ur(this):this.inAnyRange(e.map((e=>[e,e+pr]))):Nr(this,"startsWithAnyOf() only works with strings")}}function Yr(e){return zn((function(t){return Vr(t),e(t.target.error),!1}))}function Vr(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const Qr=Or(null,"storagemutated");class Jr{_lock(){return vt(!En.global),++this._reculock,1!==this._reculock||En.global||(En.lockOwnerFor=this),this}_unlock(){if(vt(!En.global),0==--this._reculock)for(En.global||(En.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{sr(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&En.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(vt(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new Jt.DatabaseClosed(n);case"MissingAPIError":throw new Jt.MissingAPI(n.message,n);default:throw new Jt.OpenFailed(n)}if(!this.active)throw new Jt.TransactionInactive;return vt(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=zn((t=>{Vr(t),this._reject(e.error)})),e.onabort=zn((t=>{Vr(t),this.active&&this._reject(new Jt.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=zn((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&Qr.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return hr(new Jt.ReadOnly("Transaction is readonly"));if(!this.active)return hr(new Jt.TransactionInactive);if(this._locked())return new Tn(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},En])}));if(n)return Zn((()=>{var e=new Tn(((e,n)=>{this._lock();const r=t(e,n,this);r&&r.then&&r.then(e,n)}));return e.finally((()=>this._unlock())),e._lib=!0,e}));var r=new Tn(((e,n)=>{var r=t(e,n,this);r&&r.then&&r.then(e,n)}));return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();const n=Tn.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((()=>n));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new Tn(((e,r)=>{n.then((n=>t._waitingQueue.push(zn(e.bind(null,n)))),(e=>t._waitingQueue.push(zn(r.bind(null,e))))).finally((()=>{t._waitingFor===o&&(t._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Jt.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(at(t,e))return t[e];const n=this.schema[e];if(!n)throw new Jt.NotFound("Table "+e+" not part of transaction");const r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}function Xr(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+Zr(t)}}function Zr(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function eo(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:mt(n,(e=>[e.name,e]))}}let to=e=>{try{return e.only([[]]),to=()=>[[]],[[]]}catch(e){return to=()=>pr,pr}};function no(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>gt(t,e)}(e):t=>gt(t,e)}function ro(e){return[].slice.call(e)}let oo=0;function io(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function ao(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:n,upper:r,lowerOpen:o,upperOpen:i}=e;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}const{schema:o,hasGetAll:i}=function(e,t){const n=ro(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:n}=e,r=nt(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:no(t)},indexes:ro(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:n,multiEntry:r,keyPath:o}=e,a={name:t,compound:nt(o),keyPath:o,unique:n,multiEntry:r,extractKey:no(o)};return i[io(o)]=a,a})),getIndexByKeyPath:e=>i[io(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[io(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),a=o.tables.map((e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:n,keys:o,values:i,range:a}){return new Promise(((s,u)=>{s=zn(s);const c=e.objectStore(t),l=null==c.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:h}=o||i||{length:1};if(o&&i&&o.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===h)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let d;const p=[],y=[];let v=0;const b=e=>{++v,Vr(e)};if("deleteRange"===n){if(4===a.type)return s({numFailures:v,failures:y,results:[],lastResult:void 0});3===a.type?p.push(d=c.clear()):p.push(d=c.delete(r(a)))}else{const[e,t]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<h;++r)p.push(d=t&&void 0!==t[r]?c[n](e[r],t[r]):c[n](e[r])),d.onerror=b;else for(let t=0;t<h;++t)p.push(d=c[n](e[t])),d.onerror=b}const m=e=>{const t=e.target.result;p.forEach(((e,t)=>null!=e.error&&(y[t]=e.error))),s({numFailures:v,failures:y,results:"delete"===n?o:p.map((e=>e.result)),lastResult:t})};d.onerror=e=>{b(e),m(e)},d.onsuccess=m}))},getMany:({trans:e,keys:n})=>new Promise(((r,o)=>{r=zn(r);const i=e.objectStore(t),a=n.length,s=new Array(a);let u,c=0,l=0;const f=e=>{const t=e.target;s[t._pos]=t.result,++l===c&&r(s)},h=Yr(o);for(let e=0;e<a;++e)null!=n[e]&&(u=i.get(n[e]),u._pos=e,u.onsuccess=f,u.onerror=h,++c);0===c&&r(s)})),get:({trans:e,key:n})=>new Promise(((r,o)=>{r=zn(r);const i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=Yr(o)})),query:function(e){return n=>new Promise(((o,i)=>{o=zn(o);const{trans:a,values:s,limit:u,query:c}=n,l=u===1/0?void 0:u,{index:f,range:h}=c,d=a.objectStore(t),p=f.isPrimaryKey?d:d.index(f.name),y=r(h);if(0===u)return o({result:[]});if(e){const e=s?p.getAll(y,l):p.getAllKeys(y,l);e.onsuccess=e=>o({result:e.target.result}),e.onerror=Yr(i)}else{let e=0;const t=s||!("openKeyCursor"in p)?p.openCursor(y):p.openKeyCursor(y),n=[];t.onsuccess=r=>{const i=t.result;return i?(n.push(s?i.value:i.primaryKey),++e===u?o({result:n}):void i.continue()):o({result:n})},t.onerror=Yr(i)}}))}(i),openCursor:function({trans:e,values:n,query:o,reverse:i,unique:a}){return new Promise(((s,u)=>{s=zn(s);const{index:c,range:l}=o,f=e.objectStore(t),h=c.isPrimaryKey?f:f.index(c.name),d=i?a?"prevunique":"prev":a?"nextunique":"next",p=n||!("openKeyCursor"in h)?h.openCursor(r(l),d):h.openKeyCursor(r(l),d);p.onerror=Yr(u),p.onsuccess=zn((t=>{const n=p.result;if(!n)return void s(null);n.___id=++oo,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),a=()=>{throw new Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=zn(u),n.next=function(){let e=1;return this.start((()=>e--?this.continue():this.stop())).then((()=>this))},n.start=e=>{const t=new Promise(((e,t)=>{e=zn(e),p.onerror=Yr(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,e(t)}})),s=()=>{if(p.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return p.onsuccess=zn((e=>{p.onsuccess=s,s()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,s(),t},s(n)}),u)}))},count({query:e,trans:n}){const{index:o,range:i}=e;return new Promise(((e,a)=>{const s=n.objectStore(t),u=o.isPrimaryKey?s:s.index(o.name),c=r(i),l=c?u.count(c):u.count();l.onsuccess=zn((t=>e(t.target.result))),l.onerror=Yr(a)}))}}}(e))),s={};return a.forEach((e=>s[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!s[e])throw new Error(`Table '${e}' not found`);return s[e]},MIN_KEY:-1/0,MAX_KEY:to(t),schema:o}}function so({_novip:e},t){const n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},o){const i=function(e,t){return t.reduce(((e,{create:t})=>({...e,...t(e)})),e)}(ao(t,n,o),e.dbcore);return{dbcore:i}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach((t=>{const n=t.name;e.core.schema.tables.some((e=>e.name===n))&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))}))}function uo({_novip:e},t,n,r){n.forEach((n=>{const o=r[n];t.forEach((t=>{const r=ht(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?ct(t,n,{get(){return this.table(n)},set(e){ut(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))}))}))}function co({_novip:e},t){t.forEach((t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]}))}function lo(e,t){return e._cfg.version-t._cfg.version}function fo(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),s=En.transless||En;Zn((()=>{En.trans=i,En.transless=s,0===t?(tt(o).forEach((e=>{po(n,e,o[e].primKey,o[e].indexes)})),so(e,n),Tn.follow((()=>e.on.populate.fire(i))).catch(a)):function({_novip:e},t,n,r){const o=[],i=e._versions;let a=e._dbSchema=vo(0,e.idbdb,r),s=!1;return i.filter((e=>e._cfg.version>=t)).forEach((i=>{o.push((()=>{const o=a,u=i._cfg.dbschema;bo(e,o,r),bo(e,u,r),a=e._dbSchema=u;const c=ho(o,u);c.add.forEach((e=>{po(r,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((e=>{if(e.recreate)throw new Jt.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach((e=>yo(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),yo(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const l=i._cfg.contentUpgrade;if(l&&i._cfg.version>t){so(e,r),n._memoizedTables={},s=!0;let t=_t(u);c.del.forEach((e=>{t[e]=o[e]})),co(e,[e.Transaction.prototype]),uo(e,[e.Transaction.prototype],tt(t),t),n.schema=t;const i=Mt(l);let a;i&&er();const f=Tn.follow((()=>{if(a=l(n),a&&i){var e=tr.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?Tn.resolve(a):f.then((()=>a))}})),o.push((t=>{s&&mr||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((n=>null==e[n]&&t.db.deleteObjectStore(n)))}(i._cfg.dbschema,t),co(e,[e.Transaction.prototype]),uo(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}))})),function e(){return o.length?Tn.resolve(o.shift()(n.idbtrans)).then(e):Tn.resolve()}().then((()=>{var e,t;t=r,tt(e=a).forEach((n=>{t.db.objectStoreNames.contains(n)||po(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}function ho(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const o=e[r],i=t[r];if(o){const e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!br)e.recreate=!0,n.change.push(e);else{const t=o.idxByName,r=i.idxByName;let a;for(a in t)r[a]||e.del.push(a);for(a in r){const n=t[a],o=r[a];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}}else n.add.push([r,i])}return n}function po(e,t,n,r){const o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((e=>yo(o,e))),o}function yo(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function vo(e,t,n){const r={};return pt(t.objectStoreNames,0).forEach((e=>{const t=n.objectStore(e);let o=t.keyPath;const i=Xr(Zr(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);o=n.keyPath;var s=Xr(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=eo(e,i,a)})),r}function bo({_novip:e},t,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const n=a.indexNames[e],r=a.index(n).keyPath,o="string"==typeof r?r:"["+pt(r).join("+")+"]";if(t[i]){const e=t[i].idxByName[o];e&&(e.name=n,delete t[i].idxByName[o],t[i].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&et.WorkerGlobalScope&&et instanceof et.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class mo{_parseStoresSpec(e,t){tt(e).forEach((n=>{if(null!==e[n]){var r=e[n].split(",").map(((e,t)=>{const n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return Xr(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),nt(r),0===t)})),o=r.shift();if(o.multi)throw new Jt.Schema("Primary key cannot be multi-valued");r.forEach((e=>{if(e.auto)throw new Jt.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new Jt.Schema("Index must have a name and cannot be an empty string")})),t[n]=eo(n,o,r)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?rt(this._cfg.storesSource,e):e;const n=t._versions,r={};let o={};return n.forEach((e=>{rt(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,co(t,[t._allTables,t,t.Transaction.prototype]),uo(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],tt(o),o),t._storeNames=tt(o),this}upgrade(e){return this._cfg.contentUpgrade=cn(this._cfg.contentUpgrade||en,e),this}}function go(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new Fo("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function wo(e){return e&&"function"==typeof e.databases}function _o(e){return Zn((function(){return En.letThrough=!0,e()}))}function xo(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function ko(e){var t=t=>e.next(t),n=o(t),r=o((t=>e.throw(t)));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):nt(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function So(e,t,n){var r=arguments.length;if(r<2)throw new Jt.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,kt(o),n]}function Oo(e,t,n,r,o){return Tn.resolve().then((()=>{const i=En.transless||En,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===Vt.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Oo(e,t,n,null,o)))):hr(r)}const u=Mt(o);let c;u&&er();const l=Tn.follow((()=>{if(c=o.call(a,a),c)if(u){var e=tr.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=ko(c))}),s);return(c&&"function"==typeof c.then?Tn.resolve(c).then((e=>a.active?e:hr(new Jt.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>c))).then((e=>(r&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),hr(e))))}))}function Po(e,t,n){const r=nt(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const Eo={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const n=e.table(t),{schema:r}=n,o={},i=[];function a(e,t,n){const r=io(e),s=o[r]=o[r]||[],u=null==e?0:"string"==typeof e?1:e.length,c=t>0,l={...n,isVirtual:c,keyTail:t,keyLength:u,extractKey:no(e),unique:!c&&n.unique};return s.push(l),l.isPrimaryKey||i.push(l),u>1&&a(2===u?e[0]:e.slice(0,u-1),t+1,n),s.sort(((e,t)=>e.keyTail-t.keyTail)),l}const s=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[s];for(const e of r.indexes)a(e.keyPath,0,e);function u(t){const n=t.query.index;return n.isVirtual?{...t,query:{index:n,range:(r=t.query.range,o=n.keyTail,{type:1===r.type?2:r.type,lower:Po(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,o),lowerOpen:!0,upper:Po(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,o),upperOpen:!0})}}:t;var r,o}const c={...n,schema:{...r,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){const t=o[io(e)];return t&&t[0]}},count:e=>n.count(u(e)),query:e=>n.query(u(e)),openCursor(t){const{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(u(t)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(Po(o,t.reverse?e.MAX_KEY:e.MIN_KEY,r)):t.unique?n.continue(n.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(t,o){n.continuePrimaryKey(Po(t,e.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const e=n.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>n.value}});return o}(n))):n.openCursor(t)}};return c}}}};function jo(e,t,n,r){return n=n||{},r=r||"",tt(e).forEach((o=>{if(at(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const e=Ct(i);e!==Ct(a)?n[r+o]=t[o]:"Object"===e?jo(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0})),tt(t).forEach((o=>{at(e,o)||(n[r+o]=t[o])})),n}const Ro={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema,o={...n,mutate(e){const o=En.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===en)break;return o._promise("readwrite",(()=>u(e)),!0);case"put":if(a.fire===en&&s.fire===en)break;return o._promise("readwrite",(()=>u(e)),!0);case"delete":if(i.fire===en)break;return o._promise("readwrite",(()=>u(e)),!0);case"deleteRange":if(i.fire===en)break;return o._promise("readwrite",(()=>function(e){return c(e.trans,e.range,1e4)}(e)),!0)}return n.mutate(e);function u(e){const t=En.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:o}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then((u=>{const c=o.map(((n,o)=>{const c=u[o],l={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(l,n,c,t);else if("add"===e.type||void 0===c){const i=a.fire.call(l,n,e.values[o],t);null==n&&null!=i&&(n=i,e.keys[o]=n,r.outbound||wt(e.values[o],r.keyPath,n))}else{const r=jo(c,e.values[o]),i=s.fire.call(l,r,n,c,t);if(i){const t=e.values[o];Object.keys(i).forEach((e=>{at(t,e)?t[e]=i[e]:wt(t,e,i[e])}))}}return l}));return n.mutate(e).then((({failures:t,results:n,numFailures:r,lastResult:i})=>{for(let r=0;r<o.length;++r){const i=n?n[r]:o[r],a=c[r];null==i?a.onerror&&a.onerror(t[r]):a.onsuccess&&a.onsuccess("put"===e.type&&u[r]?e.values[r]:i)}return{failures:t,results:n,numFailures:r,lastResult:i}})).catch((e=>(c.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function c(e,t,o){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:o}).then((({result:n})=>u({type:"delete",keys:n,trans:e}).then((r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<o?{failures:[],numFailures:0,lastResult:void 0}:c(e,{...t,lower:n[n.length-1],lowerOpen:!0},o)))))}}};return o}})};function Co(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;const r=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===Kr(t.keys[o],e[i])&&(r.push(n?Et(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}const To={stack:"dbcore",level:-1,create:e=>({table:t=>{const n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);const t=Co(e.keys,e.trans._cache,"clone"===e.cache);return t?Tn.resolve(t):n.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?Et(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function Ao(e){return!("from"in e)}const Do=function(e,t){if(!this){const t=new Do;return e&&"d"in e&&rt(t,e),t}rt(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Ko(e,t,n){const r=Kr(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(Ao(e))return rt(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(Kr(n,e.from)<0)return o?Ko(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},$o(e);if(Kr(t,e.to)>0)return i?Ko(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},$o(e);Kr(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),Kr(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const a=!e.r;o&&!e.l&&Mo(e,o),i&&a&&Mo(e,i)}function Mo(e,t){Ao(t)||function e(t,{from:n,to:r,l:o,r:i}){Ko(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function Io(e){let t=Ao(e)?null:{s:0,n:e};return{next(e){const n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&Kr(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||Kr(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function $o(e){var t,n;const r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const t="r"===o?"l":"r",n={...e},r=e[o];e.from=r.from,e.to=r.to,e[o]=r[o],n[o]=r[t],e[t]=n,n.d=Bo(n)}e.d=Bo(e)}function Bo({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}st(Do.prototype,{add(e){return Mo(this,e),this},addKey(e){return Ko(this,e,e),this},addKeys(e){return e.forEach((e=>Ko(this,e,e))),this},[Tt](){return Io(this)}});const qo={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new Do(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const o=e.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:u}=a,c={...o,mutate:e=>{const a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),u=e=>{const n=`idb://${t}/${r}/${e}`;return s[n]||(s[n]=new Do)},c=u(""),l=u(":dels"),{type:f}=e;let[h,d]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const p=e.trans._cache;return o.mutate(e).then((e=>{if(nt(h)){"delete"!==f&&(h=e.results),c.addKeys(h);const t=Co(h,p);t||"add"===f||l.addKeys(h),(t||d)&&function(e,t,n,r){t.indexes.forEach((function(t){const o=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}const a=e=>t.multiEntry&&nt(e)?e.forEach((e=>o.addKey(e))):o.addKey(e);(n||r).forEach(((e,t)=>{const o=n&&i(n[t]),s=r&&i(r[t]);0!==Kr(o,s)&&(null!=o&&a(o),null!=s&&a(s))}))}))}(u,i,t,d)}else if(h){const e={from:h.lower,to:h.upper};l.add(e),c.add(e)}else c.add(n),l.add(n),i.indexes.forEach((e=>u(e.name).add(n)));return e}))}},l=({query:{index:t,range:n}})=>{var r,o;return[t,new Do(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:e.MAX_KEY)]},f={get:e=>[a,new Do(e.key)],getMany:e=>[a,(new Do).addKeys(e.keys)],count:l,query:l,openCursor:l};return tt(f).forEach((e=>{c[e]=function(i){const{subscr:a}=En;if(a){const c=e=>{const n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new Do)},l=c(""),h=c(":dels"),[d,p]=f[e](i);if(c(d.name||"").add(p),!d.isPrimaryKey){if("count"!==e){const t="query"===e&&u&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then((n=>{if("query"===e){if(u&&i.values)return t.then((({result:e})=>(l.addKeys(e),n)));const e=i.values?n.result.map(s):n.result;i.values?l.addKeys(e):h.addKeys(e)}else if("openCursor"===e){const e=n,t=i.values;return e&&Object.create(e,{key:{get:()=>(h.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return h.addKey(t),t}},value:{get:()=>(t&&l.addKey(e.primaryKey),e.value)}})}return n}))}h.add(n)}}return o[e].apply(this,arguments)}})),c}}}};class Fo{constructor(e,t){this._middlewares={},this.verno=0;const n=Fo.dependencies;this._options=t={addons:Fo.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:r}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:en,dbReadyPromise:null,cancelOpen:en,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new Tn((e=>{o.dbReadyResolve=e})),o.openCanceller=new Tn(((e,t)=>{o.cancelOpen=t})),this._state=o,this.name=e,this.on=Or(this,"populate","blocked","versionchange","close",{ready:[cn,en]}),this.on.ready.subscribe=yt(this.on.ready.subscribe,(e=>(t,n)=>{Fo.vip((()=>{const r=this._state;if(r.openComplete)r.dbOpenError||Tn.resolve().then(t),n&&e(t);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(t),n&&e(t);else{e(t);const r=this;n||e((function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)}))}}))})),this.Collection=(i=this,Pr($r.prototype,(function(e,t){this.db=i;let n=xr,r=null;if(t)try{n=t()}catch(e){r=e}const o=e._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:s!==tn?s:null}}))),this.Table=function(e){return Pr(Sr.prototype,(function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:Or(null,{creating:[on,en],reading:[nn,tn],updating:[sn,en],deleting:[an,en]})}))}(this),this.Transaction=function(e){return Pr(Jr.prototype,(function(t,n,r,o,i){this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=Or(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Tn(((e,t)=>{this._resolve=e,this._reject=t})),this._completion.then((()=>{this.active=!1,this.on.complete.fire()}),(e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),hr(e)}))}))}(this),this.Version=function(e){return Pr(mo.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Pr(Gr.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};const o=e._deps.indexedDB;if(!o)throw new Jt.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>o.cmp(e,t)<0?e:t,this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()})),this.on("blocked",(e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)})),this._maxKey=to(t.IDBKeyRange),this._createTransaction=(e,t,n,r)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),vr.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(Eo),this.use(Ro),this.use(qo),this.use(To),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new Jt.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Jt.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const t=this._versions;var n=t.filter((t=>t._cfg.version===e))[0];return n||(n=new this.Version(e),t.push(n),t.sort(lo),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||En.letThrough||this._vip)?e():new Tn(((e,t)=>{if(this._state.openComplete)return t(new Jt.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new Jt.DatabaseClosed);this.open().catch(en)}this._state.dbReadyPromise.then(e,t)})).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});const o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==n?10:n,name:r}),o.sort(((e,t)=>e.level-t.level)),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((e=>n?e.create!==n:!!t&&e.name!==t))),this}open(){return function(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((()=>t.dbOpenError?hr(t.dbOpenError):e));It&&(t.openCanceller._stackHolder=Ft()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new Jt.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,a=null,s=!1;return Tn.race([r,("undefined"==typeof navigator?Tn.resolve():xo()).then((()=>new Tn(((r,i)=>{if(o(),!n)throw new Jt.MissingAPI;const u=e.name,c=t.autoSchema?n.open(u):n.open(u,Math.round(10*e.verno));if(!c)throw new Jt.MissingAPI;c.onerror=Yr(i),c.onblocked=zn(e._fireOnBlocked),c.onupgradeneeded=zn((r=>{if(a=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=Vr,a.abort(),c.result.close();const e=n.deleteDatabase(u);e.onsuccess=e.onerror=zn((()=>{i(new Jt.NoSuchDatabase(`Database ${u} doesnt exist`))}))}else{a.onerror=Yr(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;s=o<1,e._novip.idbdb=c.result,fo(e,o/10,a,i)}}),i),c.onsuccess=zn((()=>{a=null;const n=e._novip.idbdb=c.result,o=pt(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");t.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;const r=e._dbSchema=vo(0,t,n);e._storeNames=pt(t.objectStoreNames,0),uo(e,[e._allTables],tt(r),r)}(e,n,r):(bo(e,e._dbSchema,r),function(e,t){const n=ho(vo(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((e=>e.add.length||e.change.length)))}(e,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),so(e,r)}catch(e){}var i;vr.push(e),n.onversionchange=zn((n=>{t.vcFired=!0,e.on("versionchange").fire(n)})),n.onclose=zn((t=>{e.on("close").fire(t)})),s&&function({indexedDB:e,IDBKeyRange:t},n){!wo(e)&&"__dbnames"!==n&&go(e,t).put({name:n}).catch(en)}(e._deps,u),r()}),i)}))))]).then((()=>(o(),t.onReadyBeingFired=[],Tn.resolve(_o((()=>e.on.ready.fire(e.vip)))).then((function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(cn,en);return t.onReadyBeingFired=[],Tn.resolve(_o((()=>r(e.vip)))).then(n)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((n=>{t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),hr(n)})).finally((()=>{t.openComplete=!0,i()}))}(this)}_close(){const e=this._state,t=vr.indexOf(this);if(t>=0&&vr.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new Tn((t=>{e.dbReadyResolve=t})),e.openCanceller=new Tn(((t,n)=>{e.cancelOpen=n}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new Jt.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new Tn(((n,r)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=zn((()=>{!function({indexedDB:e,IDBKeyRange:t},n){!wo(e)&&"__dbnames"!==n&&go(e,t).delete(n).catch(en)}(this._deps,this.name),n()})),e.onerror=Yr(r),e.onblocked=this._fireOnBlocked};if(e)throw new Jt.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return tt(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=So.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=En.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const o=-1!==e.indexOf("?");let i,a;e=e.replace("!","").replace("?","");try{if(a=t.map((e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new Jt.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new Jt.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!o)throw new Jt.SubTransaction("Table "+e+" not included in parent transaction.");r=null}})),o&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,((t,n)=>{n(e)})):hr(e)}const s=Oo.bind(null,this,i,a,r,n);return r?r._promise(i,s,"lock"):En.trans?sr(En.transless,(()=>this._whenReady(s))):this._whenReady(s)}table(e){if(!at(this._allTables,e))throw new Jt.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const No="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class Uo{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[No](){return this}}function Lo(e,t){return tt(t).forEach((n=>{Mo(e[n]||(e[n]=new Do),t[n])})),e}let Wo;try{Wo={indexedDB:et.indexedDB||et.mozIndexedDB||et.webkitIndexedDB||et.msIndexedDB,IDBKeyRange:et.IDBKeyRange||et.webkitIDBKeyRange}}catch(et){Wo={indexedDB:null,IDBKeyRange:null}}const Ho=Fo;function zo(e){let t=Go;try{Go=!0,Qr.storagemutated.fire(e)}finally{Go=t}}st(Ho,{...Zt,delete:e=>new Ho(e,{addons:[]}).delete(),exists:e=>new Ho(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return wo(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):go(e,t).toCollection().primaryKeys()}(Ho.dependencies).then(e)}catch(e){return hr(new Jt.MissingAPI)}},defineClass:()=>function(e){rt(this,e)},ignoreTransaction:e=>En.trans?sr(En.transless,e):e(),vip:_o,async:function(e){return function(){try{var t=ko(e.apply(this,arguments));return t&&"function"==typeof t.then?t:Tn.resolve(t)}catch(e){return hr(e)}}},spawn:function(e,t,n){try{var r=ko(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:Tn.resolve(r)}catch(e){return hr(e)}},currentTransaction:{get:()=>En.trans||null},waitFor:function(e,t){const n=Tn.resolve("function"==typeof e?Ho.ignoreTransaction(e):e).timeout(t||6e4);return En.trans?En.trans.waitFor(n):n},Promise:Tn,debug:{get:()=>It,set:e=>{$t(e,"dexie"===e?()=>!0:wr)}},derive:lt,extend:rt,props:st,override:yt,Events:Or,on:Qr,liveQuery:function(e){return new Uo((t=>{const n=Mt(e);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,Qr.storagemutated.unsubscribe(l)}};t.start&&t.start(a);let s=!1,u=!1;function c(){return tt(i).some((e=>o[e]&&function(e,t){const n=Io(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=Io(e);let a=i.next(o.from),s=a.value;for(;!r.done&&!a.done;){if(Kr(s.from,o.to)<=0&&Kr(s.to,o.from)>=0)return!0;Kr(o.from,s.from)<0?o=(r=n.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e])))}const l=e=>{Lo(o,e),c()&&f()},f=()=>{if(s||r)return;o={};const h={},d=function(t){n&&er();const r=()=>Zn(e,{subscr:t,trans:null}),o=En.trans?sr(En.transless,r):r();return n&&o.then(tr,tr),o}(h);u||(Qr("storagemutated",l),u=!0),s=!0,Promise.resolve(d).then((e=>{s=!1,r||(c()?f():(o={},i=h,t.next&&t.next(e)))}),(e=>{s=!1,t.error&&t.error(e),a.unsubscribe()}))};return f(),a}))},extendObservabilitySet:Lo,getByKeyPath:gt,setByKeyPath:wt,delByKeyPath:function(e,t){"string"==typeof t?wt(e,t,void 0):"length"in t&&[].map.call(t,(function(t){wt(e,t,void 0)}))},shallowClone:_t,deepClone:Et,getObjectDiff:jo,cmp:Kr,asap:bt,minKey:-1/0,addons:[],connections:vr,errnames:Vt,dependencies:Wo,semVer:"3.2.3",version:"3.2.3".split(".").map((e=>parseInt(e))).reduce(((e,t,n)=>e+t/Math.pow(10,2*n)))}),Ho.maxKey=to(Ho.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Qr("storagemutated",(e=>{if(!Go){let t;br?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),Go=!0,dispatchEvent(t),Go=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{Go||zo(e)})));let Go=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");"function"==typeof e.unref&&e.unref(),Qr("storagemutated",(t=>{Go||e.postMessage(t)})),e.onmessage=e=>{e.data&&zo(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){Qr("storagemutated",(e=>{try{Go||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:"x-storagemutated-1",changedParts:e}))))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&zo(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&zo(e.changedParts)}))}function Yo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vo(e){return Vo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Vo(e)}function Qo(e,t){return Qo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Qo(e,t)}function Jo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Vo(e);if(t){var o=Vo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?Yo(e):t;var n}(this,n)}}Tn.rejectionMapper=function(e,t){if(!e||e instanceof Ht||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Xt[e.name])return e;var n=new Xt[e.name](t||e.message,e);return"stack"in e&&ct(n,"stack",{get:function(){return this.inner.stack}}),n},$t(It,wr);var Xo=function(e){!function(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}}),t&&Qo(e,t)}(n,e);var t=Jo(n);function n(){var e,r,o,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),i=void 0,(o="dynamicRouteRegistrations")in(r=Yo(e=t.call(this,"ServiceWorker")))?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,e.version(1).stores({dynamicRouteRegistrations:"++,&pattern"}),e.dynamicRouteRegistrations=e.table("dynamicRouteRegistrations"),e}return n}(Fo);function Zo(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function ei(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Zo(i,r,o,a,s,"next",e)}function s(e){Zo(i,r,o,a,s,"throw",e)}a(void 0)}))}}function ti(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function ni(e){return ri.apply(this,arguments)}function ri(){return(ri=ei((function(e){var t;return ti(this,(function(n){switch(n.label){case 0:return[4,Qe(e)];case 1:return[4,ai(t=n.sent())];case 2:return n.sent(),[4,oi(t)];case 3:return n.sent(),[2]}}))}))).apply(this,arguments)}function oi(e){return ii.apply(this,arguments)}function ii(){return ii=ei((function(e){var t,n,r,o;return ti(this,(function(i){switch(i.label){case 0:return 0===e.length?[2]:[4,caches.open(Te)];case 1:return t=i.sent(),[4,Promise.all(e.map((a=ei((function(e){return ti(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,N((function(){return t.add(e)}),{onError:function(t,n){return console.debug("[SW] Failure attempt ".concat(n,' at caching "').concat(e,'". Error: '),t)}})];case 1:return n.sent(),[2,{url:e,success:!0}];case 2:return n.sent(),[2,{url:e,success:!1}];case 3:return[2]}}))})),function(e){return a.apply(this,arguments)})))];case 2:return n=i.sent(),r=n.filter((function(e){return e.success})),o=n.filter((function(e){return!e.success})),r.length>0&&console.debug("[SW] Successfully added ".concat(r.length," URLs to the OMRS cache. URLs: "),r.map((function(e){return e.url}))),o.length>0&&console.error("[SW] Failed to cache ".concat(o.length," URLs. URLs: "),o.map((function(e){return e.url}))),[2]}var a}))})),ii.apply(this,arguments)}function ai(e){return si.apply(this,arguments)}function si(){return si=ei((function(e){var t,n,r,o;return ti(this,(function(i){switch(i.label){case 0:return[4,caches.open(Te)];case 1:return[4,(t=i.sent()).keys()];case 2:return n=i.sent().map((function(e){return e.url})),[4,(new Xo).dynamicRouteRegistrations.toArray()];case 3:return r=i.sent(),o=n.filter((function(t){return!Ke.includes(t)&&!e.includes(t)&&!r.some((function(e){return new RegExp(e.pattern).test(t)}))})),console.info("[SW] Removing the following expired URLs from the cache: ",o),console.debug("[SW] The following URLs were known and not invalidated: ",Ke,e,r),[4,Promise.all(o.map((function(e){return t.delete(e)})))];case 4:return i.sent(),[2]}}))})),si.apply(this,arguments)}function ui(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function ci(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ui(i,r,o,a,s,"next",e)}function s(e){ui(i,r,o,a,s,"throw",e)}a(void 0)}))}}function li(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var fi={onImportMapChanged:function(e){return hi.apply(this,arguments)},clearDynamicRoutes:function(){return di.apply(this,arguments)},registerDynamicRoute:function(e){return pi.apply(this,arguments)}};function hi(){return(hi=ci((function(e){return li(this,(function(t){switch(t.label){case 0:return[4,ni(e.importMap)];case 1:return t.sent(),[2]}}))}))).apply(this,arguments)}function di(){return(di=ci((function(){return li(this,(function(e){switch(e.label){case 0:return[4,(new Xo).dynamicRouteRegistrations.clear()];case 1:return e.sent(),[2]}}))}))).apply(this,arguments)}function pi(){return(pi=ci((function(e){var t,n,r,o,i;return li(this,(function(a){switch(a.label){case 0:return t=e.pattern,n=e.url,r=e.strategy,!(o=t)&&n&&(o="^".concat($(n),"$")),o?(i={pattern:o,strategy:r},[4,(new Xo).dynamicRouteRegistrations.put(i)]):[3,2];case 1:a.sent(),a.label=2;case 2:return[2]}}))}))).apply(this,arguments)}function yi(){return yi=ci((function(e){var t,n,r,o,i,a,s,u;function c(e){console.warn("[SW] Handling a message resulted in an error.",e),l({success:!1,error:e})}function l(t){e.ports[0].postMessage(null!=t?t:{})}return li(this,(function(f){switch(f.label){case 0:if(!(o=fi[null!==(r=null===(t=e.data)||void 0===t||null===(n=t.type)||void 0===n?void 0:n.toString())&&void 0!==r?r:""]))return c('Received an unknown message of type "'.concat(null===(i=e.data)||void 0===i?void 0:i.type," which cannot be handled.")),[2];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,o(e.data)];case 2:return l({success:!0,result:f.sent()}),[3,4];case 3:return a=f.sent(),c(null!==(u=null!==(s=null==a?void 0:a.message)&&void 0!==s?s:null==a?void 0:a.toString())&&void 0!==u?u:"Unknown error."),[3,4];case 4:return[2]}}))})),yi.apply(this,arguments)}n(585);var vi=["DELETE","GET","HEAD","PATCH","POST","PUT"],bi=function(e){return e&&"object"==typeof e?e:{handle:e}};function mi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var gi=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GET";!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.handler=bi(n),this.match=t,this.method=r}var t,n;return t=e,(n=[{key:"setCatchHandler",value:function(e){this.catchHandler=bi(e)}}])&&mi(t.prototype,n),e}();function wi(e){return wi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},wi(e)}function _i(e,t){return _i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_i(e,t)}function xi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wi(e);if(t){var o=wi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var n}(this,n)}}var ki=function(e){!function(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}}),t&&_i(e,t)}(n,e);var t=xi(n);function n(e,r,o){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t.call(this,(function(t){var n=t.url,r=e.exec(n.href);if(r&&(n.origin===location.origin||0===r.index))return r.slice(1)}),r,o)}return n}(gi);function Si(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Oi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Pi(e,t,n){return Pi=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Ri(o,n.prototype),o},Pi.apply(null,arguments)}function Ei(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ji(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Ri(e,t){return Ri=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ri(e,t)}var Ci,Ti=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._routes=new Map,this._defaultHandlerMap=new Map}var t,n;return t=e,n=[{key:"routes",get:function(){return this._routes}},{key:"addFetchListener",value:function(){var e=this;self.addEventListener("fetch",(function(t){var n=t.request,r=e.handleRequest({request:n,event:t});r&&t.respondWith(r)}))}},{key:"addCacheListener",value:function(){var e=this;self.addEventListener("message",(function(t){if(t.data&&"CACHE_URLS"===t.data.type){var n=t.data.payload,r=Promise.all(n.urlsToCache.map((function(n){"string"==typeof n&&(n=[n]);var r,o=Pi(Request,function(e){if(Array.isArray(e))return Si(e)}(r=n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Si(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Si(e,t):void 0}}(r)||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.")}());return e.handleRequest({request:o,event:t})})));t.waitUntil(r),t.ports&&t.ports[0]&&r.then((function(){return t.ports[0].postMessage(!0)}))}}))}},{key:"handleRequest",value:function(e){var t=e.request,n=e.event,r=new URL(t.url,location.href);if(r.protocol.startsWith("http")){var o=r.origin===location.origin,i=this.findMatchingRoute({event:n,request:t,sameOrigin:o,url:r}),a=i.params,s=i.route,u=s&&s.handler,c=t.method;if(!u&&this._defaultHandlerMap.has(c)&&(u=this._defaultHandlerMap.get(c)),u){var l;try{l=u.handle({url:r,request:t,event:n,params:a})}catch(e){l=Promise.reject(e)}var f,h=s&&s.catchHandler;if(ji(l,Promise)&&(this._catchHandler||h)){var d=this;l=l.catch((f=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Oi(i,r,o,a,s,"next",e)}function s(e){Oi(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(e){var o;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(i){switch(i.label){case 0:if(!h)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,h.handle({url:r,request:t,event:n,params:a})];case 2:return[2,i.sent()];case 3:return ji(o=i.sent(),Error)&&(e=o),[3,4];case 4:if(d._catchHandler)return[2,d._catchHandler.handle({url:r,request:t,event:n})];throw e}}))})),function(e){return f.apply(this,arguments)}))}return l}}}},{key:"findMatchingRoute",value:function(e){var t=e.url,n=e.sameOrigin,r=e.request,o=e.event,i=this._routes.get(r.method)||[],a=!0,s=!1,u=void 0;try{for(var c,l=i[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var f=c.value,h=void 0,d=f.match({url:t,sameOrigin:n,request:r,event:o});if(d)return h=d,(Array.isArray(h)&&0===h.length||d.constructor===Object&&0===Object.keys(d).length||"boolean"==typeof d)&&(h=void 0),{route:f,params:h}}}catch(e){s=!0,u=e}finally{try{a||null==l.return||l.return()}finally{if(s)throw u}}return{}}},{key:"setDefaultHandler",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";this._defaultHandlerMap.set(t,bi(e))}},{key:"setCatchHandler",value:function(e){this._catchHandler=bi(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 a("unregister-route-but-not-found-with-method",{method:e.method});var t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new a("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}],n&&Ei(t.prototype,n),e}(),Ai=function(){return Ci||((Ci=new Ti).addFetchListener(),Ci.addCacheListener()),Ci};function Di(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Ki(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Ii(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Mi(i,r,o,a,s,"next",e)}function s(e){Mi(i,r,o,a,s,"throw",e)}a(void 0)}))}}function $i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bi(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function qi(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function Fi(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ni(e){return"string"==typeof e?new Request(e):e}n(238);var Ui=function(){function e(t,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._cacheKeys={},Object.assign(this,n),this.event=n.event,this._strategy=t,this._handlerDeferred=new p,this._extendLifetimePromises=[],this._plugins=function(e){if(Array.isArray(e))return Ki(e)}(r=t.plugins)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Ki(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ki(e,t):void 0}}(r)||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.")}(),this._pluginStateMap=new Map;var o=!0,i=!1,a=void 0;try{for(var s,u=this._plugins[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value;this._pluginStateMap.set(c,{})}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}this.event.waitUntil(this._handlerDeferred.promise)}var t,n;return t=e,(n=[{key:"fetch",value:function(e){var t=this;return Ii((function(){var n,r,o,i,s,u,c,l,f,h,d,p,y,v,b,m,g,w,_;return qi(this,(function(x){switch(x.label){case 0:return n=t.event,"navigate"===(r=Ni(e)).mode&&Bi(n,FetchEvent)&&n.preloadResponse?[4,n.preloadResponse]:[3,2];case 1:if(o=x.sent())return[2,o];x.label=2;case 2:i=t.hasCallback("fetchDidFail")?r.clone():null,x.label=3;case 3:x.trys.push([3,12,,13]),s=!0,u=!1,c=void 0,x.label=4;case 4:x.trys.push([4,9,10,11]),l=t.iterateCallbacks("requestWillFetch")[Symbol.iterator](),x.label=5;case 5:return(s=(f=l.next()).done)?[3,8]:[4,(0,f.value)({request:r.clone(),event:n})];case 6:r=x.sent(),x.label=7;case 7:return s=!0,[3,5];case 8:return[3,11];case 9:return w=x.sent(),u=!0,c=w,[3,11];case 10:try{s||null==l.return||l.return()}finally{if(u)throw c}return[7];case 11:return[3,13];case 12:if(Bi(h=x.sent(),Error))throw new a("plugin-error-request-will-fetch",{thrownErrorMessage:h.message});return[3,13];case 13:d=r.clone(),x.label=14;case 14:return x.trys.push([14,24,,27]),[4,fetch(r,"navigate"===r.mode?void 0:t._strategy.fetchOptions)];case 15:p=x.sent(),y=!0,v=!1,b=void 0,x.label=16;case 16:x.trys.push([16,21,22,23]),m=t.iterateCallbacks("fetchDidSucceed")[Symbol.iterator](),x.label=17;case 17:return(y=(g=m.next()).done)?[3,20]:[4,(0,g.value)({event:n,request:d,response:p})];case 18:p=x.sent(),x.label=19;case 19:return y=!0,[3,17];case 20:return[3,23];case 21:return w=x.sent(),v=!0,b=w,[3,23];case 22:try{y||null==m.return||m.return()}finally{if(v)throw b}return[7];case 23:return[2,p];case 24:return _=x.sent(),i?[4,t.runCallbacks("fetchDidFail",{error:_,event:n,originalRequest:i.clone(),request:d.clone()})]:[3,26];case 25:x.sent(),x.label=26;case 26:throw _;case 27:return[2]}}))}))()}},{key:"fetchAndCachePut",value:function(e){var t=this;return Ii((function(){var n,r;return qi(this,(function(o){switch(o.label){case 0:return[4,t.fetch(e)];case 1:return n=o.sent(),r=n.clone(),t.waitUntil(t.cachePut(e,r)),[2,n]}}))}))()}},{key:"cacheMatch",value:function(e){var t=this;return Ii((function(){var n,r,o,i,a,s,u,c,l,f,h,d,p;return qi(this,(function(y){switch(y.label){case 0:return n=Ni(e),o=t._strategy,i=o.cacheName,a=o.matchOptions,[4,t.getCacheKey(n,"read")];case 1:return s=y.sent(),u=Object.assign(Object.assign({},a),{cacheName:i}),[4,caches.match(s,u)];case 2:r=y.sent(),c=!0,l=!1,f=void 0,y.label=3;case 3:y.trys.push([3,8,9,10]),h=t.iterateCallbacks("cachedResponseWillBeUsed")[Symbol.iterator](),y.label=4;case 4:return(c=(d=h.next()).done)?[3,7]:[4,(0,d.value)({cacheName:i,matchOptions:a,cachedResponse:r,request:s,event:t.event})];case 5:r=y.sent()||void 0,y.label=6;case 6:return c=!0,[3,4];case 7:return[3,10];case 8:return p=y.sent(),l=!0,f=p,[3,10];case 9:try{c||null==h.return||h.return()}finally{if(l)throw f}return[7];case 10:return[2,r]}}))}))()}},{key:"cachePut",value:function(e,t){var n=this;return Ii((function(){var r,o,i,s,u,c,l,f,d,p,y,b,g,w,_,x,k;return qi(this,(function(S){switch(S.label){case 0:return r=Ni(e),[4,m(0)];case 1:return S.sent(),[4,n.getCacheKey(r,"write")];case 2:if(o=S.sent(),!t)throw new a("cache-put-with-no-response",{url:(O=o.url,new URL(String(O),location.href).href.replace(new RegExp("^".concat(location.origin)),""))});return[4,n._ensureResponseSafeToCache(t)];case 3:return(i=S.sent())?(s=n._strategy,u=s.cacheName,c=s.matchOptions,[4,self.caches.open(u)]):[2,!1];case 4:return l=S.sent(),(f=n.hasCallback("cacheDidUpdate"))?[4,h(l,o.clone(),["__WB_REVISION__"],c)]:[3,6];case 5:return p=S.sent(),[3,7];case 6:p=null,S.label=7;case 7:d=p,S.label=8;case 8:return S.trys.push([8,10,,14]),[4,l.put(o,f?i.clone():i)];case 9:return S.sent(),[3,14];case 10:return Bi(y=S.sent(),Error)?"QuotaExceededError"!==y.name?[3,12]:[4,v()]:[3,13];case 11:S.sent(),S.label=12;case 12:throw y;case 13:return[3,14];case 14:b=!0,g=!1,w=void 0,S.label=15;case 15:S.trys.push([15,20,21,22]),_=n.iterateCallbacks("cacheDidUpdate")[Symbol.iterator](),S.label=16;case 16:return(b=(x=_.next()).done)?[3,19]:[4,(0,x.value)({cacheName:u,oldResponse:d,newResponse:i.clone(),request:o,event:n.event})];case 17:S.sent(),S.label=18;case 18:return b=!0,[3,16];case 19:return[3,22];case 20:return k=S.sent(),g=!0,w=k,[3,22];case 21:try{b||null==_.return||_.return()}finally{if(g)throw w}return[7];case 22:return[2,!0]}var O}))}))()}},{key:"getCacheKey",value:function(e,t){var n=this;return Ii((function(){var r,o,i,a,s,u,c,l;return qi(this,(function(f){switch(f.label){case 0:if(r="".concat(e.url," | ").concat(t),n._cacheKeys[r])return[3,9];o=e,i=!0,a=!1,s=void 0,f.label=1;case 1:f.trys.push([1,6,7,8]),u=n.iterateCallbacks("cacheKeyWillBeUsed")[Symbol.iterator](),f.label=2;case 2:return(i=(c=u.next()).done)?[3,5]:[4,(0,c.value)({mode:t,request:o,event:n.event,params:n.params})];case 3:o=Ni.apply(void 0,[f.sent()]),f.label=4;case 4:return i=!0,[3,2];case 5:return[3,8];case 6:return l=f.sent(),a=!0,s=l,[3,8];case 7:try{i||null==u.return||u.return()}finally{if(a)throw s}return[7];case 8:n._cacheKeys[r]=o,f.label=9;case 9:return[2,n._cacheKeys[r]]}}))}))()}},{key:"hasCallback",value:function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=this._strategy.plugins[Symbol.iterator]();!(t=(o=i.next()).done);t=!0)if(e in o.value)return!0}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return!1}},{key:"runCallbacks",value:function(e,t){var n=this;return Ii((function(){var r,o,i,a,s,u;return qi(this,(function(c){switch(c.label){case 0:r=!0,o=!1,i=void 0,c.label=1;case 1:c.trys.push([1,6,7,8]),a=n.iterateCallbacks(e)[Symbol.iterator](),c.label=2;case 2:return(r=(s=a.next()).done)?[3,5]:[4,(0,s.value)(t)];case 3:c.sent(),c.label=4;case 4:return r=!0,[3,2];case 5:return[3,8];case 6:return u=c.sent(),o=!0,i=u,[3,8];case 7:try{r||null==a.return||a.return()}finally{if(o)throw i}return[7];case 8:return[2]}}))}))()}},{key:"iterateCallbacks",value:function(e){var t,n,r,o,i,a,s,u;return qi(this,(function(c){switch(c.label){case 0:t=!0,n=!1,r=void 0,c.label=1;case 1:c.trys.push([1,6,7,8]),o=this,i=function(){var t,n;return qi(this,(function(r){switch(r.label){case 0:return"function"!=typeof(t=s.value)[e]?[3,2]:(n=o._pluginStateMap.get(t),[4,function(r){var o=Object.assign(Object.assign({},r),{state:n});return t[e](o)}]);case 1:r.sent(),r.label=2;case 2:return[2]}}))},a=this._strategy.plugins[Symbol.iterator](),c.label=2;case 2:return(t=(s=a.next()).done)?[3,5]:[5,Fi(i())];case 3:c.sent(),c.label=4;case 4:return t=!0,[3,2];case 5:return[3,8];case 6:return u=c.sent(),n=!0,r=u,[3,8];case 7:try{t||null==a.return||a.return()}finally{if(n)throw r}return[7];case 8:return[2]}}))}},{key:"waitUntil",value:function(e){return this._extendLifetimePromises.push(e),e}},{key:"doneWaiting",value:function(){var e=this;return Ii((function(){var t;return qi(this,(function(n){switch(n.label){case 0:return(t=e._extendLifetimePromises.shift())?[4,t]:[3,2];case 1:return n.sent(),[3,0];case 2:return[2]}}))}))()}},{key:"destroy",value:function(){this._handlerDeferred.resolve(null)}},{key:"_ensureResponseSafeToCache",value:function(e){var t=this;return Ii((function(){var n,r,o,i,a,s,u,c;return qi(this,(function(l){switch(l.label){case 0:n=e,r=!1,o=!0,i=!1,a=void 0,l.label=1;case 1:l.trys.push([1,6,7,8]),s=t.iterateCallbacks("cacheWillUpdate")[Symbol.iterator](),l.label=2;case 2:return(o=(u=s.next()).done)?[3,5]:[4,(0,u.value)({request:t.request,response:n,event:t.event})];case 3:if(n=l.sent()||void 0,r=!0,!n)return[3,5];l.label=4;case 4:return o=!0,[3,2];case 5:return[3,8];case 6:return c=l.sent(),i=!0,a=c,[3,8];case 7:try{o||null==s.return||s.return()}finally{if(i)throw a}return[7];case 8:return r||n&&200!==n.status&&(n=void 0),[2,n]}}))}))()}}])&&$i(t.prototype,n),e}();function Li(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Hi(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Wi(i,r,o,a,s,"next",e)}function s(e){Wi(i,r,o,a,s,"throw",e)}a(void 0)}))}}function zi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gi(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Yi(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var Vi=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cacheName=c(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}var t,n;return t=e,(n=[{key:"handle",value:function(e){return function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Li(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Li(e,t):void 0}}(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.")}()}(this.handleAll(e),1)[0]}},{key:"handleAll",value:function(e){Gi(e,FetchEvent)&&(e={event:e,request:e.request});var t=e.event,n="string"==typeof e.request?new Request(e.request):e.request,r="params"in e?e.params:void 0,o=new Ui(this,{event:t,request:n,params:r}),i=this._getResponse(o,n,t);return[i,this._awaitComplete(i,o,n,t)]}},{key:"_getResponse",value:function(e,t,n){var r=this;return Hi((function(){var o,i,s,u,c,l,f,h,d,p,y,v,b;return Yi(this,(function(m){switch(m.label){case 0:return[4,e.runCallbacks("handlerWillStart",{event:n,request:t})];case 1:m.sent(),o=void 0,m.label=2;case 2:return m.trys.push([2,4,,13]),[4,r._handle(t,e)];case 3:if(!(o=m.sent())||"error"===o.type)throw new a("no-response",{url:t.url});return[3,13];case 4:if(!Gi(i=m.sent(),Error))return[3,12];s=!0,u=!1,c=void 0,m.label=5;case 5:m.trys.push([5,10,11,12]),l=e.iterateCallbacks("handlerDidError")[Symbol.iterator](),m.label=6;case 6:return(s=(f=l.next()).done)?[3,9]:[4,(0,f.value)({error:i,event:n,request:t})];case 7:if(o=m.sent())return[3,9];m.label=8;case 8:return s=!0,[3,6];case 9:return[3,12];case 10:return b=m.sent(),u=!0,c=b,[3,12];case 11:try{s||null==l.return||l.return()}finally{if(u)throw c}return[7];case 12:if(!o)throw i;return[3,13];case 13:h=!0,d=!1,p=void 0,m.label=14;case 14:m.trys.push([14,19,20,21]),y=e.iterateCallbacks("handlerWillRespond")[Symbol.iterator](),m.label=15;case 15:return(h=(v=y.next()).done)?[3,18]:[4,(0,v.value)({event:n,request:t,response:o})];case 16:o=m.sent(),m.label=17;case 17:return h=!0,[3,15];case 18:return[3,21];case 19:return b=m.sent(),d=!0,p=b,[3,21];case 20:try{h||null==y.return||y.return()}finally{if(d)throw p}return[7];case 21:return[2,o]}}))}))()}},{key:"_awaitComplete",value:function(e,t,n,r){return Hi((function(){var o,i,a;return Yi(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,e];case 1:return o=s.sent(),[3,3];case 2:return s.sent(),[3,3];case 3:return s.trys.push([3,6,,7]),[4,t.runCallbacks("handlerDidRespond",{event:r,request:n,response:o})];case 4:return s.sent(),[4,t.doneWaiting()];case 5:return s.sent(),[3,7];case 6:return Gi(a=s.sent(),Error)&&(i=a),[3,7];case 7:return[4,t.runCallbacks("handlerDidComplete",{event:r,request:n,response:o,error:i})];case 8:if(s.sent(),t.destroy(),i)throw i;return[2]}}))}))()}}])&&zi(t.prototype,n),e}();function Qi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Ji(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xi(e){return Xi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Xi(e)}function Zi(e,t){return Zi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Zi(e,t)}function ea(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Xi(e);if(t){var o=Xi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var n}(this,n)}}var ta=function(e){!function(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}}),t&&Zi(e,t)}(o,e);var t,n,r=ea(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.apply(this,arguments)}return t=o,n=[{key:"_handle",value:function(e,t){return function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Qi(i,r,o,a,s,"next",e)}function s(e){Qi(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(){var n;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(r){switch(r.label){case 0:return[4,t.cacheMatch(e)];case 1:if(!(n=r.sent()))throw new a("no-response",{url:e.url});return[2,n]}}))}))()}}],n&&Ji(t.prototype,n),o}(Vi);function na(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}var ra,oa={cacheWillUpdate:(ra=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){na(i,r,o,a,s,"next",e)}function s(e){na(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(e){var t;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(n){return 200===(t=e.response).status||0===t.status?[2,t]:[2,null]}))})),function(e){return ra.apply(this,arguments)})};function ia(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function aa(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ia(i,r,o,a,s,"next",e)}function s(e){ia(i,r,o,a,s,"throw",e)}a(void 0)}))}}function sa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ua(e){return ua=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ua(e)}function ca(e,t){return ca=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ca(e,t)}function la(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ua(e);if(t){var o=ua(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var n}(this,n)}}function fa(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var ha=function(e){!function(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}}),t&&ca(e,t)}(o,e);var t,n,r=la(o);function o(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,t)).plugins.some((function(e){return"cacheWillUpdate"in e}))||e.plugins.unshift(oa),e._networkTimeoutSeconds=t.networkTimeoutSeconds||0,e}return t=o,n=[{key:"_handle",value:function(e,t){var n=this;return aa((function(){var r,o,i,s,u,c,l,f;return fa(this,(function(h){switch(h.label){case 0:return r=[],o=[],n._networkTimeoutSeconds&&(s=n._getTimeoutPromise({request:e,logs:r,handler:t}),u=s.id,c=s.promise,i=u,o.push(c)),l=n._getNetworkPromise({timeoutId:i,request:e,logs:r,handler:t}),o.push(l),[4,t.waitUntil(aa((function(){var e;return fa(this,(function(n){switch(n.label){case 0:return[4,t.waitUntil(Promise.race(o))];case 1:return(e=n.sent())?[3,3]:[4,l];case 2:e=n.sent(),n.label=3;case 3:return[2,e]}}))}))())];case 1:if(!(f=h.sent()))throw new a("no-response",{url:e.url});return[2,f]}}))}))()}},{key:"_getTimeoutPromise",value:function(e){var t,n=e.request,r=(e.logs,e.handler),o=this,i=new Promise((function(e){var i=function(){var t=aa((function(){return fa(this,(function(t){switch(t.label){case 0:return[4,r.cacheMatch(n)];case 1:return e.apply(void 0,[t.sent()]),[2]}}))}));return function(){return t.apply(this,arguments)}}();t=setTimeout(i,1e3*o._networkTimeoutSeconds)}));return{promise:i,id:t}}},{key:"_getNetworkPromise",value:function(e){var t=e.timeoutId,n=e.request,r=(e.logs,e.handler);return aa((function(){var e,o,i;return fa(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,r.fetchAndCachePut(n)];case 1:return o=a.sent(),[3,3];case 2:return s=i=a.sent(),(null!=(u=Error)&&"undefined"!=typeof Symbol&&u[Symbol.hasInstance]?u[Symbol.hasInstance](s):s instanceof u)&&(e=i),[3,3];case 3:return t&&clearTimeout(t),!e&&o?[3,5]:[4,r.cacheMatch(n)];case 4:o=a.sent(),a.label=5;case 5:return[2,o]}var s,u}))}))()}}],n&&sa(t.prototype,n),o}(Vi);function da(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function pa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ya(e){return ya=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ya(e)}function va(e,t){return va=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},va(e,t)}function ba(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ya(e);if(t){var o=ya(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var n}(this,n)}}var ma=function(e){!function(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}}),t&&va(e,t)}(o,e);var t,n,r=ba(o);function o(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,t))._networkTimeoutSeconds=t.networkTimeoutSeconds||0,e}return t=o,n=[{key:"_handle",value:function(e,t){var n=this;return function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){da(i,r,o,a,s,"next",e)}function s(e){da(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(){var r,o,i,s,u;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(c){switch(c.label){case 0:r=void 0,c.label=1;case 1:return c.trys.push([1,3,,4]),i=[t.fetch(e)],n._networkTimeoutSeconds&&(s=m(1e3*n._networkTimeoutSeconds),i.push(s)),[4,Promise.race(i)];case 2:if(!(o=c.sent()))throw new Error("Timed out the network response after "+"".concat(n._networkTimeoutSeconds," seconds."));return[3,4];case 3:return l=u=c.sent(),(null!=(f=Error)&&"undefined"!=typeof Symbol&&f[Symbol.hasInstance]?f[Symbol.hasInstance](l):l instanceof f)&&(r=u),[3,4];case 4:if(!o)throw new a("no-response",{url:e.url,error:r});return[2,o]}var l,f}))}))()}}],n&&pa(t.prototype,n),o}(Vi);function ga(e){var t,n=+(null!==(t=wa(e,je))&&void 0!==t?t:"");return isNaN(n)||n<200||n>599?503:n}function wa(e,t){return e.get(t)}function _a(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function xa(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){_a(i,r,o,a,s,"next",e)}function s(e){_a(i,r,o,a,s,"throw",e)}a(void 0)}))}}function ka(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sa(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var Oa,Pa,Ea=new ma,ja=new ta({cacheName:Te}),Ra=new ha({cacheName:Te}),Ca="network-only-or-cache-only",Ta=(ka(Oa={},"network-first",(function(e){return Ra.handle(e)})),ka(Oa,"network-only-or-cache-only",function(){var e=xa((function(e){return Sa(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,4]),[4,Ea.handle(e)];case 1:case 3:return[2,t.sent()];case 2:return t.sent(),[4,ja.handle(e)];case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}()),Oa);function Aa(e){return Da.apply(this,arguments)}function Da(){return(Da=xa((function(e){var t;return Sa(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,5]),[4,Ea.handle(e)];case 1:return[2,n.sent()];case 2:return n.sent(),[4,caches.open(Te)];case 3:return[4,n.sent().match(De)];case 4:return[2,null!=(t=n.sent())?t:Response.error()];case 5:return[2]}}))}))).apply(this,arguments)}function Ka(e){return Ma.apply(this,arguments)}function Ma(){return Ma=xa((function(e){var t,n,r,o,i,a;return Sa(this,(function(s){switch(s.label){case 0:return t=e.request,"GET"!==e.request.method?[3,2]:[4,Ia(e)];case 1:return r=s.sent(),[3,3];case 2:r=Ca,s.label=3;case 3:i=null!==(o=Ta[n=r])&&void 0!==o?o:Ta[Ca],s.label=4;case 4:return s.trys.push([4,6,,7]),[4,i(e)];case 5:return[2,s.sent()];case 6:return a=s.sent(),console.warn("[SW] Could not handle the request to %s (using handler %s).",t.url,n,a),[2,new Response((u=t.headers,null!==(c=wa(u,Ee))&&void 0!==c?c:void 0),{status:ga(t.headers)})];case 7:return[2]}var u,c}))})),Ma.apply(this,arguments)}function Ia(e){return $a.apply(this,arguments)}function $a(){return($a=xa((function(e){var t,n,r;return Sa(this,(function(o){switch(o.label){case 0:return null===(i=(t=e.request).headers,n=wa(i,Re))||void 0===n?[3,1]:(r=n,[3,3]);case 1:return[4,Ba(t.url)];case 2:r=o.sent(),o.label=3;case 3:return[2,r]}var i}))}))).apply(this,arguments)}function Ba(e){return qa.apply(this,arguments)}function qa(){return(qa=xa((function(e){var t,n,r,o;return Sa(this,(function(i){switch(i.label){case 0:return[4,(new Xo).dynamicRouteRegistrations.toArray()];case 1:return t=i.sent(),(r=Pe(t.filter((function(t){return new RegExp(t.pattern).test(e)})).map((function(e){return null!==(n=e.strategy)&&void 0!==n?n:"network-first"})))).length<=1?[2,r[0]]:[2,null!==(o=["network-first","network-only-or-cache-only"].find((function(e){return r.some((function(t){return t===e}))})))&&void 0!==o?o:Ca]}}))}))).apply(this,arguments)}self.__WB_DISABLE_DEV_LOGS=!0,Pa={prefix:Ce},function(e){var t,n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(u)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0)t=i.value,"string"==typeof Pa[t]&&(u[t]=Pa[t])}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}(),function(){!function(e,t,n){var r;r=Di(e,RegExp)?new ki(e,t,n):new gi(e,t,n),Ai().registerRoute(r)}((function(e){return"navigate"===e.request.mode}),Aa);var e=Ai(),t=!0,n=!1,r=void 0;try{for(var o,i=vi[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;e.setDefaultHandler(Ka,a)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(),self.addEventListener("message",(function(e){return yi.apply(this,arguments)})),self.addEventListener("install",(function(e){self.skipWaiting(),e.waitUntil(oi(Ke))})),self.addEventListener("activate",(function(e){e.waitUntil(self.clients.claim())}))})()})();
|
|
1
|
+
(()=>{var e={23:function(e){function t(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}e.exports=function(){"use strict";var e=6e4,n=36e5,r="millisecond",o="second",i="minute",a="hour",s="day",u="week",c="month",l="quarter",f="year",h="date",d="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},b=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},m={s:b,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+b(r,2,"0")+":"+b(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,c),i=n-o<0,a=t.clone().add(r+(i?-1:1),c);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:f,w:u,d:s,D:h,h:a,m:i,s:o,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},g="en",w={};w[g]=v;var _=function(e){return t(e,O)},x=function e(t,n,r){var o;if(!t)return g;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),n&&(w[i]=n,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;w[s]=t,o=s}return!r&&o&&(g=o),o||!r&&g},k=function(e,t){if(_(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new O(n)},S=m;S.l=x,S.i=_,S.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var O=function(){var v=function(e){this.$L=x(e.locale,null,!0),this.parse(e)},b=v.prototype;return b.parse=function(e){this.$d=function(e){var n=e.date,r=e.utc;if(null===n)return new Date(NaN);if(S.u(n))return new Date;if(t(n,Date))return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var o=n.match(p);if(o){var i=o[2]-1||0,a=(o[7]||"0").substring(0,3);return r?new Date(Date.UTC(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)):new Date(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)}}return new Date(n)}(e),this.$x=e.x||{},this.init()},b.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},b.$utils=function(){return S},b.isValid=function(){return!(this.$d.toString()===d)},b.isSame=function(e,t){var n=k(e);return this.startOf(t)<=n&&n<=this.endOf(t)},b.isAfter=function(e,t){return k(e)<this.startOf(t)},b.isBefore=function(e,t){return this.endOf(t)<k(e)},b.$g=function(e,t,n){return S.u(e)?this[t]:this.set(n,e)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(e,t){var n=this,r=!!S.u(t)||t,l=S.p(e),d=function(e,t){var o=S.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(s)},p=function(e,t){return S.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},y=this.$W,v=this.$M,b=this.$D,m="set"+(this.$u?"UTC":"");switch(l){case f:return r?d(1,0):d(31,11);case c:return r?d(1,v):d(0,v+1);case u:var g=this.$locale().weekStart||0,w=(y<g?y+7:y)-g;return d(r?b-w:b+(6-w),v);case s:case h:return p(m+"Hours",0);case a:return p(m+"Minutes",1);case i:return p(m+"Seconds",2);case o:return p(m+"Milliseconds",3);default:return this.clone()}},b.endOf=function(e){return this.startOf(e,!1)},b.$set=function(e,t){var n,u=S.p(e),l="set"+(this.$u?"UTC":""),d=(n={},n[s]=l+"Date",n[h]=l+"Date",n[c]=l+"Month",n[f]=l+"FullYear",n[a]=l+"Hours",n[i]=l+"Minutes",n[o]=l+"Seconds",n[r]=l+"Milliseconds",n)[u],p=u===s?this.$D+(t-this.$W):t;if(u===c||u===f){var y=this.clone().set(h,1);y.$d[d](p),y.init(),this.$d=y.set(h,Math.min(this.$D,y.daysInMonth())).$d}else d&&this.$d[d](p);return this.init(),this},b.set=function(e,t){return this.clone().$set(e,t)},b.get=function(e){return this[S.p(e)]()},b.add=function(t,r){var l,h=this;t=Number(t);var d=S.p(r),p=function(e){var n=k(h);return S.w(n.date(n.date()+Math.round(e*t)),h)};if(d===c)return this.set(c,this.$M+t);if(d===f)return this.set(f,this.$y+t);if(d===s)return p(1);if(d===u)return p(7);var y=(l={},l[i]=e,l[a]=n,l[o]=1e3,l)[d]||1,v=this.$d.getTime()+t*y;return S.w(v,this)},b.subtract=function(e,t){return this.add(-1*e,t)},b.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||d;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=S.z(this),i=this.$H,a=this.$m,s=this.$M,u=n.weekdays,c=n.months,l=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].slice(0,i)},f=function(e){return S.s(i%12||12,e,"0")},h=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:S.s(s+1,2,"0"),MMM:l(n.monthsShort,s,c,3),MMMM:l(c,s),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,u,2),ddd:l(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(i),HH:S.s(i,2,"0"),h:f(1),hh:f(2),a:h(i,a,!0),A:h(i,a,!1),m:String(a),mm:S.s(a,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:o};return r.replace(y,(function(e,t){return t||p[e]||o.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(t,r,h){var d,p=S.p(r),y=k(t),v=(y.utcOffset()-this.utcOffset())*e,b=this-y,m=S.m(this,y);return m=(d={},d[f]=m/12,d[c]=m,d[l]=m/3,d[u]=(b-v)/6048e5,d[s]=(b-v)/864e5,d[a]=b/n,d[i]=b/e,d[o]=b/1e3,d)[p]||b,h?m:S.a(m)},b.daysInMonth=function(){return this.endOf(c).$D},b.$locale=function(){return w[this.$L]},b.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=x(e,t,!0);return r&&(n.$L=r),n},b.clone=function(){return S.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},v}(),P=O.prototype;return k.prototype=P,[["$ms",r],["$s",o],["$m",i],["$H",a],["$W",s],["$M",c],["$y",f],["$D",h]].forEach((function(e){P[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),k.extend=function(e,t){return e.$i||(e(t,O,k),e.$i=!0),k},k.locale=x,k.isDayjs=_,k.unix=function(e){return k(1e3*e)},k.en=w[g],k.Ls=w,k.p={},k}()},774:()=>{"use strict";try{self["workbox:core:6.5.4"]&&_()}catch(e){}},585:()=>{"use strict";try{self["workbox:routing:6.5.4"]&&_()}catch(e){}},238:()=>{"use strict";try{self["workbox:strategies:6.5.4"]&&_()}catch(e){}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{n.S={};var e={},t={};n.I=(r,o)=>{o||(o=[]);var i=t[r];if(i||(i=t[r]={}),!(o.indexOf(i)>=0)){if(o.push(i),e[r])return e[r];n.o(n.S,r)||(n.S[r]={});var a=n.S[r],s="@openmrs/esm-app-shell",u=[];return"default"===r&&((e,t,r,o)=>{var i=a[e]=a[e]||{},u=i[t];(!u||!u.loaded&&(0!=!u.eager||s>u.from))&&(i[t]={get:()=>()=>n(23),from:s,eager:!0})})("dayjs","1.11.5"),e[r]=u.length?Promise.all(u).then((()=>e[r]=1)):1}}})(),(()=>{"use strict";n(774);function e(t,n,o){return e=i()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&r(i,n.prototype),i},e.apply(null,arguments)}function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(e)}function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}function o(n){var i="function"==typeof Map?new Map:void 0;return o=function(n){if(null===n||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(n))return n;if("function"!=typeof n)throw new TypeError("Super expression must either be null or a function");if(void 0!==i){if(i.has(n))return i.get(n);i.set(n,o)}function o(){return e(n,arguments,t(this).constructor)}return o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),r(o,n)},o(n)}function i(){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}}var a=function(e){!function(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}}),t&&r(e,t)}(s,e);var n,o,a=(n=s,o=i(),function(){var e,r=t(n);if(o){var i=t(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var n}(this,e)});function s(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var r=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=e;return n.length>0&&(o+=" :: ".concat(JSON.stringify(n))),o}(e,t);return(n=a.call(this,r)).name=e,n.details=t,n}return s}(o(Error)),s=new Set,u={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},c=function(e){return e||(t=u.runtime,[u.prefix,t,u.suffix].filter((function(e){return e&&e.length>0})).join("-"));var t};function l(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function f(e,t){var n=new URL(e),r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;n.searchParams.delete(u)}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n.href}function h(e,t,n,r){return d.apply(this,arguments)}function d(){return d=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){l(i,r,o,a,s,"next",e)}function s(e){l(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(e,t,n,r){var o,i,a,s,u,c,l,h,d,p;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(y){switch(y.label){case 0:return o=f(t.url,n),t.url===o?[2,e.match(t,r)]:(i=Object.assign(Object.assign({},r),{ignoreSearch:!0}),[4,e.keys(t,i)]);case 1:a=y.sent(),s=!0,u=!1,c=void 0;try{for(l=a[Symbol.iterator]();!(s=(h=l.next()).done);s=!0)if(d=h.value,p=f(d.url,n),o===p)return[2,e.match(d,r)]}catch(e){u=!0,c=e}finally{try{s||null==l.return||l.return()}finally{if(u)throw c}}return[2]}}))})),d.apply(this,arguments)}var p=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))};function y(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function v(){return b.apply(this,arguments)}function b(){return b=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){y(i,r,o,a,s,"next",e)}function s(e){y(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(){var e,t,n,r,o,i;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(a){switch(a.label){case 0:e=!0,t=!1,n=void 0,a.label=1;case 1:a.trys.push([1,6,7,8]),r=s[Symbol.iterator](),a.label=2;case 2:return(e=(o=r.next()).done)?[3,5]:[4,(0,o.value)()];case 3:a.sent(),a.label=4;case 4:return e=!0,[3,2];case 5:return[3,8];case 6:return i=a.sent(),t=!0,n=i,[3,8];case 7:try{e||null==r.return||r.return()}finally{if(t)throw n}return[7];case 8:return[2]}}))})),b.apply(this,arguments)}function m(e){return new Promise((function(t){return setTimeout(t,e)}))}const g="object"==typeof global&&global&&global.Object===Object&&global;var w="object"==typeof self&&self&&self.Object===Object&&self;const _=g||w||Function("return this")(),x=_.Symbol,k=Array.isArray;var S=Object.prototype,O=S.hasOwnProperty,P=S.toString,E=x?x.toStringTag:void 0;var j=Object.prototype.toString;var R=x?x.toStringTag:void 0;const C=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":R&&R in Object(e)?function(e){var t=O.call(e,E),n=e[E];try{e[E]=void 0;var r=!0}catch(e){}var o=P.call(e);return r&&(t?e[E]=n:delete e[E]),o}(e):function(e){return j.call(e)}(e)},T=function(e){return null!=e&&"object"==typeof e};var A=x?x.prototype:void 0,D=A?A.toString:void 0;const K=function e(t){if("string"==typeof t)return t;if(k(t))return function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}(t,e)+"";if(function(e){return"symbol"==(void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||T(e)&&"[object Symbol]"==C(e);var t}(t))return D?D.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var M=/[\\^$.*+?()[\]{}|]/g,I=RegExp(M.source);const $=function(e){return(e=null==(t=e)?"":K(t))&&I.test(e)?e.replace(M,"\\$&"):e;var t};function B(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function q(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){B(i,r,o,a,s,"next",e)}function s(e){B(i,r,o,a,s,"throw",e)}a(void 0)}))}}function F(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function N(e){return U.apply(this,arguments)}function U(){return U=q((function(e){var t,n,r,o,i,a,s,u=arguments;return F(this,(function(c){switch(c.label){case 0:n=(t=u.length>1&&void 0!==u[1]?u[1]:{}).shouldRetry,r=t.getDelay,o=t.onError,n=null!=n?n:function(e){return function(e,t){return e<=5}(e)},r=null!=r?r:function(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2]?e+1:e;return t*Math.pow(2,n)}(e,1e3)},i=0,a=void 0,c.label=1;case 1:return c.trys.push([1,4,,5]),[4,L(r(i))];case 2:return c.sent(),[4,e()];case 3:return[2,c.sent()];case 4:return s=c.sent(),null==o||o(s,i),a=s,[3,5];case 5:if(n(i++))return[3,1];c.label=6;case 6:throw a}}))})),U.apply(this,arguments)}function L(e){return W.apply(this,arguments)}function W(){return(W=q((function(e){return F(this,(function(t){return e<=0?[2]:[2,new Promise((function(t){return setTimeout(t,e)}))]}))}))).apply(this,arguments)}const H=function(e){var t,n=void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t;return null!=e&&("object"==n||"function"==n)},z=_["__core-js_shared__"];var G,Y=(G=/[^.]+$/.exec(z&&z.keys&&z.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"";var V=Function.prototype.toString;var Q=/^\[object .+?Constructor\]$/,J=Function.prototype,X=Object.prototype,Z=J.toString,ee=X.hasOwnProperty,te=RegExp("^"+Z.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const ne=function(e){return!(!H(e)||(t=e,Y&&Y in t))&&(function(e){if(!H(e))return!1;var t=C(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}(e)?te:Q).test(function(e){if(null!=e){try{return V.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t},re=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ne(n)?n:void 0},oe=re(Object,"create");var ie=Object.prototype.hasOwnProperty;var ae=Object.prototype.hasOwnProperty;function se(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}se.prototype.clear=function(){this.__data__=oe?oe(null):{},this.size=0},se.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},se.prototype.get=function(e){var t=this.__data__;if(oe){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ie.call(t,e)?t[e]:void 0},se.prototype.has=function(e){var t=this.__data__;return oe?void 0!==t[e]:ae.call(t,e)},se.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=oe&&void 0===t?"__lodash_hash_undefined__":t,this};const ue=se,ce=function(e,t){for(var n=e.length;n--;)if((r=e[n][0])===(o=t)||r!=r&&o!=o)return n;var r,o;return-1};var le=Array.prototype.splice;function fe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}fe.prototype.clear=function(){this.__data__=[],this.size=0},fe.prototype.delete=function(e){var t=this.__data__,n=ce(t,e);return!(n<0||(n==t.length-1?t.pop():le.call(t,n,1),--this.size,0))},fe.prototype.get=function(e){var t=this.__data__,n=ce(t,e);return n<0?void 0:t[n][1]},fe.prototype.has=function(e){return ce(this.__data__,e)>-1},fe.prototype.set=function(e,t){var n=this.__data__,r=ce(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const he=fe,de=re(_,"Map"),pe=function(e,t){var n,r,o,i=e.__data__;return("string"==(o=void 0===(n=t)?"undefined":(r=n)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ye.prototype.clear=function(){this.size=0,this.__data__={hash:new ue,map:new(de||he),string:new ue}},ye.prototype.delete=function(e){var t=pe(this,e).delete(e);return this.size-=t?1:0,t},ye.prototype.get=function(e){return pe(this,e).get(e)},ye.prototype.has=function(e){return pe(this,e).has(e)},ye.prototype.set=function(e,t){var n=pe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const ve=ye;function be(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ve;++t<n;)this.add(e[t])}be.prototype.add=be.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},be.prototype.has=function(e){return this.__data__.has(e)};const me=be,ge=function(e){return e!=e},we=function(e,t){return!(null==e||!e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}(e,ge,n)}(e,t,0)>-1},_e=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},xe=function(e,t){return e.has(t)},ke=re(_,"Set"),Se=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Oe=ke&&1/Se(new ke([,-0]))[1]==1/0?function(e){return new ke(e)}:function(){},Pe=function(e){return e&&e.length?function(e,t,n){var r=-1,o=we,i=e.length,a=!0,s=[],u=s;if(n)a=!1,o=_e;else if(i>=200){var c=t?null:Oe(e);if(c)return Se(c);a=!1,o=xe,u=new me}else u=t?[]:s;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue e;t&&u.push(f),s.push(l)}else o(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}(e):[]};var Ee="x-omrs-offline-response-body",je="x-omrs-offline-response-status",Re="x-omrs-offline-caching-strategy",Ce="omrs",Te="".concat(Ce,"-spa-cache-v1"),Ae=[{'revision':null,'url':'/openmrs/spa/routes.registry.json'},{'revision':null,'url':'0030f1956e452721.js'},{'revision':null,'url':'023bd53d342b7463.woff'},{'revision':null,'url':'02acc4469a2fe2e4.woff2'},{'revision':null,'url':'02af6181aebfc3a3.js'},{'revision':'e383dc21b1990707f5078248de39a136','url':'02af6181aebfc3a3.js.LICENSE.txt'},{'revision':null,'url':'033e03f8663ab9b1.woff'},{'revision':null,'url':'052607e67da262ec.woff'},{'revision':null,'url':'081587ca0db8e63f.woff2'},{'revision':null,'url':'08cf53c4e5e71cf1.woff2'},{'revision':null,'url':'090b2bc014d24ea4.woff2'},{'revision':null,'url':'0a28cd0b47497b71.woff'},{'revision':null,'url':'0a9765a89ff0437d.woff'},{'revision':null,'url':'0ae92bcea615e948.woff2'},{'revision':null,'url':'0be8520d8945b3b7.woff2'},{'revision':null,'url':'0bf5f337a1bf9187.js'},{'revision':null,'url':'0bf6b66a8b86b014.woff'},{'revision':null,'url':'0e7dd073cd8bb0ad.woff2'},{'revision':null,'url':'14869ac5d1830304.woff2'},{'revision':null,'url':'14aaceff85fc8b28.woff2'},{'revision':null,'url':'1590052e1cf8f28d.woff'},{'revision':null,'url':'16f443eed01776ca.woff2'},{'revision':null,'url':'183bae0e53a22182.woff2'},{'revision':null,'url':'19b239a0bb74b27e.woff'},{'revision':null,'url':'19c8f94ccd6289f5.woff2'},{'revision':null,'url':'1a24572453c2e538.js'},{'revision':null,'url':'1ae86565eab7451c.woff2'},{'revision':null,'url':'1af7a4d6b41cd1cd.js'},{'revision':null,'url':'1c7bf8797e0a9be6.woff2'},{'revision':null,'url':'1d9aff9a93a3bb66.woff'},{'revision':null,'url':'1f266d3619b30f16.woff2'},{'revision':null,'url':'1f8c5a4087a524fd.woff2'},{'revision':null,'url':'20ba2b23c5c0cd0b.woff2'},{'revision':null,'url':'218d03de949106fa.js'},{'revision':null,'url':'2269d45733c5cf8f.woff'},{'revision':null,'url':'258ecbd235953099.woff'},{'revision':null,'url':'283a712fa0ce77a6.js'},{'revision':null,'url':'295dd01a1fbfee6d.woff2'},{'revision':null,'url':'2d7f835ab7c7c764.woff'},{'revision':null,'url':'2ecffd6094f75ff7.js'},{'revision':null,'url':'2f66cca99eeead63.woff'},{'revision':null,'url':'2f686985e26e7107.woff2'},{'revision':null,'url':'315eff729e4ccbd9.woff2'},{'revision':null,'url':'32f1e5aadf845e08.woff'},{'revision':null,'url':'338484e1c850669c.woff'},{'revision':null,'url':'33b7a82f1e295190.woff'},{'revision':null,'url':'358c311631fbf075.js'},{'revision':null,'url':'3674d98ec4a9173d.woff'},{'revision':null,'url':'368d16e3259bf207.woff2'},{'revision':null,'url':'36c49aa341a7079a.woff2'},{'revision':null,'url':'36e1e0430475edee.woff2'},{'revision':null,'url':'38d4b8fb75f8850c.js'},{'revision':null,'url':'3b01402cd7292844.js'},{'revision':null,'url':'3bc19662b8630ee9.woff2'},{'revision':null,'url':'3f645f473b3f8fba.woff2'},{'revision':null,'url':'4095df88acae9e98.woff'},{'revision':null,'url':'4218ac9901b9d36d.woff2'},{'revision':null,'url':'4680ba68412e4da9.woff2'},{'revision':null,'url':'47d7a8698d562a0e.woff'},{'revision':null,'url':'47ec6c9dffe776a0.woff'},{'revision':null,'url':'48e37bd7ebf85a1f.woff2'},{'revision':null,'url':'48edfdf51dfb3160.woff'},{'revision':null,'url':'4a35a2746c8ad7a5.woff'},{'revision':null,'url':'4bc75ee78353dab4.js'},{'revision':null,'url':'4c46128f5543a744.js'},{'revision':null,'url':'4e11b8a7c445255f.woff2'},{'revision':null,'url':'4ea1f5c3baf89fe3.woff'},{'revision':null,'url':'4ea99f41c896bf9d.woff'},{'revision':null,'url':'5005db1d1caf70c7.woff'},{'revision':null,'url':'528a8e7c1c141a31.woff'},{'revision':null,'url':'52ca12f5b516d4ea.woff'},{'revision':null,'url':'537ddd61c5c1fce2.woff2'},{'revision':null,'url':'53baea24a93b42fc.js'},{'revision':null,'url':'5432f7541ec25c34.woff'},{'revision':null,'url':'54a95d73a9454ba3.woff'},{'revision':null,'url':'56c4118c0907f151.woff2'},{'revision':null,'url':'572e81f004cc10c5.js'},{'revision':null,'url':'58675205690e717d.js'},{'revision':null,'url':'5938bc2ae7ec60c0.woff2'},{'revision':null,'url':'594306657c4e44e8.woff'},{'revision':null,'url':'5a538aa477a66067.woff'},{'revision':null,'url':'5bd4d5d1e74e6532.js'},{'revision':null,'url':'5c6586155f0d278a.woff2'},{'revision':null,'url':'60ec587649ba812a.woff2'},{'revision':null,'url':'616567cd947eb9dd.woff'},{'revision':null,'url':'65168b59f44caab4.woff'},{'revision':null,'url':'65c0982f98374864.woff'},{'revision':null,'url':'65e6511e035870e1.woff2'},{'revision':null,'url':'661425f6798cd16a.woff2'},{'revision':null,'url':'66b864fe213caf46.woff2'},{'revision':null,'url':'6775fee945132ef9.woff'},{'revision':null,'url':'68bbd362c8e4983b.woff'},{'revision':null,'url':'68d6deec87b6b604.woff'},{'revision':null,'url':'69a7e6d31d390296.woff'},{'revision':null,'url':'69d087d970ee9455.woff2'},{'revision':null,'url':'69fa3fc7363bbc04.woff'},{'revision':null,'url':'6a1f0178b45b2e9e.woff'},{'revision':null,'url':'6c6c45e66ff54281.woff2'},{'revision':null,'url':'6f47008d9c93c1cb.js'},{'revision':'783f14fa45b10e088e68f98251448010','url':'6f47008d9c93c1cb.js.LICENSE.txt'},{'revision':null,'url':'6ffb9ed97b21fdc0.woff'},{'revision':null,'url':'7073a7323e92bd11.woff2'},{'revision':null,'url':'718c6cc31274ab1a.woff2'},{'revision':null,'url':'71ab27e0b8d1949e.js'},{'revision':'61baa3a5fc2eebeed7b52ce72e4992aa','url':'71ab27e0b8d1949e.js.LICENSE.txt'},{'revision':null,'url':'7245ef51b3517bf9.js'},{'revision':null,'url':'72cdbedfe04be9f9.woff2'},{'revision':null,'url':'7509c9f56fe9e532.woff2'},{'revision':null,'url':'75dc5c5b04adc8bf.woff2'},{'revision':null,'url':'76a7c256fc8b3490.woff'},{'revision':null,'url':'77b48bc05299ecca.woff2'},{'revision':null,'url':'787f56efa306ddbc.woff'},{'revision':null,'url':'79e0fe636d1ed41c.js'},{'revision':null,'url':'7a0a0215c248c73d.woff2'},{'revision':null,'url':'7b204450699b0daf.js'},{'revision':null,'url':'7c4463d9c84f263a.woff'},{'revision':null,'url':'7d112a556b7670d2.woff'},{'revision':null,'url':'7d52d6014b5f2bbc.woff'},{'revision':null,'url':'7f00bebb24e40167.woff2'},{'revision':null,'url':'7f2c6ea3e740417e.woff'},{'revision':null,'url':'802c6176541eeed7.woff2'},{'revision':null,'url':'8080081b3379c637.woff2'},{'revision':null,'url':'8274cc1afc7619f1.woff'},{'revision':null,'url':'8605507b7a8487c4.woff2'},{'revision':null,'url':'8a83d654702f6534.woff2'},{'revision':null,'url':'8ccee65f6cf254ee.woff'},{'revision':null,'url':'8d82a082a4aba439.woff'},{'revision':null,'url':'8de04ae985937b56.woff'},{'revision':null,'url':'8e0d11f862dfbba6.js'},{'revision':null,'url':'8fe71173a13fe571.woff2'},{'revision':null,'url':'90edccb224a51cee.woff'},{'revision':null,'url':'932785417ef383b8.js'},{'revision':null,'url':'935dd2c6ef71ecc9.js'},{'revision':null,'url':'94b292fe87831a8b.woff'},{'revision':null,'url':'95dc66c1b88745f8.woff'},{'revision':null,'url':'95fb698be77c85ef.woff'},{'revision':null,'url':'9624cec0f9bdd81e.woff2'},{'revision':null,'url':'965c9d9f6a80b848.js'},{'revision':null,'url':'9662331fa31e3f20.woff'},{'revision':null,'url':'98a3af55a1698171.woff2'},{'revision':null,'url':'9ba85996af74c5ce.woff2'},{'revision':null,'url':'9bc133b1df25cb74.woff'},{'revision':null,'url':'9c36bff0a4f1503e.js'},{'revision':null,'url':'9ddb22faa35006e7.woff2'},{'revision':null,'url':'9e97352380611b95.woff'},{'revision':null,'url':'a167fb2799dd741b.woff2'},{'revision':null,'url':'a2045a5cc4fdf94f.woff2'},{'revision':null,'url':'a246c73905a31c93.woff2'},{'revision':null,'url':'a401aa7939cb6e6f.woff2'},{'revision':null,'url':'a41a71258c38684d.woff'},{'revision':null,'url':'a528b4b01d62ed17.js'},{'revision':null,'url':'a60d94a72d615a8e.woff'},{'revision':null,'url':'a66764dd0c1fa213.woff'},{'revision':null,'url':'a6ed036f17a1ea29.woff2'},{'revision':null,'url':'a7792d6252d85b20.js'},{'revision':'6973c4dc40d031fe098d652147281cf0','url':'a7792d6252d85b20.js.LICENSE.txt'},{'revision':null,'url':'a7efa2596cd2be4f.js'},{'revision':'dbacaddfa543893ec51e7930e9eee4d1','url':'a7efa2596cd2be4f.js.LICENSE.txt'},{'revision':null,'url':'a8f635129d660202.woff'},{'revision':null,'url':'a9f25ca430709a1a.woff2'},{'revision':null,'url':'ae14d98ad8a1212c.woff'},{'revision':null,'url':'aeec4f78084adf7f.woff'},{'revision':null,'url':'af11e94b0644eba5.woff'},{'revision':null,'url':'afa9121a49e95351.woff2'},{'revision':null,'url':'afcda12d9f805543.woff2'},{'revision':null,'url':'b09ded85a7da77f1.woff2'},{'revision':null,'url':'b2f4e9d1e821b71c.woff2'},{'revision':null,'url':'b30b06698dc369b2.woff'},{'revision':null,'url':'b407f548b6fadfa3.js'},{'revision':null,'url':'b4a074bf828bb757.woff2'},{'revision':null,'url':'b500f36d715a6ea5.js'},{'revision':null,'url':'b7f447da43f6e596.woff2'},{'revision':null,'url':'b7f633b871b84820.woff'},{'revision':null,'url':'b87a5878f8961d1a.js'},{'revision':null,'url':'b88532bde74b513a.js'},{'revision':null,'url':'bb04bb60f8aa150f.js'},{'revision':null,'url':'bcca84a524572d10.woff2'},{'revision':null,'url':'bd8148abf2d524fc.js'},{'revision':null,'url':'be4d1f97b11d087c.woff2'},{'revision':null,'url':'be91def2232f6776.woff'},{'revision':null,'url':'bec14780d81164de.woff2'},{'revision':null,'url':'c285f4b15d11f172.woff'},{'revision':null,'url':'c2de24781179b3fc.js'},{'revision':null,'url':'c4673617b80801f3.woff'},{'revision':null,'url':'c553f7e0199c5084.woff2'},{'revision':null,'url':'c8470ed2c145ace7.woff'},{'revision':null,'url':'c9ba768259e8702c.js'},{'revision':null,'url':'c9bc7c77210219a8.js'},{'revision':null,'url':'c9d9ce9f465df4fe.woff2'},{'revision':null,'url':'cc0d293bb9b870d9.js'},{'revision':'61baa3a5fc2eebeed7b52ce72e4992aa','url':'cc0d293bb9b870d9.js.LICENSE.txt'},{'revision':null,'url':'ccb2870475da9fe8.woff'},{'revision':null,'url':'d04134fa33c2606d.woff'},{'revision':null,'url':'d11f9c5cd7d9ea16.woff'},{'revision':null,'url':'d188f7f036ac5779.woff2'},{'revision':null,'url':'d265d81c58525ae4.woff2'},{'revision':null,'url':'d5082a5140f450d7.js'},{'revision':null,'url':'d5942cd81663e136.woff2'},{'revision':null,'url':'d6097a5c452acf6d.woff'},{'revision':null,'url':'d66b8ff73d95cabb.woff2'},{'revision':null,'url':'d77f5bf95de8edaa.woff'},{'revision':null,'url':'d80423830df5e906.js'},{'revision':null,'url':'d80464c66e5d20d7.js'},{'revision':null,'url':'d8829a685af4f372.woff'},{'revision':null,'url':'d88899ef0fd16719.woff2'},{'revision':null,'url':'d9a5d958e69e058d.woff2'},{'revision':null,'url':'da65d9a514c628c8.woff'},{'revision':null,'url':'dac90d495be353a0.woff2'},{'revision':null,'url':'dd0262d4e75c15f8.js'},{'revision':null,'url':'dd7071bc6306585c.woff'},{'revision':null,'url':'dd8ce598529c3fab.woff2'},{'revision':null,'url':'ddef6f2dd566c2b9.woff'},{'revision':null,'url':'de013f1be25103fa.woff2'},{'revision':null,'url':'dee2ff599db31e5b.woff'},{'revision':null,'url':'dee7c6b5dd954d9b.woff'},{'revision':null,'url':'df222fceeffca849.woff2'},{'revision':null,'url':'e0d2e5b12f028b5d.woff'},{'revision':null,'url':'e33e3db8e4f7559f.woff'},{'revision':null,'url':'e419a658f4742c3e.js'},{'revision':'f7b599e3f88bf94d2af5d3f60873a311','url':'e419a658f4742c3e.js.LICENSE.txt'},{'revision':null,'url':'e62b00b9199c1ac9.woff2'},{'revision':null,'url':'e696cef1407b2610.woff2'},{'revision':null,'url':'e89ca83b24959664.woff'},{'revision':null,'url':'ea114697cfb59962.js'},{'revision':null,'url':'eb8c0ae77ad55249.woff'},{'revision':null,'url':'eccc74f925b1e148.js'},{'revision':null,'url':'ed0997bd7d221b8e.woff'},{'revision':null,'url':'eed48feba743e21c.woff2'},{'revision':null,'url':'f280bda8a6e535a6.woff'},{'revision':null,'url':'f368b00f4e1695a5.js'},{'revision':null,'url':'f543c88feb236d11.woff2'},{'revision':null,'url':'f591b0079faa93fe.woff2'},{'revision':null,'url':'f5c65190072bb3f7.js'},{'revision':null,'url':'f6ed27923769ad1d.woff2'},{'revision':null,'url':'f8803bebe640d99a.woff'},{'revision':'30de494bd9e73ae96c18fd0c06fa422b','url':'favicon.ico'},{'revision':null,'url':'fbebeb4336e67012.woff2'},{'revision':null,'url':'fcb385df17a82210.js'},{'revision':null,'url':'fd522cd7a5c646fe.woff'},{'revision':null,'url':'ff8fd36f7a9ca50a.js'},{'revision':null,'url':'https://dev3.openmrs.org/openmrs/spa/importmap.json'},{'revision':'a83eca246abd8dd2f8e2a55f8bd92bb7','url':'index.html'},{'revision':'6b758b31ea00150986994edcfb033a94','url':'logo-512.png'},{'revision':'b860db243392596e3b875bad9794b4e5','url':'logo.svg'},{'revision':null,'url':'openmrs.31b15ac64df7e8b7.css'},{'revision':null,'url':'openmrs.9696ea15df57b138.css'},{'revision':null,'url':'openmrs.f8f34d1e7caf6da9.js'}],De=Ie("index.html"),Ke=Pe(Ae.map((function(e){return Ie(e.url)}))),Me=".buildmanifest.json";function Ie(e){return new URL(e,self.location.href).href}const $e=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},Be=function(e){return T(e)&&"[object Arguments]"==C(e)};var qe=Object.prototype,Fe=qe.hasOwnProperty,Ne=qe.propertyIsEnumerable;const Ue=Be(function(){return arguments}())?Be:function(e){return T(e)&&Fe.call(e,"callee")&&!Ne.call(e,"callee")};var Le=x?x.isConcatSpreadable:void 0;const We=function(e){return k(e)||Ue(e)||!!(Le&&e&&e[Le])},He=function e(t,n,r,o,i){var a=-1,s=t.length;for(r||(r=We),i||(i=[]);++a<s;){var u=t[a];n>0&&r(u)?n>1?e(u,n-1,r,o,i):$e(i,u):o||(i[i.length]=u)}return i},ze=function(e){return null!=e&&e.length?He(e,1):[]};function Ge(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Ye(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ge(i,r,o,a,s,"next",e)}function s(e){Ge(i,r,o,a,s,"throw",e)}a(void 0)}))}}function Ve(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function Qe(e){return Je.apply(this,arguments)}function Je(){return Je=Ye((function(e){var t,n,r,o;return Ve(this,(function(i){switch(i.label){case 0:return t=e.imports,n=void 0===t?{}:t,r=Object.values(n),[4,Promise.all(r.map((a=Ye((function(e){var t,n;return Ve(this,(function(r){switch(r.label){case 0:return t=function(e){return e+Me}(e),[4,Xe(t)];case 1:return[2,(n=r.sent())?Ze(e,n):[]]}}))})),function(e){return a.apply(this,arguments)})))];case 1:return o=i.sent(),[2,ze(o)]}var a}))})),Je.apply(this,arguments)}function Xe(e){return fetch(e).then((function(e){return e.json()})).catch((function(){return null}))}function Ze(e,t){try{var n,r=[],o=((g=((m=new URL(e,self.location.href)).origin+m.pathname).split("/"))[g.length-1]="",g.join("/")),i=!0,a=!1,s=void 0;try{for(var u,c=(null!==(n=t.chunks)&&void 0!==n?n:[])[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var l,f=u.value,h=!0,d=!1,p=void 0;try{for(var y,v=(null!==(l=f.files)&&void 0!==l?l:[])[Symbol.iterator]();!(h=(y=v.next()).done);h=!0){var b=y.value;r.push(new URL(b,o).toString())}}catch(e){d=!0,p=e}finally{try{h||null==v.return||v.return()}finally{if(d)throw p}}}}catch(e){a=!0,s=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw s}}return r}catch(t){return console.error("[SW] Failed to determine the dependencies of the module with the URL %s. Not precaching any of the module's assets. Error: ",e,t),[]}var m,g}const et="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,tt=Object.keys,nt=Array.isArray;function rt(e,t){return"object"!=typeof t||tt(t).forEach((function(n){e[n]=t[n]})),e}"undefined"==typeof Promise||et.Promise||(et.Promise=Promise);const ot=Object.getPrototypeOf,it={}.hasOwnProperty;function at(e,t){return it.call(e,t)}function st(e,t){"function"==typeof t&&(t=t(ot(e))),("undefined"==typeof Reflect?tt:Reflect.ownKeys)(t).forEach((n=>{ct(e,n,t[n])}))}const ut=Object.defineProperty;function ct(e,t,n,r){ut(e,t,rt(n&&at(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function lt(e){return{from:function(t){return e.prototype=Object.create(t.prototype),ct(e.prototype,"constructor",e),{extend:st.bind(null,e.prototype)}}}}const ft=Object.getOwnPropertyDescriptor;function ht(e,t){let n;return ft(e,t)||(n=ot(e))&&ht(n,t)}const dt=[].slice;function pt(e,t,n){return dt.call(e,t,n)}function yt(e,t){return t(e)}function vt(e){if(!e)throw new Error("Assertion Failed")}function bt(e){et.setImmediate?setImmediate(e):setTimeout(e,0)}function mt(e,t){return e.reduce(((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})}function gt(e,t){if(at(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,o=t.length;r<o;++r){var i=gt(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:gt(s,t.substr(a+1))}}function wt(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){vt("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)wt(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===n?nt(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var u=e[a];u&&at(e,a)||(u=e[a]={}),wt(u,s,n)}}else void 0===n?nt(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function _t(e){var t={};for(var n in e)at(e,n)&&(t[n]=e[n]);return t}const xt=[].concat;function kt(e){return xt.apply([],e)}const St="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(kt([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>et[e])),Ot=St.map((e=>et[e]));mt(St,(e=>[e,!0]));let Pt=null;function Et(e){Pt="undefined"!=typeof WeakMap&&new WeakMap;const t=jt(e);return Pt=null,t}function jt(e){if(!e||"object"!=typeof e)return e;let t=Pt&&Pt.get(e);if(t)return t;if(nt(e)){t=[],Pt&&Pt.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(jt(e[n]))}else if(Ot.indexOf(e.constructor)>=0)t=e;else{const n=ot(e);for(var o in t=n===Object.prototype?{}:Object.create(n),Pt&&Pt.set(e,t),e)at(e,o)&&(t[o]=jt(e[o]))}return t}const{toString:Rt}={};function Ct(e){return Rt.call(e).slice(8,-1)}const Tt="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",At="symbol"==typeof Tt?function(e){var t;return null!=e&&(t=e[Tt])&&t.apply(e)}:function(){return null},Dt={};function Kt(e){var t,n,r,o;if(1===arguments.length){if(nt(e))return e.slice();if(this===Dt&&"string"==typeof e)return[e];if(o=At(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const Mt="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var It="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function $t(e,t){It=e,Bt=t}var Bt=()=>!0;const qt=!new Error("").stack;function Ft(){if(qt)try{throw Ft.arguments,new Error}catch(e){return e}return new Error}function Nt(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(Bt).map((e=>"\n"+e)).join("")):""}var Ut=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Lt=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Ut),Wt={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Ht(e,t){this._e=Ft(),this.name=e,this.message=t}function zt(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,n)=>n.indexOf(e)===t)).join("\n")}function Gt(e,t,n,r){this._e=Ft(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=zt(e,t)}function Yt(e,t){this._e=Ft(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=zt(e,t)}lt(Ht).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Nt(this._e,2))}},toString:function(){return this.name+": "+this.message}}),lt(Gt).from(Ht),lt(Yt).from(Ht);var Vt=Lt.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const Qt=Ht;var Jt=Lt.reduce(((e,t)=>{var n=t+"Error";function r(e,r){this._e=Ft(),this.name=n,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=Wt[t]||n,this.inner=null)}return lt(r).from(Qt),e[t]=r,e}),{});Jt.Syntax=SyntaxError,Jt.Type=TypeError,Jt.Range=RangeError;var Xt=Ut.reduce(((e,t)=>(e[t+"Error"]=Jt[t],e)),{}),Zt=Lt.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=Jt[t]),e)),{});function en(){}function tn(e){return e}function nn(e,t){return null==e||e===tn?t:function(n){return t(e(n))}}function rn(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function on(e,t){return e===en?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?rn(r,this.onsuccess):r),o&&(this.onerror=this.onerror?rn(o,this.onerror):o),void 0!==i?i:n}}function an(e,t){return e===en?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?rn(n,this.onsuccess):n),r&&(this.onerror=this.onerror?rn(r,this.onerror):r)}}function sn(e,t){return e===en?t:function(n){var r=e.apply(this,arguments);rt(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?rn(o,this.onsuccess):o),i&&(this.onerror=this.onerror?rn(i,this.onerror):i),void 0===r?void 0===a?void 0:a:rt(r,a)}}function un(e,t){return e===en?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function cn(e,t){return e===en?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return t.apply(r,i)}))}return t.apply(this,arguments)}}Zt.ModifyError=Gt,Zt.DexieError=Ht,Zt.BulkError=Yt;var ln={};const[fn,hn,dn]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,ot(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,ot(t),e]})(),pn=hn&&hn.then,yn=fn&&fn.constructor,vn=!!dn;var bn=!1,mn=dn?()=>{dn.then(Nn)}:et.setImmediate?setImmediate.bind(null,Nn):et.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{Nn(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(Nn,0)},gn=function(e,t){jn.push([e,t]),_n&&(mn(),_n=!1)},wn=!0,_n=!0,xn=[],kn=[],Sn=null,On=tn,Pn={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:fr,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{fr(e[0],e[1])}catch(e){}}))}},En=Pn,jn=[],Rn=0,Cn=[];function Tn(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=en,this._lib=!1;var t=this._PSD=En;if(It&&(this._stackHolder=Ft(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==ln)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Mn(this,this._value))}this._state=null,this._value=null,++t.ref,Kn(this,e)}const An={get:function(){var e=En,t=Jn;function n(n,r){var o=!e.global&&(e!==En||t!==Jn);const i=o&&!tr();var a=new Tn(((t,a)=>{$n(this,new Dn(cr(n,e,o,i),cr(r,e,o,i),t,a,e))}));return It&&Fn(a,this),a}return n.prototype=ln,n},set:function(e){ct(this,"then",e&&e.prototype===ln?An:{get:function(){return e},set:An.set})}};function Dn(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o}function Kn(e,t){try{t((t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&Un();t&&"function"==typeof t.then?Kn(e,((e,n)=>{t instanceof Tn?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,In(e)),n&&Ln()}}),Mn.bind(null,e))}catch(t){Mn(e,t)}}function Mn(e,t){if(kn.push(t),null===e._state){var n=e._lib&&Un();t=On(t),e._state=!1,e._value=t,It&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((()=>{var n=ht(t,"stack");t._promise=e,ct(t,"stack",{get:()=>bn?n&&(n.get?n.get.apply(t):n.value):e.stack})})),function(e){xn.some((t=>t._value===e._value))||xn.push(e)}(e),In(e),n&&Ln()}}function In(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)$n(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===Rn&&(++Rn,gn((()=>{0==--Rn&&Wn()}),[]))}function $n(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Rn,gn(Bn,[n,e,t])}else e._listeners.push(t)}function Bn(e,t,n){try{Sn=t;var r,o=t._value;t._state?r=e(o):(kn.length&&(kn=[]),r=e(o),-1===kn.indexOf(o)&&function(e){for(var t=xn.length;t;)if(xn[--t]._value===e._value)return void xn.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Sn=null,0==--Rn&&Wn(),--n.psd.ref||n.psd.finalize()}}function qn(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=Nt(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return It&&((r=Nt(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&qn(e._prev,t,n)),t}function Fn(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function Nn(){Un()&&Ln()}function Un(){var e=wn;return wn=!1,_n=!1,e}function Ln(){var e,t,n;do{for(;jn.length>0;)for(e=jn,jn=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(jn.length>0);wn=!0,_n=!0}function Wn(){var e=xn;xn=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=Cn.slice(0),n=t.length;n;)t[--n]()}function Hn(e){return new Tn(ln,!1,e)}function zn(e,t){var n=En;return function(){var r=Un(),o=En;try{return ir(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{ir(o,!1),r&&Ln()}}}st(Tn.prototype,{then:An,_then:function(e,t){$n(this,new Dn(null,null,e,t,En))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(e=>e instanceof t?n(e):Hn(e))):this.then(null,(e=>e&&e.name===t?n(e):Hn(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),Hn(t))))},stack:{get:function(){if(this._stack)return this._stack;try{bn=!0;var e=qn(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{bn=!1}}},timeout:function(e,t){return e<1/0?new Tn(((n,r)=>{var o=setTimeout((()=>r(new Jt.Timeout(t))),e);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&ct(Tn.prototype,Symbol.toStringTag,"Dexie.Promise"),Pn.env=ar(),st(Tn,{all:function(){var e=Kt.apply(null,arguments).map(nr);return new Tn((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach(((o,i)=>Tn.resolve(o).then((n=>{e[i]=n,--r||t(e)}),n)))}))},resolve:e=>{if(e instanceof Tn)return e;if(e&&"function"==typeof e.then)return new Tn(((t,n)=>{e.then(t,n)}));var t=new Tn(ln,!0,e);return Fn(t,Sn),t},reject:Hn,race:function(){var e=Kt.apply(null,arguments).map(nr);return new Tn(((t,n)=>{e.map((e=>Tn.resolve(e).then(t,n)))}))},PSD:{get:()=>En,set:e=>En=e},totalEchoes:{get:()=>Jn},newPSD:Zn,usePSD:sr,scheduler:{get:()=>gn,set:e=>{gn=e}},rejectionMapper:{get:()=>On,set:e=>{On=e}},follow:(e,t)=>new Tn(((n,r)=>Zn(((t,n)=>{var r=En;r.unhandleds=[],r.onunhandled=n,r.finalize=rn((function(){!function(e){Cn.push((function t(){e(),Cn.splice(Cn.indexOf(t),1)})),++Rn,gn((()=>{0==--Rn&&Wn()}),[])}((()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])}))}),r.finalize),e()}),t,n,r)))}),yn&&(yn.allSettled&&ct(Tn,"allSettled",(function(){const e=Kt.apply(null,arguments).map(nr);return new Tn((t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach(((e,o)=>Tn.resolve(e).then((e=>r[o]={status:"fulfilled",value:e}),(e=>r[o]={status:"rejected",reason:e})).then((()=>--n||t(r)))))}))})),yn.any&&"undefined"!=typeof AggregateError&&ct(Tn,"any",(function(){const e=Kt.apply(null,arguments).map(nr);return new Tn(((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach(((e,i)=>Tn.resolve(e).then((e=>t(e)),(e=>{o[i]=e,--r||n(new AggregateError(o))}))))}))})));const Gn={awaits:0,echoes:0,id:0};var Yn=0,Vn=[],Qn=0,Jn=0,Xn=0;function Zn(e,t,n,r){var o=En,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++Xn;var a=Pn.env;i.env=vn?{Promise:Tn,PromiseProp:{value:Tn,configurable:!0,writable:!0},all:Tn.all,race:Tn.race,allSettled:Tn.allSettled,any:Tn.any,resolve:Tn.resolve,reject:Tn.reject,nthen:lr(a.nthen,i),gthen:lr(a.gthen,i)}:{},t&&rt(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=sr(i,e,n,r);return 0===i.ref&&i.finalize(),s}function er(){return Gn.id||(Gn.id=++Yn),++Gn.awaits,Gn.echoes+=100,Gn.id}function tr(){return!!Gn.awaits&&(0==--Gn.awaits&&(Gn.id=0),Gn.echoes=100*Gn.awaits,!0)}function nr(e){return Gn.echoes&&e&&e.constructor===yn?(er(),e.then((e=>(tr(),e)),(e=>(tr(),hr(e))))):e}function rr(e){++Jn,Gn.echoes&&0!=--Gn.echoes||(Gn.echoes=Gn.id=0),Vn.push(En),ir(e,!0)}function or(){var e=Vn[Vn.length-1];Vn.pop(),ir(e,!1)}function ir(e,t){var n=En;if((t?!Gn.echoes||Qn++&&e===En:!Qn||--Qn&&e===En)||ur(t?rr.bind(null,e):or),e!==En&&(En=e,n===Pn&&(Pn.env=ar()),vn)){var r=Pn.env.Promise,o=e.env;hn.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(et,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function ar(){var e=et.Promise;return vn?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(et,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:hn.then,gthen:e.prototype.then}:{}}function sr(e,t,n,r,o){var i=En;try{return ir(e,!0),t(n,r,o)}finally{ir(i,!1)}}function ur(e){pn.call(fn,e)}function cr(e,t,n,r){return"function"!=typeof e?e:function(){var o=En;n&&er(),ir(t,!0);try{return e.apply(this,arguments)}finally{ir(o,!1),r&&ur(tr)}}}function lr(e,t){return function(n,r){return e.call(this,cr(n,t),cr(r,t))}}function fr(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(et.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),rt(r,o)):et.CustomEvent&&rt(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&et.dispatchEvent&&(dispatchEvent(r),!et.PromiseRejectionEvent&&et.onunhandledrejection))try{et.onunhandledrejection(r)}catch(e){}It&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+pn).indexOf("[native code]")&&(er=tr=en);var hr=Tn.reject;function dr(e,t,n,r){if(e.idbdb&&(e._state.openComplete||En.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===Vt.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>dr(e,t,n,r)))):hr(o)}return o._promise(t,((e,t)=>Zn((()=>(En.trans=o,r(e,t,o)))))).then((e=>o._completion.then((()=>e))))}if(e._state.openComplete)return hr(new Jt.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return hr(new Jt.DatabaseClosed);e.open().catch(en)}return e._state.dbReadyPromise.then((()=>dr(e,t,n,r)))}const pr=String.fromCharCode(65535),yr="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",vr=[],br="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),mr=br,gr=br,wr=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function _r(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const xr={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function kr(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=Et(t))[e],t)}class Sr{_trans(e,t,n){const r=this._tx||En.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new Jt.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}const a=Un();try{return r&&r.db===this.db?r===En.trans?r._promise(e,i,n):Zn((()=>r._promise(e,i,n)),{trans:r,transless:En.transless||En}):dr(this.db,e,[this.name],i)}finally{a&&Ln()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(t=>this.core.get({trans:t,key:e}).then((e=>this.hook.reading.fire(e))))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(nt(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=tt(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter((e=>e.compound&&t.every((t=>e.keyPath.indexOf(t)>=0))&&e.keyPath.every((e=>t.indexOf(e)>=0))))[0];if(n&&this.db._maxKey!==pr)return this.where(n.name).equals(n.keyPath.map((t=>e[t])));!n&&It&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}const[a,s]=t.reduce((([t,n],o)=>{const a=r[o],s=e[o];return[t||a,t||!a?_r(n,a&&a.multi?e=>{const t=gt(e,o);return nt(t)&&t.some((e=>i(s,e)))}:e=>i(s,gt(e,o))):n]}),[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):n?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,nt(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const n=Object.create(e.prototype);for(var r in t)if(at(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass((function(e){rt(this,e)}))}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=kr(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]}))).then((e=>e.numFailures?Tn.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{wt(e,r,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||nt(e))return this.where(":id").equals(e).modify(t);{const n=gt(e,this.schema.primKey.keyPath);if(void 0===n)return hr(new Jt.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?tt(t).forEach((n=>{wt(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=kr(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null}))).then((e=>e.numFailures?Tn.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{wt(e,r,t)}catch(e){}return t}))}delete(e){return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:[e]}))).then((e=>e.numFailures?Tn.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:xr}))).then((e=>e.numFailures?Tn.reject(e.failures[0]):void 0))}bulkGet(e){return this._trans("readonly",(t=>this.core.getMany({keys:e,trans:t}).then((e=>e.map((e=>this.hook.reading.fire(e)))))))}bulkAdd(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Jt.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Jt.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(kr(i)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new Yt(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,r)}))}))}bulkPut(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Jt.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Jt.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(kr(i)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new Yt(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,r)}))}))}bulkDelete(e){const t=e.length;return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:e}))).then((({numFailures:e,lastResult:n,failures:r})=>{if(0===e)return n;throw new Yt(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)}))}}function Or(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return a(e);r||(r=un),o||(o=en);var i={subscribers:[],fire:o,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=r(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter((function(t){return t!==e})),i.fire=i.subscribers.reduce(r,o)}};return t[e]=n[e]=i,i}function a(e){tt(e).forEach((function(t){var n=e[t];if(nt(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new Jt.InvalidArgument("Invalid event config");var r=i(t,tn,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){bt((function(){e.apply(null,t)}))}))}))}}))}}function Pr(e,t){return lt(t).from({prototype:e}),t}function Er(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function jr(e,t){e.filter=_r(e.filter,t)}function Rr(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>_r(r(),t()):t,e.justLimit=n&&!r}function Cr(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new Jt.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function Tr(e,t,n){const r=Cr(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function Ar(e,t,n,r){const o=e.replayFilter?_r(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},a=(e,n,r)=>{if(!o||o(n,r,(e=>n.stop(e)),(e=>n.fail(e)))){var a=n.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),at(i,s)||(i[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),Dr(Tr(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return Dr(Tr(e,r,n),_r(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function Dr(e,t,n,r){var o=zn(r?(e,t,o)=>n(r(e),t,o):n);return e.then((e=>{if(e)return e.start((()=>{var n=()=>e.continue();t&&!t(e,(e=>n=e),(t=>{e.stop(t),n=en}),(t=>{e.fail(t),n=en}))||o(e.value,e,(e=>n=e)),n()}))}))}function Kr(e,t){try{const n=Mr(e),r=Mr(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===r?0:n<r?-1:1}(Ir(e),Ir(t));case"Array":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=Kr(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function Mr(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=Ct(e);return"ArrayBuffer"===n?"binary":n}function Ir(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class $r{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,hr.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,hr.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=_r(t.algorithm,e)}_iterate(e,t){return Ar(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&rt(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((n=>Ar(t,e,n,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,n=t.table.core;if(Er(t,!0))return n.count({trans:e,query:{index:Cr(t,n.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var r=0;return Ar(t,(()=>(++r,!1)),e,n).then((()=>r))})).then(e)}sortBy(e,t){const n=e.split(".").reverse(),r=n[0],o=n.length-1;function i(e,t){return t?i(e[n[t]],t-1):e[r]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var n=i(e,o),r=i(t,o);return n<r?-a:n>r?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)}toArray(e){return this._read((e=>{var t=this._ctx;if("next"===t.dir&&Er(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=Cr(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:r,range:t.range}}).then((({result:e})=>n?e.map(n):e))}{const n=[];return Ar(t,(e=>n.push(e)),e,t.table.core).then((()=>n))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,Er(t)?Rr(t,(()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n((()=>{e.advance(t),t=0})),!1))})):Rr(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Rr(this._ctx,(()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}until(e,t){return jr(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}first(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}last(e){return this.reverse().first(e)}filter(e){var t,n;return jr(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=_r(t.isMatch,n),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&Er(t,!0)&&t.limit>0)return this._read((e=>{var n=Cr(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((({result:e})=>e)).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return jr(this._ctx,(function(e){var t=e.primaryKey.toString(),r=at(n,t);return n[t]=!0,!r})),this}modify(e){var t=this._ctx;return this._write((n=>{var r;if("function"==typeof e)r=e;else{var o=tt(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var a=o[r],s=e[a];gt(t,a)!==s&&(wt(t,a,s),n=!0)}return n}}const a=t.table.core,{outbound:s,extractKey:u}=a.schema.primaryKey,c=this.db._options.modifyChunkSize||200,l=[];let f=0;const h=[],d=(e,t)=>{const{failures:n,numFailures:r}=t;f+=e-r;for(let e of tt(n))l.push(n[e])};return this.clone().primaryKeys().then((o=>{const i=l=>{const f=Math.min(c,o.length-l);return a.getMany({trans:n,keys:o.slice(l,l+f),cache:"immutable"}).then((h=>{const p=[],y=[],v=s?[]:null,b=[];for(let e=0;e<f;++e){const t=h[e],n={value:Et(t),primKey:o[l+e]};!1!==r.call(n,n.value,n)&&(null==n.value?b.push(o[l+e]):s||0===Kr(u(t),u(n.value))?(y.push(n.value),s&&v.push(o[l+e])):(b.push(o[l+e]),p.push(n.value)))}const m=Er(t)&&t.limit===1/0&&("function"!=typeof e||e===Br)&&{index:t.index,range:t.range};return Promise.resolve(p.length>0&&a.mutate({trans:n,type:"add",values:p}).then((e=>{for(let t in e.failures)b.splice(parseInt(t),1);d(p.length,e)}))).then((()=>(y.length>0||m&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:v,values:y,criteria:m,changeSpec:"function"!=typeof e&&e}).then((e=>d(y.length,e))))).then((()=>(b.length>0||m&&e===Br)&&a.mutate({trans:n,type:"delete",keys:b,criteria:m}).then((e=>d(b.length,e))))).then((()=>o.length>l+f&&i(l+c)))}))};return i(0).then((()=>{if(l.length>0)throw new Gt("Error modifying one or more objects",l,f,h);return o.length}))}))}))}delete(){var e=this._ctx,t=e.range;return Er(e)&&(e.isPrimKey&&!gr||3===t.type)?this._write((n=>{const{primaryKey:r}=e.table.core.schema,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((t=>e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((({failures:e,lastResult:n,results:r,numFailures:o})=>{if(o)throw new Gt("Could not delete some values",Object.keys(e).map((t=>e[t])),t-o);return t-o}))))})):this.modify(Br)}}const Br=(e,t)=>t.value=null;function qr(e,t){return e<t?-1:e===t?0:1}function Fr(e,t){return e>t?-1:e===t?0:1}function Nr(e,t,n){var r=e instanceof Gr?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function Ur(e){return new e.Collection(e,(()=>zr(""))).limit(0)}function Lr(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),s=-1,u=0;u<a;++u){var c=t[u];if(c!==r[u])return o(e[u],n[u])<0?e.substr(0,u)+n[u]+n.substr(u+1):o(e[u],r[u])<0?e.substr(0,u)+r[u]+n.substr(u+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;o(e[u],c)<0&&(s=u)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):s<0?null:e.substr(0,s)+r[s]+n.substr(s+1)}function Wr(e,t,n,r){var o,i,a,s,u,c,l,f=n.length;if(!n.every((e=>"string"==typeof e)))return Nr(e,"String expected.");function h(e){o=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),i=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),a="next"===e?qr:Fr;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),u=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r}h("next");var d=new e.Collection(e,(()=>Hr(s[0],u[f-1]+r)));d._ondirectionchange=function(e){h(e)};var p=0;return d._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var h=i(o);if(t(h,u,p))return!0;for(var d=null,y=p;y<f;++y){var v=Lr(o,h,s[y],u[y],a,c);null===v&&null===d?p=y+1:(null===d||a(d,v)>0)&&(d=v)}return n(null!==d?function(){e.continue(d+l)}:r),!1})),d}function Hr(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function zr(e){return{type:1,lower:e,upper:e}}class Gr{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?Ur(this):new this.Collection(this,(()=>Hr(e,t,!n,!r)))}catch(e){return Nr(this,yr)}}equals(e){return null==e?Nr(this,yr):new this.Collection(this,(()=>zr(e)))}above(e){return null==e?Nr(this,yr):new this.Collection(this,(()=>Hr(e,void 0,!0)))}aboveOrEqual(e){return null==e?Nr(this,yr):new this.Collection(this,(()=>Hr(e,void 0,!1)))}below(e){return null==e?Nr(this,yr):new this.Collection(this,(()=>Hr(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?Nr(this,yr):new this.Collection(this,(()=>Hr(void 0,e)))}startsWith(e){return"string"!=typeof e?Nr(this,"String expected."):this.between(e,e+pr,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):Wr(this,((e,t)=>0===e.indexOf(t[0])),[e],pr)}equalsIgnoreCase(e){return Wr(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=Kt.apply(Dt,arguments);return 0===e.length?Ur(this):Wr(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=Kt.apply(Dt,arguments);return 0===e.length?Ur(this):Wr(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,pr)}anyOf(){const e=Kt.apply(Dt,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return Nr(this,yr)}if(0===e.length)return Ur(this);const n=new this.Collection(this,(()=>Hr(e[0],e[e.length-1])));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let r=0;return n._addAlgorithm(((n,o,i)=>{const a=n.key;for(;t(a,e[r])>0;)if(++r,r===e.length)return o(i),!1;return 0===t(a,e[r])||(o((()=>{n.continue(e[r])})),!1)})),n}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=Kt.apply(Dt,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Nr(this,yr)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return Ur(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0)))return Nr(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Jt.InvalidArgument);const s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;let c,l=r;function f(e,t){return l(e[0],t[0])}try{c=e.reduce((function(e,t){let r=0,o=e.length;for(;r<o;++r){const o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return r===o&&e.push(t),e}),[]),c.sort(f)}catch(e){return Nr(this,yr)}let h=0;const d=u?e=>r(e,c[h][1])>0:e=>r(e,c[h][1])>=0,p=s?e=>o(e,c[h][0])>0:e=>o(e,c[h][0])>=0;let y=d;const v=new this.Collection(this,(()=>Hr(c[0][0],c[c.length-1][1],!s,!u)));return v._ondirectionchange=e=>{"next"===e?(y=d,l=r):(y=p,l=o),c.sort(f)},v._addAlgorithm(((e,t,n)=>{for(var o=e.key;y(o);)if(++h,h===c.length)return t(n),!1;return!!function(e){return!d(e)&&!p(e)}(o)||(0===this._cmp(o,c[h][1])||0===this._cmp(o,c[h][0])||t((()=>{l===r?e.continue(c[h][0]):e.continue(c[h][1])})),!1)})),v}startsWithAnyOf(){const e=Kt.apply(Dt,arguments);return e.every((e=>"string"==typeof e))?0===e.length?Ur(this):this.inAnyRange(e.map((e=>[e,e+pr]))):Nr(this,"startsWithAnyOf() only works with strings")}}function Yr(e){return zn((function(t){return Vr(t),e(t.target.error),!1}))}function Vr(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const Qr=Or(null,"storagemutated");class Jr{_lock(){return vt(!En.global),++this._reculock,1!==this._reculock||En.global||(En.lockOwnerFor=this),this}_unlock(){if(vt(!En.global),0==--this._reculock)for(En.global||(En.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{sr(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&En.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(vt(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new Jt.DatabaseClosed(n);case"MissingAPIError":throw new Jt.MissingAPI(n.message,n);default:throw new Jt.OpenFailed(n)}if(!this.active)throw new Jt.TransactionInactive;return vt(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=zn((t=>{Vr(t),this._reject(e.error)})),e.onabort=zn((t=>{Vr(t),this.active&&this._reject(new Jt.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=zn((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&Qr.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return hr(new Jt.ReadOnly("Transaction is readonly"));if(!this.active)return hr(new Jt.TransactionInactive);if(this._locked())return new Tn(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},En])}));if(n)return Zn((()=>{var e=new Tn(((e,n)=>{this._lock();const r=t(e,n,this);r&&r.then&&r.then(e,n)}));return e.finally((()=>this._unlock())),e._lib=!0,e}));var r=new Tn(((e,n)=>{var r=t(e,n,this);r&&r.then&&r.then(e,n)}));return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();const n=Tn.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((()=>n));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new Tn(((e,r)=>{n.then((n=>t._waitingQueue.push(zn(e.bind(null,n)))),(e=>t._waitingQueue.push(zn(r.bind(null,e))))).finally((()=>{t._waitingFor===o&&(t._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Jt.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(at(t,e))return t[e];const n=this.schema[e];if(!n)throw new Jt.NotFound("Table "+e+" not part of transaction");const r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}function Xr(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+Zr(t)}}function Zr(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function eo(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:mt(n,(e=>[e.name,e]))}}let to=e=>{try{return e.only([[]]),to=()=>[[]],[[]]}catch(e){return to=()=>pr,pr}};function no(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>gt(t,e)}(e):t=>gt(t,e)}function ro(e){return[].slice.call(e)}let oo=0;function io(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function ao(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:n,upper:r,lowerOpen:o,upperOpen:i}=e;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}const{schema:o,hasGetAll:i}=function(e,t){const n=ro(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:n}=e,r=nt(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:no(t)},indexes:ro(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:n,multiEntry:r,keyPath:o}=e,a={name:t,compound:nt(o),keyPath:o,unique:n,multiEntry:r,extractKey:no(o)};return i[io(o)]=a,a})),getIndexByKeyPath:e=>i[io(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[io(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),a=o.tables.map((e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:n,keys:o,values:i,range:a}){return new Promise(((s,u)=>{s=zn(s);const c=e.objectStore(t),l=null==c.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:h}=o||i||{length:1};if(o&&i&&o.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===h)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let d;const p=[],y=[];let v=0;const b=e=>{++v,Vr(e)};if("deleteRange"===n){if(4===a.type)return s({numFailures:v,failures:y,results:[],lastResult:void 0});3===a.type?p.push(d=c.clear()):p.push(d=c.delete(r(a)))}else{const[e,t]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<h;++r)p.push(d=t&&void 0!==t[r]?c[n](e[r],t[r]):c[n](e[r])),d.onerror=b;else for(let t=0;t<h;++t)p.push(d=c[n](e[t])),d.onerror=b}const m=e=>{const t=e.target.result;p.forEach(((e,t)=>null!=e.error&&(y[t]=e.error))),s({numFailures:v,failures:y,results:"delete"===n?o:p.map((e=>e.result)),lastResult:t})};d.onerror=e=>{b(e),m(e)},d.onsuccess=m}))},getMany:({trans:e,keys:n})=>new Promise(((r,o)=>{r=zn(r);const i=e.objectStore(t),a=n.length,s=new Array(a);let u,c=0,l=0;const f=e=>{const t=e.target;s[t._pos]=t.result,++l===c&&r(s)},h=Yr(o);for(let e=0;e<a;++e)null!=n[e]&&(u=i.get(n[e]),u._pos=e,u.onsuccess=f,u.onerror=h,++c);0===c&&r(s)})),get:({trans:e,key:n})=>new Promise(((r,o)=>{r=zn(r);const i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=Yr(o)})),query:function(e){return n=>new Promise(((o,i)=>{o=zn(o);const{trans:a,values:s,limit:u,query:c}=n,l=u===1/0?void 0:u,{index:f,range:h}=c,d=a.objectStore(t),p=f.isPrimaryKey?d:d.index(f.name),y=r(h);if(0===u)return o({result:[]});if(e){const e=s?p.getAll(y,l):p.getAllKeys(y,l);e.onsuccess=e=>o({result:e.target.result}),e.onerror=Yr(i)}else{let e=0;const t=s||!("openKeyCursor"in p)?p.openCursor(y):p.openKeyCursor(y),n=[];t.onsuccess=r=>{const i=t.result;return i?(n.push(s?i.value:i.primaryKey),++e===u?o({result:n}):void i.continue()):o({result:n})},t.onerror=Yr(i)}}))}(i),openCursor:function({trans:e,values:n,query:o,reverse:i,unique:a}){return new Promise(((s,u)=>{s=zn(s);const{index:c,range:l}=o,f=e.objectStore(t),h=c.isPrimaryKey?f:f.index(c.name),d=i?a?"prevunique":"prev":a?"nextunique":"next",p=n||!("openKeyCursor"in h)?h.openCursor(r(l),d):h.openKeyCursor(r(l),d);p.onerror=Yr(u),p.onsuccess=zn((t=>{const n=p.result;if(!n)return void s(null);n.___id=++oo,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),a=()=>{throw new Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=zn(u),n.next=function(){let e=1;return this.start((()=>e--?this.continue():this.stop())).then((()=>this))},n.start=e=>{const t=new Promise(((e,t)=>{e=zn(e),p.onerror=Yr(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,e(t)}})),s=()=>{if(p.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return p.onsuccess=zn((e=>{p.onsuccess=s,s()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,s(),t},s(n)}),u)}))},count({query:e,trans:n}){const{index:o,range:i}=e;return new Promise(((e,a)=>{const s=n.objectStore(t),u=o.isPrimaryKey?s:s.index(o.name),c=r(i),l=c?u.count(c):u.count();l.onsuccess=zn((t=>e(t.target.result))),l.onerror=Yr(a)}))}}}(e))),s={};return a.forEach((e=>s[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!s[e])throw new Error(`Table '${e}' not found`);return s[e]},MIN_KEY:-1/0,MAX_KEY:to(t),schema:o}}function so({_novip:e},t){const n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},o){const i=function(e,t){return t.reduce(((e,{create:t})=>({...e,...t(e)})),e)}(ao(t,n,o),e.dbcore);return{dbcore:i}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach((t=>{const n=t.name;e.core.schema.tables.some((e=>e.name===n))&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))}))}function uo({_novip:e},t,n,r){n.forEach((n=>{const o=r[n];t.forEach((t=>{const r=ht(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?ct(t,n,{get(){return this.table(n)},set(e){ut(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))}))}))}function co({_novip:e},t){t.forEach((t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]}))}function lo(e,t){return e._cfg.version-t._cfg.version}function fo(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),s=En.transless||En;Zn((()=>{En.trans=i,En.transless=s,0===t?(tt(o).forEach((e=>{po(n,e,o[e].primKey,o[e].indexes)})),so(e,n),Tn.follow((()=>e.on.populate.fire(i))).catch(a)):function({_novip:e},t,n,r){const o=[],i=e._versions;let a=e._dbSchema=vo(0,e.idbdb,r),s=!1;return i.filter((e=>e._cfg.version>=t)).forEach((i=>{o.push((()=>{const o=a,u=i._cfg.dbschema;bo(e,o,r),bo(e,u,r),a=e._dbSchema=u;const c=ho(o,u);c.add.forEach((e=>{po(r,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((e=>{if(e.recreate)throw new Jt.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach((e=>yo(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),yo(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const l=i._cfg.contentUpgrade;if(l&&i._cfg.version>t){so(e,r),n._memoizedTables={},s=!0;let t=_t(u);c.del.forEach((e=>{t[e]=o[e]})),co(e,[e.Transaction.prototype]),uo(e,[e.Transaction.prototype],tt(t),t),n.schema=t;const i=Mt(l);let a;i&&er();const f=Tn.follow((()=>{if(a=l(n),a&&i){var e=tr.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?Tn.resolve(a):f.then((()=>a))}})),o.push((t=>{s&&mr||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((n=>null==e[n]&&t.db.deleteObjectStore(n)))}(i._cfg.dbschema,t),co(e,[e.Transaction.prototype]),uo(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}))})),function e(){return o.length?Tn.resolve(o.shift()(n.idbtrans)).then(e):Tn.resolve()}().then((()=>{var e,t;t=r,tt(e=a).forEach((n=>{t.db.objectStoreNames.contains(n)||po(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}function ho(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const o=e[r],i=t[r];if(o){const e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!br)e.recreate=!0,n.change.push(e);else{const t=o.idxByName,r=i.idxByName;let a;for(a in t)r[a]||e.del.push(a);for(a in r){const n=t[a],o=r[a];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}}else n.add.push([r,i])}return n}function po(e,t,n,r){const o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((e=>yo(o,e))),o}function yo(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function vo(e,t,n){const r={};return pt(t.objectStoreNames,0).forEach((e=>{const t=n.objectStore(e);let o=t.keyPath;const i=Xr(Zr(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);o=n.keyPath;var s=Xr(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=eo(e,i,a)})),r}function bo({_novip:e},t,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const n=a.indexNames[e],r=a.index(n).keyPath,o="string"==typeof r?r:"["+pt(r).join("+")+"]";if(t[i]){const e=t[i].idxByName[o];e&&(e.name=n,delete t[i].idxByName[o],t[i].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&et.WorkerGlobalScope&&et instanceof et.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class mo{_parseStoresSpec(e,t){tt(e).forEach((n=>{if(null!==e[n]){var r=e[n].split(",").map(((e,t)=>{const n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return Xr(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),nt(r),0===t)})),o=r.shift();if(o.multi)throw new Jt.Schema("Primary key cannot be multi-valued");r.forEach((e=>{if(e.auto)throw new Jt.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new Jt.Schema("Index must have a name and cannot be an empty string")})),t[n]=eo(n,o,r)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?rt(this._cfg.storesSource,e):e;const n=t._versions,r={};let o={};return n.forEach((e=>{rt(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,co(t,[t._allTables,t,t.Transaction.prototype]),uo(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],tt(o),o),t._storeNames=tt(o),this}upgrade(e){return this._cfg.contentUpgrade=cn(this._cfg.contentUpgrade||en,e),this}}function go(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new Fo("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function wo(e){return e&&"function"==typeof e.databases}function _o(e){return Zn((function(){return En.letThrough=!0,e()}))}function xo(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function ko(e){var t=t=>e.next(t),n=o(t),r=o((t=>e.throw(t)));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):nt(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function So(e,t,n){var r=arguments.length;if(r<2)throw new Jt.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,kt(o),n]}function Oo(e,t,n,r,o){return Tn.resolve().then((()=>{const i=En.transless||En,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===Vt.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Oo(e,t,n,null,o)))):hr(r)}const u=Mt(o);let c;u&&er();const l=Tn.follow((()=>{if(c=o.call(a,a),c)if(u){var e=tr.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=ko(c))}),s);return(c&&"function"==typeof c.then?Tn.resolve(c).then((e=>a.active?e:hr(new Jt.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>c))).then((e=>(r&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),hr(e))))}))}function Po(e,t,n){const r=nt(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const Eo={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const n=e.table(t),{schema:r}=n,o={},i=[];function a(e,t,n){const r=io(e),s=o[r]=o[r]||[],u=null==e?0:"string"==typeof e?1:e.length,c=t>0,l={...n,isVirtual:c,keyTail:t,keyLength:u,extractKey:no(e),unique:!c&&n.unique};return s.push(l),l.isPrimaryKey||i.push(l),u>1&&a(2===u?e[0]:e.slice(0,u-1),t+1,n),s.sort(((e,t)=>e.keyTail-t.keyTail)),l}const s=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[s];for(const e of r.indexes)a(e.keyPath,0,e);function u(t){const n=t.query.index;return n.isVirtual?{...t,query:{index:n,range:(r=t.query.range,o=n.keyTail,{type:1===r.type?2:r.type,lower:Po(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,o),lowerOpen:!0,upper:Po(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,o),upperOpen:!0})}}:t;var r,o}const c={...n,schema:{...r,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){const t=o[io(e)];return t&&t[0]}},count:e=>n.count(u(e)),query:e=>n.query(u(e)),openCursor(t){const{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(u(t)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(Po(o,t.reverse?e.MAX_KEY:e.MIN_KEY,r)):t.unique?n.continue(n.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(t,o){n.continuePrimaryKey(Po(t,e.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const e=n.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>n.value}});return o}(n))):n.openCursor(t)}};return c}}}};function jo(e,t,n,r){return n=n||{},r=r||"",tt(e).forEach((o=>{if(at(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const e=Ct(i);e!==Ct(a)?n[r+o]=t[o]:"Object"===e?jo(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0})),tt(t).forEach((o=>{at(e,o)||(n[r+o]=t[o])})),n}const Ro={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema,o={...n,mutate(e){const o=En.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===en)break;return o._promise("readwrite",(()=>u(e)),!0);case"put":if(a.fire===en&&s.fire===en)break;return o._promise("readwrite",(()=>u(e)),!0);case"delete":if(i.fire===en)break;return o._promise("readwrite",(()=>u(e)),!0);case"deleteRange":if(i.fire===en)break;return o._promise("readwrite",(()=>function(e){return c(e.trans,e.range,1e4)}(e)),!0)}return n.mutate(e);function u(e){const t=En.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:o}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then((u=>{const c=o.map(((n,o)=>{const c=u[o],l={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(l,n,c,t);else if("add"===e.type||void 0===c){const i=a.fire.call(l,n,e.values[o],t);null==n&&null!=i&&(n=i,e.keys[o]=n,r.outbound||wt(e.values[o],r.keyPath,n))}else{const r=jo(c,e.values[o]),i=s.fire.call(l,r,n,c,t);if(i){const t=e.values[o];Object.keys(i).forEach((e=>{at(t,e)?t[e]=i[e]:wt(t,e,i[e])}))}}return l}));return n.mutate(e).then((({failures:t,results:n,numFailures:r,lastResult:i})=>{for(let r=0;r<o.length;++r){const i=n?n[r]:o[r],a=c[r];null==i?a.onerror&&a.onerror(t[r]):a.onsuccess&&a.onsuccess("put"===e.type&&u[r]?e.values[r]:i)}return{failures:t,results:n,numFailures:r,lastResult:i}})).catch((e=>(c.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function c(e,t,o){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:o}).then((({result:n})=>u({type:"delete",keys:n,trans:e}).then((r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<o?{failures:[],numFailures:0,lastResult:void 0}:c(e,{...t,lower:n[n.length-1],lowerOpen:!0},o)))))}}};return o}})};function Co(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;const r=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===Kr(t.keys[o],e[i])&&(r.push(n?Et(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}const To={stack:"dbcore",level:-1,create:e=>({table:t=>{const n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);const t=Co(e.keys,e.trans._cache,"clone"===e.cache);return t?Tn.resolve(t):n.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?Et(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function Ao(e){return!("from"in e)}const Do=function(e,t){if(!this){const t=new Do;return e&&"d"in e&&rt(t,e),t}rt(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Ko(e,t,n){const r=Kr(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(Ao(e))return rt(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(Kr(n,e.from)<0)return o?Ko(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},$o(e);if(Kr(t,e.to)>0)return i?Ko(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},$o(e);Kr(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),Kr(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const a=!e.r;o&&!e.l&&Mo(e,o),i&&a&&Mo(e,i)}function Mo(e,t){Ao(t)||function e(t,{from:n,to:r,l:o,r:i}){Ko(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function Io(e){let t=Ao(e)?null:{s:0,n:e};return{next(e){const n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&Kr(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||Kr(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function $o(e){var t,n;const r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const t="r"===o?"l":"r",n={...e},r=e[o];e.from=r.from,e.to=r.to,e[o]=r[o],n[o]=r[t],e[t]=n,n.d=Bo(n)}e.d=Bo(e)}function Bo({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}st(Do.prototype,{add(e){return Mo(this,e),this},addKey(e){return Ko(this,e,e),this},addKeys(e){return e.forEach((e=>Ko(this,e,e))),this},[Tt](){return Io(this)}});const qo={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new Do(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const o=e.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:u}=a,c={...o,mutate:e=>{const a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),u=e=>{const n=`idb://${t}/${r}/${e}`;return s[n]||(s[n]=new Do)},c=u(""),l=u(":dels"),{type:f}=e;let[h,d]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const p=e.trans._cache;return o.mutate(e).then((e=>{if(nt(h)){"delete"!==f&&(h=e.results),c.addKeys(h);const t=Co(h,p);t||"add"===f||l.addKeys(h),(t||d)&&function(e,t,n,r){t.indexes.forEach((function(t){const o=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}const a=e=>t.multiEntry&&nt(e)?e.forEach((e=>o.addKey(e))):o.addKey(e);(n||r).forEach(((e,t)=>{const o=n&&i(n[t]),s=r&&i(r[t]);0!==Kr(o,s)&&(null!=o&&a(o),null!=s&&a(s))}))}))}(u,i,t,d)}else if(h){const e={from:h.lower,to:h.upper};l.add(e),c.add(e)}else c.add(n),l.add(n),i.indexes.forEach((e=>u(e.name).add(n)));return e}))}},l=({query:{index:t,range:n}})=>{var r,o;return[t,new Do(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:e.MAX_KEY)]},f={get:e=>[a,new Do(e.key)],getMany:e=>[a,(new Do).addKeys(e.keys)],count:l,query:l,openCursor:l};return tt(f).forEach((e=>{c[e]=function(i){const{subscr:a}=En;if(a){const c=e=>{const n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new Do)},l=c(""),h=c(":dels"),[d,p]=f[e](i);if(c(d.name||"").add(p),!d.isPrimaryKey){if("count"!==e){const t="query"===e&&u&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then((n=>{if("query"===e){if(u&&i.values)return t.then((({result:e})=>(l.addKeys(e),n)));const e=i.values?n.result.map(s):n.result;i.values?l.addKeys(e):h.addKeys(e)}else if("openCursor"===e){const e=n,t=i.values;return e&&Object.create(e,{key:{get:()=>(h.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return h.addKey(t),t}},value:{get:()=>(t&&l.addKey(e.primaryKey),e.value)}})}return n}))}h.add(n)}}return o[e].apply(this,arguments)}})),c}}}};class Fo{constructor(e,t){this._middlewares={},this.verno=0;const n=Fo.dependencies;this._options=t={addons:Fo.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:r}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:en,dbReadyPromise:null,cancelOpen:en,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new Tn((e=>{o.dbReadyResolve=e})),o.openCanceller=new Tn(((e,t)=>{o.cancelOpen=t})),this._state=o,this.name=e,this.on=Or(this,"populate","blocked","versionchange","close",{ready:[cn,en]}),this.on.ready.subscribe=yt(this.on.ready.subscribe,(e=>(t,n)=>{Fo.vip((()=>{const r=this._state;if(r.openComplete)r.dbOpenError||Tn.resolve().then(t),n&&e(t);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(t),n&&e(t);else{e(t);const r=this;n||e((function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)}))}}))})),this.Collection=(i=this,Pr($r.prototype,(function(e,t){this.db=i;let n=xr,r=null;if(t)try{n=t()}catch(e){r=e}const o=e._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:s!==tn?s:null}}))),this.Table=function(e){return Pr(Sr.prototype,(function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:Or(null,{creating:[on,en],reading:[nn,tn],updating:[sn,en],deleting:[an,en]})}))}(this),this.Transaction=function(e){return Pr(Jr.prototype,(function(t,n,r,o,i){this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=Or(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Tn(((e,t)=>{this._resolve=e,this._reject=t})),this._completion.then((()=>{this.active=!1,this.on.complete.fire()}),(e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),hr(e)}))}))}(this),this.Version=function(e){return Pr(mo.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Pr(Gr.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};const o=e._deps.indexedDB;if(!o)throw new Jt.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>o.cmp(e,t)<0?e:t,this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()})),this.on("blocked",(e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)})),this._maxKey=to(t.IDBKeyRange),this._createTransaction=(e,t,n,r)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),vr.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(Eo),this.use(Ro),this.use(qo),this.use(To),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new Jt.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Jt.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const t=this._versions;var n=t.filter((t=>t._cfg.version===e))[0];return n||(n=new this.Version(e),t.push(n),t.sort(lo),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||En.letThrough||this._vip)?e():new Tn(((e,t)=>{if(this._state.openComplete)return t(new Jt.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new Jt.DatabaseClosed);this.open().catch(en)}this._state.dbReadyPromise.then(e,t)})).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});const o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==n?10:n,name:r}),o.sort(((e,t)=>e.level-t.level)),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((e=>n?e.create!==n:!!t&&e.name!==t))),this}open(){return function(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((()=>t.dbOpenError?hr(t.dbOpenError):e));It&&(t.openCanceller._stackHolder=Ft()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new Jt.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,a=null,s=!1;return Tn.race([r,("undefined"==typeof navigator?Tn.resolve():xo()).then((()=>new Tn(((r,i)=>{if(o(),!n)throw new Jt.MissingAPI;const u=e.name,c=t.autoSchema?n.open(u):n.open(u,Math.round(10*e.verno));if(!c)throw new Jt.MissingAPI;c.onerror=Yr(i),c.onblocked=zn(e._fireOnBlocked),c.onupgradeneeded=zn((r=>{if(a=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=Vr,a.abort(),c.result.close();const e=n.deleteDatabase(u);e.onsuccess=e.onerror=zn((()=>{i(new Jt.NoSuchDatabase(`Database ${u} doesnt exist`))}))}else{a.onerror=Yr(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;s=o<1,e._novip.idbdb=c.result,fo(e,o/10,a,i)}}),i),c.onsuccess=zn((()=>{a=null;const n=e._novip.idbdb=c.result,o=pt(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");t.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;const r=e._dbSchema=vo(0,t,n);e._storeNames=pt(t.objectStoreNames,0),uo(e,[e._allTables],tt(r),r)}(e,n,r):(bo(e,e._dbSchema,r),function(e,t){const n=ho(vo(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((e=>e.add.length||e.change.length)))}(e,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),so(e,r)}catch(e){}var i;vr.push(e),n.onversionchange=zn((n=>{t.vcFired=!0,e.on("versionchange").fire(n)})),n.onclose=zn((t=>{e.on("close").fire(t)})),s&&function({indexedDB:e,IDBKeyRange:t},n){!wo(e)&&"__dbnames"!==n&&go(e,t).put({name:n}).catch(en)}(e._deps,u),r()}),i)}))))]).then((()=>(o(),t.onReadyBeingFired=[],Tn.resolve(_o((()=>e.on.ready.fire(e.vip)))).then((function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(cn,en);return t.onReadyBeingFired=[],Tn.resolve(_o((()=>r(e.vip)))).then(n)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((n=>{t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),hr(n)})).finally((()=>{t.openComplete=!0,i()}))}(this)}_close(){const e=this._state,t=vr.indexOf(this);if(t>=0&&vr.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new Tn((t=>{e.dbReadyResolve=t})),e.openCanceller=new Tn(((t,n)=>{e.cancelOpen=n}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new Jt.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new Tn(((n,r)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=zn((()=>{!function({indexedDB:e,IDBKeyRange:t},n){!wo(e)&&"__dbnames"!==n&&go(e,t).delete(n).catch(en)}(this._deps,this.name),n()})),e.onerror=Yr(r),e.onblocked=this._fireOnBlocked};if(e)throw new Jt.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return tt(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=So.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=En.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const o=-1!==e.indexOf("?");let i,a;e=e.replace("!","").replace("?","");try{if(a=t.map((e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new Jt.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new Jt.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!o)throw new Jt.SubTransaction("Table "+e+" not included in parent transaction.");r=null}})),o&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,((t,n)=>{n(e)})):hr(e)}const s=Oo.bind(null,this,i,a,r,n);return r?r._promise(i,s,"lock"):En.trans?sr(En.transless,(()=>this._whenReady(s))):this._whenReady(s)}table(e){if(!at(this._allTables,e))throw new Jt.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const No="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class Uo{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[No](){return this}}function Lo(e,t){return tt(t).forEach((n=>{Mo(e[n]||(e[n]=new Do),t[n])})),e}let Wo;try{Wo={indexedDB:et.indexedDB||et.mozIndexedDB||et.webkitIndexedDB||et.msIndexedDB,IDBKeyRange:et.IDBKeyRange||et.webkitIDBKeyRange}}catch(et){Wo={indexedDB:null,IDBKeyRange:null}}const Ho=Fo;function zo(e){let t=Go;try{Go=!0,Qr.storagemutated.fire(e)}finally{Go=t}}st(Ho,{...Zt,delete:e=>new Ho(e,{addons:[]}).delete(),exists:e=>new Ho(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return wo(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):go(e,t).toCollection().primaryKeys()}(Ho.dependencies).then(e)}catch(e){return hr(new Jt.MissingAPI)}},defineClass:()=>function(e){rt(this,e)},ignoreTransaction:e=>En.trans?sr(En.transless,e):e(),vip:_o,async:function(e){return function(){try{var t=ko(e.apply(this,arguments));return t&&"function"==typeof t.then?t:Tn.resolve(t)}catch(e){return hr(e)}}},spawn:function(e,t,n){try{var r=ko(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:Tn.resolve(r)}catch(e){return hr(e)}},currentTransaction:{get:()=>En.trans||null},waitFor:function(e,t){const n=Tn.resolve("function"==typeof e?Ho.ignoreTransaction(e):e).timeout(t||6e4);return En.trans?En.trans.waitFor(n):n},Promise:Tn,debug:{get:()=>It,set:e=>{$t(e,"dexie"===e?()=>!0:wr)}},derive:lt,extend:rt,props:st,override:yt,Events:Or,on:Qr,liveQuery:function(e){return new Uo((t=>{const n=Mt(e);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,Qr.storagemutated.unsubscribe(l)}};t.start&&t.start(a);let s=!1,u=!1;function c(){return tt(i).some((e=>o[e]&&function(e,t){const n=Io(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=Io(e);let a=i.next(o.from),s=a.value;for(;!r.done&&!a.done;){if(Kr(s.from,o.to)<=0&&Kr(s.to,o.from)>=0)return!0;Kr(o.from,s.from)<0?o=(r=n.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e])))}const l=e=>{Lo(o,e),c()&&f()},f=()=>{if(s||r)return;o={};const h={},d=function(t){n&&er();const r=()=>Zn(e,{subscr:t,trans:null}),o=En.trans?sr(En.transless,r):r();return n&&o.then(tr,tr),o}(h);u||(Qr("storagemutated",l),u=!0),s=!0,Promise.resolve(d).then((e=>{s=!1,r||(c()?f():(o={},i=h,t.next&&t.next(e)))}),(e=>{s=!1,t.error&&t.error(e),a.unsubscribe()}))};return f(),a}))},extendObservabilitySet:Lo,getByKeyPath:gt,setByKeyPath:wt,delByKeyPath:function(e,t){"string"==typeof t?wt(e,t,void 0):"length"in t&&[].map.call(t,(function(t){wt(e,t,void 0)}))},shallowClone:_t,deepClone:Et,getObjectDiff:jo,cmp:Kr,asap:bt,minKey:-1/0,addons:[],connections:vr,errnames:Vt,dependencies:Wo,semVer:"3.2.3",version:"3.2.3".split(".").map((e=>parseInt(e))).reduce(((e,t,n)=>e+t/Math.pow(10,2*n)))}),Ho.maxKey=to(Ho.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Qr("storagemutated",(e=>{if(!Go){let t;br?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),Go=!0,dispatchEvent(t),Go=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{Go||zo(e)})));let Go=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");"function"==typeof e.unref&&e.unref(),Qr("storagemutated",(t=>{Go||e.postMessage(t)})),e.onmessage=e=>{e.data&&zo(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){Qr("storagemutated",(e=>{try{Go||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:"x-storagemutated-1",changedParts:e}))))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&zo(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&zo(e.changedParts)}))}function Yo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vo(e){return Vo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Vo(e)}function Qo(e,t){return Qo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Qo(e,t)}function Jo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Vo(e);if(t){var o=Vo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?Yo(e):t;var n}(this,n)}}Tn.rejectionMapper=function(e,t){if(!e||e instanceof Ht||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Xt[e.name])return e;var n=new Xt[e.name](t||e.message,e);return"stack"in e&&ct(n,"stack",{get:function(){return this.inner.stack}}),n},$t(It,wr);var Xo=function(e){!function(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}}),t&&Qo(e,t)}(n,e);var t=Jo(n);function n(){var e,r,o,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),i=void 0,(o="dynamicRouteRegistrations")in(r=Yo(e=t.call(this,"ServiceWorker")))?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,e.version(1).stores({dynamicRouteRegistrations:"++,&pattern"}),e.dynamicRouteRegistrations=e.table("dynamicRouteRegistrations"),e}return n}(Fo);function Zo(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function ei(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Zo(i,r,o,a,s,"next",e)}function s(e){Zo(i,r,o,a,s,"throw",e)}a(void 0)}))}}function ti(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function ni(e){return ri.apply(this,arguments)}function ri(){return(ri=ei((function(e){var t;return ti(this,(function(n){switch(n.label){case 0:return[4,Qe(e)];case 1:return[4,ai(t=n.sent())];case 2:return n.sent(),[4,oi(t)];case 3:return n.sent(),[2]}}))}))).apply(this,arguments)}function oi(e){return ii.apply(this,arguments)}function ii(){return ii=ei((function(e){var t,n,r,o;return ti(this,(function(i){switch(i.label){case 0:return 0===e.length?[2]:[4,caches.open(Te)];case 1:return t=i.sent(),[4,Promise.all(e.map((a=ei((function(e){return ti(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,N((function(){return t.add(e)}),{onError:function(t,n){return console.debug("[SW] Failure attempt ".concat(n,' at caching "').concat(e,'". Error: '),t)}})];case 1:return n.sent(),[2,{url:e,success:!0}];case 2:return n.sent(),[2,{url:e,success:!1}];case 3:return[2]}}))})),function(e){return a.apply(this,arguments)})))];case 2:return n=i.sent(),r=n.filter((function(e){return e.success})),o=n.filter((function(e){return!e.success})),r.length>0&&console.debug("[SW] Successfully added ".concat(r.length," URLs to the OMRS cache. URLs: "),r.map((function(e){return e.url}))),o.length>0&&console.error("[SW] Failed to cache ".concat(o.length," URLs. URLs: "),o.map((function(e){return e.url}))),[2]}var a}))})),ii.apply(this,arguments)}function ai(e){return si.apply(this,arguments)}function si(){return si=ei((function(e){var t,n,r,o;return ti(this,(function(i){switch(i.label){case 0:return[4,caches.open(Te)];case 1:return[4,(t=i.sent()).keys()];case 2:return n=i.sent().map((function(e){return e.url})),[4,(new Xo).dynamicRouteRegistrations.toArray()];case 3:return r=i.sent(),o=n.filter((function(t){return!Ke.includes(t)&&!e.includes(t)&&!r.some((function(e){return new RegExp(e.pattern).test(t)}))})),console.info("[SW] Removing the following expired URLs from the cache: ",o),console.debug("[SW] The following URLs were known and not invalidated: ",Ke,e,r),[4,Promise.all(o.map((function(e){return t.delete(e)})))];case 4:return i.sent(),[2]}}))})),si.apply(this,arguments)}function ui(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function ci(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ui(i,r,o,a,s,"next",e)}function s(e){ui(i,r,o,a,s,"throw",e)}a(void 0)}))}}function li(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var fi={onImportMapChanged:function(e){return hi.apply(this,arguments)},clearDynamicRoutes:function(){return di.apply(this,arguments)},registerDynamicRoute:function(e){return pi.apply(this,arguments)}};function hi(){return(hi=ci((function(e){return li(this,(function(t){switch(t.label){case 0:return[4,ni(e.importMap)];case 1:return t.sent(),[2]}}))}))).apply(this,arguments)}function di(){return(di=ci((function(){return li(this,(function(e){switch(e.label){case 0:return[4,(new Xo).dynamicRouteRegistrations.clear()];case 1:return e.sent(),[2]}}))}))).apply(this,arguments)}function pi(){return(pi=ci((function(e){var t,n,r,o,i;return li(this,(function(a){switch(a.label){case 0:return t=e.pattern,n=e.url,r=e.strategy,!(o=t)&&n&&(o="^".concat($(n),"$")),o?(i={pattern:o,strategy:r},[4,(new Xo).dynamicRouteRegistrations.put(i)]):[3,2];case 1:a.sent(),a.label=2;case 2:return[2]}}))}))).apply(this,arguments)}function yi(){return yi=ci((function(e){var t,n,r,o,i,a,s,u;function c(e){console.warn("[SW] Handling a message resulted in an error.",e),l({success:!1,error:e})}function l(t){e.ports[0].postMessage(null!=t?t:{})}return li(this,(function(f){switch(f.label){case 0:if(!(o=fi[null!==(r=null===(t=e.data)||void 0===t||null===(n=t.type)||void 0===n?void 0:n.toString())&&void 0!==r?r:""]))return c('Received an unknown message of type "'.concat(null===(i=e.data)||void 0===i?void 0:i.type," which cannot be handled.")),[2];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,o(e.data)];case 2:return l({success:!0,result:f.sent()}),[3,4];case 3:return a=f.sent(),c(null!==(u=null!==(s=null==a?void 0:a.message)&&void 0!==s?s:null==a?void 0:a.toString())&&void 0!==u?u:"Unknown error."),[3,4];case 4:return[2]}}))})),yi.apply(this,arguments)}n(585);var vi=["DELETE","GET","HEAD","PATCH","POST","PUT"],bi=function(e){return e&&"object"==typeof e?e:{handle:e}};function mi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var gi=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GET";!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.handler=bi(n),this.match=t,this.method=r}var t,n;return t=e,(n=[{key:"setCatchHandler",value:function(e){this.catchHandler=bi(e)}}])&&mi(t.prototype,n),e}();function wi(e){return wi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},wi(e)}function _i(e,t){return _i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_i(e,t)}function xi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wi(e);if(t){var o=wi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var n}(this,n)}}var ki=function(e){!function(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}}),t&&_i(e,t)}(n,e);var t=xi(n);function n(e,r,o){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t.call(this,(function(t){var n=t.url,r=e.exec(n.href);if(r&&(n.origin===location.origin||0===r.index))return r.slice(1)}),r,o)}return n}(gi);function Si(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Oi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Pi(e,t,n){return Pi=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Ri(o,n.prototype),o},Pi.apply(null,arguments)}function Ei(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ji(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Ri(e,t){return Ri=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ri(e,t)}var Ci,Ti=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._routes=new Map,this._defaultHandlerMap=new Map}var t,n;return t=e,n=[{key:"routes",get:function(){return this._routes}},{key:"addFetchListener",value:function(){var e=this;self.addEventListener("fetch",(function(t){var n=t.request,r=e.handleRequest({request:n,event:t});r&&t.respondWith(r)}))}},{key:"addCacheListener",value:function(){var e=this;self.addEventListener("message",(function(t){if(t.data&&"CACHE_URLS"===t.data.type){var n=t.data.payload,r=Promise.all(n.urlsToCache.map((function(n){"string"==typeof n&&(n=[n]);var r,o=Pi(Request,function(e){if(Array.isArray(e))return Si(e)}(r=n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Si(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Si(e,t):void 0}}(r)||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.")}());return e.handleRequest({request:o,event:t})})));t.waitUntil(r),t.ports&&t.ports[0]&&r.then((function(){return t.ports[0].postMessage(!0)}))}}))}},{key:"handleRequest",value:function(e){var t=e.request,n=e.event,r=new URL(t.url,location.href);if(r.protocol.startsWith("http")){var o=r.origin===location.origin,i=this.findMatchingRoute({event:n,request:t,sameOrigin:o,url:r}),a=i.params,s=i.route,u=s&&s.handler,c=t.method;if(!u&&this._defaultHandlerMap.has(c)&&(u=this._defaultHandlerMap.get(c)),u){var l;try{l=u.handle({url:r,request:t,event:n,params:a})}catch(e){l=Promise.reject(e)}var f,h=s&&s.catchHandler;if(ji(l,Promise)&&(this._catchHandler||h)){var d=this;l=l.catch((f=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Oi(i,r,o,a,s,"next",e)}function s(e){Oi(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(e){var o;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(i){switch(i.label){case 0:if(!h)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,h.handle({url:r,request:t,event:n,params:a})];case 2:return[2,i.sent()];case 3:return ji(o=i.sent(),Error)&&(e=o),[3,4];case 4:if(d._catchHandler)return[2,d._catchHandler.handle({url:r,request:t,event:n})];throw e}}))})),function(e){return f.apply(this,arguments)}))}return l}}}},{key:"findMatchingRoute",value:function(e){var t=e.url,n=e.sameOrigin,r=e.request,o=e.event,i=this._routes.get(r.method)||[],a=!0,s=!1,u=void 0;try{for(var c,l=i[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var f=c.value,h=void 0,d=f.match({url:t,sameOrigin:n,request:r,event:o});if(d)return h=d,(Array.isArray(h)&&0===h.length||d.constructor===Object&&0===Object.keys(d).length||"boolean"==typeof d)&&(h=void 0),{route:f,params:h}}}catch(e){s=!0,u=e}finally{try{a||null==l.return||l.return()}finally{if(s)throw u}}return{}}},{key:"setDefaultHandler",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";this._defaultHandlerMap.set(t,bi(e))}},{key:"setCatchHandler",value:function(e){this._catchHandler=bi(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 a("unregister-route-but-not-found-with-method",{method:e.method});var t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new a("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}],n&&Ei(t.prototype,n),e}(),Ai=function(){return Ci||((Ci=new Ti).addFetchListener(),Ci.addCacheListener()),Ci};function Di(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Ki(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Ii(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Mi(i,r,o,a,s,"next",e)}function s(e){Mi(i,r,o,a,s,"throw",e)}a(void 0)}))}}function $i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bi(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function qi(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function Fi(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ni(e){return"string"==typeof e?new Request(e):e}n(238);var Ui=function(){function e(t,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._cacheKeys={},Object.assign(this,n),this.event=n.event,this._strategy=t,this._handlerDeferred=new p,this._extendLifetimePromises=[],this._plugins=function(e){if(Array.isArray(e))return Ki(e)}(r=t.plugins)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Ki(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ki(e,t):void 0}}(r)||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.")}(),this._pluginStateMap=new Map;var o=!0,i=!1,a=void 0;try{for(var s,u=this._plugins[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value;this._pluginStateMap.set(c,{})}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}this.event.waitUntil(this._handlerDeferred.promise)}var t,n;return t=e,(n=[{key:"fetch",value:function(e){var t=this;return Ii((function(){var n,r,o,i,s,u,c,l,f,h,d,p,y,v,b,m,g,w,_;return qi(this,(function(x){switch(x.label){case 0:return n=t.event,"navigate"===(r=Ni(e)).mode&&Bi(n,FetchEvent)&&n.preloadResponse?[4,n.preloadResponse]:[3,2];case 1:if(o=x.sent())return[2,o];x.label=2;case 2:i=t.hasCallback("fetchDidFail")?r.clone():null,x.label=3;case 3:x.trys.push([3,12,,13]),s=!0,u=!1,c=void 0,x.label=4;case 4:x.trys.push([4,9,10,11]),l=t.iterateCallbacks("requestWillFetch")[Symbol.iterator](),x.label=5;case 5:return(s=(f=l.next()).done)?[3,8]:[4,(0,f.value)({request:r.clone(),event:n})];case 6:r=x.sent(),x.label=7;case 7:return s=!0,[3,5];case 8:return[3,11];case 9:return w=x.sent(),u=!0,c=w,[3,11];case 10:try{s||null==l.return||l.return()}finally{if(u)throw c}return[7];case 11:return[3,13];case 12:if(Bi(h=x.sent(),Error))throw new a("plugin-error-request-will-fetch",{thrownErrorMessage:h.message});return[3,13];case 13:d=r.clone(),x.label=14;case 14:return x.trys.push([14,24,,27]),[4,fetch(r,"navigate"===r.mode?void 0:t._strategy.fetchOptions)];case 15:p=x.sent(),y=!0,v=!1,b=void 0,x.label=16;case 16:x.trys.push([16,21,22,23]),m=t.iterateCallbacks("fetchDidSucceed")[Symbol.iterator](),x.label=17;case 17:return(y=(g=m.next()).done)?[3,20]:[4,(0,g.value)({event:n,request:d,response:p})];case 18:p=x.sent(),x.label=19;case 19:return y=!0,[3,17];case 20:return[3,23];case 21:return w=x.sent(),v=!0,b=w,[3,23];case 22:try{y||null==m.return||m.return()}finally{if(v)throw b}return[7];case 23:return[2,p];case 24:return _=x.sent(),i?[4,t.runCallbacks("fetchDidFail",{error:_,event:n,originalRequest:i.clone(),request:d.clone()})]:[3,26];case 25:x.sent(),x.label=26;case 26:throw _;case 27:return[2]}}))}))()}},{key:"fetchAndCachePut",value:function(e){var t=this;return Ii((function(){var n,r;return qi(this,(function(o){switch(o.label){case 0:return[4,t.fetch(e)];case 1:return n=o.sent(),r=n.clone(),t.waitUntil(t.cachePut(e,r)),[2,n]}}))}))()}},{key:"cacheMatch",value:function(e){var t=this;return Ii((function(){var n,r,o,i,a,s,u,c,l,f,h,d,p;return qi(this,(function(y){switch(y.label){case 0:return n=Ni(e),o=t._strategy,i=o.cacheName,a=o.matchOptions,[4,t.getCacheKey(n,"read")];case 1:return s=y.sent(),u=Object.assign(Object.assign({},a),{cacheName:i}),[4,caches.match(s,u)];case 2:r=y.sent(),c=!0,l=!1,f=void 0,y.label=3;case 3:y.trys.push([3,8,9,10]),h=t.iterateCallbacks("cachedResponseWillBeUsed")[Symbol.iterator](),y.label=4;case 4:return(c=(d=h.next()).done)?[3,7]:[4,(0,d.value)({cacheName:i,matchOptions:a,cachedResponse:r,request:s,event:t.event})];case 5:r=y.sent()||void 0,y.label=6;case 6:return c=!0,[3,4];case 7:return[3,10];case 8:return p=y.sent(),l=!0,f=p,[3,10];case 9:try{c||null==h.return||h.return()}finally{if(l)throw f}return[7];case 10:return[2,r]}}))}))()}},{key:"cachePut",value:function(e,t){var n=this;return Ii((function(){var r,o,i,s,u,c,l,f,d,p,y,b,g,w,_,x,k;return qi(this,(function(S){switch(S.label){case 0:return r=Ni(e),[4,m(0)];case 1:return S.sent(),[4,n.getCacheKey(r,"write")];case 2:if(o=S.sent(),!t)throw new a("cache-put-with-no-response",{url:(O=o.url,new URL(String(O),location.href).href.replace(new RegExp("^".concat(location.origin)),""))});return[4,n._ensureResponseSafeToCache(t)];case 3:return(i=S.sent())?(s=n._strategy,u=s.cacheName,c=s.matchOptions,[4,self.caches.open(u)]):[2,!1];case 4:return l=S.sent(),(f=n.hasCallback("cacheDidUpdate"))?[4,h(l,o.clone(),["__WB_REVISION__"],c)]:[3,6];case 5:return p=S.sent(),[3,7];case 6:p=null,S.label=7;case 7:d=p,S.label=8;case 8:return S.trys.push([8,10,,14]),[4,l.put(o,f?i.clone():i)];case 9:return S.sent(),[3,14];case 10:return Bi(y=S.sent(),Error)?"QuotaExceededError"!==y.name?[3,12]:[4,v()]:[3,13];case 11:S.sent(),S.label=12;case 12:throw y;case 13:return[3,14];case 14:b=!0,g=!1,w=void 0,S.label=15;case 15:S.trys.push([15,20,21,22]),_=n.iterateCallbacks("cacheDidUpdate")[Symbol.iterator](),S.label=16;case 16:return(b=(x=_.next()).done)?[3,19]:[4,(0,x.value)({cacheName:u,oldResponse:d,newResponse:i.clone(),request:o,event:n.event})];case 17:S.sent(),S.label=18;case 18:return b=!0,[3,16];case 19:return[3,22];case 20:return k=S.sent(),g=!0,w=k,[3,22];case 21:try{b||null==_.return||_.return()}finally{if(g)throw w}return[7];case 22:return[2,!0]}var O}))}))()}},{key:"getCacheKey",value:function(e,t){var n=this;return Ii((function(){var r,o,i,a,s,u,c,l;return qi(this,(function(f){switch(f.label){case 0:if(r="".concat(e.url," | ").concat(t),n._cacheKeys[r])return[3,9];o=e,i=!0,a=!1,s=void 0,f.label=1;case 1:f.trys.push([1,6,7,8]),u=n.iterateCallbacks("cacheKeyWillBeUsed")[Symbol.iterator](),f.label=2;case 2:return(i=(c=u.next()).done)?[3,5]:[4,(0,c.value)({mode:t,request:o,event:n.event,params:n.params})];case 3:o=Ni.apply(void 0,[f.sent()]),f.label=4;case 4:return i=!0,[3,2];case 5:return[3,8];case 6:return l=f.sent(),a=!0,s=l,[3,8];case 7:try{i||null==u.return||u.return()}finally{if(a)throw s}return[7];case 8:n._cacheKeys[r]=o,f.label=9;case 9:return[2,n._cacheKeys[r]]}}))}))()}},{key:"hasCallback",value:function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=this._strategy.plugins[Symbol.iterator]();!(t=(o=i.next()).done);t=!0)if(e in o.value)return!0}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return!1}},{key:"runCallbacks",value:function(e,t){var n=this;return Ii((function(){var r,o,i,a,s,u;return qi(this,(function(c){switch(c.label){case 0:r=!0,o=!1,i=void 0,c.label=1;case 1:c.trys.push([1,6,7,8]),a=n.iterateCallbacks(e)[Symbol.iterator](),c.label=2;case 2:return(r=(s=a.next()).done)?[3,5]:[4,(0,s.value)(t)];case 3:c.sent(),c.label=4;case 4:return r=!0,[3,2];case 5:return[3,8];case 6:return u=c.sent(),o=!0,i=u,[3,8];case 7:try{r||null==a.return||a.return()}finally{if(o)throw i}return[7];case 8:return[2]}}))}))()}},{key:"iterateCallbacks",value:function(e){var t,n,r,o,i,a,s,u;return qi(this,(function(c){switch(c.label){case 0:t=!0,n=!1,r=void 0,c.label=1;case 1:c.trys.push([1,6,7,8]),o=this,i=function(){var t,n;return qi(this,(function(r){switch(r.label){case 0:return"function"!=typeof(t=s.value)[e]?[3,2]:(n=o._pluginStateMap.get(t),[4,function(r){var o=Object.assign(Object.assign({},r),{state:n});return t[e](o)}]);case 1:r.sent(),r.label=2;case 2:return[2]}}))},a=this._strategy.plugins[Symbol.iterator](),c.label=2;case 2:return(t=(s=a.next()).done)?[3,5]:[5,Fi(i())];case 3:c.sent(),c.label=4;case 4:return t=!0,[3,2];case 5:return[3,8];case 6:return u=c.sent(),n=!0,r=u,[3,8];case 7:try{t||null==a.return||a.return()}finally{if(n)throw r}return[7];case 8:return[2]}}))}},{key:"waitUntil",value:function(e){return this._extendLifetimePromises.push(e),e}},{key:"doneWaiting",value:function(){var e=this;return Ii((function(){var t;return qi(this,(function(n){switch(n.label){case 0:return(t=e._extendLifetimePromises.shift())?[4,t]:[3,2];case 1:return n.sent(),[3,0];case 2:return[2]}}))}))()}},{key:"destroy",value:function(){this._handlerDeferred.resolve(null)}},{key:"_ensureResponseSafeToCache",value:function(e){var t=this;return Ii((function(){var n,r,o,i,a,s,u,c;return qi(this,(function(l){switch(l.label){case 0:n=e,r=!1,o=!0,i=!1,a=void 0,l.label=1;case 1:l.trys.push([1,6,7,8]),s=t.iterateCallbacks("cacheWillUpdate")[Symbol.iterator](),l.label=2;case 2:return(o=(u=s.next()).done)?[3,5]:[4,(0,u.value)({request:t.request,response:n,event:t.event})];case 3:if(n=l.sent()||void 0,r=!0,!n)return[3,5];l.label=4;case 4:return o=!0,[3,2];case 5:return[3,8];case 6:return c=l.sent(),i=!0,a=c,[3,8];case 7:try{o||null==s.return||s.return()}finally{if(i)throw a}return[7];case 8:return r||n&&200!==n.status&&(n=void 0),[2,n]}}))}))()}}])&&$i(t.prototype,n),e}();function Li(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Hi(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Wi(i,r,o,a,s,"next",e)}function s(e){Wi(i,r,o,a,s,"throw",e)}a(void 0)}))}}function zi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gi(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Yi(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var Vi=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cacheName=c(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}var t,n;return t=e,(n=[{key:"handle",value:function(e){return function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Li(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Li(e,t):void 0}}(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.")}()}(this.handleAll(e),1)[0]}},{key:"handleAll",value:function(e){Gi(e,FetchEvent)&&(e={event:e,request:e.request});var t=e.event,n="string"==typeof e.request?new Request(e.request):e.request,r="params"in e?e.params:void 0,o=new Ui(this,{event:t,request:n,params:r}),i=this._getResponse(o,n,t);return[i,this._awaitComplete(i,o,n,t)]}},{key:"_getResponse",value:function(e,t,n){var r=this;return Hi((function(){var o,i,s,u,c,l,f,h,d,p,y,v,b;return Yi(this,(function(m){switch(m.label){case 0:return[4,e.runCallbacks("handlerWillStart",{event:n,request:t})];case 1:m.sent(),o=void 0,m.label=2;case 2:return m.trys.push([2,4,,13]),[4,r._handle(t,e)];case 3:if(!(o=m.sent())||"error"===o.type)throw new a("no-response",{url:t.url});return[3,13];case 4:if(!Gi(i=m.sent(),Error))return[3,12];s=!0,u=!1,c=void 0,m.label=5;case 5:m.trys.push([5,10,11,12]),l=e.iterateCallbacks("handlerDidError")[Symbol.iterator](),m.label=6;case 6:return(s=(f=l.next()).done)?[3,9]:[4,(0,f.value)({error:i,event:n,request:t})];case 7:if(o=m.sent())return[3,9];m.label=8;case 8:return s=!0,[3,6];case 9:return[3,12];case 10:return b=m.sent(),u=!0,c=b,[3,12];case 11:try{s||null==l.return||l.return()}finally{if(u)throw c}return[7];case 12:if(!o)throw i;return[3,13];case 13:h=!0,d=!1,p=void 0,m.label=14;case 14:m.trys.push([14,19,20,21]),y=e.iterateCallbacks("handlerWillRespond")[Symbol.iterator](),m.label=15;case 15:return(h=(v=y.next()).done)?[3,18]:[4,(0,v.value)({event:n,request:t,response:o})];case 16:o=m.sent(),m.label=17;case 17:return h=!0,[3,15];case 18:return[3,21];case 19:return b=m.sent(),d=!0,p=b,[3,21];case 20:try{h||null==y.return||y.return()}finally{if(d)throw p}return[7];case 21:return[2,o]}}))}))()}},{key:"_awaitComplete",value:function(e,t,n,r){return Hi((function(){var o,i,a;return Yi(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,e];case 1:return o=s.sent(),[3,3];case 2:return s.sent(),[3,3];case 3:return s.trys.push([3,6,,7]),[4,t.runCallbacks("handlerDidRespond",{event:r,request:n,response:o})];case 4:return s.sent(),[4,t.doneWaiting()];case 5:return s.sent(),[3,7];case 6:return Gi(a=s.sent(),Error)&&(i=a),[3,7];case 7:return[4,t.runCallbacks("handlerDidComplete",{event:r,request:n,response:o,error:i})];case 8:if(s.sent(),t.destroy(),i)throw i;return[2]}}))}))()}}])&&zi(t.prototype,n),e}();function Qi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Ji(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xi(e){return Xi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Xi(e)}function Zi(e,t){return Zi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Zi(e,t)}function ea(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Xi(e);if(t){var o=Xi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var n}(this,n)}}var ta=function(e){!function(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}}),t&&Zi(e,t)}(o,e);var t,n,r=ea(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.apply(this,arguments)}return t=o,n=[{key:"_handle",value:function(e,t){return function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Qi(i,r,o,a,s,"next",e)}function s(e){Qi(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(){var n;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(r){switch(r.label){case 0:return[4,t.cacheMatch(e)];case 1:if(!(n=r.sent()))throw new a("no-response",{url:e.url});return[2,n]}}))}))()}}],n&&Ji(t.prototype,n),o}(Vi);function na(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}var ra,oa={cacheWillUpdate:(ra=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){na(i,r,o,a,s,"next",e)}function s(e){na(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(e){var t;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(n){return 200===(t=e.response).status||0===t.status?[2,t]:[2,null]}))})),function(e){return ra.apply(this,arguments)})};function ia(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function aa(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ia(i,r,o,a,s,"next",e)}function s(e){ia(i,r,o,a,s,"throw",e)}a(void 0)}))}}function sa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ua(e){return ua=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ua(e)}function ca(e,t){return ca=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ca(e,t)}function la(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ua(e);if(t){var o=ua(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var n}(this,n)}}function fa(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var ha=function(e){!function(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}}),t&&ca(e,t)}(o,e);var t,n,r=la(o);function o(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,t)).plugins.some((function(e){return"cacheWillUpdate"in e}))||e.plugins.unshift(oa),e._networkTimeoutSeconds=t.networkTimeoutSeconds||0,e}return t=o,n=[{key:"_handle",value:function(e,t){var n=this;return aa((function(){var r,o,i,s,u,c,l,f;return fa(this,(function(h){switch(h.label){case 0:return r=[],o=[],n._networkTimeoutSeconds&&(s=n._getTimeoutPromise({request:e,logs:r,handler:t}),u=s.id,c=s.promise,i=u,o.push(c)),l=n._getNetworkPromise({timeoutId:i,request:e,logs:r,handler:t}),o.push(l),[4,t.waitUntil(aa((function(){var e;return fa(this,(function(n){switch(n.label){case 0:return[4,t.waitUntil(Promise.race(o))];case 1:return(e=n.sent())?[3,3]:[4,l];case 2:e=n.sent(),n.label=3;case 3:return[2,e]}}))}))())];case 1:if(!(f=h.sent()))throw new a("no-response",{url:e.url});return[2,f]}}))}))()}},{key:"_getTimeoutPromise",value:function(e){var t,n=e.request,r=(e.logs,e.handler),o=this,i=new Promise((function(e){var i=function(){var t=aa((function(){return fa(this,(function(t){switch(t.label){case 0:return[4,r.cacheMatch(n)];case 1:return e.apply(void 0,[t.sent()]),[2]}}))}));return function(){return t.apply(this,arguments)}}();t=setTimeout(i,1e3*o._networkTimeoutSeconds)}));return{promise:i,id:t}}},{key:"_getNetworkPromise",value:function(e){var t=e.timeoutId,n=e.request,r=(e.logs,e.handler);return aa((function(){var e,o,i;return fa(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,r.fetchAndCachePut(n)];case 1:return o=a.sent(),[3,3];case 2:return s=i=a.sent(),(null!=(u=Error)&&"undefined"!=typeof Symbol&&u[Symbol.hasInstance]?u[Symbol.hasInstance](s):s instanceof u)&&(e=i),[3,3];case 3:return t&&clearTimeout(t),!e&&o?[3,5]:[4,r.cacheMatch(n)];case 4:o=a.sent(),a.label=5;case 5:return[2,o]}var s,u}))}))()}}],n&&sa(t.prototype,n),o}(Vi);function da(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function pa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ya(e){return ya=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ya(e)}function va(e,t){return va=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},va(e,t)}function ba(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ya(e);if(t){var o=ya(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var n}(this,n)}}var ma=function(e){!function(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}}),t&&va(e,t)}(o,e);var t,n,r=ba(o);function o(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,t))._networkTimeoutSeconds=t.networkTimeoutSeconds||0,e}return t=o,n=[{key:"_handle",value:function(e,t){var n=this;return function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){da(i,r,o,a,s,"next",e)}function s(e){da(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(){var r,o,i,s,u;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(c){switch(c.label){case 0:r=void 0,c.label=1;case 1:return c.trys.push([1,3,,4]),i=[t.fetch(e)],n._networkTimeoutSeconds&&(s=m(1e3*n._networkTimeoutSeconds),i.push(s)),[4,Promise.race(i)];case 2:if(!(o=c.sent()))throw new Error("Timed out the network response after "+"".concat(n._networkTimeoutSeconds," seconds."));return[3,4];case 3:return l=u=c.sent(),(null!=(f=Error)&&"undefined"!=typeof Symbol&&f[Symbol.hasInstance]?f[Symbol.hasInstance](l):l instanceof f)&&(r=u),[3,4];case 4:if(!o)throw new a("no-response",{url:e.url,error:r});return[2,o]}var l,f}))}))()}}],n&&pa(t.prototype,n),o}(Vi);function ga(e){var t,n=+(null!==(t=wa(e,je))&&void 0!==t?t:"");return isNaN(n)||n<200||n>599?503:n}function wa(e,t){return e.get(t)}function _a(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function xa(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){_a(i,r,o,a,s,"next",e)}function s(e){_a(i,r,o,a,s,"throw",e)}a(void 0)}))}}function ka(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sa(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var Oa,Pa,Ea=new ma,ja=new ta({cacheName:Te}),Ra=new ha({cacheName:Te}),Ca="network-only-or-cache-only",Ta=(ka(Oa={},"network-first",(function(e){return Ra.handle(e)})),ka(Oa,"network-only-or-cache-only",function(){var e=xa((function(e){return Sa(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,4]),[4,Ea.handle(e)];case 1:case 3:return[2,t.sent()];case 2:return t.sent(),[4,ja.handle(e)];case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}()),Oa);function Aa(e){return Da.apply(this,arguments)}function Da(){return(Da=xa((function(e){var t;return Sa(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,5]),[4,Ea.handle(e)];case 1:return[2,n.sent()];case 2:return n.sent(),[4,caches.open(Te)];case 3:return[4,n.sent().match(De)];case 4:return[2,null!=(t=n.sent())?t:Response.error()];case 5:return[2]}}))}))).apply(this,arguments)}function Ka(e){return Ma.apply(this,arguments)}function Ma(){return Ma=xa((function(e){var t,n,r,o,i,a;return Sa(this,(function(s){switch(s.label){case 0:return t=e.request,"GET"!==e.request.method?[3,2]:[4,Ia(e)];case 1:return r=s.sent(),[3,3];case 2:r=Ca,s.label=3;case 3:i=null!==(o=Ta[n=r])&&void 0!==o?o:Ta[Ca],s.label=4;case 4:return s.trys.push([4,6,,7]),[4,i(e)];case 5:return[2,s.sent()];case 6:return a=s.sent(),console.warn("[SW] Could not handle the request to %s (using handler %s).",t.url,n,a),[2,new Response((u=t.headers,null!==(c=wa(u,Ee))&&void 0!==c?c:void 0),{status:ga(t.headers)})];case 7:return[2]}var u,c}))})),Ma.apply(this,arguments)}function Ia(e){return $a.apply(this,arguments)}function $a(){return($a=xa((function(e){var t,n,r;return Sa(this,(function(o){switch(o.label){case 0:return null===(i=(t=e.request).headers,n=wa(i,Re))||void 0===n?[3,1]:(r=n,[3,3]);case 1:return[4,Ba(t.url)];case 2:r=o.sent(),o.label=3;case 3:return[2,r]}var i}))}))).apply(this,arguments)}function Ba(e){return qa.apply(this,arguments)}function qa(){return(qa=xa((function(e){var t,n,r,o;return Sa(this,(function(i){switch(i.label){case 0:return[4,(new Xo).dynamicRouteRegistrations.toArray()];case 1:return t=i.sent(),(r=Pe(t.filter((function(t){return new RegExp(t.pattern).test(e)})).map((function(e){return null!==(n=e.strategy)&&void 0!==n?n:"network-first"})))).length<=1?[2,r[0]]:[2,null!==(o=["network-first","network-only-or-cache-only"].find((function(e){return r.some((function(t){return t===e}))})))&&void 0!==o?o:Ca]}}))}))).apply(this,arguments)}self.__WB_DISABLE_DEV_LOGS=!0,Pa={prefix:Ce},function(e){var t,n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(u)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0)t=i.value,"string"==typeof Pa[t]&&(u[t]=Pa[t])}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}(),function(){!function(e,t,n){var r;r=Di(e,RegExp)?new ki(e,t,n):new gi(e,t,n),Ai().registerRoute(r)}((function(e){return"navigate"===e.request.mode}),Aa);var e=Ai(),t=!0,n=!1,r=void 0;try{for(var o,i=vi[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;e.setDefaultHandler(Ka,a)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(),self.addEventListener("message",(function(e){return yi.apply(this,arguments)})),self.addEventListener("install",(function(e){self.skipWaiting(),e.waitUntil(oi(Ke))})),self.addEventListener("activate",(function(e){e.waitUntil(self.clients.claim())}))})()})();
|