@fluid-topics/ft-reader-page-title 1.1.6 → 1.1.8
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.
|
@@ -38,7 +38,7 @@ const C={attribute:!0,type:String,converter:S,reflect:!1,hasChanged:w},E=(t=C,o,
|
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright 2017 Google LLC
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
|
-
*/const $=globalThis,K=$.trustedTypes,A=K?K.createPolicy("lit-html",{createHTML:t=>t}):void 0,j="$lit$",F=`lit$${(Math.random()+"").slice(9)}$`,
|
|
41
|
+
*/const $=globalThis,K=$.trustedTypes,A=K?K.createPolicy("lit-html",{createHTML:t=>t}):void 0,j="$lit$",F=`lit$${(Math.random()+"").slice(9)}$`,M="?"+F,Z=`<${M}>`,P=document,z=()=>P.createComment(""),D=t=>null===t||"object"!=typeof t&&"function"!=typeof t,B=Array.isArray,_="[ \t\n\f\r]",T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,H=/-->/g,G=/>/g,q=RegExp(`>|${_}(?:([^\\s"'>=/]+)(${_}*=${_}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),V=/'/g,Y=/"/g,J=/^(?:script|style|textarea|title)$/i,X=(t=>(o,...e)=>({_$litType$:t,strings:o,values:e}))(1),Q=Symbol.for("lit-noChange"),tt=Symbol.for("lit-nothing"),ot=new WeakMap,et=P.createTreeWalker(P,129);function rt(t,o){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==A?A.createHTML(o):o}let nt=class t{constructor({strings:o,_$litType$:e},r){let n;this.parts=[];let i=0,a=0;const s=o.length-1,c=this.parts,[l,f]=((t,o)=>{const e=t.length-1,r=[];let n,i=2===o?"<svg>":"",a=T;for(let o=0;o<e;o++){const e=t[o];let s,c,l=-1,f=0;for(;f<e.length&&(a.lastIndex=f,c=a.exec(e),null!==c);)f=a.lastIndex,a===T?"!--"===c[1]?a=H:void 0!==c[1]?a=G:void 0!==c[2]?(J.test(c[2])&&(n=RegExp("</"+c[2],"g")),a=q):void 0!==c[3]&&(a=q):a===q?">"===c[0]?(a=n??T,l=-1):void 0===c[1]?l=-2:(l=a.lastIndex-c[2].length,s=c[1],a=void 0===c[3]?q:'"'===c[3]?Y:V):a===Y||a===V?a=q:a===H||a===G?a=T:(a=q,n=void 0);const h=a===q&&t[o+1].startsWith("/>")?" ":"";i+=a===T?e+Z:l>=0?(r.push(s),e.slice(0,l)+j+e.slice(l)+F+h):e+F+(-2===l?o:h)}return[rt(t,i+(t[e]||"<?>")+(2===o?"</svg>":"")),r]})(o,e);if(this.el=t.createElement(l,r),et.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(n=et.nextNode())&&c.length<s;){if(1===n.nodeType){if(n.hasAttributes())for(const t of n.getAttributeNames())if(t.endsWith(j)){const o=f[a++],e=n.getAttribute(t).split(F),r=/([.?@])?(.*)/.exec(o);c.push({type:1,index:i,name:r[2],strings:e,ctor:"."===r[1]?ct:"?"===r[1]?lt:"@"===r[1]?ft:st}),n.removeAttribute(t)}else t.startsWith(F)&&(c.push({type:6,index:i}),n.removeAttribute(t));if(J.test(n.tagName)){const t=n.textContent.split(F),o=t.length-1;if(o>0){n.textContent=K?K.emptyScript:"";for(let e=0;e<o;e++)n.append(t[e],z()),et.nextNode(),c.push({type:2,index:++i});n.append(t[o],z())}}}else if(8===n.nodeType)if(n.data===M)c.push({type:2,index:i});else{let t=-1;for(;-1!==(t=n.data.indexOf(F,t+1));)c.push({type:7,index:i}),t+=F.length-1}i++}}static createElement(t,o){const e=P.createElement("template");return e.innerHTML=t,e}};function it(t,o,e=t,r){if(o===Q)return o;let n=void 0!==r?e._$Co?.[r]:e._$Cl;const i=D(o)?void 0:o._$litDirective$;return n?.constructor!==i&&(n?._$AO?.(!1),void 0===i?n=void 0:(n=new i(t),n._$AT(t,e,r)),void 0!==r?(e._$Co??=[])[r]=n:e._$Cl=n),void 0!==n&&(o=it(t,n._$AS(t,o.values),n,r)),o}let at=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,o,e,r){this.type=2,this._$AH=tt,this._$AN=void 0,this._$AA=t,this._$AB=o,this._$AM=e,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const o=this._$AM;return void 0!==o&&11===t?.nodeType&&(t=o.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,o=this){t=it(this,t,o),D(t)?t===tt||null==t||""===t?(this._$AH!==tt&&this._$AR(),this._$AH=tt):t!==this._$AH&&t!==Q&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>B(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==tt&&D(this._$AH)?this._$AA.nextSibling.data=t:this.$(P.createTextNode(t)),this._$AH=t}g(t){const{values:o,_$litType$:e}=t,r="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=nt.createElement(rt(e.h,e.h[0]),this.options)),e);if(this._$AH?._$AD===r)this._$AH.p(o);else{const t=new class{constructor(t,o){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:o},parts:e}=this._$AD,r=(t?.creationScope??P).importNode(o,!0);et.currentNode=r;let n=et.nextNode(),i=0,a=0,s=e[0];for(;void 0!==s;){if(i===s.index){let o;2===s.type?o=new at(n,n.nextSibling,this,t):1===s.type?o=new s.ctor(n,s.name,s.strings,this,t):6===s.type&&(o=new ht(n,this,t)),this._$AV.push(o),s=e[++a]}i!==s?.index&&(n=et.nextNode(),i++)}return et.currentNode=P,r}p(t){let o=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,o),o+=e.strings.length-2):e._$AI(t[o])),o++}}(r,this),e=t.u(this.options);t.p(o),this.$(e),this._$AH=t}}_$AC(t){let o=ot.get(t.strings);return void 0===o&&ot.set(t.strings,o=new nt(t)),o}T(o){B(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,n=0;for(const i of o)n===e.length?e.push(r=new t(this.k(z()),this.k(z()),this,this.options)):r=e[n],r._$AI(i),n++;n<e.length&&(this._$AR(r&&r._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,o){for(this._$AP?.(!1,!0,o);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}},st=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,o,e,r,n){this.type=1,this._$AH=tt,this._$AN=void 0,this.element=t,this.name=o,this._$AM=r,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=tt}_$AI(t,o=this,e,r){const n=this.strings;let i=!1;if(void 0===n)t=it(this,t,o,0),i=!D(t)||t!==this._$AH&&t!==Q,i&&(this._$AH=t);else{const r=t;let a,s;for(t=n[0],a=0;a<n.length-1;a++)s=it(this,r[e+a],o,a),s===Q&&(s=this._$AH[a]),i||=!D(s)||s!==this._$AH[a],s===tt?t=tt:t!==tt&&(t+=(s??"")+n[a+1]),this._$AH[a]=s}i&&!r&&this.O(t)}O(t){t===tt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ct=class extends st{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===tt?void 0:t}},lt=class extends st{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==tt)}},ft=class extends st{constructor(t,o,e,r,n){super(t,o,e,r,n),this.type=5}_$AI(t,o=this){if((t=it(this,t,o,0)??tt)===Q)return;const e=this._$AH,r=t===tt&&e!==tt||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==tt&&(e===tt||r);r&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},ht=class{constructor(t,o,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=o,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){it(this,t)}};const pt=$.litHtmlPolyfillSupport;pt?.(nt,at),($.litHtmlVersions??=[]).push("3.1.0");
|
|
42
42
|
/**
|
|
43
43
|
* @license
|
|
44
44
|
* Copyright 2019 Google LLC
|
|
@@ -55,7 +55,7 @@ const ut=globalThis,dt=ut.ShadowRoot&&(void 0===ut.ShadyCSS||ut.ShadyCSS.nativeS
|
|
|
55
55
|
* Copyright 2017 Google LLC
|
|
56
56
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
57
57
|
*/
|
|
58
|
-
const jt=globalThis,Ft=jt.trustedTypes,
|
|
58
|
+
const jt=globalThis,Ft=jt.trustedTypes,Mt=Ft?Ft.createPolicy("lit-html",{createHTML:t=>t}):void 0,Zt="$lit$",Pt=`lit$${(Math.random()+"").slice(9)}$`,zt="?"+Pt,Dt=`<${zt}>`,Bt=document,_t=()=>Bt.createComment(""),Tt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Ht=Array.isArray,Gt="[ \t\n\f\r]",qt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Vt=/-->/g,Yt=/>/g,Jt=RegExp(`>|${Gt}(?:([^\\s"'>=/]+)(${Gt}*=${Gt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Xt=/'/g,Qt=/"/g,to=/^(?:script|style|textarea|title)$/i,oo=(t=>(o,...e)=>({_$litType$:t,strings:o,values:e}))(1),eo=Symbol.for("lit-noChange"),ro=Symbol.for("lit-nothing"),no=new WeakMap,io=Bt.createTreeWalker(Bt,129);function ao(t,o){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Mt?Mt.createHTML(o):o}class so{constructor({strings:t,_$litType$:o},e){let r;this.parts=[];let n=0,i=0;const a=t.length-1,s=this.parts,[c,l]=((t,o)=>{const e=t.length-1,r=[];let n,i=2===o?"<svg>":"",a=qt;for(let o=0;o<e;o++){const e=t[o];let s,c,l=-1,f=0;for(;f<e.length&&(a.lastIndex=f,c=a.exec(e),null!==c);)f=a.lastIndex,a===qt?"!--"===c[1]?a=Vt:void 0!==c[1]?a=Yt:void 0!==c[2]?(to.test(c[2])&&(n=RegExp("</"+c[2],"g")),a=Jt):void 0!==c[3]&&(a=Jt):a===Jt?">"===c[0]?(a=n??qt,l=-1):void 0===c[1]?l=-2:(l=a.lastIndex-c[2].length,s=c[1],a=void 0===c[3]?Jt:'"'===c[3]?Qt:Xt):a===Qt||a===Xt?a=Jt:a===Vt||a===Yt?a=qt:(a=Jt,n=void 0);const h=a===Jt&&t[o+1].startsWith("/>")?" ":"";i+=a===qt?e+Dt:l>=0?(r.push(s),e.slice(0,l)+Zt+e.slice(l)+Pt+h):e+Pt+(-2===l?o:h)}return[ao(t,i+(t[e]||"<?>")+(2===o?"</svg>":"")),r]})(t,o);if(this.el=so.createElement(c,e),io.currentNode=this.el.content,2===o){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=io.nextNode())&&s.length<a;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(Zt)){const o=l[i++],e=r.getAttribute(t).split(Pt),a=/([.?@])?(.*)/.exec(o);s.push({type:1,index:n,name:a[2],strings:e,ctor:"."===a[1]?ho:"?"===a[1]?po:"@"===a[1]?uo:fo}),r.removeAttribute(t)}else t.startsWith(Pt)&&(s.push({type:6,index:n}),r.removeAttribute(t));if(to.test(r.tagName)){const t=r.textContent.split(Pt),o=t.length-1;if(o>0){r.textContent=Ft?Ft.emptyScript:"";for(let e=0;e<o;e++)r.append(t[e],_t()),io.nextNode(),s.push({type:2,index:++n});r.append(t[o],_t())}}}else if(8===r.nodeType)if(r.data===zt)s.push({type:2,index:n});else{let t=-1;for(;-1!==(t=r.data.indexOf(Pt,t+1));)s.push({type:7,index:n}),t+=Pt.length-1}n++}}static createElement(t,o){const e=Bt.createElement("template");return e.innerHTML=t,e}}function co(t,o,e=t,r){if(o===eo)return o;let n=void 0!==r?e._$Co?.[r]:e._$Cl;const i=Tt(o)?void 0:o._$litDirective$;return n?.constructor!==i&&(n?._$AO?.(!1),void 0===i?n=void 0:(n=new i(t),n._$AT(t,e,r)),void 0!==r?(e._$Co??=[])[r]=n:e._$Cl=n),void 0!==n&&(o=co(t,n._$AS(t,o.values),n,r)),o}let lo=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,o,e,r){this.type=2,this._$AH=ro,this._$AN=void 0,this._$AA=t,this._$AB=o,this._$AM=e,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const o=this._$AM;return void 0!==o&&11===t?.nodeType&&(t=o.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,o=this){t=co(this,t,o),Tt(t)?t===ro||null==t||""===t?(this._$AH!==ro&&this._$AR(),this._$AH=ro):t!==this._$AH&&t!==eo&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>Ht(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==ro&&Tt(this._$AH)?this._$AA.nextSibling.data=t:this.$(Bt.createTextNode(t)),this._$AH=t}g(t){const{values:o,_$litType$:e}=t,r="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=so.createElement(ao(e.h,e.h[0]),this.options)),e);if(this._$AH?._$AD===r)this._$AH.p(o);else{const t=new class{constructor(t,o){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:o},parts:e}=this._$AD,r=(t?.creationScope??Bt).importNode(o,!0);io.currentNode=r;let n=io.nextNode(),i=0,a=0,s=e[0];for(;void 0!==s;){if(i===s.index){let o;2===s.type?o=new lo(n,n.nextSibling,this,t):1===s.type?o=new s.ctor(n,s.name,s.strings,this,t):6===s.type&&(o=new yo(n,this,t)),this._$AV.push(o),s=e[++a]}i!==s?.index&&(n=io.nextNode(),i++)}return io.currentNode=Bt,r}p(t){let o=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,o),o+=e.strings.length-2):e._$AI(t[o])),o++}}(r,this),e=t.u(this.options);t.p(o),this.$(e),this._$AH=t}}_$AC(t){let o=no.get(t.strings);return void 0===o&&no.set(t.strings,o=new so(t)),o}T(o){Ht(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,n=0;for(const i of o)n===e.length?e.push(r=new t(this.k(_t()),this.k(_t()),this,this.options)):r=e[n],r._$AI(i),n++;n<e.length&&(this._$AR(r&&r._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,o){for(this._$AP?.(!1,!0,o);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}},fo=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,o,e,r,n){this.type=1,this._$AH=ro,this._$AN=void 0,this.element=t,this.name=o,this._$AM=r,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=ro}_$AI(t,o=this,e,r){const n=this.strings;let i=!1;if(void 0===n)t=co(this,t,o,0),i=!Tt(t)||t!==this._$AH&&t!==eo,i&&(this._$AH=t);else{const r=t;let a,s;for(t=n[0],a=0;a<n.length-1;a++)s=co(this,r[e+a],o,a),s===eo&&(s=this._$AH[a]),i||=!Tt(s)||s!==this._$AH[a],s===ro?t=ro:t!==ro&&(t+=(s??"")+n[a+1]),this._$AH[a]=s}i&&!r&&this.O(t)}O(t){t===ro?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ho=class extends fo{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===ro?void 0:t}},po=class extends fo{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==ro)}},uo=class extends fo{constructor(t,o,e,r,n){super(t,o,e,r,n),this.type=5}_$AI(t,o=this){if((t=co(this,t,o,0)??ro)===eo)return;const e=this._$AH,r=t===ro&&e!==ro||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==ro&&(e===ro||r);r&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},yo=class{constructor(t,o,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=o,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){co(this,t)}};const go=jt.litHtmlPolyfillSupport;go?.(so,lo),(jt.litHtmlVersions??=[]).push("3.1.0");
|
|
59
59
|
/**
|
|
60
60
|
* @license
|
|
61
61
|
* Copyright 2017 Google LLC
|
|
@@ -102,12 +102,12 @@ let bo=class extends At{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
102
102
|
display: inline-block;
|
|
103
103
|
width: 0;
|
|
104
104
|
}
|
|
105
|
-
`;class Ao{constructor(t,o){this.defaultLabels=t,this.labels=o}resolve(t,...o){var e,r;t=this.resolvePluralKey(t,o);let n=null!==(r=null!==(e=this.labels[t])&&void 0!==e?e:this.defaultLabels[t])&&void 0!==r?r:"";return o.forEach(((t,o)=>n=n.replace(new RegExp(`\\{${o}([^}]*)\\}`,"g"),((o,e)=>this.formatValue(t,e))))),n}resolvePluralKey(t,o){for(let e of o)if("number"==typeof e){const o=`${String(t)}[\\=${e}]`;if(o in this.labels||o in this.defaultLabels)return o}return t}formatValue(t,o){return t instanceof Date?this.formatDate(t,o):null!=t?t:""}formatDate(t,o){const e=e=>(null==o?void 0:o.includes("date"))?t.toLocaleDateString(e):(null==o?void 0:o.includes("time"))?t.toLocaleTimeString(e):t.toLocaleString(e);try{return e(document.documentElement.lang)}catch(t){return e()}}}const jo=t=>{const o=null!=t?t:{};return(t,e)=>{var r;const n={hasChanged:(t,o)=>!L(t,o),attribute:!1,...o};R(n)(t,e);const i=t;i.reduxProperties=i.reduxProperties||new Map,i.reduxProperties.set(e,{selector:null!==(r=o.selector)&&void 0!==r?r:t=>t[e],store:o.store})}};class Fo{constructor(){this.stack=[]}add(t,o=!1){o&&(this.stack=this.stack.filter((o=>o.type!==t.type))),this.stack.push(t)}consume(t){const o=this.stack.find((o=>o.type===t));return o&&(this.stack=this.stack.filter((t=>t!==o))),o}}function Zo(t){var o;return null!==(o=null==t?void 0:t.isFtReduxStore)&&void 0!==o&&o}var Po,Mo,zo;const Do=Symbol("internalReduxEventsUnsubscribers"),Bo=Symbol("internalStoresUnsubscribers"),_o=Symbol("internalStores");class To extends $o{constructor(){super(...arguments),this[Po]=new Map,this[Mo]=new Map,this[zo]=[]}update(t){var o;super.update(t),(null===(o=this.reduxReactiveProperties)||void 0===o?void 0:o.some((o=>t.has(o))))&&this.updateFromStores()}getUnnamedStore(){if(this[_o].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[_o].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[_o].get(t)}addStore(t,o){var e;o=null!==(e=null!=o?o:Zo(t)?t.name:void 0)&&void 0!==e?e:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,t)}removeStore(t){const o="string"==typeof t?t:t.name;this.unsubscribeFromStore(o),this[_o].delete(o)}setupStore(t,o){this[_o].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[_o].forEach(((t,o)=>this.subscribeToStore(o,t))),this.updateFromStores()}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,o)=>{const e=this.constructor.getPropertyOptions(o);if(!(null==e?void 0:e.attribute)||!this.hasAttribute("string"==typeof(null==e?void 0:e.attribute)?e.attribute:o)){const e=this.getStore(t.store);e&&(t.store?this[Bo].has(t.store):this[Bo].size>0)&&(this[o]=t.selector(e.getState(),this))}}))}subscribeToStore(t,o){var e;this[Bo].set(t,o.subscribe((()=>this.updateFromStores()))),Zo(o)&&o.eventBus&&(null===(e=this.reduxEventListeners)||void 0===e||e.forEach(((t,e)=>{if("function"==typeof this[e]&&(!t.store||o.name===t.store)){const r=t=>this[e](t);o.eventBus.addEventListener(t.eventName,r),this[Do].push((()=>o.eventBus.removeEventListener(t.eventName,r)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Bo].forEach(((t,o)=>this.unsubscribeFromStore(o))),this[Do].forEach((t=>t())),this[Do]=[]}unsubscribeFromStore(t){this[Bo].has(t)&&this[Bo].get(t)(),this[Bo].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}function Ho(t){for(var o=arguments.length,e=Array(o>1?o-1:0),r=1;r<o;r++)e[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(e.length?" "+e.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Go(t){return!!t&&!!t[$e]}function qo(t){var o;return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var o=Object.getPrototypeOf(t);if(null===o)return!0;var e=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return e===Object||"function"==typeof e&&Function.toString.call(e)===Ke}(t)||Array.isArray(t)||!!t[ke]||!!(null===(o=t.constructor)||void 0===o?void 0:o[ke])||te(t)||oe(t))}function Vo(t,o,e){void 0===e&&(e=!1),0===Yo(t)?(e?Object.keys:Ae)(t).forEach((function(r){e&&"symbol"==typeof r||o(r,t[r],t)})):t.forEach((function(e,r){return o(r,e,t)}))}function Yo(t){var o=t[$e];return o?o.i>3?o.i-4:o.i:Array.isArray(t)?1:te(t)?2:oe(t)?3:0}function Jo(t,o){return 2===Yo(t)?t.has(o):Object.prototype.hasOwnProperty.call(t,o)}function Xo(t,o,e){var r=Yo(t);2===r?t.set(o,e):3===r?t.add(e):t[o]=e}function Qo(t,o){return t===o?0!==t||1/t==1/o:t!=t&&o!=o}function te(t){return Ue&&t instanceof Map}function oe(t){return Ie&&t instanceof Set}function ee(t){return t.o||t.t}function re(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var o=je(t);delete o[$e];for(var e=Ae(o),r=0;r<e.length;r++){var n=e[r],i=o[n];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(o[n]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[n]})}return Object.create(Object.getPrototypeOf(t),o)}function ne(t,o){return void 0===o&&(o=!1),ae(t)||Go(t)||!qo(t)||(Yo(t)>1&&(t.set=t.add=t.clear=t.delete=ie),Object.freeze(t),o&&Vo(t,(function(t,o){return ne(o,!0)}),!0)),t}function ie(){Ho(2)}function ae(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function se(t){var o=Fe[t];return o||Ho(18,t),o}function ce(){return Ee}function le(t,o){o&&(se("Patches"),t.u=[],t.s=[],t.v=o)}function fe(t){he(t),t.p.forEach(ue),t.p=null}function he(t){t===Ee&&(Ee=t.l)}function pe(t){return Ee={p:[],l:Ee,h:t,m:!0,_:0}}function ue(t){var o=t[$e];0===o.i||1===o.i?o.j():o.g=!0}function de(t,o){o._=o.p.length;var e=o.p[0],r=void 0!==t&&t!==e;return o.h.O||se("ES5").S(o,t,r),r?(e[$e].P&&(fe(o),Ho(4)),qo(t)&&(t=ye(o,t),o.l||be(o,t)),o.u&&se("Patches").M(e[$e].t,t,o.u,o.s)):t=ye(o,e,[]),fe(o),o.u&&o.v(o.u,o.s),t!==We?t:void 0}function ye(t,o,e){if(ae(o))return o;var r=o[$e];if(!r)return Vo(o,(function(n,i){return ge(t,r,o,n,i,e)}),!0),o;if(r.A!==t)return o;if(!r.P)return be(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var n=4===r.i||5===r.i?r.o=re(r.k):r.o,i=n,a=!1;3===r.i&&(i=new Set(n),n.clear(),a=!0),Vo(i,(function(o,i){return ge(t,r,n,o,i,e,a)})),be(t,n,!1),e&&t.u&&se("Patches").N(r,e,t.u,t.s)}return r.o}function ge(t,o,e,r,n,i,a){if(Go(n)){var s=ye(t,n,i&&o&&3!==o.i&&!Jo(o.R,r)?i.concat(r):void 0);if(Xo(e,r,s),!Go(s))return;t.m=!1}else a&&e.add(n);if(qo(n)&&!ae(n)){if(!t.h.D&&t._<1)return;ye(t,n),o&&o.A.l||be(t,n)}}function be(t,o,e){void 0===e&&(e=!1),!t.l&&t.h.D&&t.m&&ne(o,e)}function me(t,o){var e=t[$e];return(e?ee(e):t)[o]}function Oe(t,o){if(o in t)for(var e=Object.getPrototypeOf(t);e;){var r=Object.getOwnPropertyDescriptor(e,o);if(r)return r;e=Object.getPrototypeOf(e)}}function ve(t){t.P||(t.P=!0,t.l&&ve(t.l))}function Se(t){t.o||(t.o=re(t.t))}function we(t,o,e){var r=te(o)?se("MapSet").F(o,e):oe(o)?se("MapSet").T(o,e):t.O?function(t,o){var e=Array.isArray(t),r={i:e?1:0,A:o?o.A:ce(),P:!1,I:!1,R:{},l:o,t,k:null,o:null,j:null,C:!1},n=r,i=Ze;e&&(n=[r],i=Pe);var a=Proxy.revocable(n,i),s=a.revoke,c=a.proxy;return r.k=c,r.j=s,c}(o,e):se("ES5").J(o,e);return(e?e.A:ce()).p.push(r),r}function Ne(t){return Go(t)||Ho(22,t),function t(o){if(!qo(o))return o;var e,r=o[$e],n=Yo(o);if(r){if(!r.P&&(r.i<4||!se("ES5").K(r)))return r.t;r.I=!0,e=xe(o,n),r.I=!1}else e=xe(o,n);return Vo(e,(function(o,n){r&&function(t,o){return 2===Yo(t)?t.get(o):t[o]}(r.t,o)===n||Xo(e,o,t(n))})),3===n?new Set(e):e}(t)}function xe(t,o){switch(o){case 2:return new Map(t);case 3:return Array.from(t)}return re(t)}Po=Bo,Mo=_o,zo=Do;var Ce,Ee,Re="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Ue="undefined"!=typeof Map,Ie="undefined"!=typeof Set,Le="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,We=Re?Symbol.for("immer-nothing"):((Ce={})["immer-nothing"]=!0,Ce),ke=Re?Symbol.for("immer-draftable"):"__$immer_draftable",$e=Re?Symbol.for("immer-state"):"__$immer_state",Ke=""+Object.prototype.constructor,Ae="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,je=Object.getOwnPropertyDescriptors||function(t){var o={};return Ae(t).forEach((function(e){o[e]=Object.getOwnPropertyDescriptor(t,e)})),o},Fe={},Ze={get:function(t,o){if(o===$e)return t;var e=ee(t);if(!Jo(e,o))return function(t,o,e){var r,n=Oe(o,e);return n?"value"in n?n.value:null===(r=n.get)||void 0===r?void 0:r.call(t.k):void 0}(t,e,o);var r=e[o];return t.I||!qo(r)?r:r===me(t.t,o)?(Se(t),t.o[o]=we(t.A.h,r,t)):r},has:function(t,o){return o in ee(t)},ownKeys:function(t){return Reflect.ownKeys(ee(t))},set:function(t,o,e){var r=Oe(ee(t),o);if(null==r?void 0:r.set)return r.set.call(t.k,e),!0;if(!t.P){var n=me(ee(t),o),i=null==n?void 0:n[$e];if(i&&i.t===e)return t.o[o]=e,t.R[o]=!1,!0;if(Qo(e,n)&&(void 0!==e||Jo(t.t,o)))return!0;Se(t),ve(t)}return t.o[o]===e&&(void 0!==e||o in t.o)||Number.isNaN(e)&&Number.isNaN(t.o[o])||(t.o[o]=e,t.R[o]=!0),!0},deleteProperty:function(t,o){return void 0!==me(t.t,o)||o in t.t?(t.R[o]=!1,Se(t),ve(t)):delete t.R[o],t.o&&delete t.o[o],!0},getOwnPropertyDescriptor:function(t,o){var e=ee(t),r=Reflect.getOwnPropertyDescriptor(e,o);return r?{writable:!0,configurable:1!==t.i||"length"!==o,enumerable:r.enumerable,value:e[o]}:r},defineProperty:function(){Ho(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ho(12)}},Pe={};Vo(Ze,(function(t,o){Pe[t]=function(){return arguments[0]=arguments[0][0],o.apply(this,arguments)}})),Pe.deleteProperty=function(t,o){return Pe.set.call(this,t,o,void 0)},Pe.set=function(t,o,e){return Ze.set.call(this,t[0],o,e,t[0])};var Me=function(){function t(t){var o=this;this.O=Le,this.D=!0,this.produce=function(t,e,r){if("function"==typeof t&&"function"!=typeof e){var n=e;e=t;var i=o;return function(t){var o=this;void 0===t&&(t=n);for(var r=arguments.length,a=Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return i.produce(t,(function(t){var r;return(r=e).call.apply(r,[o,t].concat(a))}))}}var a;if("function"!=typeof e&&Ho(6),void 0!==r&&"function"!=typeof r&&Ho(7),qo(t)){var s=pe(o),c=we(o,t,void 0),l=!0;try{a=e(c),l=!1}finally{l?fe(s):he(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(t){return le(s,r),de(t,s)}),(function(t){throw fe(s),t})):(le(s,r),de(a,s))}if(!t||"object"!=typeof t){if(void 0===(a=e(t))&&(a=t),a===We&&(a=void 0),o.D&&ne(a,!0),r){var f=[],h=[];se("Patches").M(t,a,f,h),r(f,h)}return a}Ho(21,t)},this.produceWithPatches=function(t,e){if("function"==typeof t)return function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return o.produceWithPatches(e,(function(o){return t.apply(void 0,[o].concat(n))}))};var r,n,i=o.produce(t,e,(function(t,o){r=t,n=o}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(t){return[t,r,n]})):[i,r,n]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var o=t.prototype;return o.createDraft=function(t){qo(t)||Ho(8),Go(t)&&(t=Ne(t));var o=pe(this),e=we(this,t,void 0);return e[$e].C=!0,he(o),e},o.finishDraft=function(t,o){var e=(t&&t[$e]).A;return le(e,o),de(void 0,e)},o.setAutoFreeze=function(t){this.D=t},o.setUseProxies=function(t){t&&!Le&&Ho(20),this.O=t},o.applyPatches=function(t,o){var e;for(e=o.length-1;e>=0;e--){var r=o[e];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}e>-1&&(o=o.slice(e+1));var n=se("Patches").$;return Go(t)?n(t,o):this.produce(t,(function(t){return n(t,o)}))},t}(),ze=new Me,De=ze.produce;function Be(t){return Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Be(t)}function _e(t){var o=function(t,o){if("object"!==Be(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,o||"default");if("object"!==Be(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(t,"string");return"symbol"===Be(o)?o:String(o)}function Te(t,o,e){return(o=_e(o))in t?Object.defineProperty(t,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[o]=e,t}function He(t,o){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),e.push.apply(e,r)}return e}function Ge(t){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?He(Object(e),!0).forEach((function(o){Te(t,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):He(Object(e)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))}))}return t}function qe(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}ze.produceWithPatches.bind(ze),ze.setAutoFreeze.bind(ze),ze.setUseProxies.bind(ze),ze.applyPatches.bind(ze),ze.createDraft.bind(ze),ze.finishDraft.bind(ze);var Ve="function"==typeof Symbol&&Symbol.observable||"@@observable",Ye=function(){return Math.random().toString(36).substring(7).split("").join(".")},Je={INIT:"@@redux/INIT"+Ye(),REPLACE:"@@redux/REPLACE"+Ye(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ye()}};function Xe(t,o,e){var r;if("function"==typeof o&&"function"==typeof e||"function"==typeof e&&"function"==typeof arguments[3])throw new Error(qe(0));if("function"==typeof o&&void 0===e&&(e=o,o=void 0),void 0!==e){if("function"!=typeof e)throw new Error(qe(1));return e(Xe)(t,o)}if("function"!=typeof t)throw new Error(qe(2));var n=t,i=o,a=[],s=a,c=!1;function l(){s===a&&(s=a.slice())}function f(){if(c)throw new Error(qe(3));return i}function h(t){if("function"!=typeof t)throw new Error(qe(4));if(c)throw new Error(qe(5));var o=!0;return l(),s.push(t),function(){if(o){if(c)throw new Error(qe(6));o=!1,l();var e=s.indexOf(t);s.splice(e,1),a=null}}}function p(t){if(!function(t){if("object"!=typeof t||null===t)return!1;for(var o=t;null!==Object.getPrototypeOf(o);)o=Object.getPrototypeOf(o);return Object.getPrototypeOf(t)===o}(t))throw new Error(qe(7));if(void 0===t.type)throw new Error(qe(8));if(c)throw new Error(qe(9));try{c=!0,i=n(i,t)}finally{c=!1}for(var o=a=s,e=0;e<o.length;e++){(0,o[e])()}return t}return p({type:Je.INIT}),(r={dispatch:p,subscribe:h,getState:f,replaceReducer:function(t){if("function"!=typeof t)throw new Error(qe(10));n=t,p({type:Je.REPLACE})}})[Ve]=function(){var t,o=h;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(qe(11));function e(){t.next&&t.next(f())}return e(),{unsubscribe:o(e)}}})[Ve]=function(){return this},t},r}function Qe(t){for(var o=Object.keys(t),e={},r=0;r<o.length;r++){var n=o[r];"function"==typeof t[n]&&(e[n]=t[n])}var i,a=Object.keys(e);try{!function(t){Object.keys(t).forEach((function(o){var e=t[o];if(void 0===e(void 0,{type:Je.INIT}))throw new Error(qe(12));if(void 0===e(void 0,{type:Je.PROBE_UNKNOWN_ACTION()}))throw new Error(qe(13))}))}(e)}catch(t){i=t}return function(t,o){if(void 0===t&&(t={}),i)throw i;for(var r=!1,n={},s=0;s<a.length;s++){var c=a[s],l=e[c],f=t[c],h=l(f,o);if(void 0===h)throw o&&o.type,new Error(qe(14));n[c]=h,r=r||h!==f}return(r=r||a.length!==Object.keys(t).length)?n:t}}function tr(){for(var t=arguments.length,o=new Array(t),e=0;e<t;e++)o[e]=arguments[e];return 0===o.length?function(t){return t}:1===o.length?o[0]:o.reduce((function(t,o){return function(){return t(o.apply(void 0,arguments))}}))}function or(){for(var t=arguments.length,o=new Array(t),e=0;e<t;e++)o[e]=arguments[e];return function(t){return function(){var e=t.apply(void 0,arguments),r=function(){throw new Error(qe(15))},n={getState:e.getState,dispatch:function(){return r.apply(void 0,arguments)}},i=o.map((function(t){return t(n)}));return r=tr.apply(void 0,i)(e.dispatch),Ge(Ge({},e),{},{dispatch:r})}}}function er(t){return function(o){var e=o.dispatch,r=o.getState;return function(o){return function(n){return"function"==typeof n?n(e,r,t):o(n)}}}}var rr=er();rr.withExtraArgument=er;var nr,ir=rr,ar=(nr=function(t,o){return nr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])},nr(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function e(){this.constructor=t}nr(t,o),t.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}),sr=function(t,o){var e,r,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[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(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(n=2&i[0]?r.return:i[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,i[1])).done)return n;switch(r=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=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(!(n=a.trys,(n=n.length>0&&n[n.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=o.call(t,a)}catch(t){i=[6,t],r=0}finally{e=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},cr=function(t,o){for(var e=0,r=o.length,n=t.length;e<r;e++,n++)t[n]=o[e];return t},lr=Object.defineProperty,fr=Object.defineProperties,hr=Object.getOwnPropertyDescriptors,pr=Object.getOwnPropertySymbols,ur=Object.prototype.hasOwnProperty,dr=Object.prototype.propertyIsEnumerable,yr=function(t,o,e){return o in t?lr(t,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[o]=e},gr=function(t,o){for(var e in o||(o={}))ur.call(o,e)&&yr(t,e,o[e]);if(pr)for(var r=0,n=pr(o);r<n.length;r++){e=n[r];dr.call(o,e)&&yr(t,e,o[e])}return t},br=function(t,o){return fr(t,hr(o))},mr="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?tr:tr.apply(null,arguments)};var Or=function(t){function o(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,e)||this;return Object.setPrototypeOf(n,o.prototype),n}return ar(o,t),Object.defineProperty(o,Symbol.species,{get:function(){return o},enumerable:!1,configurable:!0}),o.prototype.concat=function(){for(var o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];return t.prototype.concat.apply(this,o)},o.prototype.prepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&Array.isArray(t[0])?new(o.bind.apply(o,cr([void 0],t[0].concat(this)))):new(o.bind.apply(o,cr([void 0],t.concat(this))))},o}(Array),vr=function(t){function o(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,e)||this;return Object.setPrototypeOf(n,o.prototype),n}return ar(o,t),Object.defineProperty(o,Symbol.species,{get:function(){return o},enumerable:!1,configurable:!0}),o.prototype.concat=function(){for(var o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];return t.prototype.concat.apply(this,o)},o.prototype.prepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&Array.isArray(t[0])?new(o.bind.apply(o,cr([void 0],t[0].concat(this)))):new(o.bind.apply(o,cr([void 0],t.concat(this))))},o}(Array);function Sr(t){return qo(t)?De(t,(function(){})):t}function wr(){return function(t){return function(t){void 0===t&&(t={});var o=t.thunk,e=void 0===o||o;t.immutableCheck,t.serializableCheck;var r=new Or;e&&(!function(t){return"boolean"==typeof t}(e)?r.push(ir.withExtraArgument(e.extraArgument)):r.push(ir));return r}(t)}}function Nr(t){var o,e=wr(),r=t||{},n=r.reducer,i=void 0===n?void 0:n,a=r.middleware,s=void 0===a?e():a,c=r.devTools,l=void 0===c||c,f=r.preloadedState,h=void 0===f?void 0:f,p=r.enhancers,u=void 0===p?void 0:p;if("function"==typeof i)o=i;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var o=Object.getPrototypeOf(t);if(null===o)return!0;for(var e=o;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return o===e}(i))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');o=Qe(i)}var d=s;"function"==typeof d&&(d=d(e));var y=or.apply(void 0,d),g=tr;l&&(g=mr(gr({trace:!1},"object"==typeof l&&l)));var b=new vr(y),m=b;return Array.isArray(u)?m=cr([y],u):"function"==typeof u&&(m=u(b)),Xe(o,h,g.apply(void 0,m))}function xr(t,o){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(o){var n=o.apply(void 0,e);if(!n)throw new Error("prepareAction did not return an object");return gr(gr({type:t,payload:n.payload},"meta"in n&&{meta:n.meta}),"error"in n&&{error:n.error})}return{type:t,payload:e[0]}}return e.toString=function(){return""+t},e.type=t,e.match=function(o){return o.type===t},e}function Cr(t){var o,e={},r=[],n={addCase:function(t,o){var r="string"==typeof t?t:t.type;if(r in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[r]=o,n},addMatcher:function(t,o){return r.push({matcher:t,reducer:o}),n},addDefaultCase:function(t){return o=t,n}};return t(n),[e,r,o]}function Er(t){var o=t.name;if(!o)throw new Error("`name` is a required option for createSlice");var e,r="function"==typeof t.initialState?t.initialState:Sr(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};function l(){var o="function"==typeof t.extraReducers?Cr(t.extraReducers):[t.extraReducers],e=o[0],n=void 0===e?{}:e,i=o[1],a=void 0===i?[]:i,c=o[2],l=void 0===c?void 0:c,f=gr(gr({},n),s);return function(t,o,e,r){void 0===e&&(e=[]);var n,i="function"==typeof o?Cr(o):[o,e,r],a=i[0],s=i[1],c=i[2];if(function(t){return"function"==typeof t}(t))n=function(){return Sr(t())};else{var l=Sr(t);n=function(){return l}}function f(t,o){void 0===t&&(t=n());var e=cr([a[o.type]],s.filter((function(t){return(0,t.matcher)(o)})).map((function(t){return t.reducer})));return 0===e.filter((function(t){return!!t})).length&&(e=[c]),e.reduce((function(t,e){if(e){var r;if(Go(t))return void 0===(r=e(t,o))?t:r;if(qo(t))return De(t,(function(t){return e(t,o)}));if(void 0===(r=e(t,o))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return t}),t)}return f.getInitialState=n,f}(r,(function(t){for(var o in f)t.addCase(o,f[o]);for(var e=0,r=a;e<r.length;e++){var n=r[e];t.addMatcher(n.matcher,n.reducer)}l&&t.addDefaultCase(l)}))}return i.forEach((function(t){var e,r,i=n[t],l=o+"/"+t;"reducer"in i?(e=i.reducer,r=i.prepare):e=i,a[t]=e,s[l]=e,c[t]=r?xr(l,r):xr(l)})),{name:o,reducer:function(t,o){return e||(e=l()),e(t,o)},actions:c,caseReducers:a,getInitialState:function(){return e||(e=l()),e.getInitialState()}}}var Rr=["name","message","stack","code"],Ur=function(t,o){this.payload=t,this.meta=o},Ir=function(t,o){this.payload=t,this.meta=o},Lr=function(t){if("object"==typeof t&&null!==t){for(var o={},e=0,r=Rr;e<r.length;e++){var n=r[e];"string"==typeof t[n]&&(o[n]=t[n])}return o}return{message:String(t)}};function Wr(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,o,e){var r=xr(t+"/fulfilled",(function(t,o,e,r){return{payload:t,meta:br(gr({},r||{}),{arg:e,requestId:o,requestStatus:"fulfilled"})}})),n=xr(t+"/pending",(function(t,o,e){return{payload:void 0,meta:br(gr({},e||{}),{arg:o,requestId:t,requestStatus:"pending"})}})),i=xr(t+"/rejected",(function(t,o,r,n,i){return{payload:n,error:(e&&e.serializeError||Lr)(t||"Rejected"),meta:br(gr({},i||{}),{arg:r,requestId:o,rejectedWithValue:!!n,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),a="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(s,c,l){var f,h=(null==e?void 0:e.idGenerator)?e.idGenerator(t):function(t){void 0===t&&(t=21);for(var o="",e=t;e--;)o+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return o}(),p=new a;function u(t){f=t,p.abort()}var d=function(){return a=this,d=null,y=function(){var a,d,y,g,b,m;return sr(this,(function(O){switch(O.label){case 0:return O.trys.push([0,4,,5]),g=null==(a=null==e?void 0:e.condition)?void 0:a.call(e,t,{getState:c,extra:l}),null===(v=g)||"object"!=typeof v||"function"!=typeof v.then?[3,2]:[4,g];case 1:g=O.sent(),O.label=2;case 2:if(!1===g||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=new Promise((function(t,o){return p.signal.addEventListener("abort",(function(){return o({name:"AbortError",message:f||"Aborted"})}))})),s(n(h,t,null==(d=null==e?void 0:e.getPendingMeta)?void 0:d.call(e,{requestId:h,arg:t},{getState:c,extra:l}))),[4,Promise.race([b,Promise.resolve(o(t,{dispatch:s,getState:c,extra:l,requestId:h,signal:p.signal,abort:u,rejectWithValue:function(t,o){return new Ur(t,o)},fulfillWithValue:function(t,o){return new Ir(t,o)}})).then((function(o){if(o instanceof Ur)throw o;return o instanceof Ir?r(o.payload,h,t,o.meta):r(o,h,t)}))])];case 3:return y=O.sent(),[3,5];case 4:return m=O.sent(),y=m instanceof Ur?i(null,h,t,m.payload,m.meta):i(m,h,t),[3,5];case 5:return e&&!e.dispatchConditionRejection&&i.match(y)&&y.meta.condition||s(y),[2,y]}var v}))},new Promise((function(t,o){var e=function(t){try{n(y.next(t))}catch(t){o(t)}},r=function(t){try{n(y.throw(t))}catch(t){o(t)}},n=function(o){return o.done?t(o.value):Promise.resolve(o.value).then(e,r)};n((y=y.apply(a,d)).next())}));var a,d,y}();return Object.assign(d,{abort:u,requestId:h,arg:t,unwrap:function(){return d.then(Wr)}})}}),{pending:n,rejected:i,fulfilled:r,typePrefix:t})}t.withTypes=function(){return t}}();var kr,$r,Kr="listenerMiddleware";xr(Kr+"/add"),xr(Kr+"/removeAll"),xr(Kr+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,o){var e=n[t];return e?e.enumerable=o:n[t]=e={configurable:!0,enumerable:o,get:function(){var o=this[$e];return Ze.get(o,t)},set:function(o){var e=this[$e];Ze.set(e,t,o)}},e}function o(t){for(var o=t.length-1;o>=0;o--){var n=t[o][$e];if(!n.P)switch(n.i){case 5:r(n)&&ve(n);break;case 4:e(n)&&ve(n)}}}function e(t){for(var o=t.t,e=t.k,r=Ae(e),n=r.length-1;n>=0;n--){var i=r[n];if(i!==$e){var a=o[i];if(void 0===a&&!Jo(o,i))return!0;var s=e[i],c=s&&s[$e];if(c?c.t!==a:!Qo(s,a))return!0}}var l=!!o[$e];return r.length!==Ae(o).length+(l?0:1)}function r(t){var o=t.k;if(o.length!==t.t.length)return!0;var e=Object.getOwnPropertyDescriptor(o,o.length-1);if(e&&!e.get)return!0;for(var r=0;r<o.length;r++)if(!o.hasOwnProperty(r))return!0;return!1}var n={};!function(t,o){Fe[t]||(Fe[t]=o)}("ES5",{J:function(o,e){var r=Array.isArray(o),n=function(o,e){if(o){for(var r=Array(e.length),n=0;n<e.length;n++)Object.defineProperty(r,""+n,t(n,!0));return r}var i=je(e);delete i[$e];for(var a=Ae(i),s=0;s<a.length;s++){var c=a[s];i[c]=t(c,o||!!i[c].enumerable)}return Object.create(Object.getPrototypeOf(e),i)}(r,o),i={i:r?5:4,A:e?e.A:ce(),P:!1,I:!1,R:{},l:e,t:o,k:n,o:null,g:!1,C:!1};return Object.defineProperty(n,$e,{value:i,writable:!0}),n},S:function(t,e,n){n?Go(e)&&e[$e].A===t&&o(t.p):(t.u&&function t(o){if(o&&"object"==typeof o){var e=o[$e];if(e){var n=e.t,i=e.k,a=e.R,s=e.i;if(4===s)Vo(i,(function(o){o!==$e&&(void 0!==n[o]||Jo(n,o)?a[o]||t(i[o]):(a[o]=!0,ve(e)))})),Vo(n,(function(t){void 0!==i[t]||Jo(i,t)||(a[t]=!1,ve(e))}));else if(5===s){if(r(e)&&(ve(e),a.length=!0),i.length<n.length)for(var c=i.length;c<n.length;c++)a[c]=!1;else for(var l=n.length;l<i.length;l++)a[l]=!0;for(var f=Math.min(i.length,n.length),h=0;h<f;h++)i.hasOwnProperty(h)||(a[h]=!0),void 0===a[h]&&t(i[h])}}}}(t.p[0]),o(t.p))},K:function(t){return 4===t.i?e(t):r(t)}})}(),window.ftReduxStores||(window.ftReduxStores={});class Ar{static get(t){var o;const e="string"==typeof t?t:t.name,r="string"==typeof t?void 0:t,n=window.ftReduxStores[e];if(Zo(n))return n;if(null==r)return;const i=Er({...r,reducers:null!==(o=r.reducers)&&void 0!==o?o:{}}),a=Nr({reducer:(t,o)=>{var e;switch(o.type){case"CLEAR_FT_REDUX_STORE":return i.getInitialState();case"DEFAULT_STATE_FIELDS_VALUES_SETTER":return{...t,...null!==(e=o.overwrites)&&void 0!==e?e:{}};default:return i.reducer(t,o)}}});return window.ftReduxStores[r.name]=new Ar(i,a)}constructor(t,o){this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new Fo,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,o,e)=>{const r=o,n=t[r];return n?(...t)=>{const o=n(...t);return this.reduxStore.dispatch(o),o}:t=>{this.setState({[r]:t})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_STATE_FIELDS_VALUES_SETTER",overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}navigator.vendor&&navigator.vendor.match(/apple/i)||(null===($r=null===(kr=window.safari)||void 0===kr?void 0:kr.pushNotification)||void 0===$r||$r.toString());const jr=Ot``;var Fr;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"}(Fr||(Fr={}));var Zr=function(t,o,e,r){for(var n,i=arguments.length,a=i<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(n=t[s])&&(a=(i<3?n(a):i>3?n(o,e,a):n(o,e))||a);return i>3&&a&&Object.defineProperty(o,e,a),a};class Pr extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const Mr=Symbol("registerInterval");class zr extends(function(t){var o;class e extends t{constructor(){super(...arguments),this[o]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[Mr]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[Mr]):this.dispatchEvent(new Pr)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return o=Mr,Zr([U()],e.prototype,"stateManager",void 0),e}(To)){}
|
|
105
|
+
`;class Ao{constructor(t,o){this.defaultLabels=t,this.labels=o}resolve(t,...o){var e,r;t=this.resolvePluralKey(t,o);let n=null!==(r=null!==(e=this.labels[t])&&void 0!==e?e:this.defaultLabels[t])&&void 0!==r?r:"";return o.forEach(((t,o)=>n=n.replace(new RegExp(`\\{${o}([^}]*)\\}`,"g"),((o,e)=>this.formatValue(t,e))))),n}resolvePluralKey(t,o){for(let e of o)if("number"==typeof e){const o=`${String(t)}[\\=${e}]`;if(o in this.labels||o in this.defaultLabels)return o}return t}formatValue(t,o){return t instanceof Date?this.formatDate(t,o):null!=t?t:""}formatDate(t,o){const e=e=>(null==o?void 0:o.includes("date"))?t.toLocaleDateString(e):(null==o?void 0:o.includes("time"))?t.toLocaleTimeString(e):t.toLocaleString(e);try{return e(document.documentElement.lang)}catch(t){return e()}}}const jo=t=>{const o=null!=t?t:{};return(t,e)=>{var r;const n={hasChanged:(t,o)=>!L(t,o),attribute:!1,...o};R(n)(t,e);const i=t.constructor;i.reduxProperties=new Map(i.reduxProperties),i.reduxProperties.set(e,{selector:null!==(r=o.selector)&&void 0!==r?r:t=>t[e],store:o.store})}};class Fo{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter((o=>o.type!==t.type))),this.queue.push(t)}consume(t){const o=this.queue.find((o=>o.type===t));return o&&(this.queue=this.queue.filter((t=>t!==o))),o}}function Mo(t){var o;return null!==(o=null==t?void 0:t.isFtReduxStore)&&void 0!==o&&o}var Zo,Po,zo;const Do=Symbol("internalReduxEventsUnsubscribers"),Bo=Symbol("internalStoresUnsubscribers"),_o=Symbol("internalStores");class To extends $o{constructor(){super(...arguments),this[Zo]=new Map,this[Po]=new Map,this[zo]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some((o=>t.has(o)))&&this.updateFromStores()}getUnnamedStore(){if(this[_o].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[_o].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[_o].get(t)}addStore(t,o){var e;o=null!==(e=null!=o?o:Mo(t)?t.name:void 0)&&void 0!==e?e:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,t)}removeStore(t){const o="string"==typeof t?t:t.name;this.unsubscribeFromStore(o),this[_o].delete(o)}setupStore(t,o){this[_o].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[_o].forEach(((t,o)=>this.subscribeToStore(o,t))),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach(((t,o)=>{const e=this.constructor.getPropertyOptions(o);if(!(null==e?void 0:e.attribute)||!this.hasAttribute("string"==typeof(null==e?void 0:e.attribute)?e.attribute:o)){const e=this.getStore(t.store);e&&(t.store?this[Bo].has(t.store):this[Bo].size>0)&&(this[o]=t.selector(e.getState(),this))}}))}subscribeToStore(t,o){var e;this[Bo].set(t,o.subscribe((()=>this.updateFromStores()))),Mo(o)&&o.eventBus&&(null===(e=this.reduxConstructor.reduxEventListeners)||void 0===e||e.forEach(((t,e)=>{if("function"==typeof this[e]&&(!t.store||o.name===t.store)){const r=t=>this[e](t);o.eventBus.addEventListener(t.eventName,r),this[Do].push((()=>o.eventBus.removeEventListener(t.eventName,r)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Bo].forEach(((t,o)=>this.unsubscribeFromStore(o))),this[Do].forEach((t=>t())),this[Do]=[]}unsubscribeFromStore(t){this[Bo].has(t)&&this[Bo].get(t)(),this[Bo].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}function Ho(t){for(var o=arguments.length,e=Array(o>1?o-1:0),r=1;r<o;r++)e[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(e.length?" "+e.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Go(t){return!!t&&!!t[$e]}function qo(t){var o;return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var o=Object.getPrototypeOf(t);if(null===o)return!0;var e=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return e===Object||"function"==typeof e&&Function.toString.call(e)===Ke}(t)||Array.isArray(t)||!!t[ke]||!!(null===(o=t.constructor)||void 0===o?void 0:o[ke])||te(t)||oe(t))}function Vo(t,o,e){void 0===e&&(e=!1),0===Yo(t)?(e?Object.keys:Ae)(t).forEach((function(r){e&&"symbol"==typeof r||o(r,t[r],t)})):t.forEach((function(e,r){return o(r,e,t)}))}function Yo(t){var o=t[$e];return o?o.i>3?o.i-4:o.i:Array.isArray(t)?1:te(t)?2:oe(t)?3:0}function Jo(t,o){return 2===Yo(t)?t.has(o):Object.prototype.hasOwnProperty.call(t,o)}function Xo(t,o,e){var r=Yo(t);2===r?t.set(o,e):3===r?t.add(e):t[o]=e}function Qo(t,o){return t===o?0!==t||1/t==1/o:t!=t&&o!=o}function te(t){return Ue&&t instanceof Map}function oe(t){return Ie&&t instanceof Set}function ee(t){return t.o||t.t}function re(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var o=je(t);delete o[$e];for(var e=Ae(o),r=0;r<e.length;r++){var n=e[r],i=o[n];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(o[n]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[n]})}return Object.create(Object.getPrototypeOf(t),o)}function ne(t,o){return void 0===o&&(o=!1),ae(t)||Go(t)||!qo(t)||(Yo(t)>1&&(t.set=t.add=t.clear=t.delete=ie),Object.freeze(t),o&&Vo(t,(function(t,o){return ne(o,!0)}),!0)),t}function ie(){Ho(2)}function ae(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function se(t){var o=Fe[t];return o||Ho(18,t),o}function ce(){return Ee}function le(t,o){o&&(se("Patches"),t.u=[],t.s=[],t.v=o)}function fe(t){he(t),t.p.forEach(ue),t.p=null}function he(t){t===Ee&&(Ee=t.l)}function pe(t){return Ee={p:[],l:Ee,h:t,m:!0,_:0}}function ue(t){var o=t[$e];0===o.i||1===o.i?o.j():o.g=!0}function de(t,o){o._=o.p.length;var e=o.p[0],r=void 0!==t&&t!==e;return o.h.O||se("ES5").S(o,t,r),r?(e[$e].P&&(fe(o),Ho(4)),qo(t)&&(t=ye(o,t),o.l||be(o,t)),o.u&&se("Patches").M(e[$e].t,t,o.u,o.s)):t=ye(o,e,[]),fe(o),o.u&&o.v(o.u,o.s),t!==We?t:void 0}function ye(t,o,e){if(ae(o))return o;var r=o[$e];if(!r)return Vo(o,(function(n,i){return ge(t,r,o,n,i,e)}),!0),o;if(r.A!==t)return o;if(!r.P)return be(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var n=4===r.i||5===r.i?r.o=re(r.k):r.o,i=n,a=!1;3===r.i&&(i=new Set(n),n.clear(),a=!0),Vo(i,(function(o,i){return ge(t,r,n,o,i,e,a)})),be(t,n,!1),e&&t.u&&se("Patches").N(r,e,t.u,t.s)}return r.o}function ge(t,o,e,r,n,i,a){if(Go(n)){var s=ye(t,n,i&&o&&3!==o.i&&!Jo(o.R,r)?i.concat(r):void 0);if(Xo(e,r,s),!Go(s))return;t.m=!1}else a&&e.add(n);if(qo(n)&&!ae(n)){if(!t.h.D&&t._<1)return;ye(t,n),o&&o.A.l||be(t,n)}}function be(t,o,e){void 0===e&&(e=!1),!t.l&&t.h.D&&t.m&&ne(o,e)}function me(t,o){var e=t[$e];return(e?ee(e):t)[o]}function Oe(t,o){if(o in t)for(var e=Object.getPrototypeOf(t);e;){var r=Object.getOwnPropertyDescriptor(e,o);if(r)return r;e=Object.getPrototypeOf(e)}}function ve(t){t.P||(t.P=!0,t.l&&ve(t.l))}function Se(t){t.o||(t.o=re(t.t))}function we(t,o,e){var r=te(o)?se("MapSet").F(o,e):oe(o)?se("MapSet").T(o,e):t.O?function(t,o){var e=Array.isArray(t),r={i:e?1:0,A:o?o.A:ce(),P:!1,I:!1,R:{},l:o,t,k:null,o:null,j:null,C:!1},n=r,i=Me;e&&(n=[r],i=Ze);var a=Proxy.revocable(n,i),s=a.revoke,c=a.proxy;return r.k=c,r.j=s,c}(o,e):se("ES5").J(o,e);return(e?e.A:ce()).p.push(r),r}function Ne(t){return Go(t)||Ho(22,t),function t(o){if(!qo(o))return o;var e,r=o[$e],n=Yo(o);if(r){if(!r.P&&(r.i<4||!se("ES5").K(r)))return r.t;r.I=!0,e=xe(o,n),r.I=!1}else e=xe(o,n);return Vo(e,(function(o,n){r&&function(t,o){return 2===Yo(t)?t.get(o):t[o]}(r.t,o)===n||Xo(e,o,t(n))})),3===n?new Set(e):e}(t)}function xe(t,o){switch(o){case 2:return new Map(t);case 3:return Array.from(t)}return re(t)}Zo=Bo,Po=_o,zo=Do,To.reduxProperties=new Map,To.reduxReactiveProperties=new Set,To.reduxEventListeners=new Map;var Ce,Ee,Re="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Ue="undefined"!=typeof Map,Ie="undefined"!=typeof Set,Le="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,We=Re?Symbol.for("immer-nothing"):((Ce={})["immer-nothing"]=!0,Ce),ke=Re?Symbol.for("immer-draftable"):"__$immer_draftable",$e=Re?Symbol.for("immer-state"):"__$immer_state",Ke=""+Object.prototype.constructor,Ae="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,je=Object.getOwnPropertyDescriptors||function(t){var o={};return Ae(t).forEach((function(e){o[e]=Object.getOwnPropertyDescriptor(t,e)})),o},Fe={},Me={get:function(t,o){if(o===$e)return t;var e=ee(t);if(!Jo(e,o))return function(t,o,e){var r,n=Oe(o,e);return n?"value"in n?n.value:null===(r=n.get)||void 0===r?void 0:r.call(t.k):void 0}(t,e,o);var r=e[o];return t.I||!qo(r)?r:r===me(t.t,o)?(Se(t),t.o[o]=we(t.A.h,r,t)):r},has:function(t,o){return o in ee(t)},ownKeys:function(t){return Reflect.ownKeys(ee(t))},set:function(t,o,e){var r=Oe(ee(t),o);if(null==r?void 0:r.set)return r.set.call(t.k,e),!0;if(!t.P){var n=me(ee(t),o),i=null==n?void 0:n[$e];if(i&&i.t===e)return t.o[o]=e,t.R[o]=!1,!0;if(Qo(e,n)&&(void 0!==e||Jo(t.t,o)))return!0;Se(t),ve(t)}return t.o[o]===e&&(void 0!==e||o in t.o)||Number.isNaN(e)&&Number.isNaN(t.o[o])||(t.o[o]=e,t.R[o]=!0),!0},deleteProperty:function(t,o){return void 0!==me(t.t,o)||o in t.t?(t.R[o]=!1,Se(t),ve(t)):delete t.R[o],t.o&&delete t.o[o],!0},getOwnPropertyDescriptor:function(t,o){var e=ee(t),r=Reflect.getOwnPropertyDescriptor(e,o);return r?{writable:!0,configurable:1!==t.i||"length"!==o,enumerable:r.enumerable,value:e[o]}:r},defineProperty:function(){Ho(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ho(12)}},Ze={};Vo(Me,(function(t,o){Ze[t]=function(){return arguments[0]=arguments[0][0],o.apply(this,arguments)}})),Ze.deleteProperty=function(t,o){return Ze.set.call(this,t,o,void 0)},Ze.set=function(t,o,e){return Me.set.call(this,t[0],o,e,t[0])};var Pe=function(){function t(t){var o=this;this.O=Le,this.D=!0,this.produce=function(t,e,r){if("function"==typeof t&&"function"!=typeof e){var n=e;e=t;var i=o;return function(t){var o=this;void 0===t&&(t=n);for(var r=arguments.length,a=Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return i.produce(t,(function(t){var r;return(r=e).call.apply(r,[o,t].concat(a))}))}}var a;if("function"!=typeof e&&Ho(6),void 0!==r&&"function"!=typeof r&&Ho(7),qo(t)){var s=pe(o),c=we(o,t,void 0),l=!0;try{a=e(c),l=!1}finally{l?fe(s):he(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(t){return le(s,r),de(t,s)}),(function(t){throw fe(s),t})):(le(s,r),de(a,s))}if(!t||"object"!=typeof t){if(void 0===(a=e(t))&&(a=t),a===We&&(a=void 0),o.D&&ne(a,!0),r){var f=[],h=[];se("Patches").M(t,a,f,h),r(f,h)}return a}Ho(21,t)},this.produceWithPatches=function(t,e){if("function"==typeof t)return function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return o.produceWithPatches(e,(function(o){return t.apply(void 0,[o].concat(n))}))};var r,n,i=o.produce(t,e,(function(t,o){r=t,n=o}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(t){return[t,r,n]})):[i,r,n]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var o=t.prototype;return o.createDraft=function(t){qo(t)||Ho(8),Go(t)&&(t=Ne(t));var o=pe(this),e=we(this,t,void 0);return e[$e].C=!0,he(o),e},o.finishDraft=function(t,o){var e=(t&&t[$e]).A;return le(e,o),de(void 0,e)},o.setAutoFreeze=function(t){this.D=t},o.setUseProxies=function(t){t&&!Le&&Ho(20),this.O=t},o.applyPatches=function(t,o){var e;for(e=o.length-1;e>=0;e--){var r=o[e];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}e>-1&&(o=o.slice(e+1));var n=se("Patches").$;return Go(t)?n(t,o):this.produce(t,(function(t){return n(t,o)}))},t}(),ze=new Pe,De=ze.produce;function Be(t){return Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Be(t)}function _e(t){var o=function(t,o){if("object"!==Be(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,o||"default");if("object"!==Be(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(t,"string");return"symbol"===Be(o)?o:String(o)}function Te(t,o,e){return(o=_e(o))in t?Object.defineProperty(t,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[o]=e,t}function He(t,o){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),e.push.apply(e,r)}return e}function Ge(t){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?He(Object(e),!0).forEach((function(o){Te(t,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):He(Object(e)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))}))}return t}function qe(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}ze.produceWithPatches.bind(ze),ze.setAutoFreeze.bind(ze),ze.setUseProxies.bind(ze),ze.applyPatches.bind(ze),ze.createDraft.bind(ze),ze.finishDraft.bind(ze);var Ve="function"==typeof Symbol&&Symbol.observable||"@@observable",Ye=function(){return Math.random().toString(36).substring(7).split("").join(".")},Je={INIT:"@@redux/INIT"+Ye(),REPLACE:"@@redux/REPLACE"+Ye(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ye()}};function Xe(t,o,e){var r;if("function"==typeof o&&"function"==typeof e||"function"==typeof e&&"function"==typeof arguments[3])throw new Error(qe(0));if("function"==typeof o&&void 0===e&&(e=o,o=void 0),void 0!==e){if("function"!=typeof e)throw new Error(qe(1));return e(Xe)(t,o)}if("function"!=typeof t)throw new Error(qe(2));var n=t,i=o,a=[],s=a,c=!1;function l(){s===a&&(s=a.slice())}function f(){if(c)throw new Error(qe(3));return i}function h(t){if("function"!=typeof t)throw new Error(qe(4));if(c)throw new Error(qe(5));var o=!0;return l(),s.push(t),function(){if(o){if(c)throw new Error(qe(6));o=!1,l();var e=s.indexOf(t);s.splice(e,1),a=null}}}function p(t){if(!function(t){if("object"!=typeof t||null===t)return!1;for(var o=t;null!==Object.getPrototypeOf(o);)o=Object.getPrototypeOf(o);return Object.getPrototypeOf(t)===o}(t))throw new Error(qe(7));if(void 0===t.type)throw new Error(qe(8));if(c)throw new Error(qe(9));try{c=!0,i=n(i,t)}finally{c=!1}for(var o=a=s,e=0;e<o.length;e++){(0,o[e])()}return t}return p({type:Je.INIT}),(r={dispatch:p,subscribe:h,getState:f,replaceReducer:function(t){if("function"!=typeof t)throw new Error(qe(10));n=t,p({type:Je.REPLACE})}})[Ve]=function(){var t,o=h;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(qe(11));function e(){t.next&&t.next(f())}return e(),{unsubscribe:o(e)}}})[Ve]=function(){return this},t},r}function Qe(t){for(var o=Object.keys(t),e={},r=0;r<o.length;r++){var n=o[r];"function"==typeof t[n]&&(e[n]=t[n])}var i,a=Object.keys(e);try{!function(t){Object.keys(t).forEach((function(o){var e=t[o];if(void 0===e(void 0,{type:Je.INIT}))throw new Error(qe(12));if(void 0===e(void 0,{type:Je.PROBE_UNKNOWN_ACTION()}))throw new Error(qe(13))}))}(e)}catch(t){i=t}return function(t,o){if(void 0===t&&(t={}),i)throw i;for(var r=!1,n={},s=0;s<a.length;s++){var c=a[s],l=e[c],f=t[c],h=l(f,o);if(void 0===h)throw o&&o.type,new Error(qe(14));n[c]=h,r=r||h!==f}return(r=r||a.length!==Object.keys(t).length)?n:t}}function tr(){for(var t=arguments.length,o=new Array(t),e=0;e<t;e++)o[e]=arguments[e];return 0===o.length?function(t){return t}:1===o.length?o[0]:o.reduce((function(t,o){return function(){return t(o.apply(void 0,arguments))}}))}function or(){for(var t=arguments.length,o=new Array(t),e=0;e<t;e++)o[e]=arguments[e];return function(t){return function(){var e=t.apply(void 0,arguments),r=function(){throw new Error(qe(15))},n={getState:e.getState,dispatch:function(){return r.apply(void 0,arguments)}},i=o.map((function(t){return t(n)}));return r=tr.apply(void 0,i)(e.dispatch),Ge(Ge({},e),{},{dispatch:r})}}}function er(t){return function(o){var e=o.dispatch,r=o.getState;return function(o){return function(n){return"function"==typeof n?n(e,r,t):o(n)}}}}var rr=er();rr.withExtraArgument=er;var nr,ir=rr,ar=(nr=function(t,o){return nr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])},nr(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function e(){this.constructor=t}nr(t,o),t.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}),sr=function(t,o){var e,r,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[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(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(n=2&i[0]?r.return:i[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,i[1])).done)return n;switch(r=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=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(!(n=a.trys,(n=n.length>0&&n[n.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=o.call(t,a)}catch(t){i=[6,t],r=0}finally{e=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},cr=function(t,o){for(var e=0,r=o.length,n=t.length;e<r;e++,n++)t[n]=o[e];return t},lr=Object.defineProperty,fr=Object.defineProperties,hr=Object.getOwnPropertyDescriptors,pr=Object.getOwnPropertySymbols,ur=Object.prototype.hasOwnProperty,dr=Object.prototype.propertyIsEnumerable,yr=function(t,o,e){return o in t?lr(t,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[o]=e},gr=function(t,o){for(var e in o||(o={}))ur.call(o,e)&&yr(t,e,o[e]);if(pr)for(var r=0,n=pr(o);r<n.length;r++){e=n[r];dr.call(o,e)&&yr(t,e,o[e])}return t},br=function(t,o){return fr(t,hr(o))},mr="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?tr:tr.apply(null,arguments)};var Or=function(t){function o(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,e)||this;return Object.setPrototypeOf(n,o.prototype),n}return ar(o,t),Object.defineProperty(o,Symbol.species,{get:function(){return o},enumerable:!1,configurable:!0}),o.prototype.concat=function(){for(var o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];return t.prototype.concat.apply(this,o)},o.prototype.prepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&Array.isArray(t[0])?new(o.bind.apply(o,cr([void 0],t[0].concat(this)))):new(o.bind.apply(o,cr([void 0],t.concat(this))))},o}(Array),vr=function(t){function o(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,e)||this;return Object.setPrototypeOf(n,o.prototype),n}return ar(o,t),Object.defineProperty(o,Symbol.species,{get:function(){return o},enumerable:!1,configurable:!0}),o.prototype.concat=function(){for(var o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];return t.prototype.concat.apply(this,o)},o.prototype.prepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&Array.isArray(t[0])?new(o.bind.apply(o,cr([void 0],t[0].concat(this)))):new(o.bind.apply(o,cr([void 0],t.concat(this))))},o}(Array);function Sr(t){return qo(t)?De(t,(function(){})):t}function wr(){return function(t){return function(t){void 0===t&&(t={});var o=t.thunk,e=void 0===o||o;t.immutableCheck,t.serializableCheck;var r=new Or;e&&(!function(t){return"boolean"==typeof t}(e)?r.push(ir.withExtraArgument(e.extraArgument)):r.push(ir));return r}(t)}}function Nr(t){var o,e=wr(),r=t||{},n=r.reducer,i=void 0===n?void 0:n,a=r.middleware,s=void 0===a?e():a,c=r.devTools,l=void 0===c||c,f=r.preloadedState,h=void 0===f?void 0:f,p=r.enhancers,u=void 0===p?void 0:p;if("function"==typeof i)o=i;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var o=Object.getPrototypeOf(t);if(null===o)return!0;for(var e=o;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return o===e}(i))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');o=Qe(i)}var d=s;"function"==typeof d&&(d=d(e));var y=or.apply(void 0,d),g=tr;l&&(g=mr(gr({trace:!1},"object"==typeof l&&l)));var b=new vr(y),m=b;return Array.isArray(u)?m=cr([y],u):"function"==typeof u&&(m=u(b)),Xe(o,h,g.apply(void 0,m))}function xr(t,o){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(o){var n=o.apply(void 0,e);if(!n)throw new Error("prepareAction did not return an object");return gr(gr({type:t,payload:n.payload},"meta"in n&&{meta:n.meta}),"error"in n&&{error:n.error})}return{type:t,payload:e[0]}}return e.toString=function(){return""+t},e.type=t,e.match=function(o){return o.type===t},e}function Cr(t){var o,e={},r=[],n={addCase:function(t,o){var r="string"==typeof t?t:t.type;if(r in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[r]=o,n},addMatcher:function(t,o){return r.push({matcher:t,reducer:o}),n},addDefaultCase:function(t){return o=t,n}};return t(n),[e,r,o]}function Er(t){var o=t.name;if(!o)throw new Error("`name` is a required option for createSlice");var e,r="function"==typeof t.initialState?t.initialState:Sr(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};function l(){var o="function"==typeof t.extraReducers?Cr(t.extraReducers):[t.extraReducers],e=o[0],n=void 0===e?{}:e,i=o[1],a=void 0===i?[]:i,c=o[2],l=void 0===c?void 0:c,f=gr(gr({},n),s);return function(t,o,e,r){void 0===e&&(e=[]);var n,i="function"==typeof o?Cr(o):[o,e,r],a=i[0],s=i[1],c=i[2];if(function(t){return"function"==typeof t}(t))n=function(){return Sr(t())};else{var l=Sr(t);n=function(){return l}}function f(t,o){void 0===t&&(t=n());var e=cr([a[o.type]],s.filter((function(t){return(0,t.matcher)(o)})).map((function(t){return t.reducer})));return 0===e.filter((function(t){return!!t})).length&&(e=[c]),e.reduce((function(t,e){if(e){var r;if(Go(t))return void 0===(r=e(t,o))?t:r;if(qo(t))return De(t,(function(t){return e(t,o)}));if(void 0===(r=e(t,o))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return t}),t)}return f.getInitialState=n,f}(r,(function(t){for(var o in f)t.addCase(o,f[o]);for(var e=0,r=a;e<r.length;e++){var n=r[e];t.addMatcher(n.matcher,n.reducer)}l&&t.addDefaultCase(l)}))}return i.forEach((function(t){var e,r,i=n[t],l=o+"/"+t;"reducer"in i?(e=i.reducer,r=i.prepare):e=i,a[t]=e,s[l]=e,c[t]=r?xr(l,r):xr(l)})),{name:o,reducer:function(t,o){return e||(e=l()),e(t,o)},actions:c,caseReducers:a,getInitialState:function(){return e||(e=l()),e.getInitialState()}}}var Rr=["name","message","stack","code"],Ur=function(t,o){this.payload=t,this.meta=o},Ir=function(t,o){this.payload=t,this.meta=o},Lr=function(t){if("object"==typeof t&&null!==t){for(var o={},e=0,r=Rr;e<r.length;e++){var n=r[e];"string"==typeof t[n]&&(o[n]=t[n])}return o}return{message:String(t)}};function Wr(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,o,e){var r=xr(t+"/fulfilled",(function(t,o,e,r){return{payload:t,meta:br(gr({},r||{}),{arg:e,requestId:o,requestStatus:"fulfilled"})}})),n=xr(t+"/pending",(function(t,o,e){return{payload:void 0,meta:br(gr({},e||{}),{arg:o,requestId:t,requestStatus:"pending"})}})),i=xr(t+"/rejected",(function(t,o,r,n,i){return{payload:n,error:(e&&e.serializeError||Lr)(t||"Rejected"),meta:br(gr({},i||{}),{arg:r,requestId:o,rejectedWithValue:!!n,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),a="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(s,c,l){var f,h=(null==e?void 0:e.idGenerator)?e.idGenerator(t):function(t){void 0===t&&(t=21);for(var o="",e=t;e--;)o+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return o}(),p=new a;function u(t){f=t,p.abort()}var d=function(){return a=this,d=null,y=function(){var a,d,y,g,b,m;return sr(this,(function(O){switch(O.label){case 0:return O.trys.push([0,4,,5]),g=null==(a=null==e?void 0:e.condition)?void 0:a.call(e,t,{getState:c,extra:l}),null===(v=g)||"object"!=typeof v||"function"!=typeof v.then?[3,2]:[4,g];case 1:g=O.sent(),O.label=2;case 2:if(!1===g||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=new Promise((function(t,o){return p.signal.addEventListener("abort",(function(){return o({name:"AbortError",message:f||"Aborted"})}))})),s(n(h,t,null==(d=null==e?void 0:e.getPendingMeta)?void 0:d.call(e,{requestId:h,arg:t},{getState:c,extra:l}))),[4,Promise.race([b,Promise.resolve(o(t,{dispatch:s,getState:c,extra:l,requestId:h,signal:p.signal,abort:u,rejectWithValue:function(t,o){return new Ur(t,o)},fulfillWithValue:function(t,o){return new Ir(t,o)}})).then((function(o){if(o instanceof Ur)throw o;return o instanceof Ir?r(o.payload,h,t,o.meta):r(o,h,t)}))])];case 3:return y=O.sent(),[3,5];case 4:return m=O.sent(),y=m instanceof Ur?i(null,h,t,m.payload,m.meta):i(m,h,t),[3,5];case 5:return e&&!e.dispatchConditionRejection&&i.match(y)&&y.meta.condition||s(y),[2,y]}var v}))},new Promise((function(t,o){var e=function(t){try{n(y.next(t))}catch(t){o(t)}},r=function(t){try{n(y.throw(t))}catch(t){o(t)}},n=function(o){return o.done?t(o.value):Promise.resolve(o.value).then(e,r)};n((y=y.apply(a,d)).next())}));var a,d,y}();return Object.assign(d,{abort:u,requestId:h,arg:t,unwrap:function(){return d.then(Wr)}})}}),{pending:n,rejected:i,fulfilled:r,typePrefix:t})}t.withTypes=function(){return t}}();var kr,$r,Kr="listenerMiddleware";xr(Kr+"/add"),xr(Kr+"/removeAll"),xr(Kr+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,o){var e=n[t];return e?e.enumerable=o:n[t]=e={configurable:!0,enumerable:o,get:function(){var o=this[$e];return Me.get(o,t)},set:function(o){var e=this[$e];Me.set(e,t,o)}},e}function o(t){for(var o=t.length-1;o>=0;o--){var n=t[o][$e];if(!n.P)switch(n.i){case 5:r(n)&&ve(n);break;case 4:e(n)&&ve(n)}}}function e(t){for(var o=t.t,e=t.k,r=Ae(e),n=r.length-1;n>=0;n--){var i=r[n];if(i!==$e){var a=o[i];if(void 0===a&&!Jo(o,i))return!0;var s=e[i],c=s&&s[$e];if(c?c.t!==a:!Qo(s,a))return!0}}var l=!!o[$e];return r.length!==Ae(o).length+(l?0:1)}function r(t){var o=t.k;if(o.length!==t.t.length)return!0;var e=Object.getOwnPropertyDescriptor(o,o.length-1);if(e&&!e.get)return!0;for(var r=0;r<o.length;r++)if(!o.hasOwnProperty(r))return!0;return!1}var n={};!function(t,o){Fe[t]||(Fe[t]=o)}("ES5",{J:function(o,e){var r=Array.isArray(o),n=function(o,e){if(o){for(var r=Array(e.length),n=0;n<e.length;n++)Object.defineProperty(r,""+n,t(n,!0));return r}var i=je(e);delete i[$e];for(var a=Ae(i),s=0;s<a.length;s++){var c=a[s];i[c]=t(c,o||!!i[c].enumerable)}return Object.create(Object.getPrototypeOf(e),i)}(r,o),i={i:r?5:4,A:e?e.A:ce(),P:!1,I:!1,R:{},l:e,t:o,k:n,o:null,g:!1,C:!1};return Object.defineProperty(n,$e,{value:i,writable:!0}),n},S:function(t,e,n){n?Go(e)&&e[$e].A===t&&o(t.p):(t.u&&function t(o){if(o&&"object"==typeof o){var e=o[$e];if(e){var n=e.t,i=e.k,a=e.R,s=e.i;if(4===s)Vo(i,(function(o){o!==$e&&(void 0!==n[o]||Jo(n,o)?a[o]||t(i[o]):(a[o]=!0,ve(e)))})),Vo(n,(function(t){void 0!==i[t]||Jo(i,t)||(a[t]=!1,ve(e))}));else if(5===s){if(r(e)&&(ve(e),a.length=!0),i.length<n.length)for(var c=i.length;c<n.length;c++)a[c]=!1;else for(var l=n.length;l<i.length;l++)a[l]=!0;for(var f=Math.min(i.length,n.length),h=0;h<f;h++)i.hasOwnProperty(h)||(a[h]=!0),void 0===a[h]&&t(i[h])}}}}(t.p[0]),o(t.p))},K:function(t){return 4===t.i?e(t):r(t)}})}(),window.ftReduxStores||(window.ftReduxStores={});class Ar{static get(t){var o;const e="string"==typeof t?t:t.name,r="string"==typeof t?void 0:t,n=window.ftReduxStores[e];if(Mo(n))return n;if(null==r)return;const i=Er({...r,reducers:null!==(o=r.reducers)&&void 0!==o?o:{}}),a=Nr({reducer:(t,o)=>{var e;switch(o.type){case"CLEAR_FT_REDUX_STORE":return i.getInitialState();case"DEFAULT_STATE_FIELDS_VALUES_SETTER":return{...t,...null!==(e=o.overwrites)&&void 0!==e?e:{}};default:return i.reducer(t,o)}}});return window.ftReduxStores[r.name]=new Ar(i,a)}constructor(t,o){this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new Fo,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,o,e)=>{const r=o,n=t[r];return n?(...t)=>{const o=n(...t);return this.reduxStore.dispatch(o),o}:t=>{this.setState({[r]:t})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_STATE_FIELDS_VALUES_SETTER",overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}navigator.vendor&&navigator.vendor.match(/apple/i)||(null===($r=null===(kr=window.safari)||void 0===kr?void 0:kr.pushNotification)||void 0===$r||$r.toString());const jr=Ot``;var Fr;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"}(Fr||(Fr={}));var Mr=function(t,o,e,r){for(var n,i=arguments.length,a=i<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(n=t[s])&&(a=(i<3?n(a):i>3?n(o,e,a):n(o,e))||a);return i>3&&a&&Object.defineProperty(o,e,a),a};class Zr extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const Pr=Symbol("registerInterval");class zr extends(function(t){var o;class e extends t{constructor(){super(...arguments),this[o]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[Pr]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[Pr]):this.dispatchEvent(new Zr)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return o=Pr,Mr([U()],e.prototype,"stateManager",void 0),e}(To)){}
|
|
106
106
|
/**
|
|
107
107
|
* @license
|
|
108
108
|
* Copyright 2020 Google LLC
|
|
109
109
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
110
|
-
*/const Dr=Symbol.for(""),Br=t=>{if(t?.r===Dr)return t?._$litStatic$},_r=t=>({_$litStatic$:t,r:Dr}),Tr=new Map,Hr=(t=>(o,...e)=>{const r=e.length;let n,i;const a=[],s=[];let c,l=0,f=!1;for(;l<r;){for(c=o[l];l<r&&void 0!==(i=e[l],n=Br(i));)c+=n+o[++l],f=!0;l!==r&&s.push(i),a.push(c),l++}if(l===r&&a.push(o[r]),f){const t=a.join("$$lit$$");void 0===(o=Tr.get(t))&&(a.raw=a,Tr.set(t,o=a)),e=s}return t(o,...e)})(X);var Gr;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button",t.display="display",t.title1="title-1",t.title2="title-2",t.title3="title-3",t.body1regular="body-1-regular",t.body1medium="body-1-medium",t.body1semibold="body-1-semibold",t.body2regular="body-2-regular",t.body2medium="body-2-medium",t.body2semibold="body-2-semibold",t.label1medium="label-1-medium",t.label1semibold="label-1-semibold",t.label1bold="label-1-bold",t.label2medium="label-2-medium",t.label2semibold="label-2-semibold",t.label2bold="label-2-bold",t.caption1medium="caption-1-medium",t.caption1semibold="caption-1-semibold",t.caption1bold="caption-1-bold",t.caption2medium="caption-2-medium",t.caption2semibold="caption-2-semibold",t.caption2bold="caption-2-bold"}(Gr||(Gr={}));const qr=vo.extend("--ft-typography-font-family","",xo.titleFont),Vr=vo.extend("--ft-typography-font-family","",xo.contentFont),Yr={fontFamily:Vr,fontSize:vo.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:vo.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:vo.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:vo.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:vo.create("--ft-typography-text-transform","","UNKNOWN","inherit")},Jr=vo.extend("--ft-typography-title-font-family","",qr),Xr=vo.extend("--ft-typography-title-font-size","",Yr.fontSize,"20px"),Qr=vo.extend("--ft-typography-title-font-weight","",Yr.fontWeight,"normal"),tn=vo.extend("--ft-typography-title-letter-spacing","",Yr.letterSpacing,"0.15px"),on=vo.extend("--ft-typography-title-line-height","",Yr.lineHeight,"1.2"),en=vo.extend("--ft-typography-title-text-transform","",Yr.textTransform,"inherit"),rn=vo.extend("--ft-typography-title-dense-font-family","",qr),nn=vo.extend("--ft-typography-title-dense-font-size","",Yr.fontSize,"14px"),an=vo.extend("--ft-typography-title-dense-font-weight","",Yr.fontWeight,"normal"),sn=vo.extend("--ft-typography-title-dense-letter-spacing","",Yr.letterSpacing,"0.105px"),cn=vo.extend("--ft-typography-title-dense-line-height","",Yr.lineHeight,"1.7"),ln=vo.extend("--ft-typography-title-dense-text-transform","",Yr.textTransform,"inherit"),fn=vo.extend("--ft-typography-subtitle1-font-family","",Vr),hn=vo.extend("--ft-typography-subtitle1-font-size","",Yr.fontSize,"16px"),pn=vo.extend("--ft-typography-subtitle1-font-weight","",Yr.fontWeight,"600"),un=vo.extend("--ft-typography-subtitle1-letter-spacing","",Yr.letterSpacing,"0.144px"),dn=vo.extend("--ft-typography-subtitle1-line-height","",Yr.lineHeight,"1.5"),yn=vo.extend("--ft-typography-subtitle1-text-transform","",Yr.textTransform,"inherit"),gn=vo.extend("--ft-typography-subtitle2-font-family","",Vr),bn=vo.extend("--ft-typography-subtitle2-font-size","",Yr.fontSize,"14px"),mn=vo.extend("--ft-typography-subtitle2-font-weight","",Yr.fontWeight,"normal"),On=vo.extend("--ft-typography-subtitle2-letter-spacing","",Yr.letterSpacing,"0.098px"),vn=vo.extend("--ft-typography-subtitle2-line-height","",Yr.lineHeight,"1.7"),Sn=vo.extend("--ft-typography-subtitle2-text-transform","",Yr.textTransform,"inherit"),wn=vo.extend("--ft-typography-body1-font-family","",Vr),Nn=vo.extend("--ft-typography-body1-font-size","",Yr.fontSize,"16px"),xn=vo.extend("--ft-typography-body1-font-weight","",Yr.fontWeight,"normal"),Cn=vo.extend("--ft-typography-body1-letter-spacing","",Yr.letterSpacing,"0.496px"),En=vo.extend("--ft-typography-body1-line-height","",Yr.lineHeight,"1.5"),Rn=vo.extend("--ft-typography-body1-text-transform","",Yr.textTransform,"inherit"),Un=vo.extend("--ft-typography-body2-font-family","",Vr),In=vo.extend("--ft-typography-body2-font-size","",Yr.fontSize,"14px"),Ln=vo.extend("--ft-typography-body2-font-weight","",Yr.fontWeight,"normal"),Wn=vo.extend("--ft-typography-body2-letter-spacing","",Yr.letterSpacing,"0.252px"),kn=vo.extend("--ft-typography-body2-line-height","",Yr.lineHeight,"1.4"),$n=vo.extend("--ft-typography-body2-text-transform","",Yr.textTransform,"inherit"),Kn=vo.extend("--ft-typography-caption-font-family","",Vr),An=vo.extend("--ft-typography-caption-font-size","",Yr.fontSize,"12px"),jn=vo.extend("--ft-typography-caption-font-weight","",Yr.fontWeight,"normal"),Fn=vo.extend("--ft-typography-caption-letter-spacing","",Yr.letterSpacing,"0.396px"),
|
|
110
|
+
*/const Dr=Symbol.for(""),Br=t=>{if(t?.r===Dr)return t?._$litStatic$},_r=t=>({_$litStatic$:t,r:Dr}),Tr=new Map,Hr=(t=>(o,...e)=>{const r=e.length;let n,i;const a=[],s=[];let c,l=0,f=!1;for(;l<r;){for(c=o[l];l<r&&void 0!==(i=e[l],n=Br(i));)c+=n+o[++l],f=!0;l!==r&&s.push(i),a.push(c),l++}if(l===r&&a.push(o[r]),f){const t=a.join("$$lit$$");void 0===(o=Tr.get(t))&&(a.raw=a,Tr.set(t,o=a)),e=s}return t(o,...e)})(X);var Gr;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button",t.display="display",t.title1="title-1",t.title2="title-2",t.title3="title-3",t.body1regular="body-1-regular",t.body1medium="body-1-medium",t.body1semibold="body-1-semibold",t.body2regular="body-2-regular",t.body2medium="body-2-medium",t.body2semibold="body-2-semibold",t.label1medium="label-1-medium",t.label1semibold="label-1-semibold",t.label1bold="label-1-bold",t.label2medium="label-2-medium",t.label2semibold="label-2-semibold",t.label2bold="label-2-bold",t.caption1medium="caption-1-medium",t.caption1semibold="caption-1-semibold",t.caption1bold="caption-1-bold",t.caption2medium="caption-2-medium",t.caption2semibold="caption-2-semibold",t.caption2bold="caption-2-bold"}(Gr||(Gr={}));const qr=vo.extend("--ft-typography-font-family","",xo.titleFont),Vr=vo.extend("--ft-typography-font-family","",xo.contentFont),Yr={fontFamily:Vr,fontSize:vo.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:vo.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:vo.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:vo.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:vo.create("--ft-typography-text-transform","","UNKNOWN","inherit")},Jr=vo.extend("--ft-typography-title-font-family","",qr),Xr=vo.extend("--ft-typography-title-font-size","",Yr.fontSize,"20px"),Qr=vo.extend("--ft-typography-title-font-weight","",Yr.fontWeight,"normal"),tn=vo.extend("--ft-typography-title-letter-spacing","",Yr.letterSpacing,"0.15px"),on=vo.extend("--ft-typography-title-line-height","",Yr.lineHeight,"1.2"),en=vo.extend("--ft-typography-title-text-transform","",Yr.textTransform,"inherit"),rn=vo.extend("--ft-typography-title-dense-font-family","",qr),nn=vo.extend("--ft-typography-title-dense-font-size","",Yr.fontSize,"14px"),an=vo.extend("--ft-typography-title-dense-font-weight","",Yr.fontWeight,"normal"),sn=vo.extend("--ft-typography-title-dense-letter-spacing","",Yr.letterSpacing,"0.105px"),cn=vo.extend("--ft-typography-title-dense-line-height","",Yr.lineHeight,"1.7"),ln=vo.extend("--ft-typography-title-dense-text-transform","",Yr.textTransform,"inherit"),fn=vo.extend("--ft-typography-subtitle1-font-family","",Vr),hn=vo.extend("--ft-typography-subtitle1-font-size","",Yr.fontSize,"16px"),pn=vo.extend("--ft-typography-subtitle1-font-weight","",Yr.fontWeight,"600"),un=vo.extend("--ft-typography-subtitle1-letter-spacing","",Yr.letterSpacing,"0.144px"),dn=vo.extend("--ft-typography-subtitle1-line-height","",Yr.lineHeight,"1.5"),yn=vo.extend("--ft-typography-subtitle1-text-transform","",Yr.textTransform,"inherit"),gn=vo.extend("--ft-typography-subtitle2-font-family","",Vr),bn=vo.extend("--ft-typography-subtitle2-font-size","",Yr.fontSize,"14px"),mn=vo.extend("--ft-typography-subtitle2-font-weight","",Yr.fontWeight,"normal"),On=vo.extend("--ft-typography-subtitle2-letter-spacing","",Yr.letterSpacing,"0.098px"),vn=vo.extend("--ft-typography-subtitle2-line-height","",Yr.lineHeight,"1.7"),Sn=vo.extend("--ft-typography-subtitle2-text-transform","",Yr.textTransform,"inherit"),wn=vo.extend("--ft-typography-body1-font-family","",Vr),Nn=vo.extend("--ft-typography-body1-font-size","",Yr.fontSize,"16px"),xn=vo.extend("--ft-typography-body1-font-weight","",Yr.fontWeight,"normal"),Cn=vo.extend("--ft-typography-body1-letter-spacing","",Yr.letterSpacing,"0.496px"),En=vo.extend("--ft-typography-body1-line-height","",Yr.lineHeight,"1.5"),Rn=vo.extend("--ft-typography-body1-text-transform","",Yr.textTransform,"inherit"),Un=vo.extend("--ft-typography-body2-font-family","",Vr),In=vo.extend("--ft-typography-body2-font-size","",Yr.fontSize,"14px"),Ln=vo.extend("--ft-typography-body2-font-weight","",Yr.fontWeight,"normal"),Wn=vo.extend("--ft-typography-body2-letter-spacing","",Yr.letterSpacing,"0.252px"),kn=vo.extend("--ft-typography-body2-line-height","",Yr.lineHeight,"1.4"),$n=vo.extend("--ft-typography-body2-text-transform","",Yr.textTransform,"inherit"),Kn=vo.extend("--ft-typography-caption-font-family","",Vr),An=vo.extend("--ft-typography-caption-font-size","",Yr.fontSize,"12px"),jn=vo.extend("--ft-typography-caption-font-weight","",Yr.fontWeight,"normal"),Fn=vo.extend("--ft-typography-caption-letter-spacing","",Yr.letterSpacing,"0.396px"),Mn=vo.extend("--ft-typography-caption-line-height","",Yr.lineHeight,"1.33"),Zn=vo.extend("--ft-typography-caption-text-transform","",Yr.textTransform,"inherit"),Pn=vo.extend("--ft-typography-breadcrumb-font-family","",Vr),zn=vo.extend("--ft-typography-breadcrumb-font-size","",Yr.fontSize,"10px"),Dn=vo.extend("--ft-typography-breadcrumb-font-weight","",Yr.fontWeight,"normal"),Bn=vo.extend("--ft-typography-breadcrumb-letter-spacing","",Yr.letterSpacing,"0.33px"),_n=vo.extend("--ft-typography-breadcrumb-line-height","",Yr.lineHeight,"1.6"),Tn=vo.extend("--ft-typography-breadcrumb-text-transform","",Yr.textTransform,"inherit"),Hn=vo.extend("--ft-typography-overline-font-family","",Vr),Gn=vo.extend("--ft-typography-overline-font-size","",Yr.fontSize,"10px"),qn=vo.extend("--ft-typography-overline-font-weight","",Yr.fontWeight,"normal"),Vn=vo.extend("--ft-typography-overline-letter-spacing","",Yr.letterSpacing,"1.5px"),Yn=vo.extend("--ft-typography-overline-line-height","",Yr.lineHeight,"1.6"),Jn=vo.extend("--ft-typography-overline-text-transform","",Yr.textTransform,"uppercase"),Xn=vo.extend("--ft-typography-button-font-family","",Vr),Qn=vo.extend("--ft-typography-button-font-size","",Yr.fontSize,"14px"),ti=vo.extend("--ft-typography-button-font-weight","",Yr.fontWeight,"600"),oi=vo.extend("--ft-typography-button-letter-spacing","",Yr.letterSpacing,"1.246px"),ei=vo.extend("--ft-typography-button-line-height","",Yr.lineHeight,"1.15"),ri=vo.extend("--ft-typography-button-text-transform","",Yr.textTransform,"uppercase"),ni=Ot`
|
|
111
111
|
.ft-typography--title {
|
|
112
112
|
font-family: ${Jr};
|
|
113
113
|
font-size: ${Xr};
|
|
@@ -168,12 +168,12 @@ let bo=class extends At{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
168
168
|
font-size: ${An};
|
|
169
169
|
font-weight: ${jn};
|
|
170
170
|
letter-spacing: ${Fn};
|
|
171
|
-
line-height: ${
|
|
172
|
-
text-transform: ${
|
|
171
|
+
line-height: ${Mn};
|
|
172
|
+
text-transform: ${Zn};
|
|
173
173
|
}
|
|
174
174
|
`,hi=Ot`
|
|
175
175
|
.ft-typography--breadcrumb {
|
|
176
|
-
font-family: ${
|
|
176
|
+
font-family: ${Pn};
|
|
177
177
|
font-size: ${zn};
|
|
178
178
|
font-weight: ${Dn};
|
|
179
179
|
letter-spacing: ${Bn};
|
|
@@ -222,8 +222,8 @@ let bo=class extends At{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
222
222
|
`,Oi=Ar.get({name:"ft-app-info",reducers:{setBaseUrl:(t,o)=>{t.baseUrl=o.payload},setApiIntegrationIdentifier:(t,o)=>{t.apiIntegrationIdentifier=o.payload},setUiLocale:(t,o)=>{t.uiLocale=o.payload},setAvailableUiLocales:(t,o)=>{t.availableUiLocales=o.payload},setEditorMode:(t,o)=>{t.editorMode=o.payload},setNoCustom:(t,o)=>{t.noCustom=o.payload},setNoCustomComponent:(t,o)=>{t.noCustomComponent=o.payload},setSession:(t,o)=>{t.session=o.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class vi{static build(t){const{baseUrl:o,apiIntegrationIdentifier:e}=Oi.getState(),r=null!=t?t:e;if(o&&r&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,r,!0)}static get(t){var o;return null!=t?vi.build(t):null!==(o=vi.API)&&void 0!==o?o:vi.API=vi.build()}static await(t){return new Promise((o=>{let e=vi.get(t);if(e)o(e);else{const r=Oi.subscribe((()=>{e=vi.get(t),e&&(r(),o(e))}))}}))}}var Si;const wi=Symbol("clearAfterUnitTest");class Ni{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new r,this.listeners={},this.currentUiLocale="",this[Si]=()=>{this.defaultMessages={},this.cache=new r,this.listeners={}},this.currentUiLocale=Oi.getState().uiLocale,Oi.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=Oi.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var e;if(t=t.toLowerCase(),Object.keys(o).length>0){const r={...null!==(e=this.defaultMessages[t])&&void 0!==e?e:{},...o};L(this.defaultMessages[t],r)||(this.defaultMessages[t]=r,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,o,...e){var r,n,i;t=t.toLowerCase(),this.fetchContext(t);const a=null!==(n=null===(r=this.cache.getNow(t))||void 0===r?void 0:r.messages)&&void 0!==n?n:{};return new Ao(null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},a).resolve(o,...e)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,o){var e;return t=t.toLowerCase(),this.listeners[t]=null!==(e=this.listeners[t])&&void 0!==e?e:new Set,this.listeners[t].add(o),()=>{var e;return null===(e=this.listeners[t])||void 0===e?void 0:e.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>{return(o=0,new Promise((t=>setTimeout(t,o)))).then((()=>t())).catch((()=>null));var o})))}}Si=wi,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new Ni((async(t,o)=>(await vi.await()).getFluidTopicsMessageContext(t,o)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new Ni((async(t,o)=>(await vi.await()).getCustomMessageContext(t,o))));const xi=window.FluidTopicsI18nService,Ci=window.FluidTopicsCustomI18nService;var Ei=function(t,o,e,r){for(var n,i=arguments.length,a=i<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(n=t[s])&&(a=(i<3?n(a):i>3?n(o,e,a):n(o,e))||a);return i>3&&a&&Object.defineProperty(o,e,a),a};class Ri extends $o{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>vi.get(),this.cache=new r,this.cleanSessionDebouncer=new I}render(){return oo`
|
|
223
223
|
<slot></slot>
|
|
224
224
|
`}update(t){super.update(t),t.has("baseUrl")&&Oi.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&Oi.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Oi.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&Oi.actions.setNoCustom(this.noCustom),t.has("editorMode")&&Oi.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&Oi.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&Oi.actions.setSession(this.session),t.has("availableUiLocales")&&Oi.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>xi.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const o=await t.getCurrentSession();return o.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),o.idleTimeoutInMillis),o}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}Ri.elementDefinitions={},Ri.styles=mi,Ei([R()],Ri.prototype,"baseUrl",void 0),Ei([R()],Ri.prototype,"apiIntegrationIdentifier",void 0),Ei([R()],Ri.prototype,"uiLocale",void 0),Ei([k([])],Ri.prototype,"availableUiLocales",void 0),Ei([R({type:Boolean})],Ri.prototype,"editorMode",void 0),Ei([R({type:Boolean})],Ri.prototype,"noCustom",void 0),Ei([R({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],Ri.prototype,"noCustomComponent",void 0),Ei([R({type:Boolean})],Ri.prototype,"withManualResources",void 0),Ei([k([])],Ri.prototype,"messageContexts",void 0),Ei([k(void 0)],Ri.prototype,"session",void 0),Ei([R({type:Object})],Ri.prototype,"apiProvider",void 0);class Ui{async listMySearches(){var t;return(null===(t=Oi.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await vi.await()).listMySearches(Oi.getState().session.profile.userId):[]}}const Ii=new r;class Li{async listMyBookmarks(){return Ii.get("bookmarks",(async()=>(await vi.await()).listMyBookmarks(Oi.getState().session.profile.userId)))}clearCache(){Ii.clear("bookmarks")}}const Wi=Ar.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=Oi.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Li,Oi.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:o}=Oi.getState();L(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==o?void 0:o.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){Wi.actions.savedSearches(void 0)}clearMyBookmarks(){Wi.actions.bookmarks(void 0)}async reloadMySearches(){const t=new Ui,o=await t.listMySearches();Wi.actions.savedSearches(o)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const o=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;Wi.actions.bookmarks(o)}}},W("ft-app-context")(Ri);const ki=Ot`
|
|
225
|
-
`;var $i=function(t,o,e,r){for(var n,i=arguments.length,a=i<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(n=t[s])&&(a=(i<3?n(a):i>3?n(o,e,a):n(o,e))||a);return i>3&&a&&Object.defineProperty(o,e,a),a};const Ki=Symbol("i18nProperties"),Ai=Symbol("i18nUnsubs");function ji(t){var o;class e extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[o]=new Map}get i18nService(){return this.useCustomMessageContexts?Ci:xi}i18n(t,o,...e){var r;if("string"==typeof t)return this.i18nService.resolveMessage(t,o,...e);const n=null!==(r=t.args)&&void 0!==r?r:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...n)}onI18nUpdate(t){var o;null===(o=this[Ki])||void 0===o||o.forEach(((o,e)=>{o.context.toLowerCase()===t.toLowerCase()&&(this[e]=this.i18n(o))})),setTimeout((()=>this.requestUpdate()),0)}update(t){var o;super.update(t),null===(o=this[Ki])||void 0===o||o.forEach(((t,o)=>{null!=t.argsProvider&&(this[o]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[Ki]&&new Set([...this[Ki].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,o){t=t.toLowerCase(),this[Ai].has(t)||this[Ai].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=o?o:{})}addI18nContext(t,o){this.addI18nMessages(t.name,o)}disconnectedCallback(){super.disconnectedCallback(),this[Ai].forEach((t=>t())),this[Ai].clear()}}return o=Ai,$i([R({type:Boolean})],e.prototype,"useCustomMessageContexts",void 0),e}class Fi extends(ji($o)){}class
|
|
225
|
+
`;var $i=function(t,o,e,r){for(var n,i=arguments.length,a=i<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(n=t[s])&&(a=(i<3?n(a):i>3?n(o,e,a):n(o,e))||a);return i>3&&a&&Object.defineProperty(o,e,a),a};const Ki=Symbol("i18nProperties"),Ai=Symbol("i18nUnsubs");function ji(t){var o;class e extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[o]=new Map}get i18nService(){return this.useCustomMessageContexts?Ci:xi}i18n(t,o,...e){var r;if("string"==typeof t)return this.i18nService.resolveMessage(t,o,...e);const n=null!==(r=t.args)&&void 0!==r?r:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...n)}onI18nUpdate(t){var o;null===(o=this[Ki])||void 0===o||o.forEach(((o,e)=>{o.context.toLowerCase()===t.toLowerCase()&&(this[e]=this.i18n(o))})),setTimeout((()=>this.requestUpdate()),0)}update(t){var o;super.update(t),null===(o=this[Ki])||void 0===o||o.forEach(((t,o)=>{null!=t.argsProvider&&(this[o]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[Ki]&&new Set([...this[Ki].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,o){t=t.toLowerCase(),this[Ai].has(t)||this[Ai].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=o?o:{})}addI18nContext(t,o){this.addI18nMessages(t.name,o)}disconnectedCallback(){super.disconnectedCallback(),this[Ai].forEach((t=>t())),this[Ai].clear()}}return o=Ai,$i([R({type:Boolean})],e.prototype,"useCustomMessageContexts",void 0),e}class Fi extends(ji($o)){}class Mi extends(ji(To)){}var Zi=function(t,o,e,r){for(var n,i=arguments.length,a=i<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(n=t[s])&&(a=(i<3?n(a):i>3?n(o,e,a):n(o,e))||a);return i>3&&a&&Object.defineProperty(o,e,a),a};class Pi extends Mi{constructor(){super(),this.editorMode=!1,this.addStore(Oi)}render(){return this.key&&this.context?oo`
|
|
226
226
|
<span class="ft-i18n">
|
|
227
227
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
228
228
|
</span>
|
|
229
|
-
`:this.editorMode?"Select a context and a label key.":ro}update(t){var o;super.update(t),this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(o=this.defaultMessage)&&void 0!==o?o:""})}}
|
|
229
|
+
`:this.editorMode?"Select a context and a label key.":ro}update(t){var o;super.update(t),this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(o=this.defaultMessage)&&void 0!==o?o:""})}}Pi.elementDefinitions={},Pi.styles=ki,Zi([jo()],Pi.prototype,"editorMode",void 0),Zi([R()],Pi.prototype,"context",void 0),Zi([R()],Pi.prototype,"key",void 0),Zi([k([])],Pi.prototype,"args",void 0),Zi([R()],Pi.prototype,"defaultMessage",void 0);class zi{static build(t){return new zi(t)}static fromGwt(t){return new zi(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,o)=>{const e=o;return t=>({context:this.name,key:e,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,o)=>(...t)=>xi.resolveMessage(this.name,o,...t)})}}W("ft-i18n")(Pi);const Di=zi.build("readerPageTitle"),Bi={pageTitle:"Page title"};var _i=function(t,o,e,r){for(var n,i=arguments.length,a=i<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(n=t[s])&&(a=(i<3?n(a):i>3?n(o,e,a):n(o,e))||a);return i>3&&a&&Object.defineProperty(o,e,a),a};class Ti extends(ji(zr)){constructor(){super(),this.target="current",this.editorMode=!1,this.addStore(Oi),this.addI18nContext(Di,Bi)}render(){var t,o;const e=null!==(o=null===(t=this.targetPage)||void 0===t?void 0:t.title)&&void 0!==o?o:this.editorMode?Di.messages.pageTitle():void 0;return e?oo`<ft-typography variant="title" part="text">${e}</ft-typography>`:ro}update(t){var o;if(super.update(t),t.has("currentPage")||t.has("target")){const t=this.computeOffset(this.target);if(this.currentPage&&0!=t){const e=this.currentPage.number+t;null===(o=this.service)||void 0===o||o.getPage(e).then((t=>{t.number==e?this.targetPage=t:this.targetPage=void 0}))}else this.targetPage=this.currentPage}}computeOffset(t){switch(t){case"next":return 1;case"previous":return-1;default:return 0}}}Ti.styles=jr,Ti.elementDefinitions={"ft-typography":bi},_i([R()],Ti.prototype,"target",void 0),_i([jo({store:"reader"})],Ti.prototype,"currentPage",void 0),_i([U()],Ti.prototype,"targetPage",void 0),_i([jo({store:Oi.name})],Ti.prototype,"editorMode",void 0),W("ft-reader-page-title")(Ti),t.FtReaderPageTitle=Ti,t.FtReaderPageTitleCssVariables={},t.styles=jr}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-page-title",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8",
|
|
4
4
|
"description": "Displays the previous/current/next page title",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-reader-context": "1.1.
|
|
23
|
-
"@fluid-topics/ft-typography": "1.1.
|
|
24
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-reader-context": "1.1.8",
|
|
23
|
+
"@fluid-topics/ft-typography": "1.1.8",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "1.1.8",
|
|
25
25
|
"lit": "3.1.0"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "95fb2d06899d700513970ac830958922b98539df"
|
|
28
28
|
}
|