@teipublisher/pb-components 2.15.1 → 2.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/Dockerfile +1 -1
- package/dist/demo/pb-tify.html +14 -2
- package/dist/pb-components-bundle.js +4 -4
- package/dist/pb-elements.json +7 -7
- package/dist/pb-tify.js +1 -1
- package/package.json +1 -1
- package/pb-elements.json +7 -7
- package/src/pb-combo-box.js +1 -1
- package/src/pb-login.js +24 -1
- package/src/pb-restricted.js +24 -2
- package/src/pb-tify.js +63 -36
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [2.15.3](https://github.com/eeditiones/tei-publisher-components/compare/v2.15.2...v2.15.3) (2024-01-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **pb-tify:** support changing the displayed manifest by reacting to 'pb-show-annotation' emitted by 'pb-facs-link'. Use the URL given in [@facs](https://github.com/facs) as manifest URL. ([1f7e6ff](https://github.com/eeditiones/tei-publisher-components/commit/1f7e6ffcd2085a9c381379e94930f77d128879bb))
|
|
7
|
+
|
|
8
|
+
## [2.15.2](https://github.com/eeditiones/tei-publisher-components/compare/v2.15.1...v2.15.2) (2023-12-22)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **pb-combo-box:** always disable client-side filtering if there's a remote source configured ([5331ca4](https://github.com/eeditiones/tei-publisher-components/commit/5331ca483576f4032c9fa073377e149f49c9dfc8))
|
|
14
|
+
|
|
1
15
|
## [2.15.1](https://github.com/eeditiones/tei-publisher-components/compare/v2.15.0...v2.15.1) (2023-11-22)
|
|
2
16
|
|
|
3
17
|
|
package/Dockerfile
CHANGED
|
@@ -14,7 +14,7 @@ RUN apt-get update && apt-get install -y \
|
|
|
14
14
|
git \
|
|
15
15
|
curl
|
|
16
16
|
|
|
17
|
-
RUN curl -L -o apache-ant-${ANT_VERSION}-bin.tar.gz
|
|
17
|
+
RUN curl -L -o apache-ant-${ANT_VERSION}-bin.tar.gz https://downloads.apache.org/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz \
|
|
18
18
|
&& mkdir ant-${ANT_VERSION} \
|
|
19
19
|
&& tar -zxvf apache-ant-${ANT_VERSION}-bin.tar.gz \
|
|
20
20
|
&& mv apache-ant-${ANT_VERSION} ${ANT_HOME} \
|
package/dist/demo/pb-tify.html
CHANGED
|
@@ -5,6 +5,14 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes" />
|
|
6
6
|
|
|
7
7
|
<title>pb-document Demo</title>
|
|
8
|
+
<link rel="stylesheet" href="demo.css">
|
|
9
|
+
<style>
|
|
10
|
+
main {
|
|
11
|
+
display: grid;
|
|
12
|
+
grid-template-rows: auto 1fr;
|
|
13
|
+
height: 70vh;
|
|
14
|
+
}
|
|
15
|
+
</style>
|
|
8
16
|
<script src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script><script type="module" src="../pb-components-bundle.js"></script><script type="module" src="../pb-tify.js"></script>
|
|
9
17
|
</head>
|
|
10
18
|
|
|
@@ -14,8 +22,12 @@
|
|
|
14
22
|
<pb-page endpoint="https://teipublisher.com/exist/apps/tei-publisher" api-version="1.0.0" api-version="1.0">
|
|
15
23
|
<!-- Display facsimile -->
|
|
16
24
|
<main>
|
|
17
|
-
<
|
|
18
|
-
|
|
25
|
+
<ul>
|
|
26
|
+
<li><pb-facs-link trigger="click" facs="https://teipublisher.com/exist/apps/tei-publisher/api/iiif/test/F-rom.xml" emit-on-load="false">Shakespeare's Romeo and Juliet</pb-facs-link></li>
|
|
27
|
+
<li><pb-facs-link trigger="click" facs="https://teipublisher.com/exist/apps/tei-publisher/api/iiif/test/F-rom.xml" order="4">Shakespeare's Romeo and Juliet: page 4</pb-facs-link></li>
|
|
28
|
+
<li><pb-facs-link trigger="click" facs="https://manifests.sub.uni-goettingen.de/iiif/presentation/PPN623133725/manifest">Historia Astronomiae</pb-facs-link></li>
|
|
29
|
+
</ul>
|
|
30
|
+
<pb-tify manifest="https://teipublisher.com/exist/apps/tei-publisher/api/iiif/test/F-rom.xml"></pb-tify>
|
|
19
31
|
</main>
|
|
20
32
|
</pb-page>
|
|
21
33
|
</template>
|
|
@@ -507,7 +507,7 @@ const et=n`
|
|
|
507
507
|
border-color: #999;
|
|
508
508
|
color: #999;
|
|
509
509
|
}
|
|
510
|
-
`}}customElements.define("pb-demo-snippet",at);class lt{static subscribe(t,e,i,n=!1){const r=lt._getChannels(e),o=document.addEventListener(t,t=>{i&&t.detail&&t.detail.key&&r.includes(t.detail.key)&&i(t,o)},{once:n})}static subscribeOnce(t,e=null){const i=lt._getChannels(e);return new Promise(e=>{document.addEventListener(t,t=>{t.detail&&t.detail.key&&i.includes(t.detail.key)&&e(t)},{once:!0})})}static _getChannels(t){return null!==t&&t.length?Array.isArray(t)?t:[t]:[N]}static emit(t,e=null,i=null){const n=i||{};n.key=e||N;const r=new CustomEvent(t,{detail:n});document.dispatchEvent(r)}}window.pbEvents||(window.pbEvents=lt);const ct="2.15.1";class ht extends V{static get properties(){return Object.assign({version:{type:String,reflect:!0}},super.properties)}constructor(){super(),this.version=ct}connectedCallback(){if(super.connectedCallback(),!this.version){const t=P("../package.json");fetch(t).then(t=>t.json()).then(t=>{this.version=t.version})}}render(){return I`<span>${this.version?this.version:"unknown"}</span>`}createRenderRoot(){return this}}customElements.define("pb-version",ht);var dt="top",pt="bottom",ut="right",gt="left",ft="auto",mt=[dt,pt,ut,gt],vt="start",bt="end",yt="clippingParents",_t="viewport",wt="popper",xt="reference",kt=mt.reduce((function(t,e){return t.concat([e+"-"+vt,e+"-"+bt])}),[]),At=[].concat(mt,[ft]).reduce((function(t,e){return t.concat([e,e+"-"+vt,e+"-"+bt])}),[]),St=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function zt(t){return t?(t.nodeName||"").toLowerCase():null}function Ct(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Et(t){return t instanceof Ct(t).Element||t instanceof Element}function Tt(t){return t instanceof Ct(t).HTMLElement||t instanceof HTMLElement}function Lt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Ct(t).ShadowRoot||t instanceof ShadowRoot)}function Mt(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];Tt(r)&&zt(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))}function Ot(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});Tt(n)&&zt(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}}var $t={name:"applyStyles",enabled:!0,phase:"write",fn:Mt,effect:Ot,requires:["computeStyles"]};function Ht(t){return t.split("-")[0]}var It=Math.max,Rt=Math.min,Pt=Math.round;function Vt(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function Nt(){return!/^((?!chrome|android).)*safari/i.test(Vt())}function Dt(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),r=1,o=1;e&&Tt(t)&&(r=t.offsetWidth>0&&Pt(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Pt(n.height)/t.offsetHeight||1);var s=(Et(t)?Ct(t):window).visualViewport,a=!Nt()&&i,l=(n.left+(a&&s?s.offsetLeft:0))/r,c=(n.top+(a&&s?s.offsetTop:0))/o,h=n.width/r,d=n.height/o;return{width:h,height:d,top:c,right:l+h,bottom:c+d,left:l,x:l,y:c}}function Ft(t){var e=Dt(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function Bt(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&Lt(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function jt(t){return Ct(t).getComputedStyle(t)}function qt(t){return["table","td","th"].indexOf(zt(t))>=0}function Ut(t){return((Et(t)?t.ownerDocument:t.document)||window.document).documentElement}function Wt(t){return"html"===zt(t)?t:t.assignedSlot||t.parentNode||(Lt(t)?t.host:null)||Ut(t)}function Yt(t){return Tt(t)&&"fixed"!==jt(t).position?t.offsetParent:null}function Gt(t){var e=/firefox/i.test(Vt());if(/Trident/i.test(Vt())&&Tt(t)&&"fixed"===jt(t).position)return null;var i=Wt(t);for(Lt(i)&&(i=i.host);Tt(i)&&["html","body"].indexOf(zt(i))<0;){var n=jt(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}function Kt(t){for(var e=Ct(t),i=Yt(t);i&&qt(i)&&"static"===jt(i).position;)i=Yt(i);return i&&("html"===zt(i)||"body"===zt(i)&&"static"===jt(i).position)?e:i||Gt(t)||e}function Xt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Zt(t,e,i){return It(t,Rt(e,i))}function Qt(t,e,i){var n=Zt(t,e,i);return n>i?i:n}function Jt(){return{top:0,right:0,bottom:0,left:0}}function te(t){return Object.assign({},Jt(),t)}function ee(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var ie=function(t,e){return te("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:ee(t,mt))};function ne(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=Ht(i.placement),l=Xt(a),c=[gt,ut].indexOf(a)>=0?"height":"width";if(o&&s){var h=ie(r.padding,i),d=Ft(o),p="y"===l?dt:gt,u="y"===l?pt:ut,g=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],f=s[l]-i.rects.reference[l],m=Kt(o),v=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,b=g/2-f/2,y=h[p],_=v-d[c]-h[u],w=v/2-d[c]/2+b,x=Zt(y,w,_),k=l;i.modifiersData[n]=((e={})[k]=x,e.centerOffset=x-w,e)}}function re(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&Bt(e.elements.popper,n)&&(e.elements.arrow=n)}function oe(t){return t.split("-")[1]}var se={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ae(t,e){var i=t.x,n=t.y,r=e.devicePixelRatio||1;return{x:Pt(i*r)/r||0,y:Pt(n*r)/r||0}}function le(t){var e,i=t.popper,n=t.popperRect,r=t.placement,o=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,d=t.isFixed,p=s.x,u=void 0===p?0:p,g=s.y,f=void 0===g?0:g,m="function"==typeof h?h({x:u,y:f}):{x:u,y:f};u=m.x,f=m.y;var v=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),y=gt,_=dt,w=window;if(c){var x=Kt(i),k="clientHeight",A="clientWidth";if(x===Ct(i)&&"static"!==jt(x=Ut(i)).position&&"absolute"===a&&(k="scrollHeight",A="scrollWidth"),x=x,r===dt||(r===gt||r===ut)&&o===bt)_=pt,f-=(d&&x===w&&w.visualViewport?w.visualViewport.height:x[k])-n.height,f*=l?1:-1;if(r===gt||(r===dt||r===pt)&&o===bt)y=ut,u-=(d&&x===w&&w.visualViewport?w.visualViewport.width:x[A])-n.width,u*=l?1:-1}var S,z=Object.assign({position:a},c&&se),C=!0===h?ae({x:u,y:f},Ct(i)):{x:u,y:f};return u=C.x,f=C.y,l?Object.assign({},z,((S={})[_]=b?"0":"",S[y]=v?"0":"",S.transform=(w.devicePixelRatio||1)<=1?"translate("+u+"px, "+f+"px)":"translate3d("+u+"px, "+f+"px, 0)",S)):Object.assign({},z,((e={})[_]=b?f+"px":"",e[y]=v?u+"px":"",e.transform="",e))}function ce(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:Ht(e.placement),variation:oe(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,le(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,le(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var he={passive:!0};function de(t){var e=t.state,i=t.instance,n=t.options,r=n.scroll,o=void 0===r||r,s=n.resize,a=void 0===s||s,l=Ct(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,he)})),a&&l.addEventListener("resize",i.update,he),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,he)})),a&&l.removeEventListener("resize",i.update,he)}}var pe={left:"right",right:"left",bottom:"top",top:"bottom"};function ue(t){return t.replace(/left|right|bottom|top/g,(function(t){return pe[t]}))}var ge={start:"end",end:"start"};function fe(t){return t.replace(/start|end/g,(function(t){return ge[t]}))}function me(t){var e=Ct(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ve(t){return Dt(Ut(t)).left+me(t).scrollLeft}function be(t,e){var i=Ct(t),n=Ut(t),r=i.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=Nt();(c||!c&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+ve(t),y:l}}function ye(t){var e,i=Ut(t),n=me(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=It(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=It(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+ve(t),l=-n.scrollTop;return"rtl"===jt(r||i).direction&&(a+=It(i.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function _e(t){var e=jt(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function we(t){return["html","body","#document"].indexOf(zt(t))>=0?t.ownerDocument.body:Tt(t)&&_e(t)?t:we(Wt(t))}function xe(t,e){var i;void 0===e&&(e=[]);var n=we(t),r=n===(null==(i=t.ownerDocument)?void 0:i.body),o=Ct(n),s=r?[o].concat(o.visualViewport||[],_e(n)?n:[]):n,a=e.concat(s);return r?a:a.concat(xe(Wt(s)))}function ke(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Ae(t,e){var i=Dt(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}function Se(t,e,i){return e===_t?ke(be(t,i)):Et(e)?Ae(e,i):ke(ye(Ut(t)))}function ze(t){var e=xe(Wt(t)),i=["absolute","fixed"].indexOf(jt(t).position)>=0&&Tt(t)?Kt(t):t;return Et(i)?e.filter((function(t){return Et(t)&&Bt(t,i)&&"body"!==zt(t)})):[]}function Ce(t,e,i,n){var r="clippingParents"===e?ze(t):[].concat(e),o=[].concat(r,[i]),s=o[0],a=o.reduce((function(e,i){var r=Se(t,i,n);return e.top=It(r.top,e.top),e.right=Rt(r.right,e.right),e.bottom=Rt(r.bottom,e.bottom),e.left=It(r.left,e.left),e}),Se(t,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Ee(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?Ht(r):null,s=r?oe(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case dt:e={x:a,y:i.y-n.height};break;case pt:e={x:a,y:i.y+i.height};break;case ut:e={x:i.x+i.width,y:l};break;case gt:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?Xt(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case vt:e[c]=e[c]-(i[h]/2-n[h]/2);break;case bt:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function Te(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=void 0===n?t.placement:n,o=i.strategy,s=void 0===o?t.strategy:o,a=i.boundary,l=void 0===a?yt:a,c=i.rootBoundary,h=void 0===c?_t:c,d=i.elementContext,p=void 0===d?wt:d,u=i.altBoundary,g=void 0!==u&&u,f=i.padding,m=void 0===f?0:f,v=te("number"!=typeof m?m:ee(m,mt)),b=p===wt?xt:wt,y=t.rects.popper,_=t.elements[g?b:p],w=Ce(Et(_)?_:_.contextElement||Ut(t.elements.popper),l,h,s),x=Dt(t.elements.reference),k=Ee({reference:x,element:y,strategy:"absolute",placement:r}),A=ke(Object.assign({},y,k)),S=p===wt?A:x,z={top:w.top-S.top+v.top,bottom:S.bottom-w.bottom+v.bottom,left:w.left-S.left+v.left,right:S.right-w.right+v.right},C=t.modifiersData.offset;if(p===wt&&C){var E=C[r];Object.keys(z).forEach((function(t){var e=[ut,pt].indexOf(t)>=0?1:-1,i=[dt,pt].indexOf(t)>=0?"y":"x";z[t]+=E[i]*e}))}return z}function Le(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?At:l,h=oe(n),d=h?a?kt:kt.filter((function(t){return oe(t)===h})):mt,p=d.filter((function(t){return c.indexOf(t)>=0}));0===p.length&&(p=d);var u=p.reduce((function(e,i){return e[i]=Te(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[Ht(i)],e}),{});return Object.keys(u).sort((function(t,e){return u[t]-u[e]}))}function Me(t){if(Ht(t)===ft)return[];var e=ue(t);return[fe(t),e,fe(e)]}function Oe(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,p=i.altBoundary,u=i.flipVariations,g=void 0===u||u,f=i.allowedAutoPlacements,m=e.options.placement,v=Ht(m),b=l||(v===m||!g?[ue(m)]:Me(m)),y=[m].concat(b).reduce((function(t,i){return t.concat(Ht(i)===ft?Le(e,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:g,allowedAutoPlacements:f}):i)}),[]),_=e.rects.reference,w=e.rects.popper,x=new Map,k=!0,A=y[0],S=0;S<y.length;S++){var z=y[S],C=Ht(z),E=oe(z)===vt,T=[dt,pt].indexOf(C)>=0,L=T?"width":"height",M=Te(e,{placement:z,boundary:h,rootBoundary:d,altBoundary:p,padding:c}),O=T?E?ut:gt:E?pt:dt;_[L]>w[L]&&(O=ue(O));var $=ue(O),H=[];if(o&&H.push(M[C]<=0),a&&H.push(M[O]<=0,M[$]<=0),H.every((function(t){return t}))){A=z,k=!1;break}x.set(z,H)}if(k)for(var I=function(t){var e=y.find((function(e){var i=x.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return A=e,"break"},R=g?3:1;R>0;R--){if("break"===I(R))break}e.placement!==A&&(e.modifiersData[n]._skip=!0,e.placement=A,e.reset=!0)}}function $e(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function He(t){return[dt,ut,pt,gt].some((function(e){return t[e]>=0}))}function Ie(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=Te(e,{elementContext:"reference"}),a=Te(e,{altBoundary:!0}),l=$e(s,n),c=$e(a,r,o),h=He(l),d=He(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}function Re(t,e,i){var n=Ht(t),r=[gt,dt].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[gt,ut].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}function Pe(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=At.reduce((function(t,i){return t[i]=Re(i,e.rects,o),t}),{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}function Ve(t){var e=t.state,i=t.name;e.modifiersData[i]=Ee({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}function Ne(t){return"x"===t?"y":"x"}function De(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,p=i.tether,u=void 0===p||p,g=i.tetherOffset,f=void 0===g?0:g,m=Te(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),v=Ht(e.placement),b=oe(e.placement),y=!b,_=Xt(v),w=Ne(_),x=e.modifiersData.popperOffsets,k=e.rects.reference,A=e.rects.popper,S="function"==typeof f?f(Object.assign({},e.rects,{placement:e.placement})):f,z="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),C=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,E={x:0,y:0};if(x){if(o){var T,L="y"===_?dt:gt,M="y"===_?pt:ut,O="y"===_?"height":"width",$=x[_],H=$+m[L],I=$-m[M],R=u?-A[O]/2:0,P=b===vt?k[O]:A[O],V=b===vt?-A[O]:-k[O],N=e.elements.arrow,D=u&&N?Ft(N):{width:0,height:0},F=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Jt(),B=F[L],j=F[M],q=Zt(0,k[O],D[O]),U=y?k[O]/2-R-q-B-z.mainAxis:P-q-B-z.mainAxis,W=y?-k[O]/2+R+q+j+z.mainAxis:V+q+j+z.mainAxis,Y=e.elements.arrow&&Kt(e.elements.arrow),G=Y?"y"===_?Y.clientTop||0:Y.clientLeft||0:0,K=null!=(T=null==C?void 0:C[_])?T:0,X=$+W-K,Z=Zt(u?Rt(H,$+U-K-G):H,$,u?It(I,X):I);x[_]=Z,E[_]=Z-$}if(a){var Q,J="x"===_?dt:gt,tt="x"===_?pt:ut,et=x[w],it="y"===w?"height":"width",nt=et+m[J],rt=et-m[tt],ot=-1!==[dt,gt].indexOf(v),st=null!=(Q=null==C?void 0:C[w])?Q:0,at=ot?nt:et-k[it]-A[it]-st+z.altAxis,lt=ot?et+k[it]+A[it]-st-z.altAxis:rt,ct=u&&ot?Qt(at,et,lt):Zt(u?at:nt,et,u?lt:rt);x[w]=ct,E[w]=ct-et}e.modifiersData[n]=E}}function Fe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Be(t){return t!==Ct(t)&&Tt(t)?Fe(t):me(t)}function je(t){var e=t.getBoundingClientRect(),i=Pt(e.width)/t.offsetWidth||1,n=Pt(e.height)/t.offsetHeight||1;return 1!==i||1!==n}function qe(t,e,i){void 0===i&&(i=!1);var n=Tt(e),r=Tt(e)&&je(e),o=Ut(e),s=Dt(t,r,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!i)&&(("body"!==zt(e)||_e(o))&&(a=Be(e)),Tt(e)?((l=Dt(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=ve(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Ue(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}function We(t){var e=Ue(t);return St.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}function Ye(t){var e;return function(){return e||(e=new Promise((function(i){Promise.resolve().then((function(){e=void 0,i(t())}))}))),e}}function Ge(t){var e=t.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}var Ke={placement:"bottom",modifiers:[],strategy:"absolute"};function Xe(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Ze(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,r=e.defaultOptions,o=void 0===r?Ke:r;return function(t,e,i){void 0===i&&(i=o);var r={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ke,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},s=[],a=!1,l={state:r,setOptions:function(i){var s="function"==typeof i?i(r.options):i;h(),r.options=Object.assign({},o,r.options,s),r.scrollParents={reference:Et(t)?xe(t):t.contextElement?xe(t.contextElement):[],popper:xe(e)};var a=We(Ge([].concat(n,r.options.modifiers)));return r.orderedModifiers=a.filter((function(t){return t.enabled})),c(),l.update()},forceUpdate:function(){if(!a){var t=r.elements,e=t.reference,i=t.popper;if(Xe(e,i)){r.rects={reference:qe(e,Kt(i),"fixed"===r.options.strategy),popper:Ft(i)},r.reset=!1,r.placement=r.options.placement,r.orderedModifiers.forEach((function(t){return r.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<r.orderedModifiers.length;n++)if(!0!==r.reset){var o=r.orderedModifiers[n],s=o.fn,c=o.options,h=void 0===c?{}:c,d=o.name;"function"==typeof s&&(r=s({state:r,options:h,name:d,instance:l})||r)}else r.reset=!1,n=-1}}},update:Ye((function(){return new Promise((function(t){l.forceUpdate(),t(r)}))})),destroy:function(){h(),a=!0}};if(!Xe(t,e))return l;function c(){r.orderedModifiers.forEach((function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,o=t.effect;if("function"==typeof o){var a=o({state:r,name:e,instance:l,options:n}),c=function(){};s.push(a||c)}}))}function h(){s.forEach((function(t){return t()})),s=[]}return l.setOptions(i).then((function(t){!a&&i.onFirstUpdate&&i.onFirstUpdate(t)})),l}}var Qe=Ze({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:de,data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:Ve,data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ce,data:{}},$t,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Pe},{name:"flip",enabled:!0,phase:"main",fn:Oe,requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:De,requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:ne,effect:re,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ie}]}),Je="tippy-box",ti="tippy-content",ei="tippy-backdrop",ii="tippy-arrow",ni="tippy-svg-arrow",ri={passive:!0,capture:!0},oi=function(){return document.body};function si(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function ai(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function li(t,e){return"function"==typeof t?t.apply(void 0,e):t}function ci(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function hi(t){return t.split(/\s+/).filter(Boolean)}function di(t){return[].concat(t)}function pi(t,e){-1===t.indexOf(e)&&t.push(e)}function ui(t){return t.filter((function(e,i){return t.indexOf(e)===i}))}function gi(t){return t.split("-")[0]}function fi(t){return[].slice.call(t)}function mi(t){return Object.keys(t).reduce((function(e,i){return void 0!==t[i]&&(e[i]=t[i]),e}),{})}function vi(){return document.createElement("div")}function bi(t){return["Element","Fragment"].some((function(e){return ai(t,e)}))}function yi(t){return ai(t,"NodeList")}function _i(t){return ai(t,"MouseEvent")}function wi(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function xi(t){return bi(t)?[t]:yi(t)?fi(t):Array.isArray(t)?t:fi(document.querySelectorAll(t))}function ki(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function Ai(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function Si(t){var e,i=di(t)[0];return null!=i&&null!=(e=i.ownerDocument)&&e.body?i.ownerDocument:document}function zi(t,e){var i=e.clientX,n=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=gi(r.placement),a=r.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,d="left"===s?a.right.x:0,p=e.top-n+l>o,u=n-e.bottom-c>o,g=e.left-i+h>o,f=i-e.right-d>o;return p||u||g||f}))}function Ci(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}function Ei(t,e){for(var i=e;i;){var n;if(t.contains(i))return!0;i=null==i.getRootNode||null==(n=i.getRootNode())?void 0:n.host}return!1}var Ti={isTouch:!1},Li=0;function Mi(){Ti.isTouch||(Ti.isTouch=!0,window.performance&&document.addEventListener("mousemove",Oi))}function Oi(){var t=performance.now();t-Li<20&&(Ti.isTouch=!1,document.removeEventListener("mousemove",Oi)),Li=t}function $i(){var t=document.activeElement;if(wi(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function Hi(){document.addEventListener("touchstart",Mi,ri),window.addEventListener("blur",$i)}var Ii=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,Ri={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Pi={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Vi=Object.assign({appendTo:oi,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Ri,Pi),Ni=Object.keys(Vi),Di=function(t){Object.keys(t).forEach((function(e){Vi[e]=t[e]}))};function Fi(t){var e=(t.plugins||[]).reduce((function(e,i){var n,r=i.name,o=i.defaultValue;r&&(e[r]=void 0!==t[r]?t[r]:null!=(n=Vi[r])?n:o);return e}),{});return Object.assign({},t,e)}function Bi(t,e){return(e?Object.keys(Fi(Object.assign({},Vi,{plugins:e}))):Ni).reduce((function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e}),{})}function ji(t,e){var i=Object.assign({},e,{content:li(e.content,[t])},e.ignoreAttributes?{}:Bi(t,e.plugins));return i.aria=Object.assign({},Vi.aria,i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}var qi=function(){return"innerHTML"};function Ui(t,e){t[qi()]=e}function Wi(t){var e=vi();return!0===t?e.className=ii:(e.className=ni,bi(t)?e.appendChild(t):Ui(e,t)),e}function Yi(t,e){bi(e.content)?(Ui(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Ui(t,e.content):t.textContent=e.content)}function Gi(t){var e=t.firstElementChild,i=fi(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(ti)})),arrow:i.find((function(t){return t.classList.contains(ii)||t.classList.contains(ni)})),backdrop:i.find((function(t){return t.classList.contains(ei)}))}}function Ki(t){var e=vi(),i=vi();i.className=Je,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=vi();function r(i,n){var r=Gi(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Yi(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Wi(n.arrow))):o.appendChild(Wi(n.arrow)):a&&o.removeChild(a)}return n.className=ti,n.setAttribute("data-state","hidden"),Yi(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Ki.$$tippy=!0;var Xi=1,Zi=[],Qi=[];function Ji(t,e){var i,n,r,o,s,a,l,c=ji(t,Object.assign({},Vi,Fi(mi(e)))),h=!1,d=!1,p=!1,u=!1,g=[],f=ci(X,c.interactiveDebounce),m=Xi++,v=null,b=ui(c.plugins),y={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},_={id:m,reference:t,popper:vi(),popperInstance:v,props:c,state:y,plugins:b,clearDelayTimeouts:lt,setProps:ct,setContent:ht,show:dt,hide:pt,hideWithInteractivity:ut,enable:st,disable:at,unmount:gt,destroy:ft};if(!c.render)return _;var w=c.render(_),x=w.popper,k=w.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+_.id,_.popper=x,t._tippy=_,x._tippy=_;var A=b.map((function(t){return t.fn(_)})),S=t.hasAttribute("aria-expanded");return Y(),R(),$(),H("onCreate",[_]),c.showOnCreate&&rt(),x.addEventListener("mouseenter",(function(){_.props.interactive&&_.state.isVisible&&_.clearDelayTimeouts()})),x.addEventListener("mouseleave",(function(){_.props.interactive&&_.props.trigger.indexOf("mouseenter")>=0&&L().addEventListener("mousemove",f)})),_;function z(){var t=_.props.touch;return Array.isArray(t)?t:[t,0]}function C(){return"hold"===z()[0]}function E(){var t;return!(null==(t=_.props.render)||!t.$$tippy)}function T(){return l||t}function L(){var t=T().parentNode;return t?Si(t):document}function M(){return Gi(x)}function O(t){return _.state.isMounted&&!_.state.isVisible||Ti.isTouch||o&&"focus"===o.type?0:si(_.props.delay,t?0:1,Vi.delay)}function $(t){void 0===t&&(t=!1),x.style.pointerEvents=_.props.interactive&&!t?"":"none",x.style.zIndex=""+_.props.zIndex}function H(t,e,i){var n;(void 0===i&&(i=!0),A.forEach((function(i){i[t]&&i[t].apply(i,e)})),i)&&(n=_.props)[t].apply(n,e)}function I(){var e=_.props.aria;if(e.content){var i="aria-"+e.content,n=x.id;di(_.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(i);if(_.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}}))}}function R(){!S&&_.props.aria.expanded&&di(_.props.triggerTarget||t).forEach((function(t){_.props.interactive?t.setAttribute("aria-expanded",_.state.isVisible&&t===T()?"true":"false"):t.removeAttribute("aria-expanded")}))}function P(){L().removeEventListener("mousemove",f),Zi=Zi.filter((function(t){return t!==f}))}function V(e){if(!Ti.isTouch||!p&&"mousedown"!==e.type){var i=e.composedPath&&e.composedPath()[0]||e.target;if(!_.props.interactive||!Ei(x,i)){if(di(_.props.triggerTarget||t).some((function(t){return Ei(t,i)}))){if(Ti.isTouch)return;if(_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else H("onClickOutside",[_,e]);!0===_.props.hideOnClick&&(_.clearDelayTimeouts(),_.hide(),d=!0,setTimeout((function(){d=!1})),_.state.isMounted||B())}}}function N(){p=!0}function D(){p=!1}function F(){var t=L();t.addEventListener("mousedown",V,!0),t.addEventListener("touchend",V,ri),t.addEventListener("touchstart",D,ri),t.addEventListener("touchmove",N,ri)}function B(){var t=L();t.removeEventListener("mousedown",V,!0),t.removeEventListener("touchend",V,ri),t.removeEventListener("touchstart",D,ri),t.removeEventListener("touchmove",N,ri)}function j(t,e){U(t,(function(){!_.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&e()}))}function q(t,e){U(t,e)}function U(t,e){var i=M().box;function n(t){t.target===i&&(Ci(i,"remove",n),e())}if(0===t)return e();Ci(i,"remove",s),Ci(i,"add",n),s=n}function W(e,i,n){void 0===n&&(n=!1),di(_.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,i,n),g.push({node:t,eventType:e,handler:i,options:n})}))}function Y(){C()&&(W("touchstart",K,{passive:!0}),W("touchend",Z,{passive:!0})),hi(_.props.trigger).forEach((function(t){if("manual"!==t)switch(W(t,K),t){case"mouseenter":W("mouseleave",Z);break;case"focus":W(Ii?"focusout":"blur",Q);break;case"focusin":W("focusout",Q)}}))}function G(){g.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),g=[]}function K(t){var e,i=!1;if(_.state.isEnabled&&!J(t)&&!d){var n="focus"===(null==(e=o)?void 0:e.type);o=t,l=t.currentTarget,R(),!_.state.isVisible&&_i(t)&&Zi.forEach((function(e){return e(t)})),"click"===t.type&&(_.props.trigger.indexOf("mouseenter")<0||h)&&!1!==_.props.hideOnClick&&_.state.isVisible?i=!0:rt(t),"click"===t.type&&(h=!i),i&&!n&&ot(t)}}function X(t){var e=t.target,i=T().contains(e)||x.contains(e);"mousemove"===t.type&&i||zi(nt().concat(x).map((function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:c}:null})).filter(Boolean),t)&&(P(),ot(t))}function Z(t){J(t)||_.props.trigger.indexOf("click")>=0&&h||(_.props.interactive?_.hideWithInteractivity(t):ot(t))}function Q(t){_.props.trigger.indexOf("focusin")<0&&t.target!==T()||_.props.interactive&&t.relatedTarget&&x.contains(t.relatedTarget)||ot(t)}function J(t){return!!Ti.isTouch&&C()!==t.type.indexOf("touch")>=0}function tt(){et();var e=_.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,l=E()?Gi(x).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||T()}:t,h=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(E()){var i=M().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];E()&&l&&h.push({name:"arrow",options:{element:l,padding:3}}),h.push.apply(h,(null==i?void 0:i.modifiers)||[]),_.popperInstance=Qe(c,x,Object.assign({},i,{placement:n,onFirstUpdate:a,modifiers:h}))}function et(){_.popperInstance&&(_.popperInstance.destroy(),_.popperInstance=null)}function it(){var t,e=_.props.appendTo,i=T();(t=_.props.interactive&&e===oi||"parent"===e?i.parentNode:li(e,[i])).contains(x)||t.appendChild(x),_.state.isMounted=!0,tt()}function nt(){return fi(x.querySelectorAll("[data-tippy-root]"))}function rt(t){_.clearDelayTimeouts(),t&&H("onTrigger",[_,t]),F();var e=O(!0),n=z(),r=n[0],o=n[1];Ti.isTouch&&"hold"===r&&o&&(e=o),e?i=setTimeout((function(){_.show()}),e):_.show()}function ot(t){if(_.clearDelayTimeouts(),H("onUntrigger",[_,t]),_.state.isVisible){if(!(_.props.trigger.indexOf("mouseenter")>=0&&_.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&h)){var e=O(!1);e?n=setTimeout((function(){_.state.isVisible&&_.hide()}),e):r=requestAnimationFrame((function(){_.hide()}))}}else B()}function st(){_.state.isEnabled=!0}function at(){_.hide(),_.state.isEnabled=!1}function lt(){clearTimeout(i),clearTimeout(n),cancelAnimationFrame(r)}function ct(e){if(!_.state.isDestroyed){H("onBeforeUpdate",[_,e]),G();var i=_.props,n=ji(t,Object.assign({},i,mi(e),{ignoreAttributes:!0}));_.props=n,Y(),i.interactiveDebounce!==n.interactiveDebounce&&(P(),f=ci(X,n.interactiveDebounce)),i.triggerTarget&&!n.triggerTarget?di(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded"),R(),$(),k&&k(i,n),_.popperInstance&&(tt(),nt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)}))),H("onAfterUpdate",[_,e])}}function ht(t){_.setProps({content:t})}function dt(){var t=_.state.isVisible,e=_.state.isDestroyed,i=!_.state.isEnabled,n=Ti.isTouch&&!_.props.touch,r=si(_.props.duration,0,Vi.duration);if(!(t||e||i||n||T().hasAttribute("disabled")||(H("onShow",[_],!1),!1===_.props.onShow(_)))){if(_.state.isVisible=!0,E()&&(x.style.visibility="visible"),$(),F(),_.state.isMounted||(x.style.transition="none"),E()){var o=M();ki([o.box,o.content],0)}a=function(){var t;if(_.state.isVisible&&!u){if(u=!0,x.offsetHeight,x.style.transition=_.props.moveTransition,E()&&_.props.animation){var e=M(),i=e.box,n=e.content;ki([i,n],r),Ai([i,n],"visible")}I(),R(),pi(Qi,_),null==(t=_.popperInstance)||t.forceUpdate(),H("onMount",[_]),_.props.animation&&E()&&q(r,(function(){_.state.isShown=!0,H("onShown",[_])}))}},it()}}function pt(){var t=!_.state.isVisible,e=_.state.isDestroyed,i=!_.state.isEnabled,n=si(_.props.duration,1,Vi.duration);if(!(t||e||i)&&(H("onHide",[_],!1),!1!==_.props.onHide(_))){if(_.state.isVisible=!1,_.state.isShown=!1,u=!1,h=!1,E()&&(x.style.visibility="hidden"),P(),B(),$(!0),E()){var r=M(),o=r.box,s=r.content;_.props.animation&&(ki([o,s],n),Ai([o,s],"hidden"))}I(),R(),_.props.animation?E()&&j(n,_.unmount):_.unmount()}}function ut(t){L().addEventListener("mousemove",f),pi(Zi,f),f(t)}function gt(){_.state.isVisible&&_.hide(),_.state.isMounted&&(et(),nt().forEach((function(t){t._tippy.unmount()})),x.parentNode&&x.parentNode.removeChild(x),Qi=Qi.filter((function(t){return t!==_})),_.state.isMounted=!1,H("onHidden",[_]))}function ft(){_.state.isDestroyed||(_.clearDelayTimeouts(),_.unmount(),G(),delete t._tippy,_.state.isDestroyed=!0,H("onDestroy",[_]))}}function tn(t,e){void 0===e&&(e={});var i=Vi.plugins.concat(e.plugins||[]);Hi();var n=Object.assign({},e,{plugins:i}),r=xi(t).reduce((function(t,e){var i=e&&Ji(e,n);return i&&t.push(i),t}),[]);return bi(t)?r[0]:r}tn.defaultProps=Vi,tn.setDefaultProps=Di,tn.currentInput=Ti;Object.assign({},$t,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});function en(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,(t,e)=>0==+t?"":0===e?t.toLowerCase():t.toUpperCase()).replace("-","")}tn.setDefaultProps({render:Ki});const nn='\n .tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n }\n\n .tippy-iOS {\n cursor: pointer!important;\n -webkit-tap-highlight-color: transparent\n }\n\n [data-tippy-root] {\n max-width: calc(100vw - 10px)\n }\n\n .tippy-box {\n position: relative;\n background-color: #333;\n color: #fff;\n border-radius: 4px;\n font-size: var(--pb-popover-font-size, var(--pb-base-font-size, 14px));\n line-height: var(--pb-popover-line-height, var(--pb-base-line-height, 1.4));\n text-align: left;\n font-style: normal;\n font-weight: normal;\n outline: 0;\n transition-property: transform, visibility, opacity\n }\n\n .tippy-box[data-placement^=top]>.tippy-arrow {\n bottom: 0\n }\n\n .tippy-box[data-placement^=top]>.tippy-arrow:before {\n bottom: -7px;\n left: 0;\n border-width: 8px 8px 0;\n border-top-color: initial;\n transform-origin: center top\n }\n\n .tippy-box[data-placement^=bottom]>.tippy-arrow {\n top: 0\n }\n\n .tippy-box[data-placement^=bottom]>.tippy-arrow:before {\n top: -7px;\n left: 0;\n border-width: 0 8px 8px;\n border-bottom-color: initial;\n transform-origin: center bottom\n }\n\n .tippy-box[data-placement^=left]>.tippy-arrow {\n right: 0\n }\n\n .tippy-box[data-placement^=left]>.tippy-arrow:before {\n border-width: 8px 0 8px 8px;\n border-left-color: initial;\n right: -7px;\n transform-origin: center left\n }\n\n .tippy-box[data-placement^=right]>.tippy-arrow {\n left: 0\n }\n\n .tippy-box[data-placement^=right]>.tippy-arrow:before {\n left: -7px;\n border-width: 8px 8px 8px 0;\n border-right-color: initial;\n transform-origin: center right\n }\n\n .tippy-box[data-inertia][data-state=visible] {\n transition-timing-function: cubic-bezier(.54, 1.5, .38, 1.11)\n }\n\n .tippy-arrow {\n width: 16px;\n height: 16px;\n color: #333\n }\n\n .tippy-arrow:before {\n content: "";\n position: absolute;\n border-color: transparent;\n border-style: solid\n }\n\n .tippy-content {\n position: relative;\n padding: 5px 9px;\n z-index: 1;\n overflow: auto;\n max-height: var(--pb-popover-max-height, calc(100vh - 60px));\n min-height: var(--pb-popover-min-height, auto);\n max-width: var(--pb-popover-max-width, auto);\n min-width: var(--pb-popover-min-width, auto);\n color: var(--pb-popover-color);\n }\n',rn='\n .tippy-box[data-theme~=light-border] {\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 8, 16, .15);\n color: #333;\n box-shadow: 0 4px 14px -2px rgba(0, 8, 16, .08)\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-backdrop {\n background-color: #fff\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-arrow:after, .tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after {\n content: "";\n position: absolute;\n z-index: -1\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-arrow:after {\n border-color: transparent;\n border-style: solid\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:before {\n border-top-color: #fff\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:after {\n border-top-color: rgba(0, 8, 16, .2);\n border-width: 7px 7px 0;\n top: 17px;\n left: 1px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow>svg {\n top: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow:after {\n top: 17px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:before {\n border-bottom-color: #fff;\n bottom: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:after {\n border-bottom-color: rgba(0, 8, 16, .2);\n border-width: 0 7px 7px;\n bottom: 17px;\n left: 1px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow>svg {\n bottom: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow:after {\n bottom: 17px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:before {\n border-left-color: #fff\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:after {\n border-left-color: rgba(0, 8, 16, .2);\n border-width: 7px 0 7px 7px;\n left: 17px;\n top: 1px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow>svg {\n left: 11px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow:after {\n left: 12px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:before {\n border-right-color: #fff;\n right: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:after {\n border-width: 7px 7px 7px 0;\n right: 17px;\n top: 1px;\n border-right-color: rgba(0, 8, 16, .2)\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow>svg {\n right: 11px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow:after {\n right: 12px\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-svg-arrow {\n fill: #fff\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after {\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCA2czEuNzk2LS4wMTMgNC42Ny0zLjYxNUM1Ljg1MS45IDYuOTMuMDA2IDggMGMxLjA3LS4wMDYgMi4xNDguODg3IDMuMzQzIDIuMzg1QzE0LjIzMyA2LjAwNSAxNiA2IDE2IDZIMHoiIGZpbGw9InJnYmEoMCwgOCwgMTYsIDAuMikiLz48L3N2Zz4=);\n background-size: 16px 6px;\n width: 16px;\n height: 6px\n }\n',on="\n .tippy-box[data-theme~=light] {\n color: #26323d;\n box-shadow: 0 0 20px 4px rgba(154, 161, 177, .15), 0 4px 80px -8px rgba(36, 40, 47, .25), 0 4px 4px -2px rgba(91, 94, 105, .15);\n background-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before {\n border-top-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before {\n border-bottom-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before {\n border-left-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before {\n border-right-color: #fff\n }\n\n .tippy-box[data-theme~=light]>.tippy-backdrop {\n background-color: #fff\n }\n\n .tippy-box[data-theme~=light]>.tippy-svg-arrow {\n fill: #fff\n }",sn="\n .tippy-box[data-theme~=material] {\n background-color: #505355;\n font-weight: 600\n }\n\n .tippy-box[data-theme~=material][data-placement^=top]>.tippy-arrow:before {\n border-top-color: #505355\n }\n\n .tippy-box[data-theme~=material][data-placement^=bottom]>.tippy-arrow:before {\n border-bottom-color: #505355\n }\n\n .tippy-box[data-theme~=material][data-placement^=left]>.tippy-arrow:before {\n border-left-color: #505355\n }\n\n .tippy-box[data-theme~=material][data-placement^=right]>.tippy-arrow:before {\n border-right-color: #505355\n }\n\n .tippy-box[data-theme~=material]>.tippy-backdrop {\n background-color: #505355\n }\n\n .tippy-box[data-theme~=material]>.tippy-svg-arrow {\n fill: #505355\n }\n",an="\n .tippy-box[data-theme~=translucent] {\n background-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent]>.tippy-arrow {\n width: 14px;\n height: 14px\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=top]>.tippy-arrow:before {\n border-width: 7px 7px 0;\n border-top-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=bottom]>.tippy-arrow:before {\n border-width: 0 7px 7px;\n border-bottom-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=left]>.tippy-arrow:before {\n border-width: 7px 0 7px 7px;\n border-left-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=right]>.tippy-arrow:before {\n border-width: 7px 7px 7px 0;\n border-right-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent]>.tippy-backdrop {\n background-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent]>.tippy-svg-arrow {\n fill: rgba(0, 0, 0, .7)\n }\n";var ln=Object.freeze({__proto__:null,camelize:en,base:nn,lightBorder:rn,light:on,material:sn,translucent:an});function cn(t,e,i){if(!t.querySelector("#pb-popover-"+e)){const n=t.nodeType===Node.DOCUMENT_NODE?document.head:t;console.log("Loading tippy styles for theme %s into %o",e,n);const r=document.createElement("style");r.type="text/css",r.id="pb-popover-"+e,r.innerHTML=i,n.appendChild(r)}}function hn(t,e){if(cn(t,"base",nn),e&&"none"!==e){const i=en(e),n=ln[i];n&&cn(t,i,n)}}class dn extends(D(V)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{for:{type:String},theme:{type:String},placement:{type:String},fallbackPlacement:{type:String,attribute:"fallback-placement"},persistent:{type:Boolean},trigger:{type:String},touch:{type:String},popupClass:{type:String,attribute:"popup-class"},remote:{type:String},stopPropagation:{type:Boolean,attribute:"stop-propagation"}})}constructor(){super(),this.persistent=!1,this.trigger=null,this.for=null,this.theme=null,this.placement=null,this.touch=null,this.fallbackPlacement=null,this.popupClass=null,this.stopPropagation=!1,this._tippy=null,this._content=null}render(){return this.for?I`<div class="hidden"><slot></slot></div>`:I`<span id="link" part="trigger" class="${this.persistent?"persistent":""}"><slot name="default"><slot></slot></slot></span><span class="hidden"><slot name="alternate"></slot></span>`}disconnectedCallback(){super.disconnectedCallback(),this._tippy&&this._tippy.destroy(),this._observer&&this._observer.disconnect()}_checkCSSProperties(){if(this.theme||"none"===this.theme||(this.theme=H(this,"--pb-popover-theme","none")),this.placement||(this.placement=H(this,"--pb-popover-placement","auto")),this.fallbackPlacement||(this.fallbackPlacement=H(this,"--pb-popover-fallback-placement",null)),this.persistent||(this.persistent=H(this,"--pb-popover-persistent",!1)),this.trigger||(this.trigger=H(this,"--pb-popover-trigger",null)),!this.touch){const t=H(this,"--pb-popover-touch","hold");this.touch="true"===t||t}}_injectStyles(){this._checkCSSProperties(),hn(this.getRootNode(),this.theme)}_getContent(){if(this._content)return this._content;const t=this._getSlot();if(t){const e=document.createElement("div");return t.assignedNodes().forEach(t=>{e.appendChild(t.content?t.content.cloneNode(!0):t.cloneNode(!0))}),this._content=e,e}return null}_getSlot(){return this.for?this.shadowRoot.querySelector("slot"):this.shadowRoot.querySelector("[name=alternate]")}_registerMutationObserver(){const t=this._getSlot();this._observer=new MutationObserver(()=>{this.alternate=this._getContent(),console.log("alternate changed"),this.emitTo("pb-popover-changed",this.alternate)}),this._observer.observe(this,{subtree:!0,childList:!0,characterData:!0}),t&&t.assignedNodes().forEach(t=>{this._observer.observe(t.content?t.content:t,{subtree:!0,childList:!0,characterData:!0})})}get alternate(){return this._getContent()}set alternate(t){this._content=t,this._tippy&&this._tippy.setContent(this._content)}command(t,e){"disable"===t&&(this.disabled=e,this._tippy&&(e?this._tippy.disable():this._tippy.enable()))}firstUpdated(){super.firstUpdated(),this._injectStyles(),this._registerMutationObserver(),this.trigger||(this.trigger=this.persistent?"click":"mouseenter");const t=this.getRootNode();let e;if(this.for?(e=t.getElementById(this.for),e||console.error("<pb-popover> target element %s not found",this.for)):e=this.shadowRoot.getElementById("link"),e){const i={allowHTML:!0,appendTo:t.nodeType===Node.DOCUMENT_NODE?document.body:t,placement:this.placement,interactive:!0,ignoreAttributes:!0,boundary:"viewport",maxWidth:"none",touch:this.touch,hideOnClick:!1,trigger:this.trigger};if(this.stopPropagation&&(i.onTrigger=(t,e)=>{e.stopPropagation()}),this.persistent&&(i.onClickOutside=(t,e)=>{t.hideWithInteractivity(e)}),this.theme&&"none"!==this.theme&&(i.theme=this.theme),this.fallbackPlacement){const t=this.fallbackPlacement.split(" ");i.popperOptions={modifiers:[{name:"flip",options:{fallbackPlacements:t}}]}}this.popupClass&&(i.onCreate=t=>{t.popper.classList.add(this.popupClass)}),i.onShow=t=>{this.remote?this._loadRemoteContent():t.setContent(this._getContent()),this.emitTo("pb-popover-show",{source:this,popup:t})},this._tippy=tn(e,i)}}_loadRemoteContent(){const t=this.toAbsoluteURL(this.remote);fetch(t,{method:"GET",mode:"cors",credentials:"same-origin"}).then(t=>t.text()).then(t=>{this.alternate=t}).catch(t=>{console.error("<pb-popover> Error retrieving remote content: %o",t)})}static get styles(){return[R`
|
|
510
|
+
`}}customElements.define("pb-demo-snippet",at);class lt{static subscribe(t,e,i,n=!1){const r=lt._getChannels(e),o=document.addEventListener(t,t=>{i&&t.detail&&t.detail.key&&r.includes(t.detail.key)&&i(t,o)},{once:n})}static subscribeOnce(t,e=null){const i=lt._getChannels(e);return new Promise(e=>{document.addEventListener(t,t=>{t.detail&&t.detail.key&&i.includes(t.detail.key)&&e(t)},{once:!0})})}static _getChannels(t){return null!==t&&t.length?Array.isArray(t)?t:[t]:[N]}static emit(t,e=null,i=null){const n=i||{};n.key=e||N;const r=new CustomEvent(t,{detail:n});document.dispatchEvent(r)}}window.pbEvents||(window.pbEvents=lt);const ct="2.15.3";class ht extends V{static get properties(){return Object.assign({version:{type:String,reflect:!0}},super.properties)}constructor(){super(),this.version=ct}connectedCallback(){if(super.connectedCallback(),!this.version){const t=P("../package.json");fetch(t).then(t=>t.json()).then(t=>{this.version=t.version})}}render(){return I`<span>${this.version?this.version:"unknown"}</span>`}createRenderRoot(){return this}}customElements.define("pb-version",ht);var dt="top",pt="bottom",ut="right",gt="left",ft="auto",mt=[dt,pt,ut,gt],vt="start",bt="end",yt="clippingParents",_t="viewport",wt="popper",xt="reference",kt=mt.reduce((function(t,e){return t.concat([e+"-"+vt,e+"-"+bt])}),[]),At=[].concat(mt,[ft]).reduce((function(t,e){return t.concat([e,e+"-"+vt,e+"-"+bt])}),[]),St=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function zt(t){return t?(t.nodeName||"").toLowerCase():null}function Ct(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Et(t){return t instanceof Ct(t).Element||t instanceof Element}function Tt(t){return t instanceof Ct(t).HTMLElement||t instanceof HTMLElement}function Lt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Ct(t).ShadowRoot||t instanceof ShadowRoot)}function Mt(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];Tt(r)&&zt(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))}function Ot(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});Tt(n)&&zt(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}}var $t={name:"applyStyles",enabled:!0,phase:"write",fn:Mt,effect:Ot,requires:["computeStyles"]};function Ht(t){return t.split("-")[0]}var It=Math.max,Rt=Math.min,Pt=Math.round;function Vt(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function Nt(){return!/^((?!chrome|android).)*safari/i.test(Vt())}function Dt(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),r=1,o=1;e&&Tt(t)&&(r=t.offsetWidth>0&&Pt(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Pt(n.height)/t.offsetHeight||1);var s=(Et(t)?Ct(t):window).visualViewport,a=!Nt()&&i,l=(n.left+(a&&s?s.offsetLeft:0))/r,c=(n.top+(a&&s?s.offsetTop:0))/o,h=n.width/r,d=n.height/o;return{width:h,height:d,top:c,right:l+h,bottom:c+d,left:l,x:l,y:c}}function Ft(t){var e=Dt(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function Bt(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&Lt(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function jt(t){return Ct(t).getComputedStyle(t)}function qt(t){return["table","td","th"].indexOf(zt(t))>=0}function Ut(t){return((Et(t)?t.ownerDocument:t.document)||window.document).documentElement}function Wt(t){return"html"===zt(t)?t:t.assignedSlot||t.parentNode||(Lt(t)?t.host:null)||Ut(t)}function Yt(t){return Tt(t)&&"fixed"!==jt(t).position?t.offsetParent:null}function Gt(t){var e=/firefox/i.test(Vt());if(/Trident/i.test(Vt())&&Tt(t)&&"fixed"===jt(t).position)return null;var i=Wt(t);for(Lt(i)&&(i=i.host);Tt(i)&&["html","body"].indexOf(zt(i))<0;){var n=jt(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}function Kt(t){for(var e=Ct(t),i=Yt(t);i&&qt(i)&&"static"===jt(i).position;)i=Yt(i);return i&&("html"===zt(i)||"body"===zt(i)&&"static"===jt(i).position)?e:i||Gt(t)||e}function Xt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Zt(t,e,i){return It(t,Rt(e,i))}function Qt(t,e,i){var n=Zt(t,e,i);return n>i?i:n}function Jt(){return{top:0,right:0,bottom:0,left:0}}function te(t){return Object.assign({},Jt(),t)}function ee(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var ie=function(t,e){return te("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:ee(t,mt))};function ne(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=Ht(i.placement),l=Xt(a),c=[gt,ut].indexOf(a)>=0?"height":"width";if(o&&s){var h=ie(r.padding,i),d=Ft(o),p="y"===l?dt:gt,u="y"===l?pt:ut,g=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],f=s[l]-i.rects.reference[l],m=Kt(o),v=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,b=g/2-f/2,y=h[p],_=v-d[c]-h[u],w=v/2-d[c]/2+b,x=Zt(y,w,_),k=l;i.modifiersData[n]=((e={})[k]=x,e.centerOffset=x-w,e)}}function re(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&Bt(e.elements.popper,n)&&(e.elements.arrow=n)}function oe(t){return t.split("-")[1]}var se={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ae(t,e){var i=t.x,n=t.y,r=e.devicePixelRatio||1;return{x:Pt(i*r)/r||0,y:Pt(n*r)/r||0}}function le(t){var e,i=t.popper,n=t.popperRect,r=t.placement,o=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,d=t.isFixed,p=s.x,u=void 0===p?0:p,g=s.y,f=void 0===g?0:g,m="function"==typeof h?h({x:u,y:f}):{x:u,y:f};u=m.x,f=m.y;var v=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),y=gt,_=dt,w=window;if(c){var x=Kt(i),k="clientHeight",A="clientWidth";if(x===Ct(i)&&"static"!==jt(x=Ut(i)).position&&"absolute"===a&&(k="scrollHeight",A="scrollWidth"),x=x,r===dt||(r===gt||r===ut)&&o===bt)_=pt,f-=(d&&x===w&&w.visualViewport?w.visualViewport.height:x[k])-n.height,f*=l?1:-1;if(r===gt||(r===dt||r===pt)&&o===bt)y=ut,u-=(d&&x===w&&w.visualViewport?w.visualViewport.width:x[A])-n.width,u*=l?1:-1}var S,z=Object.assign({position:a},c&&se),C=!0===h?ae({x:u,y:f},Ct(i)):{x:u,y:f};return u=C.x,f=C.y,l?Object.assign({},z,((S={})[_]=b?"0":"",S[y]=v?"0":"",S.transform=(w.devicePixelRatio||1)<=1?"translate("+u+"px, "+f+"px)":"translate3d("+u+"px, "+f+"px, 0)",S)):Object.assign({},z,((e={})[_]=b?f+"px":"",e[y]=v?u+"px":"",e.transform="",e))}function ce(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:Ht(e.placement),variation:oe(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,le(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,le(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var he={passive:!0};function de(t){var e=t.state,i=t.instance,n=t.options,r=n.scroll,o=void 0===r||r,s=n.resize,a=void 0===s||s,l=Ct(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,he)})),a&&l.addEventListener("resize",i.update,he),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,he)})),a&&l.removeEventListener("resize",i.update,he)}}var pe={left:"right",right:"left",bottom:"top",top:"bottom"};function ue(t){return t.replace(/left|right|bottom|top/g,(function(t){return pe[t]}))}var ge={start:"end",end:"start"};function fe(t){return t.replace(/start|end/g,(function(t){return ge[t]}))}function me(t){var e=Ct(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ve(t){return Dt(Ut(t)).left+me(t).scrollLeft}function be(t,e){var i=Ct(t),n=Ut(t),r=i.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=Nt();(c||!c&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+ve(t),y:l}}function ye(t){var e,i=Ut(t),n=me(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=It(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=It(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+ve(t),l=-n.scrollTop;return"rtl"===jt(r||i).direction&&(a+=It(i.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function _e(t){var e=jt(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function we(t){return["html","body","#document"].indexOf(zt(t))>=0?t.ownerDocument.body:Tt(t)&&_e(t)?t:we(Wt(t))}function xe(t,e){var i;void 0===e&&(e=[]);var n=we(t),r=n===(null==(i=t.ownerDocument)?void 0:i.body),o=Ct(n),s=r?[o].concat(o.visualViewport||[],_e(n)?n:[]):n,a=e.concat(s);return r?a:a.concat(xe(Wt(s)))}function ke(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Ae(t,e){var i=Dt(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}function Se(t,e,i){return e===_t?ke(be(t,i)):Et(e)?Ae(e,i):ke(ye(Ut(t)))}function ze(t){var e=xe(Wt(t)),i=["absolute","fixed"].indexOf(jt(t).position)>=0&&Tt(t)?Kt(t):t;return Et(i)?e.filter((function(t){return Et(t)&&Bt(t,i)&&"body"!==zt(t)})):[]}function Ce(t,e,i,n){var r="clippingParents"===e?ze(t):[].concat(e),o=[].concat(r,[i]),s=o[0],a=o.reduce((function(e,i){var r=Se(t,i,n);return e.top=It(r.top,e.top),e.right=Rt(r.right,e.right),e.bottom=Rt(r.bottom,e.bottom),e.left=It(r.left,e.left),e}),Se(t,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Ee(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?Ht(r):null,s=r?oe(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case dt:e={x:a,y:i.y-n.height};break;case pt:e={x:a,y:i.y+i.height};break;case ut:e={x:i.x+i.width,y:l};break;case gt:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?Xt(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case vt:e[c]=e[c]-(i[h]/2-n[h]/2);break;case bt:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function Te(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=void 0===n?t.placement:n,o=i.strategy,s=void 0===o?t.strategy:o,a=i.boundary,l=void 0===a?yt:a,c=i.rootBoundary,h=void 0===c?_t:c,d=i.elementContext,p=void 0===d?wt:d,u=i.altBoundary,g=void 0!==u&&u,f=i.padding,m=void 0===f?0:f,v=te("number"!=typeof m?m:ee(m,mt)),b=p===wt?xt:wt,y=t.rects.popper,_=t.elements[g?b:p],w=Ce(Et(_)?_:_.contextElement||Ut(t.elements.popper),l,h,s),x=Dt(t.elements.reference),k=Ee({reference:x,element:y,strategy:"absolute",placement:r}),A=ke(Object.assign({},y,k)),S=p===wt?A:x,z={top:w.top-S.top+v.top,bottom:S.bottom-w.bottom+v.bottom,left:w.left-S.left+v.left,right:S.right-w.right+v.right},C=t.modifiersData.offset;if(p===wt&&C){var E=C[r];Object.keys(z).forEach((function(t){var e=[ut,pt].indexOf(t)>=0?1:-1,i=[dt,pt].indexOf(t)>=0?"y":"x";z[t]+=E[i]*e}))}return z}function Le(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?At:l,h=oe(n),d=h?a?kt:kt.filter((function(t){return oe(t)===h})):mt,p=d.filter((function(t){return c.indexOf(t)>=0}));0===p.length&&(p=d);var u=p.reduce((function(e,i){return e[i]=Te(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[Ht(i)],e}),{});return Object.keys(u).sort((function(t,e){return u[t]-u[e]}))}function Me(t){if(Ht(t)===ft)return[];var e=ue(t);return[fe(t),e,fe(e)]}function Oe(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,p=i.altBoundary,u=i.flipVariations,g=void 0===u||u,f=i.allowedAutoPlacements,m=e.options.placement,v=Ht(m),b=l||(v===m||!g?[ue(m)]:Me(m)),y=[m].concat(b).reduce((function(t,i){return t.concat(Ht(i)===ft?Le(e,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:g,allowedAutoPlacements:f}):i)}),[]),_=e.rects.reference,w=e.rects.popper,x=new Map,k=!0,A=y[0],S=0;S<y.length;S++){var z=y[S],C=Ht(z),E=oe(z)===vt,T=[dt,pt].indexOf(C)>=0,L=T?"width":"height",M=Te(e,{placement:z,boundary:h,rootBoundary:d,altBoundary:p,padding:c}),O=T?E?ut:gt:E?pt:dt;_[L]>w[L]&&(O=ue(O));var $=ue(O),H=[];if(o&&H.push(M[C]<=0),a&&H.push(M[O]<=0,M[$]<=0),H.every((function(t){return t}))){A=z,k=!1;break}x.set(z,H)}if(k)for(var I=function(t){var e=y.find((function(e){var i=x.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return A=e,"break"},R=g?3:1;R>0;R--){if("break"===I(R))break}e.placement!==A&&(e.modifiersData[n]._skip=!0,e.placement=A,e.reset=!0)}}function $e(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function He(t){return[dt,ut,pt,gt].some((function(e){return t[e]>=0}))}function Ie(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=Te(e,{elementContext:"reference"}),a=Te(e,{altBoundary:!0}),l=$e(s,n),c=$e(a,r,o),h=He(l),d=He(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}function Re(t,e,i){var n=Ht(t),r=[gt,dt].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[gt,ut].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}function Pe(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=At.reduce((function(t,i){return t[i]=Re(i,e.rects,o),t}),{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}function Ve(t){var e=t.state,i=t.name;e.modifiersData[i]=Ee({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}function Ne(t){return"x"===t?"y":"x"}function De(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,p=i.tether,u=void 0===p||p,g=i.tetherOffset,f=void 0===g?0:g,m=Te(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),v=Ht(e.placement),b=oe(e.placement),y=!b,_=Xt(v),w=Ne(_),x=e.modifiersData.popperOffsets,k=e.rects.reference,A=e.rects.popper,S="function"==typeof f?f(Object.assign({},e.rects,{placement:e.placement})):f,z="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),C=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,E={x:0,y:0};if(x){if(o){var T,L="y"===_?dt:gt,M="y"===_?pt:ut,O="y"===_?"height":"width",$=x[_],H=$+m[L],I=$-m[M],R=u?-A[O]/2:0,P=b===vt?k[O]:A[O],V=b===vt?-A[O]:-k[O],N=e.elements.arrow,D=u&&N?Ft(N):{width:0,height:0},F=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Jt(),B=F[L],j=F[M],q=Zt(0,k[O],D[O]),U=y?k[O]/2-R-q-B-z.mainAxis:P-q-B-z.mainAxis,W=y?-k[O]/2+R+q+j+z.mainAxis:V+q+j+z.mainAxis,Y=e.elements.arrow&&Kt(e.elements.arrow),G=Y?"y"===_?Y.clientTop||0:Y.clientLeft||0:0,K=null!=(T=null==C?void 0:C[_])?T:0,X=$+W-K,Z=Zt(u?Rt(H,$+U-K-G):H,$,u?It(I,X):I);x[_]=Z,E[_]=Z-$}if(a){var Q,J="x"===_?dt:gt,tt="x"===_?pt:ut,et=x[w],it="y"===w?"height":"width",nt=et+m[J],rt=et-m[tt],ot=-1!==[dt,gt].indexOf(v),st=null!=(Q=null==C?void 0:C[w])?Q:0,at=ot?nt:et-k[it]-A[it]-st+z.altAxis,lt=ot?et+k[it]+A[it]-st-z.altAxis:rt,ct=u&&ot?Qt(at,et,lt):Zt(u?at:nt,et,u?lt:rt);x[w]=ct,E[w]=ct-et}e.modifiersData[n]=E}}function Fe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Be(t){return t!==Ct(t)&&Tt(t)?Fe(t):me(t)}function je(t){var e=t.getBoundingClientRect(),i=Pt(e.width)/t.offsetWidth||1,n=Pt(e.height)/t.offsetHeight||1;return 1!==i||1!==n}function qe(t,e,i){void 0===i&&(i=!1);var n=Tt(e),r=Tt(e)&&je(e),o=Ut(e),s=Dt(t,r,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!i)&&(("body"!==zt(e)||_e(o))&&(a=Be(e)),Tt(e)?((l=Dt(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=ve(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Ue(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}function We(t){var e=Ue(t);return St.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}function Ye(t){var e;return function(){return e||(e=new Promise((function(i){Promise.resolve().then((function(){e=void 0,i(t())}))}))),e}}function Ge(t){var e=t.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}var Ke={placement:"bottom",modifiers:[],strategy:"absolute"};function Xe(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Ze(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,r=e.defaultOptions,o=void 0===r?Ke:r;return function(t,e,i){void 0===i&&(i=o);var r={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ke,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},s=[],a=!1,l={state:r,setOptions:function(i){var s="function"==typeof i?i(r.options):i;h(),r.options=Object.assign({},o,r.options,s),r.scrollParents={reference:Et(t)?xe(t):t.contextElement?xe(t.contextElement):[],popper:xe(e)};var a=We(Ge([].concat(n,r.options.modifiers)));return r.orderedModifiers=a.filter((function(t){return t.enabled})),c(),l.update()},forceUpdate:function(){if(!a){var t=r.elements,e=t.reference,i=t.popper;if(Xe(e,i)){r.rects={reference:qe(e,Kt(i),"fixed"===r.options.strategy),popper:Ft(i)},r.reset=!1,r.placement=r.options.placement,r.orderedModifiers.forEach((function(t){return r.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<r.orderedModifiers.length;n++)if(!0!==r.reset){var o=r.orderedModifiers[n],s=o.fn,c=o.options,h=void 0===c?{}:c,d=o.name;"function"==typeof s&&(r=s({state:r,options:h,name:d,instance:l})||r)}else r.reset=!1,n=-1}}},update:Ye((function(){return new Promise((function(t){l.forceUpdate(),t(r)}))})),destroy:function(){h(),a=!0}};if(!Xe(t,e))return l;function c(){r.orderedModifiers.forEach((function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,o=t.effect;if("function"==typeof o){var a=o({state:r,name:e,instance:l,options:n}),c=function(){};s.push(a||c)}}))}function h(){s.forEach((function(t){return t()})),s=[]}return l.setOptions(i).then((function(t){!a&&i.onFirstUpdate&&i.onFirstUpdate(t)})),l}}var Qe=Ze({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:de,data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:Ve,data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ce,data:{}},$t,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Pe},{name:"flip",enabled:!0,phase:"main",fn:Oe,requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:De,requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:ne,effect:re,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ie}]}),Je="tippy-box",ti="tippy-content",ei="tippy-backdrop",ii="tippy-arrow",ni="tippy-svg-arrow",ri={passive:!0,capture:!0},oi=function(){return document.body};function si(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function ai(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function li(t,e){return"function"==typeof t?t.apply(void 0,e):t}function ci(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function hi(t){return t.split(/\s+/).filter(Boolean)}function di(t){return[].concat(t)}function pi(t,e){-1===t.indexOf(e)&&t.push(e)}function ui(t){return t.filter((function(e,i){return t.indexOf(e)===i}))}function gi(t){return t.split("-")[0]}function fi(t){return[].slice.call(t)}function mi(t){return Object.keys(t).reduce((function(e,i){return void 0!==t[i]&&(e[i]=t[i]),e}),{})}function vi(){return document.createElement("div")}function bi(t){return["Element","Fragment"].some((function(e){return ai(t,e)}))}function yi(t){return ai(t,"NodeList")}function _i(t){return ai(t,"MouseEvent")}function wi(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function xi(t){return bi(t)?[t]:yi(t)?fi(t):Array.isArray(t)?t:fi(document.querySelectorAll(t))}function ki(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function Ai(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function Si(t){var e,i=di(t)[0];return null!=i&&null!=(e=i.ownerDocument)&&e.body?i.ownerDocument:document}function zi(t,e){var i=e.clientX,n=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=gi(r.placement),a=r.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,d="left"===s?a.right.x:0,p=e.top-n+l>o,u=n-e.bottom-c>o,g=e.left-i+h>o,f=i-e.right-d>o;return p||u||g||f}))}function Ci(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}function Ei(t,e){for(var i=e;i;){var n;if(t.contains(i))return!0;i=null==i.getRootNode||null==(n=i.getRootNode())?void 0:n.host}return!1}var Ti={isTouch:!1},Li=0;function Mi(){Ti.isTouch||(Ti.isTouch=!0,window.performance&&document.addEventListener("mousemove",Oi))}function Oi(){var t=performance.now();t-Li<20&&(Ti.isTouch=!1,document.removeEventListener("mousemove",Oi)),Li=t}function $i(){var t=document.activeElement;if(wi(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function Hi(){document.addEventListener("touchstart",Mi,ri),window.addEventListener("blur",$i)}var Ii=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,Ri={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Pi={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Vi=Object.assign({appendTo:oi,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Ri,Pi),Ni=Object.keys(Vi),Di=function(t){Object.keys(t).forEach((function(e){Vi[e]=t[e]}))};function Fi(t){var e=(t.plugins||[]).reduce((function(e,i){var n,r=i.name,o=i.defaultValue;r&&(e[r]=void 0!==t[r]?t[r]:null!=(n=Vi[r])?n:o);return e}),{});return Object.assign({},t,e)}function Bi(t,e){return(e?Object.keys(Fi(Object.assign({},Vi,{plugins:e}))):Ni).reduce((function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e}),{})}function ji(t,e){var i=Object.assign({},e,{content:li(e.content,[t])},e.ignoreAttributes?{}:Bi(t,e.plugins));return i.aria=Object.assign({},Vi.aria,i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}var qi=function(){return"innerHTML"};function Ui(t,e){t[qi()]=e}function Wi(t){var e=vi();return!0===t?e.className=ii:(e.className=ni,bi(t)?e.appendChild(t):Ui(e,t)),e}function Yi(t,e){bi(e.content)?(Ui(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Ui(t,e.content):t.textContent=e.content)}function Gi(t){var e=t.firstElementChild,i=fi(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(ti)})),arrow:i.find((function(t){return t.classList.contains(ii)||t.classList.contains(ni)})),backdrop:i.find((function(t){return t.classList.contains(ei)}))}}function Ki(t){var e=vi(),i=vi();i.className=Je,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=vi();function r(i,n){var r=Gi(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Yi(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Wi(n.arrow))):o.appendChild(Wi(n.arrow)):a&&o.removeChild(a)}return n.className=ti,n.setAttribute("data-state","hidden"),Yi(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Ki.$$tippy=!0;var Xi=1,Zi=[],Qi=[];function Ji(t,e){var i,n,r,o,s,a,l,c=ji(t,Object.assign({},Vi,Fi(mi(e)))),h=!1,d=!1,p=!1,u=!1,g=[],f=ci(X,c.interactiveDebounce),m=Xi++,v=null,b=ui(c.plugins),y={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},_={id:m,reference:t,popper:vi(),popperInstance:v,props:c,state:y,plugins:b,clearDelayTimeouts:lt,setProps:ct,setContent:ht,show:dt,hide:pt,hideWithInteractivity:ut,enable:st,disable:at,unmount:gt,destroy:ft};if(!c.render)return _;var w=c.render(_),x=w.popper,k=w.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+_.id,_.popper=x,t._tippy=_,x._tippy=_;var A=b.map((function(t){return t.fn(_)})),S=t.hasAttribute("aria-expanded");return Y(),R(),$(),H("onCreate",[_]),c.showOnCreate&&rt(),x.addEventListener("mouseenter",(function(){_.props.interactive&&_.state.isVisible&&_.clearDelayTimeouts()})),x.addEventListener("mouseleave",(function(){_.props.interactive&&_.props.trigger.indexOf("mouseenter")>=0&&L().addEventListener("mousemove",f)})),_;function z(){var t=_.props.touch;return Array.isArray(t)?t:[t,0]}function C(){return"hold"===z()[0]}function E(){var t;return!(null==(t=_.props.render)||!t.$$tippy)}function T(){return l||t}function L(){var t=T().parentNode;return t?Si(t):document}function M(){return Gi(x)}function O(t){return _.state.isMounted&&!_.state.isVisible||Ti.isTouch||o&&"focus"===o.type?0:si(_.props.delay,t?0:1,Vi.delay)}function $(t){void 0===t&&(t=!1),x.style.pointerEvents=_.props.interactive&&!t?"":"none",x.style.zIndex=""+_.props.zIndex}function H(t,e,i){var n;(void 0===i&&(i=!0),A.forEach((function(i){i[t]&&i[t].apply(i,e)})),i)&&(n=_.props)[t].apply(n,e)}function I(){var e=_.props.aria;if(e.content){var i="aria-"+e.content,n=x.id;di(_.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(i);if(_.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}}))}}function R(){!S&&_.props.aria.expanded&&di(_.props.triggerTarget||t).forEach((function(t){_.props.interactive?t.setAttribute("aria-expanded",_.state.isVisible&&t===T()?"true":"false"):t.removeAttribute("aria-expanded")}))}function P(){L().removeEventListener("mousemove",f),Zi=Zi.filter((function(t){return t!==f}))}function V(e){if(!Ti.isTouch||!p&&"mousedown"!==e.type){var i=e.composedPath&&e.composedPath()[0]||e.target;if(!_.props.interactive||!Ei(x,i)){if(di(_.props.triggerTarget||t).some((function(t){return Ei(t,i)}))){if(Ti.isTouch)return;if(_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else H("onClickOutside",[_,e]);!0===_.props.hideOnClick&&(_.clearDelayTimeouts(),_.hide(),d=!0,setTimeout((function(){d=!1})),_.state.isMounted||B())}}}function N(){p=!0}function D(){p=!1}function F(){var t=L();t.addEventListener("mousedown",V,!0),t.addEventListener("touchend",V,ri),t.addEventListener("touchstart",D,ri),t.addEventListener("touchmove",N,ri)}function B(){var t=L();t.removeEventListener("mousedown",V,!0),t.removeEventListener("touchend",V,ri),t.removeEventListener("touchstart",D,ri),t.removeEventListener("touchmove",N,ri)}function j(t,e){U(t,(function(){!_.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&e()}))}function q(t,e){U(t,e)}function U(t,e){var i=M().box;function n(t){t.target===i&&(Ci(i,"remove",n),e())}if(0===t)return e();Ci(i,"remove",s),Ci(i,"add",n),s=n}function W(e,i,n){void 0===n&&(n=!1),di(_.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,i,n),g.push({node:t,eventType:e,handler:i,options:n})}))}function Y(){C()&&(W("touchstart",K,{passive:!0}),W("touchend",Z,{passive:!0})),hi(_.props.trigger).forEach((function(t){if("manual"!==t)switch(W(t,K),t){case"mouseenter":W("mouseleave",Z);break;case"focus":W(Ii?"focusout":"blur",Q);break;case"focusin":W("focusout",Q)}}))}function G(){g.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),g=[]}function K(t){var e,i=!1;if(_.state.isEnabled&&!J(t)&&!d){var n="focus"===(null==(e=o)?void 0:e.type);o=t,l=t.currentTarget,R(),!_.state.isVisible&&_i(t)&&Zi.forEach((function(e){return e(t)})),"click"===t.type&&(_.props.trigger.indexOf("mouseenter")<0||h)&&!1!==_.props.hideOnClick&&_.state.isVisible?i=!0:rt(t),"click"===t.type&&(h=!i),i&&!n&&ot(t)}}function X(t){var e=t.target,i=T().contains(e)||x.contains(e);"mousemove"===t.type&&i||zi(nt().concat(x).map((function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:c}:null})).filter(Boolean),t)&&(P(),ot(t))}function Z(t){J(t)||_.props.trigger.indexOf("click")>=0&&h||(_.props.interactive?_.hideWithInteractivity(t):ot(t))}function Q(t){_.props.trigger.indexOf("focusin")<0&&t.target!==T()||_.props.interactive&&t.relatedTarget&&x.contains(t.relatedTarget)||ot(t)}function J(t){return!!Ti.isTouch&&C()!==t.type.indexOf("touch")>=0}function tt(){et();var e=_.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,l=E()?Gi(x).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||T()}:t,h=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(E()){var i=M().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];E()&&l&&h.push({name:"arrow",options:{element:l,padding:3}}),h.push.apply(h,(null==i?void 0:i.modifiers)||[]),_.popperInstance=Qe(c,x,Object.assign({},i,{placement:n,onFirstUpdate:a,modifiers:h}))}function et(){_.popperInstance&&(_.popperInstance.destroy(),_.popperInstance=null)}function it(){var t,e=_.props.appendTo,i=T();(t=_.props.interactive&&e===oi||"parent"===e?i.parentNode:li(e,[i])).contains(x)||t.appendChild(x),_.state.isMounted=!0,tt()}function nt(){return fi(x.querySelectorAll("[data-tippy-root]"))}function rt(t){_.clearDelayTimeouts(),t&&H("onTrigger",[_,t]),F();var e=O(!0),n=z(),r=n[0],o=n[1];Ti.isTouch&&"hold"===r&&o&&(e=o),e?i=setTimeout((function(){_.show()}),e):_.show()}function ot(t){if(_.clearDelayTimeouts(),H("onUntrigger",[_,t]),_.state.isVisible){if(!(_.props.trigger.indexOf("mouseenter")>=0&&_.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&h)){var e=O(!1);e?n=setTimeout((function(){_.state.isVisible&&_.hide()}),e):r=requestAnimationFrame((function(){_.hide()}))}}else B()}function st(){_.state.isEnabled=!0}function at(){_.hide(),_.state.isEnabled=!1}function lt(){clearTimeout(i),clearTimeout(n),cancelAnimationFrame(r)}function ct(e){if(!_.state.isDestroyed){H("onBeforeUpdate",[_,e]),G();var i=_.props,n=ji(t,Object.assign({},i,mi(e),{ignoreAttributes:!0}));_.props=n,Y(),i.interactiveDebounce!==n.interactiveDebounce&&(P(),f=ci(X,n.interactiveDebounce)),i.triggerTarget&&!n.triggerTarget?di(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded"),R(),$(),k&&k(i,n),_.popperInstance&&(tt(),nt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)}))),H("onAfterUpdate",[_,e])}}function ht(t){_.setProps({content:t})}function dt(){var t=_.state.isVisible,e=_.state.isDestroyed,i=!_.state.isEnabled,n=Ti.isTouch&&!_.props.touch,r=si(_.props.duration,0,Vi.duration);if(!(t||e||i||n||T().hasAttribute("disabled")||(H("onShow",[_],!1),!1===_.props.onShow(_)))){if(_.state.isVisible=!0,E()&&(x.style.visibility="visible"),$(),F(),_.state.isMounted||(x.style.transition="none"),E()){var o=M();ki([o.box,o.content],0)}a=function(){var t;if(_.state.isVisible&&!u){if(u=!0,x.offsetHeight,x.style.transition=_.props.moveTransition,E()&&_.props.animation){var e=M(),i=e.box,n=e.content;ki([i,n],r),Ai([i,n],"visible")}I(),R(),pi(Qi,_),null==(t=_.popperInstance)||t.forceUpdate(),H("onMount",[_]),_.props.animation&&E()&&q(r,(function(){_.state.isShown=!0,H("onShown",[_])}))}},it()}}function pt(){var t=!_.state.isVisible,e=_.state.isDestroyed,i=!_.state.isEnabled,n=si(_.props.duration,1,Vi.duration);if(!(t||e||i)&&(H("onHide",[_],!1),!1!==_.props.onHide(_))){if(_.state.isVisible=!1,_.state.isShown=!1,u=!1,h=!1,E()&&(x.style.visibility="hidden"),P(),B(),$(!0),E()){var r=M(),o=r.box,s=r.content;_.props.animation&&(ki([o,s],n),Ai([o,s],"hidden"))}I(),R(),_.props.animation?E()&&j(n,_.unmount):_.unmount()}}function ut(t){L().addEventListener("mousemove",f),pi(Zi,f),f(t)}function gt(){_.state.isVisible&&_.hide(),_.state.isMounted&&(et(),nt().forEach((function(t){t._tippy.unmount()})),x.parentNode&&x.parentNode.removeChild(x),Qi=Qi.filter((function(t){return t!==_})),_.state.isMounted=!1,H("onHidden",[_]))}function ft(){_.state.isDestroyed||(_.clearDelayTimeouts(),_.unmount(),G(),delete t._tippy,_.state.isDestroyed=!0,H("onDestroy",[_]))}}function tn(t,e){void 0===e&&(e={});var i=Vi.plugins.concat(e.plugins||[]);Hi();var n=Object.assign({},e,{plugins:i}),r=xi(t).reduce((function(t,e){var i=e&&Ji(e,n);return i&&t.push(i),t}),[]);return bi(t)?r[0]:r}tn.defaultProps=Vi,tn.setDefaultProps=Di,tn.currentInput=Ti;Object.assign({},$t,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});function en(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,(t,e)=>0==+t?"":0===e?t.toLowerCase():t.toUpperCase()).replace("-","")}tn.setDefaultProps({render:Ki});const nn='\n .tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n }\n\n .tippy-iOS {\n cursor: pointer!important;\n -webkit-tap-highlight-color: transparent\n }\n\n [data-tippy-root] {\n max-width: calc(100vw - 10px)\n }\n\n .tippy-box {\n position: relative;\n background-color: #333;\n color: #fff;\n border-radius: 4px;\n font-size: var(--pb-popover-font-size, var(--pb-base-font-size, 14px));\n line-height: var(--pb-popover-line-height, var(--pb-base-line-height, 1.4));\n text-align: left;\n font-style: normal;\n font-weight: normal;\n outline: 0;\n transition-property: transform, visibility, opacity\n }\n\n .tippy-box[data-placement^=top]>.tippy-arrow {\n bottom: 0\n }\n\n .tippy-box[data-placement^=top]>.tippy-arrow:before {\n bottom: -7px;\n left: 0;\n border-width: 8px 8px 0;\n border-top-color: initial;\n transform-origin: center top\n }\n\n .tippy-box[data-placement^=bottom]>.tippy-arrow {\n top: 0\n }\n\n .tippy-box[data-placement^=bottom]>.tippy-arrow:before {\n top: -7px;\n left: 0;\n border-width: 0 8px 8px;\n border-bottom-color: initial;\n transform-origin: center bottom\n }\n\n .tippy-box[data-placement^=left]>.tippy-arrow {\n right: 0\n }\n\n .tippy-box[data-placement^=left]>.tippy-arrow:before {\n border-width: 8px 0 8px 8px;\n border-left-color: initial;\n right: -7px;\n transform-origin: center left\n }\n\n .tippy-box[data-placement^=right]>.tippy-arrow {\n left: 0\n }\n\n .tippy-box[data-placement^=right]>.tippy-arrow:before {\n left: -7px;\n border-width: 8px 8px 8px 0;\n border-right-color: initial;\n transform-origin: center right\n }\n\n .tippy-box[data-inertia][data-state=visible] {\n transition-timing-function: cubic-bezier(.54, 1.5, .38, 1.11)\n }\n\n .tippy-arrow {\n width: 16px;\n height: 16px;\n color: #333\n }\n\n .tippy-arrow:before {\n content: "";\n position: absolute;\n border-color: transparent;\n border-style: solid\n }\n\n .tippy-content {\n position: relative;\n padding: 5px 9px;\n z-index: 1;\n overflow: auto;\n max-height: var(--pb-popover-max-height, calc(100vh - 60px));\n min-height: var(--pb-popover-min-height, auto);\n max-width: var(--pb-popover-max-width, auto);\n min-width: var(--pb-popover-min-width, auto);\n color: var(--pb-popover-color);\n }\n',rn='\n .tippy-box[data-theme~=light-border] {\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 8, 16, .15);\n color: #333;\n box-shadow: 0 4px 14px -2px rgba(0, 8, 16, .08)\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-backdrop {\n background-color: #fff\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-arrow:after, .tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after {\n content: "";\n position: absolute;\n z-index: -1\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-arrow:after {\n border-color: transparent;\n border-style: solid\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:before {\n border-top-color: #fff\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:after {\n border-top-color: rgba(0, 8, 16, .2);\n border-width: 7px 7px 0;\n top: 17px;\n left: 1px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow>svg {\n top: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow:after {\n top: 17px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:before {\n border-bottom-color: #fff;\n bottom: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:after {\n border-bottom-color: rgba(0, 8, 16, .2);\n border-width: 0 7px 7px;\n bottom: 17px;\n left: 1px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow>svg {\n bottom: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow:after {\n bottom: 17px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:before {\n border-left-color: #fff\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:after {\n border-left-color: rgba(0, 8, 16, .2);\n border-width: 7px 0 7px 7px;\n left: 17px;\n top: 1px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow>svg {\n left: 11px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow:after {\n left: 12px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:before {\n border-right-color: #fff;\n right: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:after {\n border-width: 7px 7px 7px 0;\n right: 17px;\n top: 1px;\n border-right-color: rgba(0, 8, 16, .2)\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow>svg {\n right: 11px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow:after {\n right: 12px\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-svg-arrow {\n fill: #fff\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after {\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCA2czEuNzk2LS4wMTMgNC42Ny0zLjYxNUM1Ljg1MS45IDYuOTMuMDA2IDggMGMxLjA3LS4wMDYgMi4xNDguODg3IDMuMzQzIDIuMzg1QzE0LjIzMyA2LjAwNSAxNiA2IDE2IDZIMHoiIGZpbGw9InJnYmEoMCwgOCwgMTYsIDAuMikiLz48L3N2Zz4=);\n background-size: 16px 6px;\n width: 16px;\n height: 6px\n }\n',on="\n .tippy-box[data-theme~=light] {\n color: #26323d;\n box-shadow: 0 0 20px 4px rgba(154, 161, 177, .15), 0 4px 80px -8px rgba(36, 40, 47, .25), 0 4px 4px -2px rgba(91, 94, 105, .15);\n background-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before {\n border-top-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before {\n border-bottom-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before {\n border-left-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before {\n border-right-color: #fff\n }\n\n .tippy-box[data-theme~=light]>.tippy-backdrop {\n background-color: #fff\n }\n\n .tippy-box[data-theme~=light]>.tippy-svg-arrow {\n fill: #fff\n }",sn="\n .tippy-box[data-theme~=material] {\n background-color: #505355;\n font-weight: 600\n }\n\n .tippy-box[data-theme~=material][data-placement^=top]>.tippy-arrow:before {\n border-top-color: #505355\n }\n\n .tippy-box[data-theme~=material][data-placement^=bottom]>.tippy-arrow:before {\n border-bottom-color: #505355\n }\n\n .tippy-box[data-theme~=material][data-placement^=left]>.tippy-arrow:before {\n border-left-color: #505355\n }\n\n .tippy-box[data-theme~=material][data-placement^=right]>.tippy-arrow:before {\n border-right-color: #505355\n }\n\n .tippy-box[data-theme~=material]>.tippy-backdrop {\n background-color: #505355\n }\n\n .tippy-box[data-theme~=material]>.tippy-svg-arrow {\n fill: #505355\n }\n",an="\n .tippy-box[data-theme~=translucent] {\n background-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent]>.tippy-arrow {\n width: 14px;\n height: 14px\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=top]>.tippy-arrow:before {\n border-width: 7px 7px 0;\n border-top-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=bottom]>.tippy-arrow:before {\n border-width: 0 7px 7px;\n border-bottom-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=left]>.tippy-arrow:before {\n border-width: 7px 0 7px 7px;\n border-left-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=right]>.tippy-arrow:before {\n border-width: 7px 7px 7px 0;\n border-right-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent]>.tippy-backdrop {\n background-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent]>.tippy-svg-arrow {\n fill: rgba(0, 0, 0, .7)\n }\n";var ln=Object.freeze({__proto__:null,camelize:en,base:nn,lightBorder:rn,light:on,material:sn,translucent:an});function cn(t,e,i){if(!t.querySelector("#pb-popover-"+e)){const n=t.nodeType===Node.DOCUMENT_NODE?document.head:t;console.log("Loading tippy styles for theme %s into %o",e,n);const r=document.createElement("style");r.type="text/css",r.id="pb-popover-"+e,r.innerHTML=i,n.appendChild(r)}}function hn(t,e){if(cn(t,"base",nn),e&&"none"!==e){const i=en(e),n=ln[i];n&&cn(t,i,n)}}class dn extends(D(V)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{for:{type:String},theme:{type:String},placement:{type:String},fallbackPlacement:{type:String,attribute:"fallback-placement"},persistent:{type:Boolean},trigger:{type:String},touch:{type:String},popupClass:{type:String,attribute:"popup-class"},remote:{type:String},stopPropagation:{type:Boolean,attribute:"stop-propagation"}})}constructor(){super(),this.persistent=!1,this.trigger=null,this.for=null,this.theme=null,this.placement=null,this.touch=null,this.fallbackPlacement=null,this.popupClass=null,this.stopPropagation=!1,this._tippy=null,this._content=null}render(){return this.for?I`<div class="hidden"><slot></slot></div>`:I`<span id="link" part="trigger" class="${this.persistent?"persistent":""}"><slot name="default"><slot></slot></slot></span><span class="hidden"><slot name="alternate"></slot></span>`}disconnectedCallback(){super.disconnectedCallback(),this._tippy&&this._tippy.destroy(),this._observer&&this._observer.disconnect()}_checkCSSProperties(){if(this.theme||"none"===this.theme||(this.theme=H(this,"--pb-popover-theme","none")),this.placement||(this.placement=H(this,"--pb-popover-placement","auto")),this.fallbackPlacement||(this.fallbackPlacement=H(this,"--pb-popover-fallback-placement",null)),this.persistent||(this.persistent=H(this,"--pb-popover-persistent",!1)),this.trigger||(this.trigger=H(this,"--pb-popover-trigger",null)),!this.touch){const t=H(this,"--pb-popover-touch","hold");this.touch="true"===t||t}}_injectStyles(){this._checkCSSProperties(),hn(this.getRootNode(),this.theme)}_getContent(){if(this._content)return this._content;const t=this._getSlot();if(t){const e=document.createElement("div");return t.assignedNodes().forEach(t=>{e.appendChild(t.content?t.content.cloneNode(!0):t.cloneNode(!0))}),this._content=e,e}return null}_getSlot(){return this.for?this.shadowRoot.querySelector("slot"):this.shadowRoot.querySelector("[name=alternate]")}_registerMutationObserver(){const t=this._getSlot();this._observer=new MutationObserver(()=>{this.alternate=this._getContent(),console.log("alternate changed"),this.emitTo("pb-popover-changed",this.alternate)}),this._observer.observe(this,{subtree:!0,childList:!0,characterData:!0}),t&&t.assignedNodes().forEach(t=>{this._observer.observe(t.content?t.content:t,{subtree:!0,childList:!0,characterData:!0})})}get alternate(){return this._getContent()}set alternate(t){this._content=t,this._tippy&&this._tippy.setContent(this._content)}command(t,e){"disable"===t&&(this.disabled=e,this._tippy&&(e?this._tippy.disable():this._tippy.enable()))}firstUpdated(){super.firstUpdated(),this._injectStyles(),this._registerMutationObserver(),this.trigger||(this.trigger=this.persistent?"click":"mouseenter");const t=this.getRootNode();let e;if(this.for?(e=t.getElementById(this.for),e||console.error("<pb-popover> target element %s not found",this.for)):e=this.shadowRoot.getElementById("link"),e){const i={allowHTML:!0,appendTo:t.nodeType===Node.DOCUMENT_NODE?document.body:t,placement:this.placement,interactive:!0,ignoreAttributes:!0,boundary:"viewport",maxWidth:"none",touch:this.touch,hideOnClick:!1,trigger:this.trigger};if(this.stopPropagation&&(i.onTrigger=(t,e)=>{e.stopPropagation()}),this.persistent&&(i.onClickOutside=(t,e)=>{t.hideWithInteractivity(e)}),this.theme&&"none"!==this.theme&&(i.theme=this.theme),this.fallbackPlacement){const t=this.fallbackPlacement.split(" ");i.popperOptions={modifiers:[{name:"flip",options:{fallbackPlacements:t}}]}}this.popupClass&&(i.onCreate=t=>{t.popper.classList.add(this.popupClass)}),i.onShow=t=>{this.remote?this._loadRemoteContent():t.setContent(this._getContent()),this.emitTo("pb-popover-show",{source:this,popup:t})},this._tippy=tn(e,i)}}_loadRemoteContent(){const t=this.toAbsoluteURL(this.remote);fetch(t,{method:"GET",mode:"cors",credentials:"same-origin"}).then(t=>t.text()).then(t=>{this.alternate=t}).catch(t=>{console.error("<pb-popover> Error retrieving remote content: %o",t)})}static get styles(){return[R`
|
|
511
511
|
:host {
|
|
512
512
|
display: inline;
|
|
513
513
|
}
|
|
@@ -1436,7 +1436,7 @@ function(t){var e;if("function"==typeof define&&define.amd&&(define(t),e=!0),"ob
|
|
|
1436
1436
|
#message {
|
|
1437
1437
|
color: var(--paper-red-800);
|
|
1438
1438
|
}
|
|
1439
|
-
`}_show(t){t.preventDefault(),this.loggedIn?(this._checkLogin.body={logout:this.user},this._checkLogin.generateRequest()):this._loginDialog.open()}_confirmLogin(){this.user=this.shadowRoot.getElementById("user").value,this.password=this.shadowRoot.getElementById("password").value,this._checkLogin.body={user:this.user,password:this.password},this._checkLogin.generateRequest()}_handleResponse(){const t=this._checkLogin.lastResponse;t.user&&this._checkGroup(t)?(t.userChanged=!this.loggedIn||this.user!==t.user,this.loggedIn=!0,this.user=t.user,this.groups=t.groups,this._invalid=!1,this._loginDialog.close()):(t.userChanged=this.loggedIn,this.loggedIn=!1,this.password=null,this._loginDialog.opened?this._invalid=!0:this.auto&&this._loginDialog.open()),this.emitTo("pb-login",t)}_handleError(){this.loggedIn=!1,this.password=null;const t={userChanged:this.loggedIn,user:null};this._loginDialog.opened?this._invalid=!0:this.auto&&this._loginDialog.open(),this.emitTo("pb-login",t)}_checkGroup(t){
|
|
1439
|
+
`}_show(t){t.preventDefault(),this.loggedIn?(this._checkLogin.body={logout:this.user},this._checkLogin.generateRequest()):this._loginDialog.open()}_confirmLogin(){this.user=this.shadowRoot.getElementById("user").value,this.password=this.shadowRoot.getElementById("password").value,this._checkLogin.body={user:this.user,password:this.password},this._checkLogin.generateRequest()}_handleResponse(){const t=this._checkLogin.lastResponse;t.user&&this._checkGroup(t)?(t.userChanged=!this.loggedIn||this.user!==t.user,this.loggedIn=!0,this.user=t.user,this.groups=t.groups,this._invalid=!1,this._loginDialog.close()):(t.userChanged=this.loggedIn,this.loggedIn=!1,this.password=null,this._loginDialog.opened?this._invalid=!0:this.auto&&this._loginDialog.open()),this.emitTo("pb-login",t)}_handleError(){this.loggedIn=!1,this.password=null;const t={userChanged:this.loggedIn,user:null};this._loginDialog.opened?this._invalid=!0:this.auto&&this._loginDialog.open(),this.emitTo("pb-login",t)}_isItemInArray(t,e){return t.some(t=>e===t)}_checkGroup(t){if(this.group){let e=this.group.split(/[\s+,]+/),i=!1;return t.groups&&e.forEach(async e=>{i=this._isItemInArray(t.groups,e)||i}),i}return!0}}customElements.define("pb-login",Ia);class Ra extends(D(V)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{url:{type:String},title:{type:String},method:{type:String},event:{type:String},confirm:{type:String},quiet:{type:Boolean},_message:{type:String}})}constructor(){super(),this.method="get",this.confirm=null,this.quiet=!1}connectedCallback(){super.connectedCallback(),this.subscribeTo("pb-update",this._onUpdate.bind(this))}render(){return I`
|
|
1440
1440
|
<a id="button" @click="${this._handleClick}" title="${this.title}"><slot></slot></a>
|
|
1441
1441
|
<iron-ajax
|
|
1442
1442
|
id="loadContent"
|
|
@@ -2299,7 +2299,7 @@ e({_template:n`
|
|
|
2299
2299
|
:host(.fallback), :host([show]) {
|
|
2300
2300
|
display: block;
|
|
2301
2301
|
}
|
|
2302
|
-
`}
|
|
2302
|
+
`}_isItemInArray(t,e){return t.some(t=>e===t)}_loggedIn(t,e){if(null==t)return!1;if(this.group){if(!e)return!1;let t=this.group.split(/[\s+,]+/),i=!1;return t.forEach(async t=>{i=this._isItemInArray(e,t)||i}),i}return!0}}customElements.define("pb-restricted",Ua);class Wa extends(D(V)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{odds:{type:Array},target:{type:String},_valid:{type:Boolean},_current:{type:String}})}constructor(){super(),this.odds=[]}connectedCallback(){super.connectedCallback(),this.subscribeTo("pb-refresh-odds",t=>{this._refresh();const e=this.shadowRoot.getElementById("regenerate"),i=t.detail.odds.map(t=>"odd="+t).join("&");this.minApiVersion("1.0.0")?e.url="api/odd?"+i:e.url="modules/lib/regenerate.xql?"+i,e.trigger()})}firstUpdated(){super.firstUpdated(),this._loader=this.shadowRoot.getElementById("load"),B("pb-page-ready",t=>{j(t.apiVersion,"1.0.0")<0?this._loader.url=t.endpoint+"/modules/lib/components-odd.xql":this._loader.url=t.endpoint+"/api/odd",this._refresh()})}_refresh(t){this.emitTo("pb-start-update"),this._loader.params=t,this._loader.generateRequest()}_update(){this.emitTo("pb-end-update"),this.odds=this._loader.lastResponse,this.requestUpdate()}_selectODD(t){const e=t.model.itemsIndex;this.odds.forEach((t,i)=>{i!==e&&t.current&&(this.set("odds."+i+".current",!1),this.set("odds."+e+".current",!0))});const i={odd:t.model.item.name+".odd"};console.log("<pb-manage-odds> selected ODD: %o",i),this.emitTo("pb-load",{params:i})}_createODD(){const t=this.shadowRoot.querySelector('paper-input[name="new_odd"]').value,e=this.shadowRoot.querySelector('paper-input[name="title"]').value;if(console.log("<pb-manage-odds> create ODD: %s, %s",t,e),this.lessThanApiVersion("1.0.0"))this._refresh({new_odd:t,title:e});else{const i=this.shadowRoot.getElementById("create");i.url=`${this.getEndpoint()}/api/odd/${t}`,i.params={title:e},this.emitTo("pb-start-update"),i.generateRequest()}}_created(t){this.emitTo("pb-end-update"),201===t.detail.status?this._refresh():console.log("<pb-manage-odds> unexpected response for create odd: %o",t.detail)}_createByExample(){const t={new_odd:this.shadowRoot.querySelector('paper-input[name="new_odd"]').value,title:this.shadowRoot.querySelector('paper-input[name="title"]').value},e=document.getElementById(this.target);e||e.getSelected||console.error("<pb-manage-odds> target %s not found",this.target);const i=e.getSelected();document.querySelectorAll(".document-select paper-checkbox[checked]").forEach(t=>{i.push(t.value)}),console.log("<pb-manage-odds> create ODD by example: %o",i),t.byExample=i,this._refresh(t)}_delete(t){this._current=t,this.shadowRoot.getElementById("deleteDialog").open()}_confirmDelete(){if(this._current){if(console.log("<pb-manage-odds> deleting ODD: %s",this._current),this.lessThanApiVersion("1.0.0"))this._refresh({delete:this._current});else{this.emitTo("pb-start-update");const t=this.shadowRoot.getElementById("delete");t.url=`${this.getEndpoint()}/api/odd/${this._current}`,t.generateRequest()}this._current=null}else console.error("<pb-manage-odds> no file marked for deletion")}_deleted(){const t=this.shadowRoot.getElementById("delete").lastError;410===t.status?this._refresh():(console.error("<pb-manage-odds> failed to delete odd: %d %o",t.status,t.response),this.emitTo("pb-end-update"))}_validate(){const t=this.shadowRoot.getElementById("ironform").validate();this.shadowRoot.getElementById("createBtn").disabled=!t,this.shadowRoot.getElementById("createByEx").disabled=!t}render(){if(!this.odds)return null;const t=this.lessThanApiVersion("1.0.0")?"modules/lib/regenerate.xql":"api/odd";return I`
|
|
2303
2303
|
<pb-restricted login="login">
|
|
2304
2304
|
<pb-ajax id="regenerateAll" url="${t}" method="post" title="${W("odd.manage.regenerate-all")}"
|
|
2305
2305
|
emit="${this.emit?this.emit:""}" .emitConfig="${this.emitConfig}">
|
|
@@ -4487,7 +4487,7 @@ const Al=e({is:"iron-label",listeners:{tap:"_tapHandler"},properties:{for:{type:
|
|
|
4487
4487
|
/*! @orchidjs/unicode-variants | https://github.com/orchidjs/unicode-variants | Apache License (v2) */,Ad=t=>{if(1===t.length)return[[t]];let e=[];const i=t.substring(1);return Ad(i).forEach((function(i){let n=i.slice(0);n[0]=t.charAt(0)+n[0],e.push(n),n=i.slice(0),n.unshift(t.charAt(0)),e.push(n)})),e},Sd=[[0,65535]],zd="[̀-ͯ·ʾʼ]";let Cd,Ed;const Td=3,Ld={},Md={"/":"⁄∕",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"};for(let t in Md){let e=Md[t]||"";for(let i=0;i<e.length;i++){let n=e.substring(i,i+1);Ld[n]=t}}const Od=new RegExp(Object.keys(Ld).join("|")+"|"+zd,"gu"),$d=t=>{void 0===Cd&&(Cd=Nd(t||Sd))},Hd=(t,e="NFKD")=>t.normalize(e),Id=t=>kd(t).reduce((t,e)=>t+Rd(e),""),Rd=t=>(t=Hd(t).toLowerCase().replace(Od,t=>Ld[t]||""),Hd(t,"NFC"));function*Pd(t){for(const[e,i]of t)for(let t=e;t<=i;t++){let e=String.fromCharCode(t),i=Id(e);i!=e.toLowerCase()&&(i.length>Td||0!=i.length&&(yield{folded:i,composed:e,code_point:t}))}}const Vd=t=>{const e={},i=(t,i)=>{const n=e[t]||new Set,r=new RegExp("^"+bd(n)+"$","iu");i.match(r)||(n.add(_d(i)),e[t]=n)};for(let e of Pd(t))i(e.folded,e.folded),i(e.folded,e.composed);return e},Nd=t=>{const e=Vd(t),i={};let n=[];for(let t in e){let r=e[t];r&&(i[t]=bd(r)),t.length>1&&n.push(_d(t))}n.sort((t,e)=>e.length-t.length);const r=md(n);return Ed=new RegExp("^"+r,"u"),i},Dd=(t,e=1)=>{let i=0;return t=t.map(t=>(Cd[t]&&(i+=t.length),Cd[t]||t)),i>=e?vd(t):""},Fd=(t,e=1)=>(e=Math.max(e,t.length-1),md(Ad(t).map(t=>Dd(t,e)))),Bd=(t,e=!0)=>{let i=t.length>1?1:0;return md(t.map(t=>{let n=[];const r=e?t.length():t.length()-1;for(let e=0;e<r;e++)n.push(Fd(t.substrs[e]||"",i));return vd(n)}))},jd=(t,e)=>{for(const i of e){if(i.start!=t.start||i.end!=t.end)continue;if(i.substrs.join("")!==t.substrs.join(""))continue;let e=t.parts;const n=t=>{for(const i of e){if(i.start===t.start&&i.substr===t.substr)return!1;if(1!=t.length&&1!=i.length){if(t.start<i.start&&t.end>i.start)return!0;if(i.start<t.start&&i.end>t.start)return!0}}return!1};if(!(i.parts.filter(n).length>0))return!0}return!1};class qd{constructor(){this.parts=[],this.substrs=[],this.start=0,this.end=0}add(t){t&&(this.parts.push(t),this.substrs.push(t.substr),this.start=Math.min(t.start,this.start),this.end=Math.max(t.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(t,e){let i=new qd,n=JSON.parse(JSON.stringify(this.parts)),r=n.pop();for(const t of n)i.add(t);let o=e.substr.substring(0,t-r.start),s=o.length;return i.add({start:r.start,end:r.start+s,length:s,substr:o}),i}}const Ud=t=>{$d(),t=Id(t);let e="",i=[new qd];for(let n=0;n<t.length;n++){let r=t.substring(n).match(Ed);const o=t.substring(n,n+1),s=r?r[0]:null;let a=[],l=new Set;for(const t of i){const e=t.last();if(!e||1==e.length||e.end<=n)if(s){const e=s.length;t.add({start:n,end:n+e,length:e,substr:s}),l.add("1")}else t.add({start:n,end:n+1,length:1,substr:o}),l.add("2");else if(s){let i=t.clone(n,e);const r=s.length;i.add({start:n,end:n+r,length:r,substr:s}),a.push(i)}else l.add("3")}if(a.length>0){a=a.sort((t,e)=>t.length()-e.length());for(let t of a)jd(t,i)||i.push(t)}else if(n>0&&1==l.size&&!l.has("3")){e+=Bd(i,!1);let t=new qd;const n=i[0];n&&t.add(n.last()),i=[t]}}return e+=Bd(i,!0),e},Wd=(t,e)=>{if(t)return t[e]},Yd=(t,e)=>{if(t){for(var i,n=e.split(".");(i=n.shift())&&(t=t[i]););return t}},Gd=(t,e,i)=>{var n,r;return t?(t+="",null==e.regex||-1===(r=t.search(e.regex))?0:(n=e.string.length/t.length,0===r&&(n+=.5),n*i)):0},Kd=(t,e)=>{var i=t[e];if("function"==typeof i)return i;i&&!Array.isArray(i)&&(t[e]=[i])},Xd=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},Zd=(t,e)=>"number"==typeof t&&"number"==typeof e?t>e?1:t<e?-1:0:(t=Id(t+"").toLowerCase())>(e=Id(e+"").toLowerCase())?1:e>t?-1:0;
|
|
4488
4488
|
/*! sifter.js | https://github.com/orchidjs/sifter.js | Apache License (v2) */
|
|
4489
4489
|
/*! sifter.js | https://github.com/orchidjs/sifter.js | Apache License (v2) */
|
|
4490
|
-
class Qd{constructor(t,e){this.items=void 0,this.settings=void 0,this.items=t,this.settings=e||{diacritics:!0}}tokenize(t,e,i){if(!t||!t.length)return[];const n=[],r=t.split(/\s+/);var o;return i&&(o=new RegExp("^("+Object.keys(i).map(_d).join("|")+"):(.*)$")),r.forEach(t=>{let i,r=null,s=null;o&&(i=t.match(o))&&(r=i[1],t=i[2]),t.length>0&&(s=this.settings.diacritics?Ud(t)||null:_d(t),s&&e&&(s="\\b"+s)),n.push({string:t,regex:s?new RegExp(s,"iu"):null,field:r})}),n}getScoreFunction(t,e){var i=this.prepareSearch(t,e);return this._getScoreFunction(i)}_getScoreFunction(t){const e=t.tokens,i=e.length;if(!i)return function(){return 0};const n=t.options.fields,r=t.weights,o=n.length,s=t.getAttrFn;if(!o)return function(){return 1};const a=1===o?function(t,e){const i=n[0].field;return Gd(s(e,i),t,r[i]||1)}:function(t,e){var i=0;if(t.field){const n=s(e,t.field);!t.regex&&n?i+=1/o:i+=Gd(n,t,1)}else Xd(r,(n,r)=>{i+=Gd(s(e,r),t,n)});return i/o};return 1===i?function(t){return a(e[0],t)}:"and"===t.options.conjunction?function(t){var n,r=0;for(let i of e){if((n=a(i,t))<=0)return 0;r+=n}return r/i}:function(t){var n=0;return Xd(e,e=>{n+=a(e,t)}),n/i}}getSortFunction(t,e){var i=this.prepareSearch(t,e);return this._getSortFunction(i)}_getSortFunction(t){var e,i=[];const n=this,r=t.options,o=!t.query&&r.sort_empty?r.sort_empty:r.sort;if("function"==typeof o)return o.bind(this);const s=function(e,i){return"$score"===e?i.score:t.getAttrFn(n.items[i.id],e)};if(o)for(let e of o)(t.query||"$score"!==e.field)&&i.push(e);if(t.query){e=!0;for(let t of i)if("$score"===t.field){e=!1;break}e&&i.unshift({field:"$score",direction:"desc"})}else i=i.filter(t=>"$score"!==t.field);return i.length?function(t,e){var n,r;for(let o of i){if(r=o.field,n=("desc"===o.direction?-1:1)*Zd(s(r,t),s(r,e)))return n}return 0}:null}prepareSearch(t,e){const i={};var n=Object.assign({},e);if(Kd(n,"sort"),Kd(n,"sort_empty"),n.fields){Kd(n,"fields");const t=[];n.fields.forEach(e=>{"string"==typeof e&&(e={field:e,weight:1}),t.push(e),i[e.field]="weight"in e?e.weight:1}),n.fields=t}return{options:n,query:t.toLowerCase().trim(),tokens:this.tokenize(t,n.respect_word_boundaries,i),total:0,items:[],weights:i,getAttrFn:n.nesting?Yd:Wd}}search(t,e){var i,n,r=this;n=this.prepareSearch(t,e),e=n.options,t=n.query;const o=e.score||r._getScoreFunction(n);t.length?Xd(r.items,(t,r)=>{i=o(t),(!1===e.filter||i>0)&&n.items.push({score:i,id:r})}):Xd(r.items,(t,e)=>{n.items.push({score:1,id:e})});const s=r._getSortFunction(n);return s&&n.items.sort(s),n.total=n.items.length,"number"==typeof e.limit&&(n.items=n.items.slice(0,e.limit)),n}}const Jd=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},tp=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(ep(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},ep=t=>"string"==typeof t&&t.indexOf("<")>-1,ip=t=>t.replace(/['"\\]/g,"\\$&"),np=(t,e)=>{var i=document.createEvent("HTMLEvents");i.initEvent(e,!0,!1),t.dispatchEvent(i)},rp=(t,e)=>{Object.assign(t.style,e)},op=(t,...e)=>{var i=ap(e);(t=lp(t)).map(t=>{i.map(e=>{t.classList.add(e)})})},sp=(t,...e)=>{var i=ap(e);(t=lp(t)).map(t=>{i.map(e=>{t.classList.remove(e)})})},ap=t=>{var e=[];return Jd(t,t=>{"string"==typeof t&&(t=t.trim().split(/[\11\12\14\15\40]/)),Array.isArray(t)&&(e=e.concat(t))}),e.filter(Boolean)},lp=t=>(Array.isArray(t)||(t=[t]),t),cp=(t,e,i)=>{if(!i||i.contains(t))for(;t&&t.matches;){if(t.matches(e))return t;t=t.parentNode}},hp=(t,e=0)=>e>0?t[t.length-1]:t[0],dp=t=>0===Object.keys(t).length,pp=(t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var i=0;t=t.previousElementSibling;)t.matches(e)&&i++;return i},up=(t,e)=>{Jd(e,(e,i)=>{null==e?t.removeAttribute(i):t.setAttribute(i,""+e)})},gp=(t,e)=>{t.parentNode&&t.parentNode.replaceChild(e,t)},fp=(t,e)=>{if(null===e)return;if("string"==typeof e){if(!e.length)return;e=new RegExp(e,"i")}const i=t=>{var i=t.data.match(e);if(i&&t.data.length>0){var n=document.createElement("span");n.className="highlight";var r=t.splitText(i.index);r.splitText(i[0].length);var o=r.cloneNode(!0);return n.appendChild(o),gp(r,n),1}return 0},n=t=>{1!==t.nodeType||!t.childNodes||/(script|style)/i.test(t.tagName)||"highlight"===t.className&&"SPAN"===t.tagName||Array.from(t.childNodes).forEach(t=>{r(t)})},r=t=>3===t.nodeType?i(t):(n(t),0);r(t)},mp=t=>{var e=t.querySelectorAll("span.highlight");Array.prototype.forEach.call(e,(function(t){var e=t.parentNode;e.replaceChild(t.firstChild,t),e.normalize()}))},vp=65,bp=13,yp=27,_p=37,wp=38,xp=39,kp=40,Ap=8,Sp=46,zp=9,Cp="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey";var Ep={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'<input type="text" autocomplete="off" size="1" />',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(t){return t.length>0},render:{}};const Tp=t=>null==t?null:Lp(t),Lp=t=>"boolean"==typeof t?t?"1":"0":t+"",Mp=t=>(t+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),Op=(t,e)=>{var i;return function(n,r){var o=this;i&&(o.loading=Math.max(o.loading-1,0),clearTimeout(i)),i=setTimeout((function(){i=null,o.loadedSearches[n]=!0,t.call(o,n,r)}),e)}},$p=(t,e,i)=>{var n,r=t.trigger,o={};for(n of(t.trigger=function(){var i=arguments[0];if(-1===e.indexOf(i))return r.apply(t,arguments);o[i]=arguments},i.apply(t,[]),t.trigger=r,e))n in o&&r.apply(t,o[n])},Hp=t=>({start:t.selectionStart||0,length:(t.selectionEnd||0)-(t.selectionStart||0)}),Ip=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},Rp=(t,e,i,n)=>{t.addEventListener(e,i,n)},Pp=(t,e)=>!!e&&(!!e[t]&&1===(e.altKey?1:0)+(e.ctrlKey?1:0)+(e.shiftKey?1:0)+(e.metaKey?1:0)),Vp=(t,e)=>{const i=t.getAttribute("id");return i||(t.setAttribute("id",e),e)},Np=t=>t.replace(/[\\"']/g,"\\$&"),Dp=(t,e)=>{e&&t.append(e)};function Fp(t,e){var i=Object.assign({},Ep,e),n=i.dataAttr,r=i.labelField,o=i.valueField,s=i.disabledField,a=i.optgroupField,l=i.optgroupLabelField,c=i.optgroupValueField,h=t.tagName.toLowerCase(),d=t.getAttribute("placeholder")||t.getAttribute("data-placeholder");if(!d&&!i.allowEmptyOption){let e=t.querySelector('option[value=""]');e&&(d=e.textContent)}var p={placeholder:d,options:[],optgroups:[],items:[],maxItems:null},u=()=>{const e=t.getAttribute(n);if(e)p.options=JSON.parse(e),Jd(p.options,t=>{p.items.push(t[o])});else{var s=t.value.trim()||"";if(!i.allowEmptyOption&&!s.length)return;const e=s.split(i.delimiter);Jd(e,t=>{const e={};e[r]=t,e[o]=t,p.options.push(e)}),p.items=e}};return"select"===h?(()=>{var e,h=p.options,d={},u=1,g=t=>{var e=Object.assign({},t.dataset),i=n&&e[n];return"string"==typeof i&&i.length&&(e=Object.assign(e,JSON.parse(i))),e},f=(t,e)=>{var n=Tp(t.value);if(null!=n&&(n||i.allowEmptyOption)){if(d.hasOwnProperty(n)){if(e){var l=d[n][a];l?Array.isArray(l)?l.push(e):d[n][a]=[l,e]:d[n][a]=e}}else{var c=g(t);c[r]=c[r]||t.textContent,c[o]=c[o]||n,c[s]=c[s]||t.disabled,c[a]=c[a]||e,c.$option=t,d[n]=c,h.push(c)}t.selected&&p.items.push(n)}},m=t=>{var e,i;(i=g(t))[l]=i[l]||t.getAttribute("label")||"",i[c]=i[c]||u++,i[s]=i[s]||t.disabled,p.optgroups.push(i),e=i[c],Jd(t.children,t=>{f(t,e)})};p.maxItems=t.hasAttribute("multiple")?null:1,Jd(t.children,t=>{"optgroup"===(e=t.tagName.toLowerCase())?m(t):"option"===e&&f(t)})})():u(),Object.assign({},Ep,p,e)}var Bp=0;class jp extends(fd(gd)){constructor(t,e){var i;super(),this.control_input=void 0,this.wrapper=void 0,this.dropdown=void 0,this.control=void 0,this.dropdown_content=void 0,this.focus_node=void 0,this.order=0,this.settings=void 0,this.input=void 0,this.tabIndex=void 0,this.is_select_tag=void 0,this.rtl=void 0,this.inputId=void 0,this._destroy=void 0,this.sifter=void 0,this.isOpen=!1,this.isDisabled=!1,this.isRequired=void 0,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.currentResults=void 0,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],Bp++;var n=tp(t);if(n.tomselect)throw new Error("Tom Select already initialized on this element");n.tomselect=this,i=(window.getComputedStyle&&window.getComputedStyle(n,null)).getPropertyValue("direction");const r=Fp(n,e);this.settings=r,this.input=n,this.tabIndex=n.tabIndex||0,this.is_select_tag="select"===n.tagName.toLowerCase(),this.rtl=/rtl/i.test(i),this.inputId=Vp(n,"tomselect-"+Bp),this.isRequired=n.required,this.sifter=new Qd(this.options,{diacritics:r.diacritics}),r.mode=r.mode||(1===r.maxItems?"single":"multi"),"boolean"!=typeof r.hideSelected&&(r.hideSelected="multi"===r.mode),"boolean"!=typeof r.hidePlaceholder&&(r.hidePlaceholder="multi"!==r.mode);var o=r.createFilter;"function"!=typeof o&&("string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?r.createFilter=t=>o.test(t):r.createFilter=t=>this.settings.duplicates||!this.options[t]),this.initializePlugins(r.plugins),this.setupCallbacks(),this.setupTemplates();const s=tp("<div>"),a=tp("<div>"),l=this._render("dropdown"),c=tp('<div role="listbox" tabindex="-1">'),h=this.input.getAttribute("class")||"",d=r.mode;var p;(op(s,r.wrapperClass,h,d),op(a,r.controlClass),Dp(s,a),op(l,r.dropdownClass,d),r.copyClassesToDropdown&&op(l,h),op(c,r.dropdownContentClass),Dp(l,c),tp(r.dropdownParent||s).appendChild(l),ep(r.controlInput))?(p=tp(r.controlInput),Xd(["autocorrect","autocapitalize","autocomplete"],t=>{n.getAttribute(t)&&up(p,{[t]:n.getAttribute(t)})}),p.tabIndex=-1,a.appendChild(p),this.focus_node=p):r.controlInput?(p=tp(r.controlInput),this.focus_node=p):(p=tp("<input/>"),this.focus_node=a);this.wrapper=s,this.dropdown=l,this.dropdown_content=c,this.control=a,this.control_input=p,this.setup()}setup(){const t=this,e=t.settings,i=t.control_input,n=t.dropdown,r=t.dropdown_content,o=t.wrapper,s=t.control,a=t.input,l=t.focus_node,c={passive:!0},h=t.inputId+"-ts-dropdown";up(r,{id:h}),up(l,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":h});const d=Vp(l,t.inputId+"-ts-control"),p="label[for='"+ip(t.inputId)+"']",u=document.querySelector(p),g=t.focus.bind(t);if(u){Rp(u,"click",g),up(u,{for:d});const e=Vp(u,t.inputId+"-ts-label");up(l,{"aria-labelledby":e}),up(r,{"aria-labelledby":e})}if(o.style.width=a.style.width,t.plugins.names.length){const e="plugin-"+t.plugins.names.join(" plugin-");op([o,n],e)}(null===e.maxItems||e.maxItems>1)&&t.is_select_tag&&up(a,{multiple:"multiple"}),e.placeholder&&up(i,{placeholder:e.placeholder}),!e.splitOn&&e.delimiter&&(e.splitOn=new RegExp("\\s*"+_d(e.delimiter)+"+\\s*")),e.load&&e.loadThrottle&&(e.load=Op(e.load,e.loadThrottle)),t.control_input.type=a.type,Rp(n,"mousemove",()=>{t.ignoreHover=!1}),Rp(n,"mouseenter",e=>{var i=cp(e.target,"[data-selectable]",n);i&&t.onOptionHover(e,i)},{capture:!0}),Rp(n,"click",e=>{const i=cp(e.target,"[data-selectable]");i&&(t.onOptionSelect(e,i),Ip(e,!0))}),Rp(s,"click",e=>{var n=cp(e.target,"[data-ts-item]",s);n&&t.onItemSelect(e,n)?Ip(e,!0):""==i.value&&(t.onClick(),Ip(e,!0))}),Rp(l,"keydown",e=>t.onKeyDown(e)),Rp(i,"keypress",e=>t.onKeyPress(e)),Rp(i,"input",e=>t.onInput(e)),Rp(l,"blur",e=>t.onBlur(e)),Rp(l,"focus",e=>t.onFocus(e)),Rp(i,"paste",e=>t.onPaste(e));const f=e=>{const r=e.composedPath()[0];if(!o.contains(r)&&!n.contains(r))return t.isFocused&&t.blur(),void t.inputState();r==i&&t.isOpen?e.stopPropagation():Ip(e,!0)},m=()=>{t.isOpen&&t.positionDropdown()};Rp(document,"mousedown",f),Rp(window,"scroll",m,c),Rp(window,"resize",m,c),this._destroy=()=>{document.removeEventListener("mousedown",f),window.removeEventListener("scroll",m),window.removeEventListener("resize",m),u&&u.removeEventListener("click",g)},this.revertSettings={innerHTML:a.innerHTML,tabIndex:a.tabIndex},a.tabIndex=-1,a.insertAdjacentElement("afterend",t.wrapper),t.sync(!1),e.items=[],delete e.optgroups,delete e.options,Rp(a,"invalid",()=>{t.isValid&&(t.isValid=!1,t.isInvalid=!0,t.refreshState())}),t.updateOriginalInput(),t.refreshItems(),t.close(!1),t.inputState(),t.isSetup=!0,a.disabled?t.disable():t.enable(),t.on("change",this.onChange),op(a,"tomselected","ts-hidden-accessible"),t.trigger("initialize"),!0===e.preload&&t.preload()}setupOptions(t=[],e=[]){this.addOptions(t),Xd(e,t=>{this.registerOptionGroup(t)})}setupTemplates(){var t=this,e=t.settings.labelField,i=t.settings.optgroupLabelField,n={optgroup:t=>{let e=document.createElement("div");return e.className="optgroup",e.appendChild(t.options),e},optgroup_header:(t,e)=>'<div class="optgroup-header">'+e(t[i])+"</div>",option:(t,i)=>"<div>"+i(t[e])+"</div>",item:(t,i)=>"<div>"+i(t[e])+"</div>",option_create:(t,e)=>'<div class="create">Add <strong>'+e(t.input)+"</strong>…</div>",no_results:()=>'<div class="no-results">No results found</div>',loading:()=>'<div class="spinner"></div>',not_loading:()=>{},dropdown:()=>"<div></div>"};t.settings.render=Object.assign({},n,t.settings.render)}setupCallbacks(){var t,e,i={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in i)(e=this.settings[i[t]])&&this.on(t,e)}sync(t=!0){const e=this,i=t?Fp(e.input,{delimiter:e.settings.delimiter}):e.settings;e.setupOptions(i.options,i.optgroups),e.setValue(i.items||[],!0),e.lastQuery=null}onClick(){var t=this;if(t.activeItems.length>0)return t.clearActiveItems(),void t.focus();t.isFocused&&t.isOpen?t.blur():t.focus()}onMouseDown(){}onChange(){np(this.input,"input"),np(this.input,"change")}onPaste(t){var e=this;e.isInputHidden||e.isLocked?Ip(t):e.settings.splitOn&&setTimeout(()=>{var t=e.inputValue();if(t.match(e.settings.splitOn)){var i=t.trim().split(e.settings.splitOn);Xd(i,t=>{Tp(t)&&(this.options[t]?e.addItem(t):e.createItem(t))})}},0)}onKeyPress(t){var e=this;if(!e.isLocked){var i=String.fromCharCode(t.keyCode||t.which);return e.settings.create&&"multi"===e.settings.mode&&i===e.settings.delimiter?(e.createItem(),void Ip(t)):void 0}Ip(t)}onKeyDown(t){var e=this;if(e.ignoreHover=!0,e.isLocked)t.keyCode!==zp&&Ip(t);else{switch(t.keyCode){case vp:if(Pp(Cp,t)&&""==e.control_input.value)return Ip(t),void e.selectAll();break;case yp:return e.isOpen&&(Ip(t,!0),e.close()),void e.clearActiveItems();case kp:if(!e.isOpen&&e.hasOptions)e.open();else if(e.activeOption){let t=e.getAdjacent(e.activeOption,1);t&&e.setActiveOption(t)}return void Ip(t);case wp:if(e.activeOption){let t=e.getAdjacent(e.activeOption,-1);t&&e.setActiveOption(t)}return void Ip(t);case bp:return void(e.canSelect(e.activeOption)?(e.onOptionSelect(t,e.activeOption),Ip(t)):(e.settings.create&&e.createItem()||document.activeElement==e.control_input&&e.isOpen)&&Ip(t));case _p:return void e.advanceSelection(-1,t);case xp:return void e.advanceSelection(1,t);case zp:return void(e.settings.selectOnTab&&(e.canSelect(e.activeOption)&&(e.onOptionSelect(t,e.activeOption),Ip(t)),e.settings.create&&e.createItem()&&Ip(t)));case Ap:case Sp:return void e.deleteSelection(t)}e.isInputHidden&&!Pp(Cp,t)&&Ip(t)}}onInput(t){var e=this;if(!e.isLocked){var i=e.inputValue();e.lastValue!==i&&(e.lastValue=i,e.settings.shouldLoad.call(e,i)&&e.load(i),e.refreshOptions(),e.trigger("type",i))}}onOptionHover(t,e){this.ignoreHover||this.setActiveOption(e,!1)}onFocus(t){var e=this,i=e.isFocused;if(e.isDisabled)return e.blur(),void Ip(t);e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.preload(),i||e.trigger("focus"),e.activeItems.length||(e.showInput(),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())}onBlur(t){if(!1!==document.hasFocus()){var e=this;if(e.isFocused){e.isFocused=!1,e.ignoreFocus=!1;var i=()=>{e.close(),e.setActiveItem(),e.setCaret(e.items.length),e.trigger("blur")};e.settings.create&&e.settings.createOnBlur?e.createItem(null,i):i()}}}onOptionSelect(t,e){var i,n=this;e.parentElement&&e.parentElement.matches("[data-disabled]")||(e.classList.contains("create")?n.createItem(null,()=>{n.settings.closeAfterSelect&&n.close()}):void 0!==(i=e.dataset.value)&&(n.lastQuery=null,n.addItem(i),n.settings.closeAfterSelect&&n.close(),!n.settings.hideSelected&&t.type&&/click/.test(t.type)&&n.setActiveOption(e)))}canSelect(t){return!!(this.isOpen&&t&&this.dropdown_content.contains(t))}onItemSelect(t,e){var i=this;return!i.isLocked&&"multi"===i.settings.mode&&(Ip(t),i.setActiveItem(e,t),!0)}canLoad(t){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(t)}load(t){const e=this;if(!e.canLoad(t))return;op(e.wrapper,e.settings.loadingClass),e.loading++;const i=e.loadCallback.bind(e);e.settings.load.call(e,t,i)}loadCallback(t,e){const i=this;i.loading=Math.max(i.loading-1,0),i.lastQuery=null,i.clearActiveOption(),i.setupOptions(t,e),i.refreshOptions(i.isFocused&&!i.isInputHidden),i.loading||sp(i.wrapper,i.settings.loadingClass),i.trigger("load",t,e)}preload(){var t=this.wrapper.classList;t.contains("preloaded")||(t.add("preloaded"),this.load(""))}setTextboxValue(t=""){var e=this.control_input;e.value!==t&&(e.value=t,np(e,"update"),this.lastValue=t)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(t,e){$p(this,e?[]:["change"],()=>{this.clear(e),this.addItems(t,e)})}setMaxItems(t){0===t&&(t=null),this.settings.maxItems=t,this.refreshState()}setActiveItem(t,e){var i,n,r,o,s,a,l=this;if("single"!==l.settings.mode){if(!t)return l.clearActiveItems(),void(l.isFocused&&l.showInput());if("click"===(i=e&&e.type.toLowerCase())&&Pp("shiftKey",e)&&l.activeItems.length){for(a=l.getLastActive(),(r=Array.prototype.indexOf.call(l.control.children,a))>(o=Array.prototype.indexOf.call(l.control.children,t))&&(s=r,r=o,o=s),n=r;n<=o;n++)t=l.control.children[n],-1===l.activeItems.indexOf(t)&&l.setActiveItemClass(t);Ip(e)}else"click"===i&&Pp(Cp,e)||"keydown"===i&&Pp("shiftKey",e)?t.classList.contains("active")?l.removeActiveItem(t):l.setActiveItemClass(t):(l.clearActiveItems(),l.setActiveItemClass(t));l.hideInput(),l.isFocused||l.focus()}}setActiveItemClass(t){const e=this,i=e.control.querySelector(".last-active");i&&sp(i,"last-active"),op(t,"active last-active"),e.trigger("item_select",t),-1==e.activeItems.indexOf(t)&&e.activeItems.push(t)}removeActiveItem(t){var e=this.activeItems.indexOf(t);this.activeItems.splice(e,1),sp(t,"active")}clearActiveItems(){sp(this.activeItems,"active"),this.activeItems=[]}setActiveOption(t,e=!0){t!==this.activeOption&&(this.clearActiveOption(),t&&(this.activeOption=t,up(this.focus_node,{"aria-activedescendant":t.getAttribute("id")}),up(t,{"aria-selected":"true"}),op(t,"active"),e&&this.scrollToOption(t)))}scrollToOption(t,e){if(!t)return;const i=this.dropdown_content,n=i.clientHeight,r=i.scrollTop||0,o=t.offsetHeight,s=t.getBoundingClientRect().top-i.getBoundingClientRect().top+r;s+o>n+r?this.scroll(s-n+o,e):s<r&&this.scroll(s,e)}scroll(t,e){const i=this.dropdown_content;e&&(i.style.scrollBehavior=e),i.scrollTop=t,i.style.scrollBehavior=""}clearActiveOption(){this.activeOption&&(sp(this.activeOption,"active"),up(this.activeOption,{"aria-selected":null})),this.activeOption=null,up(this.focus_node,{"aria-activedescendant":null})}selectAll(){const t=this;if("single"===t.settings.mode)return;const e=t.controlChildren();e.length&&(t.hideInput(),t.close(),t.activeItems=e,Xd(e,e=>{t.setActiveItemClass(e)}))}inputState(){var t=this;t.control.contains(t.control_input)&&(up(t.control_input,{placeholder:t.settings.placeholder}),t.activeItems.length>0||!t.isFocused&&t.settings.hidePlaceholder&&t.items.length>0?(t.setTextboxValue(),t.isInputHidden=!0):(t.settings.hidePlaceholder&&t.items.length>0&&up(t.control_input,{placeholder:""}),t.isInputHidden=!1),t.wrapper.classList.toggle("input-hidden",t.isInputHidden))}hideInput(){this.inputState()}showInput(){this.inputState()}inputValue(){return this.control_input.value.trim()}focus(){var t=this;t.isDisabled||(t.ignoreFocus=!0,t.control_input.offsetWidth?t.control_input.focus():t.focus_node.focus(),setTimeout(()=>{t.ignoreFocus=!1,t.onFocus()},0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())}getSearchOptions(){var t=this.settings,e=t.sortField;return"string"==typeof t.sortField&&(e=[{field:t.sortField}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting}}search(t){var e,i,n=this,r=this.getSearchOptions();if(n.settings.score&&"function"!=typeof(i=n.settings.score.call(n,t)))throw new Error('Tom Select "score" setting must be a function that returns a function');return t!==n.lastQuery?(n.lastQuery=t,e=n.sifter.search(t,Object.assign(r,{score:i})),n.currentResults=e):e=Object.assign({},n.currentResults),n.settings.hideSelected&&(e.items=e.items.filter(t=>{let e=Tp(t.id);return!(e&&-1!==n.items.indexOf(e))})),e}refreshOptions(t=!0){var e,i,n,r,o,s,a,l,c,h;const d={},p=[];var u=this,g=u.inputValue();const f=g===u.lastQuery||""==g&&null==u.lastQuery;var m=u.search(g),v=null,b=u.settings.shouldOpen||!1,y=u.dropdown_content;for(f&&(v=u.activeOption)&&(c=v.closest("[data-group]")),r=m.items.length,"number"==typeof u.settings.maxOptions&&(r=Math.min(r,u.settings.maxOptions)),r>0&&(b=!0),e=0;e<r;e++){let t=m.items[e];if(!t)continue;let r=t.id,a=u.options[r];if(void 0===a)continue;let l=Lp(r),h=u.getOption(l,!0);for(u.settings.hideSelected||h.classList.toggle("selected",u.items.includes(l)),o=a[u.settings.optgroupField]||"",i=0,n=(s=Array.isArray(o)?o:[o])&&s.length;i<n;i++){o=s[i],u.optgroups.hasOwnProperty(o)||(o="");let t=d[o];void 0===t&&(t=document.createDocumentFragment(),p.push(o)),i>0&&(h=h.cloneNode(!0),up(h,{id:a.$id+"-clone-"+i,"aria-selected":null}),h.classList.add("ts-cloned"),sp(h,"active"),u.activeOption&&u.activeOption.dataset.value==r&&c&&c.dataset.group===o.toString()&&(v=h)),t.appendChild(h),d[o]=t}}u.settings.lockOptgroupOrder&&p.sort((t,e)=>{const i=u.optgroups[t],n=u.optgroups[e];return(i&&i.$order||0)-(n&&n.$order||0)}),a=document.createDocumentFragment(),Xd(p,t=>{let e=d[t];if(!e||!e.children.length)return;let i=u.optgroups[t];if(void 0!==i){let t=document.createDocumentFragment(),n=u.render("optgroup_header",i);Dp(t,n),Dp(t,e);let r=u.render("optgroup",{group:i,options:t});Dp(a,r)}else Dp(a,e)}),y.innerHTML="",Dp(y,a),u.settings.highlight&&(mp(y),m.query.length&&m.tokens.length&&Xd(m.tokens,t=>{fp(y,t.regex)}));var _=t=>{let e=u.render(t,{input:g});return e&&(b=!0,y.insertBefore(e,y.firstChild)),e};if(u.loading?_("loading"):u.settings.shouldLoad.call(u,g)?0===m.items.length&&_("no_results"):_("not_loading"),(l=u.canCreate(g))&&(h=_("option_create")),u.hasOptions=m.items.length>0||l,b){if(m.items.length>0){if(v||"single"!==u.settings.mode||null==u.items[0]||(v=u.getOption(u.items[0])),!y.contains(v)){let t=0;h&&!u.settings.addPrecedence&&(t=1),v=u.selectable()[t]}}else h&&(v=h);t&&!u.isOpen&&(u.open(),u.scrollToOption(v,"auto")),u.setActiveOption(v)}else u.clearActiveOption(),t&&u.isOpen&&u.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(t,e=!1){const i=this;if(Array.isArray(t))return i.addOptions(t,e),!1;const n=Tp(t[i.settings.valueField]);return null!==n&&!i.options.hasOwnProperty(n)&&(t.$order=t.$order||++i.order,t.$id=i.inputId+"-opt-"+t.$order,i.options[n]=t,i.lastQuery=null,e&&(i.userOptions[n]=e,i.trigger("option_add",n,t)),n)}addOptions(t,e=!1){Xd(t,t=>{this.addOption(t,e)})}registerOption(t){return this.addOption(t)}registerOptionGroup(t){var e=Tp(t[this.settings.optgroupValueField]);return null!==e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)}addOptionGroup(t,e){var i;e[this.settings.optgroupValueField]=t,(i=this.registerOptionGroup(e))&&this.trigger("optgroup_add",i,e)}removeOptionGroup(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.clearCache(),this.trigger("optgroup_remove",t))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(t,e){const i=this;var n,r;const o=Tp(t),s=Tp(e[i.settings.valueField]);if(null===o)return;const a=i.options[o];if(null==a)return;if("string"!=typeof s)throw new Error("Value must be set in option data");const l=i.getOption(o),c=i.getItem(o);if(e.$order=e.$order||a.$order,delete i.options[o],i.uncacheValue(s),i.options[s]=e,l){if(i.dropdown_content.contains(l)){const t=i._render("option",e);gp(l,t),i.activeOption===l&&i.setActiveOption(t)}l.remove()}c&&(-1!==(r=i.items.indexOf(o))&&i.items.splice(r,1,s),n=i._render("item",e),c.classList.contains("active")&&op(n,"active"),gp(c,n)),i.lastQuery=null}removeOption(t,e){const i=this;t=Lp(t),i.uncacheValue(t),delete i.userOptions[t],delete i.options[t],i.lastQuery=null,i.trigger("option_remove",t),i.removeItem(t,e)}clearOptions(t){const e=(t||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const i={};Xd(this.options,(t,n)=>{e(t,n)&&(i[n]=t)}),this.options=this.sifter.items=i,this.lastQuery=null,this.trigger("option_clear")}clearFilter(t,e){return this.items.indexOf(e)>=0}getOption(t,e=!1){const i=Tp(t);if(null===i)return null;const n=this.options[i];if(null!=n){if(n.$div)return n.$div;if(e)return this._render("option",n)}return null}getAdjacent(t,e,i="option"){var n,r=this;if(!t)return null;n="item"==i?r.controlChildren():r.dropdown_content.querySelectorAll("[data-selectable]");for(let i=0;i<n.length;i++)if(n[i]==t)return e>0?n[i+1]:n[i-1];return null}getItem(t){if("object"==typeof t)return t;var e=Tp(t);return null!==e?this.control.querySelector(`[data-value="${Np(e)}"]`):null}addItems(t,e){var i=this,n=Array.isArray(t)?t:[t];const r=(n=n.filter(t=>-1===i.items.indexOf(t)))[n.length-1];n.forEach(t=>{i.isPending=t!==r,i.addItem(t,e)})}addItem(t,e){$p(this,e?[]:["change","dropdown_close"],()=>{var i,n;const r=this,o=r.settings.mode,s=Tp(t);if((!s||-1===r.items.indexOf(s)||("single"===o&&r.close(),"single"!==o&&r.settings.duplicates))&&null!==s&&r.options.hasOwnProperty(s)&&("single"===o&&r.clear(e),"multi"!==o||!r.isFull())){if(i=r._render("item",r.options[s]),r.control.contains(i)&&(i=i.cloneNode(!0)),n=r.isFull(),r.items.splice(r.caretPos,0,s),r.insertAtCaret(i),r.isSetup){if(!r.isPending&&r.settings.hideSelected){let t=r.getOption(s),e=r.getAdjacent(t,1);e&&r.setActiveOption(e)}r.isPending||r.settings.closeAfterSelect||r.refreshOptions(r.isFocused&&"single"!==o),0!=r.settings.closeAfterSelect&&r.isFull()?r.close():r.isPending||r.positionDropdown(),r.trigger("item_add",s,i),r.isPending||r.updateOriginalInput({silent:e})}(!r.isPending||!n&&r.isFull())&&(r.inputState(),r.refreshState())}})}removeItem(t=null,e){const i=this;if(!(t=i.getItem(t)))return;var n,r;const o=t.dataset.value;n=pp(t),t.remove(),t.classList.contains("active")&&(r=i.activeItems.indexOf(t),i.activeItems.splice(r,1),sp(t,"active")),i.items.splice(n,1),i.lastQuery=null,!i.settings.persist&&i.userOptions.hasOwnProperty(o)&&i.removeOption(o,e),n<i.caretPos&&i.setCaret(i.caretPos-1),i.updateOriginalInput({silent:e}),i.refreshState(),i.positionDropdown(),i.trigger("item_remove",o,t)}createItem(t=null,e=(()=>{})){3===arguments.length&&(e=arguments[2]),"function"!=typeof e&&(e=()=>{});var i,n=this,r=n.caretPos;if(t=t||n.inputValue(),!n.canCreate(t))return e(),!1;n.lock();var o=!1,s=t=>{if(n.unlock(),!t||"object"!=typeof t)return e();var i=Tp(t[n.settings.valueField]);if("string"!=typeof i)return e();n.setTextboxValue(),n.addOption(t,!0),n.setCaret(r),n.addItem(i),e(t),o=!0};return i="function"==typeof n.settings.create?n.settings.create.call(this,t,s):{[n.settings.labelField]:t,[n.settings.valueField]:t},o||s(i),!0}refreshItems(){var t=this;t.lastQuery=null,t.isSetup&&t.addItems(t.items),t.updateOriginalInput(),t.refreshState()}refreshState(){const t=this;t.refreshValidityState();const e=t.isFull(),i=t.isLocked;t.wrapper.classList.toggle("rtl",t.rtl);const n=t.wrapper.classList;n.toggle("focus",t.isFocused),n.toggle("disabled",t.isDisabled),n.toggle("required",t.isRequired),n.toggle("invalid",!t.isValid),n.toggle("locked",i),n.toggle("full",e),n.toggle("input-active",t.isFocused&&!t.isInputHidden),n.toggle("dropdown-active",t.isOpen),n.toggle("has-options",dp(t.options)),n.toggle("has-items",t.items.length>0)}refreshValidityState(){var t=this;t.input.validity&&(t.isValid=t.input.validity.valid,t.isInvalid=!t.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(t={}){const e=this;var i,n;const r=e.input.querySelector('option[value=""]');if(e.is_select_tag){const t=[],s=e.input.querySelectorAll("option:checked").length;function o(i,n,o){return i||(i=tp('<option value="'+Mp(n)+'">'+Mp(o)+"</option>")),i!=r&&e.input.append(i),t.push(i),(i!=r||s>0)&&(i.selected=!0),i}e.input.querySelectorAll("option:checked").forEach(t=>{t.selected=!1}),0==e.items.length&&"single"==e.settings.mode?o(r,"",""):e.items.forEach(r=>{if(i=e.options[r],n=i[e.settings.labelField]||"",t.includes(i.$option)){o(e.input.querySelector(`option[value="${Np(r)}"]:not(:checked)`),r,n)}else i.$option=o(i.$option,r,n)})}else e.input.value=e.getValue();e.isSetup&&(t.silent||e.trigger("change",e.getValue()))}open(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,up(t.focus_node,{"aria-expanded":"true"}),t.refreshState(),rp(t.dropdown,{visibility:"hidden",display:"block"}),t.positionDropdown(),rp(t.dropdown,{visibility:"visible",display:"block"}),t.focus(),t.trigger("dropdown_open",t.dropdown))}close(t=!0){var e=this,i=e.isOpen;t&&(e.setTextboxValue(),"single"===e.settings.mode&&e.items.length&&e.hideInput()),e.isOpen=!1,up(e.focus_node,{"aria-expanded":"false"}),rp(e.dropdown,{display:"none"}),e.settings.hideSelected&&e.clearActiveOption(),e.refreshState(),i&&e.trigger("dropdown_close",e.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),i=t.offsetHeight+e.top+window.scrollY,n=e.left+window.scrollX;rp(this.dropdown,{width:e.width+"px",top:i+"px",left:n+"px"})}}clear(t){var e=this;if(e.items.length){var i=e.controlChildren();Xd(i,t=>{e.removeItem(t,!0)}),e.showInput(),t||e.updateOriginalInput(),e.trigger("clear")}}insertAtCaret(t){const e=this,i=e.caretPos,n=e.control;n.insertBefore(t,n.children[i]||null),e.setCaret(i+1)}deleteSelection(t){var e,i,n,r,o=this;e=t&&t.keyCode===Ap?-1:1,i=Hp(o.control_input);const s=[];if(o.activeItems.length)r=hp(o.activeItems,e),n=pp(r),e>0&&n++,Xd(o.activeItems,t=>s.push(t));else if((o.isFocused||"single"===o.settings.mode)&&o.items.length){const t=o.controlChildren();let n;e<0&&0===i.start&&0===i.length?n=t[o.caretPos-1]:e>0&&i.start===o.inputValue().length&&(n=t[o.caretPos]),void 0!==n&&s.push(n)}if(!o.shouldDelete(s,t))return!1;for(Ip(t,!0),void 0!==n&&o.setCaret(n);s.length;)o.removeItem(s.pop());return o.showInput(),o.positionDropdown(),o.refreshOptions(!1),!0}shouldDelete(t,e){const i=t.map(t=>t.dataset.value);return!(!i.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(i,e))}advanceSelection(t,e){var i,n,r=this;r.rtl&&(t*=-1),r.inputValue().length||(Pp(Cp,e)||Pp("shiftKey",e)?(n=(i=r.getLastActive(t))?i.classList.contains("active")?r.getAdjacent(i,t,"item"):i:t>0?r.control_input.nextElementSibling:r.control_input.previousElementSibling)&&(n.classList.contains("active")&&r.removeActiveItem(i),r.setActiveItemClass(n)):r.moveCaret(t))}moveCaret(t){}getLastActive(t){let e=this.control.querySelector(".last-active");if(e)return e;var i=this.control.querySelectorAll(".active");return i?hp(i,t):void 0}setCaret(t){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.isLocked=!0,this.refreshState()}unlock(){this.isLocked=!1,this.refreshState()}disable(){var t=this;t.input.disabled=!0,t.control_input.disabled=!0,t.focus_node.tabIndex=-1,t.isDisabled=!0,this.close(),t.lock()}enable(){var t=this;t.input.disabled=!1,t.control_input.disabled=!1,t.focus_node.tabIndex=t.tabIndex,t.isDisabled=!1,t.unlock()}destroy(){var t=this,e=t.revertSettings;t.trigger("destroy"),t.off(),t.wrapper.remove(),t.dropdown.remove(),t.input.innerHTML=e.innerHTML,t.input.tabIndex=e.tabIndex,sp(t.input,"tomselected","ts-hidden-accessible"),t._destroy(),delete t.input.tomselect}render(t,e){var i,n;const r=this;if("function"!=typeof this.settings.render[t])return null;if(!(n=r.settings.render[t].call(this,e,Mp)))return null;if(n=tp(n),"option"===t||"option_create"===t?e[r.settings.disabledField]?up(n,{"aria-disabled":"true"}):up(n,{"data-selectable":""}):"optgroup"===t&&(i=e.group[r.settings.optgroupValueField],up(n,{"data-group":i}),e.group[r.settings.disabledField]&&up(n,{"data-disabled":""})),"option"===t||"item"===t){const i=Lp(e[r.settings.valueField]);up(n,{"data-value":i}),"item"===t?(op(n,r.settings.itemClass),up(n,{"data-ts-item":""})):(op(n,r.settings.optionClass),up(n,{role:"option",id:e.$id}),e.$div=n,r.options[i]=e)}return n}_render(t,e){const i=this.render(t,e);if(null==i)throw"HTMLElement expected";return i}clearCache(){Xd(this.options,t=>{t.$div&&(t.$div.remove(),delete t.$div)})}uncacheValue(t){const e=this.getOption(t);e&&e.remove()}canCreate(t){return this.settings.create&&t.length>0&&this.settings.createFilter.call(this,t)}hook(t,e,i){var n=this,r=n[e];n[e]=function(){var e,o;return"after"===t&&(e=r.apply(n,arguments)),o=i.apply(n,arguments),"instead"===t?o:("before"===t&&(e=r.apply(n,arguments)),e)}}}function qp(){Rp(this.input,"change",()=>{this.sync()})}function Up(){var t=this,e=t.onOptionSelect;t.settings.hideSelected=!1;var i=function(t){setTimeout(()=>{var e=t.querySelector("input");e instanceof HTMLInputElement&&(t.classList.contains("selected")?e.checked=!0:e.checked=!1)},1)};t.hook("after","setupTemplates",()=>{var e=t.settings.render.option;t.settings.render.option=(i,n)=>{var r=tp(e.call(t,i,n)),o=document.createElement("input");o.addEventListener("click",(function(t){Ip(t)})),o.type="checkbox";const s=Tp(i[t.settings.valueField]);return s&&t.items.indexOf(s)>-1&&(o.checked=!0),r.prepend(o),r}}),t.on("item_remove",e=>{var n=t.getOption(e);n&&(n.classList.remove("selected"),i(n))}),t.on("item_add",e=>{var n=t.getOption(e);n&&i(n)}),t.hook("instead","onOptionSelect",(n,r)=>{if(r.classList.contains("selected"))return r.classList.remove("selected"),t.removeItem(r.dataset.value),t.refreshOptions(),void Ip(n,!0);e.call(t,n,r),i(r)})}function Wp(t){const e=this,i=Object.assign({className:"clear-button",title:"Clear All",html:t=>`<div class="${t.className}" title="${t.title}">⨯</div>`},t);e.on("initialize",()=>{var t=tp(i.html(i));t.addEventListener("click",t=>{e.isDisabled||(e.clear(),"single"===e.settings.mode&&e.settings.allowEmptyOption&&e.addItem(""),t.preventDefault(),t.stopPropagation())}),e.control.appendChild(t)})}function Yp(){var t=this;if(!$.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===t.settings.mode){var e=t.lock,i=t.unlock;t.hook("instead","lock",()=>{var i=$(t.control).data("sortable");return i&&i.disable(),e.call(t)}),t.hook("instead","unlock",()=>{var e=$(t.control).data("sortable");return e&&e.enable(),i.call(t)}),t.on("initialize",()=>{var e=$(t.control).sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:t.isLocked,start:(t,i)=>{i.placeholder.css("width",i.helper.css("width")),e.css({overflow:"visible"})},stop:()=>{e.css({overflow:"hidden"});var i=[];e.children("[data-value]").each((function(){this.dataset.value&&i.push(this.dataset.value)})),t.setValue(i)}})})}}function Gp(t){const e=this,i=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:t=>'<div class="'+t.headerClass+'"><div class="'+t.titleRowClass+'"><span class="'+t.labelClass+'">'+t.title+'</span><a class="'+t.closeClass+'">×</a></div></div>'},t);e.on("initialize",()=>{var t=tp(i.html(i)),n=t.querySelector("."+i.closeClass);n&&n.addEventListener("click",t=>{Ip(t,!0),e.close()}),e.dropdown.insertBefore(t,e.dropdown.firstChild)})}function Kp(){var t=this;t.hook("instead","setCaret",e=>{"single"!==t.settings.mode&&t.control.contains(t.control_input)?(e=Math.max(0,Math.min(t.items.length,e)))==t.caretPos||t.isPending||t.controlChildren().forEach((i,n)=>{n<e?t.control_input.insertAdjacentElement("beforebegin",i):t.control.appendChild(i)}):e=t.items.length,t.caretPos=e}),t.hook("instead","moveCaret",e=>{if(!t.isFocused)return;const i=t.getLastActive(e);if(i){const n=pp(i);t.setCaret(e>0?n+1:n),t.setActiveItem(),sp(i,"last-active")}else t.setCaret(t.caretPos+e)})}function Xp(){const t=this;t.settings.shouldOpen=!0,t.hook("before","setup",()=>{t.focus_node=t.control,op(t.control_input,"dropdown-input");const e=tp('<div class="dropdown-input-wrap">');e.append(t.control_input),t.dropdown.insertBefore(e,t.dropdown.firstChild);const i=tp('<input class="items-placeholder" tabindex="-1" />');i.placeholder=t.settings.placeholder||"",t.control.append(i)}),t.on("initialize",()=>{t.control_input.addEventListener("keydown",e=>{switch(e.keyCode){case yp:return t.isOpen&&(Ip(e,!0),t.close()),void t.clearActiveItems();case zp:t.focus_node.tabIndex=-1}return t.onKeyDown.call(t,e)}),t.on("blur",()=>{t.focus_node.tabIndex=t.isDisabled?-1:t.tabIndex}),t.on("dropdown_open",()=>{t.control_input.focus()});const e=t.onBlur;t.hook("instead","onBlur",i=>{if(!i||i.relatedTarget!=t.control_input)return e.call(t)}),Rp(t.control_input,"blur",()=>t.onBlur()),t.hook("before","close",()=>{t.isOpen&&t.focus_node.focus({preventScroll:!0})})})}function Zp(){var t=this;t.on("initialize",()=>{var e=document.createElement("span"),i=t.control_input;e.style.cssText="position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ",t.wrapper.appendChild(e);var n=["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"];for(const t of n)e.style[t]=i.style[t];var r=()=>{e.textContent=i.value,i.style.width=e.clientWidth+"px"};r(),t.on("update item_add item_remove",r),Rp(i,"input",r),Rp(i,"keyup",r),Rp(i,"blur",r),Rp(i,"update",r)})}function Qp(){var t=this,e=t.deleteSelection;this.hook("instead","deleteSelection",i=>!!t.activeItems.length&&e.call(t,i))}function Jp(){this.hook("instead","setActiveItem",()=>{}),this.hook("instead","selectAll",()=>{})}function tu(){var t=this,e=t.onKeyDown;t.hook("instead","onKeyDown",i=>{var n,r,o,s;if(!t.isOpen||i.keyCode!==_p&&i.keyCode!==xp)return e.call(t,i);t.ignoreHover=!0,s=cp(t.activeOption,"[data-group]"),n=pp(t.activeOption,"[data-selectable]"),s&&(s=i.keyCode===_p?s.previousSibling:s.nextSibling)&&(r=(o=s.querySelectorAll("[data-selectable]"))[Math.min(o.length-1,n)])&&t.setActiveOption(r)})}function eu(t){const e=Object.assign({label:"×",title:"Remove",className:"remove",append:!0},t);var i=this;if(e.append){var n='<a href="javascript:void(0)" class="'+e.className+'" tabindex="-1" title="'+Mp(e.title)+'">'+e.label+"</a>";i.hook("after","setupTemplates",()=>{var t=i.settings.render.item;i.settings.render.item=(e,r)=>{var o=tp(t.call(i,e,r)),s=tp(n);return o.appendChild(s),Rp(s,"mousedown",t=>{Ip(t,!0)}),Rp(s,"click",t=>{Ip(t,!0),i.isLocked||i.shouldDelete([o],t)&&(i.removeItem(o),i.refreshOptions(!1),i.inputState())}),o}})}}function iu(t){const e=this,i=Object.assign({text:t=>t[e.settings.labelField]},t);e.on("item_remove",(function(t){if(e.isFocused&&""===e.control_input.value.trim()){var n=e.options[t];n&&e.setTextboxValue(i.text.call(e,n))}}))}function nu(){const t=this,e=t.canLoad,i=t.clearActiveOption,n=t.loadCallback;var r,o,s={},a=!1,l=[];if(t.settings.shouldLoadMore||(t.settings.shouldLoadMore=()=>{if(r.clientHeight/(r.scrollHeight-r.scrollTop)>.9)return!0;if(t.activeOption){var e=t.selectable();if(Array.from(e).indexOf(t.activeOption)>=e.length-2)return!0}return!1}),!t.settings.firstUrl)throw"virtual_scroll plugin requires a firstUrl() method";t.settings.sortField=[{field:"$order"},{field:"$score"}];const c=e=>!("number"==typeof t.settings.maxOptions&&r.children.length>=t.settings.maxOptions)&&!(!(e in s)||!s[e]),h=(e,i)=>t.items.indexOf(i)>=0||l.indexOf(i)>=0;t.setNextUrl=(t,e)=>{s[t]=e},t.getUrl=e=>{if(e in s){const t=s[e];return s[e]=!1,t}return s={},t.settings.firstUrl.call(t,e)},t.hook("instead","clearActiveOption",()=>{if(!a)return i.call(t)}),t.hook("instead","canLoad",i=>i in s?c(i):e.call(t,i)),t.hook("instead","loadCallback",(e,i)=>{if(a){if(o){const i=e[0];void 0!==i&&(o.dataset.value=i[t.settings.valueField])}}else t.clearOptions(h);n.call(t,e,i),a=!1}),t.hook("after","refreshOptions",()=>{const e=t.lastValue;var i;c(e)?(i=t.render("loading_more",{query:e}))&&(i.setAttribute("data-selectable",""),o=i):e in s&&!r.querySelector(".no-results")&&(i=t.render("no_more_results",{query:e})),i&&(op(i,t.settings.optionClass),r.append(i))}),t.on("initialize",()=>{l=Object.keys(t.options),r=t.dropdown_content,t.settings.render=Object.assign({},{loading_more:()=>'<div class="loading-more-results">Loading more results ... </div>',no_more_results:()=>'<div class="no-more-results">No more results</div>'},t.settings.render),r.addEventListener("scroll",()=>{t.settings.shouldLoadMore.call(t)&&c(t.lastValue)&&(a||(a=!0,t.load.call(t,t.lastValue)))})})}function ru(t){if(document.getElementById("__pb-multi-select-css"))return;const e=P("../css/tom-select"),i=document.createElement("link");i.id="__pb-multi-select-css",i.href=`${e}/tom-select.${t}.min.css`,i.rel="stylesheet",document.head.appendChild(i)}jp.define("change_listener",qp),jp.define("checkbox_options",Up),jp.define("clear_button",Wp),jp.define("drag_drop",Yp),jp.define("dropdown_header",Gp),jp.define("caret_position",Kp),jp.define("dropdown_input",Xp),jp.define("input_autogrow",Zp),jp.define("no_backspace_delete",Qp),jp.define("no_active_items",Jp),jp.define("optgroup_columns",tu),jp.define("remove_button",eu),jp.define("restore_on_backspace",iu),jp.define("virtual_scroll",nu);const ou=t=>t?`<div>${G(t.text)}</div>`:"";class su extends(D(V)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{placeholder:{type:String},source:{type:String},closeAfterSelect:{type:Boolean,attribute:"close-after-select"},preload:{type:Boolean},onBlur:{type:String,attribute:"on-blur"},onChange:{type:String,attribute:"on-change"}})}get value(){return this._select?this._select.getValue():null}set value(t){this._select&&(this._select.clear(!0),this._select.sync(),this._select.setValue(t,!1),this._select.sync())}set renderItem(t){this.renderFunction=t}constructor(){super(),this.theme="default",this.source=null,this.closeAfterSelect=!1,this.preload=!1,this.renderFunction=ou,this.onBlur="pb-combo-box-blur",this.onChange="pb-combo-box-change",this.placeholder=""}connectedCallback(){super.connectedCallback(),this.subscribeTo("pb-i18n-update",()=>{this._select&&(this._select.settings.placeholder=G(this.placeholder),this._select.inputState(),this.source?this._select.refreshOptions(!1):(this._select.clearOptions(),this._select.sync()))})}firstUpdated(){ru(this.theme);let t=this.querySelector("select,input");t||(t=document.createElement("input"),this.appendChild(t)),t.autocomplete=!1,B("pb-page-ready",()=>{const e={};if(this.source){const t=this.toAbsoluteURL(this.source);e.labelField="text",e.valueField="value",e.searchField=["text","value"],e.preload=this.preload,e.load=(e,i)=>{fetch(`${t}?query=${encodeURIComponent(e)}`,{method:"GET",mode:"cors",credentials:"same-origin"}).then(t=>t.json()).then(t=>{i(t)}).catch(()=>{i()})},e.render={option:this.renderFunction,item:this.renderFunction}}e.placeholder=G(this.placeholder),e.closeAfterSelect=this.closeAfterSelect,e.onBlur=()=>this.emitTo(this.onBlur,{value:this.value}),e.onChange=()=>this.emitTo(this.onChange,{value:this.value}),this._select=new jp(t,e)})}createRenderRoot(){return this}}customElements.define("pb-combo-box",su);class au extends(D(V)){static get properties(){return Object.assign({src:{type:String},styles:{type:String},url:{type:String,reflect:!0,readOnly:!0},raw:{type:Boolean}},super.properties)}constructor(){super(),this.url="about:blank",this.raw=!1}firstUpdated(){super.firstUpdated(),this._iframe=this.shadowRoot.querySelector("iframe"),this._iframe.addEventListener("load",()=>{"about:blank"!==this._iframe.src&&(this._iframe.className="",this.emitTo("pb-end-update"))}),B("pb-page-ready",()=>{this.refresh()})}print(){this._iframe.contentWindow.print()}refresh(){this.emitTo("pb-start-update"),this._iframe.className="hidden",this._iframe.src="about:blank";const t=this.getDocument(),e=new URLSearchParams;t.odd&&e.set("odd",t.odd+".odd"),e.set("base",`${this.getEndpoint()}/${t.getCollection()}/`),this._getCustomStyles().forEach(t=>e.append("style",t));const i=e.toString();this.url=`${this.getEndpoint()}/api/document/${encodeURIComponent(t.path)}/print?${i}`;const n=new URLSearchParams(i);n.set("wc","true"),this.raw||(n.set("script",P("../lib/paged.polyfill.js")),n.append("style",P("../css/pagedjs/interface.css"))),this._iframe.src=`${this.getEndpoint()}/api/document/${encodeURIComponent(t.path)}/print?${n.toString()}`}render(){return I`
|
|
4490
|
+
class Qd{constructor(t,e){this.items=void 0,this.settings=void 0,this.items=t,this.settings=e||{diacritics:!0}}tokenize(t,e,i){if(!t||!t.length)return[];const n=[],r=t.split(/\s+/);var o;return i&&(o=new RegExp("^("+Object.keys(i).map(_d).join("|")+"):(.*)$")),r.forEach(t=>{let i,r=null,s=null;o&&(i=t.match(o))&&(r=i[1],t=i[2]),t.length>0&&(s=this.settings.diacritics?Ud(t)||null:_d(t),s&&e&&(s="\\b"+s)),n.push({string:t,regex:s?new RegExp(s,"iu"):null,field:r})}),n}getScoreFunction(t,e){var i=this.prepareSearch(t,e);return this._getScoreFunction(i)}_getScoreFunction(t){const e=t.tokens,i=e.length;if(!i)return function(){return 0};const n=t.options.fields,r=t.weights,o=n.length,s=t.getAttrFn;if(!o)return function(){return 1};const a=1===o?function(t,e){const i=n[0].field;return Gd(s(e,i),t,r[i]||1)}:function(t,e){var i=0;if(t.field){const n=s(e,t.field);!t.regex&&n?i+=1/o:i+=Gd(n,t,1)}else Xd(r,(n,r)=>{i+=Gd(s(e,r),t,n)});return i/o};return 1===i?function(t){return a(e[0],t)}:"and"===t.options.conjunction?function(t){var n,r=0;for(let i of e){if((n=a(i,t))<=0)return 0;r+=n}return r/i}:function(t){var n=0;return Xd(e,e=>{n+=a(e,t)}),n/i}}getSortFunction(t,e){var i=this.prepareSearch(t,e);return this._getSortFunction(i)}_getSortFunction(t){var e,i=[];const n=this,r=t.options,o=!t.query&&r.sort_empty?r.sort_empty:r.sort;if("function"==typeof o)return o.bind(this);const s=function(e,i){return"$score"===e?i.score:t.getAttrFn(n.items[i.id],e)};if(o)for(let e of o)(t.query||"$score"!==e.field)&&i.push(e);if(t.query){e=!0;for(let t of i)if("$score"===t.field){e=!1;break}e&&i.unshift({field:"$score",direction:"desc"})}else i=i.filter(t=>"$score"!==t.field);return i.length?function(t,e){var n,r;for(let o of i){if(r=o.field,n=("desc"===o.direction?-1:1)*Zd(s(r,t),s(r,e)))return n}return 0}:null}prepareSearch(t,e){const i={};var n=Object.assign({},e);if(Kd(n,"sort"),Kd(n,"sort_empty"),n.fields){Kd(n,"fields");const t=[];n.fields.forEach(e=>{"string"==typeof e&&(e={field:e,weight:1}),t.push(e),i[e.field]="weight"in e?e.weight:1}),n.fields=t}return{options:n,query:t.toLowerCase().trim(),tokens:this.tokenize(t,n.respect_word_boundaries,i),total:0,items:[],weights:i,getAttrFn:n.nesting?Yd:Wd}}search(t,e){var i,n,r=this;n=this.prepareSearch(t,e),e=n.options,t=n.query;const o=e.score||r._getScoreFunction(n);t.length?Xd(r.items,(t,r)=>{i=o(t),(!1===e.filter||i>0)&&n.items.push({score:i,id:r})}):Xd(r.items,(t,e)=>{n.items.push({score:1,id:e})});const s=r._getSortFunction(n);return s&&n.items.sort(s),n.total=n.items.length,"number"==typeof e.limit&&(n.items=n.items.slice(0,e.limit)),n}}const Jd=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},tp=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(ep(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},ep=t=>"string"==typeof t&&t.indexOf("<")>-1,ip=t=>t.replace(/['"\\]/g,"\\$&"),np=(t,e)=>{var i=document.createEvent("HTMLEvents");i.initEvent(e,!0,!1),t.dispatchEvent(i)},rp=(t,e)=>{Object.assign(t.style,e)},op=(t,...e)=>{var i=ap(e);(t=lp(t)).map(t=>{i.map(e=>{t.classList.add(e)})})},sp=(t,...e)=>{var i=ap(e);(t=lp(t)).map(t=>{i.map(e=>{t.classList.remove(e)})})},ap=t=>{var e=[];return Jd(t,t=>{"string"==typeof t&&(t=t.trim().split(/[\11\12\14\15\40]/)),Array.isArray(t)&&(e=e.concat(t))}),e.filter(Boolean)},lp=t=>(Array.isArray(t)||(t=[t]),t),cp=(t,e,i)=>{if(!i||i.contains(t))for(;t&&t.matches;){if(t.matches(e))return t;t=t.parentNode}},hp=(t,e=0)=>e>0?t[t.length-1]:t[0],dp=t=>0===Object.keys(t).length,pp=(t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var i=0;t=t.previousElementSibling;)t.matches(e)&&i++;return i},up=(t,e)=>{Jd(e,(e,i)=>{null==e?t.removeAttribute(i):t.setAttribute(i,""+e)})},gp=(t,e)=>{t.parentNode&&t.parentNode.replaceChild(e,t)},fp=(t,e)=>{if(null===e)return;if("string"==typeof e){if(!e.length)return;e=new RegExp(e,"i")}const i=t=>{var i=t.data.match(e);if(i&&t.data.length>0){var n=document.createElement("span");n.className="highlight";var r=t.splitText(i.index);r.splitText(i[0].length);var o=r.cloneNode(!0);return n.appendChild(o),gp(r,n),1}return 0},n=t=>{1!==t.nodeType||!t.childNodes||/(script|style)/i.test(t.tagName)||"highlight"===t.className&&"SPAN"===t.tagName||Array.from(t.childNodes).forEach(t=>{r(t)})},r=t=>3===t.nodeType?i(t):(n(t),0);r(t)},mp=t=>{var e=t.querySelectorAll("span.highlight");Array.prototype.forEach.call(e,(function(t){var e=t.parentNode;e.replaceChild(t.firstChild,t),e.normalize()}))},vp=65,bp=13,yp=27,_p=37,wp=38,xp=39,kp=40,Ap=8,Sp=46,zp=9,Cp="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey";var Ep={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'<input type="text" autocomplete="off" size="1" />',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(t){return t.length>0},render:{}};const Tp=t=>null==t?null:Lp(t),Lp=t=>"boolean"==typeof t?t?"1":"0":t+"",Mp=t=>(t+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),Op=(t,e)=>{var i;return function(n,r){var o=this;i&&(o.loading=Math.max(o.loading-1,0),clearTimeout(i)),i=setTimeout((function(){i=null,o.loadedSearches[n]=!0,t.call(o,n,r)}),e)}},$p=(t,e,i)=>{var n,r=t.trigger,o={};for(n of(t.trigger=function(){var i=arguments[0];if(-1===e.indexOf(i))return r.apply(t,arguments);o[i]=arguments},i.apply(t,[]),t.trigger=r,e))n in o&&r.apply(t,o[n])},Hp=t=>({start:t.selectionStart||0,length:(t.selectionEnd||0)-(t.selectionStart||0)}),Ip=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},Rp=(t,e,i,n)=>{t.addEventListener(e,i,n)},Pp=(t,e)=>!!e&&(!!e[t]&&1===(e.altKey?1:0)+(e.ctrlKey?1:0)+(e.shiftKey?1:0)+(e.metaKey?1:0)),Vp=(t,e)=>{const i=t.getAttribute("id");return i||(t.setAttribute("id",e),e)},Np=t=>t.replace(/[\\"']/g,"\\$&"),Dp=(t,e)=>{e&&t.append(e)};function Fp(t,e){var i=Object.assign({},Ep,e),n=i.dataAttr,r=i.labelField,o=i.valueField,s=i.disabledField,a=i.optgroupField,l=i.optgroupLabelField,c=i.optgroupValueField,h=t.tagName.toLowerCase(),d=t.getAttribute("placeholder")||t.getAttribute("data-placeholder");if(!d&&!i.allowEmptyOption){let e=t.querySelector('option[value=""]');e&&(d=e.textContent)}var p={placeholder:d,options:[],optgroups:[],items:[],maxItems:null},u=()=>{const e=t.getAttribute(n);if(e)p.options=JSON.parse(e),Jd(p.options,t=>{p.items.push(t[o])});else{var s=t.value.trim()||"";if(!i.allowEmptyOption&&!s.length)return;const e=s.split(i.delimiter);Jd(e,t=>{const e={};e[r]=t,e[o]=t,p.options.push(e)}),p.items=e}};return"select"===h?(()=>{var e,h=p.options,d={},u=1,g=t=>{var e=Object.assign({},t.dataset),i=n&&e[n];return"string"==typeof i&&i.length&&(e=Object.assign(e,JSON.parse(i))),e},f=(t,e)=>{var n=Tp(t.value);if(null!=n&&(n||i.allowEmptyOption)){if(d.hasOwnProperty(n)){if(e){var l=d[n][a];l?Array.isArray(l)?l.push(e):d[n][a]=[l,e]:d[n][a]=e}}else{var c=g(t);c[r]=c[r]||t.textContent,c[o]=c[o]||n,c[s]=c[s]||t.disabled,c[a]=c[a]||e,c.$option=t,d[n]=c,h.push(c)}t.selected&&p.items.push(n)}},m=t=>{var e,i;(i=g(t))[l]=i[l]||t.getAttribute("label")||"",i[c]=i[c]||u++,i[s]=i[s]||t.disabled,p.optgroups.push(i),e=i[c],Jd(t.children,t=>{f(t,e)})};p.maxItems=t.hasAttribute("multiple")?null:1,Jd(t.children,t=>{"optgroup"===(e=t.tagName.toLowerCase())?m(t):"option"===e&&f(t)})})():u(),Object.assign({},Ep,p,e)}var Bp=0;class jp extends(fd(gd)){constructor(t,e){var i;super(),this.control_input=void 0,this.wrapper=void 0,this.dropdown=void 0,this.control=void 0,this.dropdown_content=void 0,this.focus_node=void 0,this.order=0,this.settings=void 0,this.input=void 0,this.tabIndex=void 0,this.is_select_tag=void 0,this.rtl=void 0,this.inputId=void 0,this._destroy=void 0,this.sifter=void 0,this.isOpen=!1,this.isDisabled=!1,this.isRequired=void 0,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.currentResults=void 0,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],Bp++;var n=tp(t);if(n.tomselect)throw new Error("Tom Select already initialized on this element");n.tomselect=this,i=(window.getComputedStyle&&window.getComputedStyle(n,null)).getPropertyValue("direction");const r=Fp(n,e);this.settings=r,this.input=n,this.tabIndex=n.tabIndex||0,this.is_select_tag="select"===n.tagName.toLowerCase(),this.rtl=/rtl/i.test(i),this.inputId=Vp(n,"tomselect-"+Bp),this.isRequired=n.required,this.sifter=new Qd(this.options,{diacritics:r.diacritics}),r.mode=r.mode||(1===r.maxItems?"single":"multi"),"boolean"!=typeof r.hideSelected&&(r.hideSelected="multi"===r.mode),"boolean"!=typeof r.hidePlaceholder&&(r.hidePlaceholder="multi"!==r.mode);var o=r.createFilter;"function"!=typeof o&&("string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?r.createFilter=t=>o.test(t):r.createFilter=t=>this.settings.duplicates||!this.options[t]),this.initializePlugins(r.plugins),this.setupCallbacks(),this.setupTemplates();const s=tp("<div>"),a=tp("<div>"),l=this._render("dropdown"),c=tp('<div role="listbox" tabindex="-1">'),h=this.input.getAttribute("class")||"",d=r.mode;var p;(op(s,r.wrapperClass,h,d),op(a,r.controlClass),Dp(s,a),op(l,r.dropdownClass,d),r.copyClassesToDropdown&&op(l,h),op(c,r.dropdownContentClass),Dp(l,c),tp(r.dropdownParent||s).appendChild(l),ep(r.controlInput))?(p=tp(r.controlInput),Xd(["autocorrect","autocapitalize","autocomplete"],t=>{n.getAttribute(t)&&up(p,{[t]:n.getAttribute(t)})}),p.tabIndex=-1,a.appendChild(p),this.focus_node=p):r.controlInput?(p=tp(r.controlInput),this.focus_node=p):(p=tp("<input/>"),this.focus_node=a);this.wrapper=s,this.dropdown=l,this.dropdown_content=c,this.control=a,this.control_input=p,this.setup()}setup(){const t=this,e=t.settings,i=t.control_input,n=t.dropdown,r=t.dropdown_content,o=t.wrapper,s=t.control,a=t.input,l=t.focus_node,c={passive:!0},h=t.inputId+"-ts-dropdown";up(r,{id:h}),up(l,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":h});const d=Vp(l,t.inputId+"-ts-control"),p="label[for='"+ip(t.inputId)+"']",u=document.querySelector(p),g=t.focus.bind(t);if(u){Rp(u,"click",g),up(u,{for:d});const e=Vp(u,t.inputId+"-ts-label");up(l,{"aria-labelledby":e}),up(r,{"aria-labelledby":e})}if(o.style.width=a.style.width,t.plugins.names.length){const e="plugin-"+t.plugins.names.join(" plugin-");op([o,n],e)}(null===e.maxItems||e.maxItems>1)&&t.is_select_tag&&up(a,{multiple:"multiple"}),e.placeholder&&up(i,{placeholder:e.placeholder}),!e.splitOn&&e.delimiter&&(e.splitOn=new RegExp("\\s*"+_d(e.delimiter)+"+\\s*")),e.load&&e.loadThrottle&&(e.load=Op(e.load,e.loadThrottle)),t.control_input.type=a.type,Rp(n,"mousemove",()=>{t.ignoreHover=!1}),Rp(n,"mouseenter",e=>{var i=cp(e.target,"[data-selectable]",n);i&&t.onOptionHover(e,i)},{capture:!0}),Rp(n,"click",e=>{const i=cp(e.target,"[data-selectable]");i&&(t.onOptionSelect(e,i),Ip(e,!0))}),Rp(s,"click",e=>{var n=cp(e.target,"[data-ts-item]",s);n&&t.onItemSelect(e,n)?Ip(e,!0):""==i.value&&(t.onClick(),Ip(e,!0))}),Rp(l,"keydown",e=>t.onKeyDown(e)),Rp(i,"keypress",e=>t.onKeyPress(e)),Rp(i,"input",e=>t.onInput(e)),Rp(l,"blur",e=>t.onBlur(e)),Rp(l,"focus",e=>t.onFocus(e)),Rp(i,"paste",e=>t.onPaste(e));const f=e=>{const r=e.composedPath()[0];if(!o.contains(r)&&!n.contains(r))return t.isFocused&&t.blur(),void t.inputState();r==i&&t.isOpen?e.stopPropagation():Ip(e,!0)},m=()=>{t.isOpen&&t.positionDropdown()};Rp(document,"mousedown",f),Rp(window,"scroll",m,c),Rp(window,"resize",m,c),this._destroy=()=>{document.removeEventListener("mousedown",f),window.removeEventListener("scroll",m),window.removeEventListener("resize",m),u&&u.removeEventListener("click",g)},this.revertSettings={innerHTML:a.innerHTML,tabIndex:a.tabIndex},a.tabIndex=-1,a.insertAdjacentElement("afterend",t.wrapper),t.sync(!1),e.items=[],delete e.optgroups,delete e.options,Rp(a,"invalid",()=>{t.isValid&&(t.isValid=!1,t.isInvalid=!0,t.refreshState())}),t.updateOriginalInput(),t.refreshItems(),t.close(!1),t.inputState(),t.isSetup=!0,a.disabled?t.disable():t.enable(),t.on("change",this.onChange),op(a,"tomselected","ts-hidden-accessible"),t.trigger("initialize"),!0===e.preload&&t.preload()}setupOptions(t=[],e=[]){this.addOptions(t),Xd(e,t=>{this.registerOptionGroup(t)})}setupTemplates(){var t=this,e=t.settings.labelField,i=t.settings.optgroupLabelField,n={optgroup:t=>{let e=document.createElement("div");return e.className="optgroup",e.appendChild(t.options),e},optgroup_header:(t,e)=>'<div class="optgroup-header">'+e(t[i])+"</div>",option:(t,i)=>"<div>"+i(t[e])+"</div>",item:(t,i)=>"<div>"+i(t[e])+"</div>",option_create:(t,e)=>'<div class="create">Add <strong>'+e(t.input)+"</strong>…</div>",no_results:()=>'<div class="no-results">No results found</div>',loading:()=>'<div class="spinner"></div>',not_loading:()=>{},dropdown:()=>"<div></div>"};t.settings.render=Object.assign({},n,t.settings.render)}setupCallbacks(){var t,e,i={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in i)(e=this.settings[i[t]])&&this.on(t,e)}sync(t=!0){const e=this,i=t?Fp(e.input,{delimiter:e.settings.delimiter}):e.settings;e.setupOptions(i.options,i.optgroups),e.setValue(i.items||[],!0),e.lastQuery=null}onClick(){var t=this;if(t.activeItems.length>0)return t.clearActiveItems(),void t.focus();t.isFocused&&t.isOpen?t.blur():t.focus()}onMouseDown(){}onChange(){np(this.input,"input"),np(this.input,"change")}onPaste(t){var e=this;e.isInputHidden||e.isLocked?Ip(t):e.settings.splitOn&&setTimeout(()=>{var t=e.inputValue();if(t.match(e.settings.splitOn)){var i=t.trim().split(e.settings.splitOn);Xd(i,t=>{Tp(t)&&(this.options[t]?e.addItem(t):e.createItem(t))})}},0)}onKeyPress(t){var e=this;if(!e.isLocked){var i=String.fromCharCode(t.keyCode||t.which);return e.settings.create&&"multi"===e.settings.mode&&i===e.settings.delimiter?(e.createItem(),void Ip(t)):void 0}Ip(t)}onKeyDown(t){var e=this;if(e.ignoreHover=!0,e.isLocked)t.keyCode!==zp&&Ip(t);else{switch(t.keyCode){case vp:if(Pp(Cp,t)&&""==e.control_input.value)return Ip(t),void e.selectAll();break;case yp:return e.isOpen&&(Ip(t,!0),e.close()),void e.clearActiveItems();case kp:if(!e.isOpen&&e.hasOptions)e.open();else if(e.activeOption){let t=e.getAdjacent(e.activeOption,1);t&&e.setActiveOption(t)}return void Ip(t);case wp:if(e.activeOption){let t=e.getAdjacent(e.activeOption,-1);t&&e.setActiveOption(t)}return void Ip(t);case bp:return void(e.canSelect(e.activeOption)?(e.onOptionSelect(t,e.activeOption),Ip(t)):(e.settings.create&&e.createItem()||document.activeElement==e.control_input&&e.isOpen)&&Ip(t));case _p:return void e.advanceSelection(-1,t);case xp:return void e.advanceSelection(1,t);case zp:return void(e.settings.selectOnTab&&(e.canSelect(e.activeOption)&&(e.onOptionSelect(t,e.activeOption),Ip(t)),e.settings.create&&e.createItem()&&Ip(t)));case Ap:case Sp:return void e.deleteSelection(t)}e.isInputHidden&&!Pp(Cp,t)&&Ip(t)}}onInput(t){var e=this;if(!e.isLocked){var i=e.inputValue();e.lastValue!==i&&(e.lastValue=i,e.settings.shouldLoad.call(e,i)&&e.load(i),e.refreshOptions(),e.trigger("type",i))}}onOptionHover(t,e){this.ignoreHover||this.setActiveOption(e,!1)}onFocus(t){var e=this,i=e.isFocused;if(e.isDisabled)return e.blur(),void Ip(t);e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.preload(),i||e.trigger("focus"),e.activeItems.length||(e.showInput(),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())}onBlur(t){if(!1!==document.hasFocus()){var e=this;if(e.isFocused){e.isFocused=!1,e.ignoreFocus=!1;var i=()=>{e.close(),e.setActiveItem(),e.setCaret(e.items.length),e.trigger("blur")};e.settings.create&&e.settings.createOnBlur?e.createItem(null,i):i()}}}onOptionSelect(t,e){var i,n=this;e.parentElement&&e.parentElement.matches("[data-disabled]")||(e.classList.contains("create")?n.createItem(null,()=>{n.settings.closeAfterSelect&&n.close()}):void 0!==(i=e.dataset.value)&&(n.lastQuery=null,n.addItem(i),n.settings.closeAfterSelect&&n.close(),!n.settings.hideSelected&&t.type&&/click/.test(t.type)&&n.setActiveOption(e)))}canSelect(t){return!!(this.isOpen&&t&&this.dropdown_content.contains(t))}onItemSelect(t,e){var i=this;return!i.isLocked&&"multi"===i.settings.mode&&(Ip(t),i.setActiveItem(e,t),!0)}canLoad(t){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(t)}load(t){const e=this;if(!e.canLoad(t))return;op(e.wrapper,e.settings.loadingClass),e.loading++;const i=e.loadCallback.bind(e);e.settings.load.call(e,t,i)}loadCallback(t,e){const i=this;i.loading=Math.max(i.loading-1,0),i.lastQuery=null,i.clearActiveOption(),i.setupOptions(t,e),i.refreshOptions(i.isFocused&&!i.isInputHidden),i.loading||sp(i.wrapper,i.settings.loadingClass),i.trigger("load",t,e)}preload(){var t=this.wrapper.classList;t.contains("preloaded")||(t.add("preloaded"),this.load(""))}setTextboxValue(t=""){var e=this.control_input;e.value!==t&&(e.value=t,np(e,"update"),this.lastValue=t)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(t,e){$p(this,e?[]:["change"],()=>{this.clear(e),this.addItems(t,e)})}setMaxItems(t){0===t&&(t=null),this.settings.maxItems=t,this.refreshState()}setActiveItem(t,e){var i,n,r,o,s,a,l=this;if("single"!==l.settings.mode){if(!t)return l.clearActiveItems(),void(l.isFocused&&l.showInput());if("click"===(i=e&&e.type.toLowerCase())&&Pp("shiftKey",e)&&l.activeItems.length){for(a=l.getLastActive(),(r=Array.prototype.indexOf.call(l.control.children,a))>(o=Array.prototype.indexOf.call(l.control.children,t))&&(s=r,r=o,o=s),n=r;n<=o;n++)t=l.control.children[n],-1===l.activeItems.indexOf(t)&&l.setActiveItemClass(t);Ip(e)}else"click"===i&&Pp(Cp,e)||"keydown"===i&&Pp("shiftKey",e)?t.classList.contains("active")?l.removeActiveItem(t):l.setActiveItemClass(t):(l.clearActiveItems(),l.setActiveItemClass(t));l.hideInput(),l.isFocused||l.focus()}}setActiveItemClass(t){const e=this,i=e.control.querySelector(".last-active");i&&sp(i,"last-active"),op(t,"active last-active"),e.trigger("item_select",t),-1==e.activeItems.indexOf(t)&&e.activeItems.push(t)}removeActiveItem(t){var e=this.activeItems.indexOf(t);this.activeItems.splice(e,1),sp(t,"active")}clearActiveItems(){sp(this.activeItems,"active"),this.activeItems=[]}setActiveOption(t,e=!0){t!==this.activeOption&&(this.clearActiveOption(),t&&(this.activeOption=t,up(this.focus_node,{"aria-activedescendant":t.getAttribute("id")}),up(t,{"aria-selected":"true"}),op(t,"active"),e&&this.scrollToOption(t)))}scrollToOption(t,e){if(!t)return;const i=this.dropdown_content,n=i.clientHeight,r=i.scrollTop||0,o=t.offsetHeight,s=t.getBoundingClientRect().top-i.getBoundingClientRect().top+r;s+o>n+r?this.scroll(s-n+o,e):s<r&&this.scroll(s,e)}scroll(t,e){const i=this.dropdown_content;e&&(i.style.scrollBehavior=e),i.scrollTop=t,i.style.scrollBehavior=""}clearActiveOption(){this.activeOption&&(sp(this.activeOption,"active"),up(this.activeOption,{"aria-selected":null})),this.activeOption=null,up(this.focus_node,{"aria-activedescendant":null})}selectAll(){const t=this;if("single"===t.settings.mode)return;const e=t.controlChildren();e.length&&(t.hideInput(),t.close(),t.activeItems=e,Xd(e,e=>{t.setActiveItemClass(e)}))}inputState(){var t=this;t.control.contains(t.control_input)&&(up(t.control_input,{placeholder:t.settings.placeholder}),t.activeItems.length>0||!t.isFocused&&t.settings.hidePlaceholder&&t.items.length>0?(t.setTextboxValue(),t.isInputHidden=!0):(t.settings.hidePlaceholder&&t.items.length>0&&up(t.control_input,{placeholder:""}),t.isInputHidden=!1),t.wrapper.classList.toggle("input-hidden",t.isInputHidden))}hideInput(){this.inputState()}showInput(){this.inputState()}inputValue(){return this.control_input.value.trim()}focus(){var t=this;t.isDisabled||(t.ignoreFocus=!0,t.control_input.offsetWidth?t.control_input.focus():t.focus_node.focus(),setTimeout(()=>{t.ignoreFocus=!1,t.onFocus()},0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())}getSearchOptions(){var t=this.settings,e=t.sortField;return"string"==typeof t.sortField&&(e=[{field:t.sortField}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting}}search(t){var e,i,n=this,r=this.getSearchOptions();if(n.settings.score&&"function"!=typeof(i=n.settings.score.call(n,t)))throw new Error('Tom Select "score" setting must be a function that returns a function');return t!==n.lastQuery?(n.lastQuery=t,e=n.sifter.search(t,Object.assign(r,{score:i})),n.currentResults=e):e=Object.assign({},n.currentResults),n.settings.hideSelected&&(e.items=e.items.filter(t=>{let e=Tp(t.id);return!(e&&-1!==n.items.indexOf(e))})),e}refreshOptions(t=!0){var e,i,n,r,o,s,a,l,c,h;const d={},p=[];var u=this,g=u.inputValue();const f=g===u.lastQuery||""==g&&null==u.lastQuery;var m=u.search(g),v=null,b=u.settings.shouldOpen||!1,y=u.dropdown_content;for(f&&(v=u.activeOption)&&(c=v.closest("[data-group]")),r=m.items.length,"number"==typeof u.settings.maxOptions&&(r=Math.min(r,u.settings.maxOptions)),r>0&&(b=!0),e=0;e<r;e++){let t=m.items[e];if(!t)continue;let r=t.id,a=u.options[r];if(void 0===a)continue;let l=Lp(r),h=u.getOption(l,!0);for(u.settings.hideSelected||h.classList.toggle("selected",u.items.includes(l)),o=a[u.settings.optgroupField]||"",i=0,n=(s=Array.isArray(o)?o:[o])&&s.length;i<n;i++){o=s[i],u.optgroups.hasOwnProperty(o)||(o="");let t=d[o];void 0===t&&(t=document.createDocumentFragment(),p.push(o)),i>0&&(h=h.cloneNode(!0),up(h,{id:a.$id+"-clone-"+i,"aria-selected":null}),h.classList.add("ts-cloned"),sp(h,"active"),u.activeOption&&u.activeOption.dataset.value==r&&c&&c.dataset.group===o.toString()&&(v=h)),t.appendChild(h),d[o]=t}}u.settings.lockOptgroupOrder&&p.sort((t,e)=>{const i=u.optgroups[t],n=u.optgroups[e];return(i&&i.$order||0)-(n&&n.$order||0)}),a=document.createDocumentFragment(),Xd(p,t=>{let e=d[t];if(!e||!e.children.length)return;let i=u.optgroups[t];if(void 0!==i){let t=document.createDocumentFragment(),n=u.render("optgroup_header",i);Dp(t,n),Dp(t,e);let r=u.render("optgroup",{group:i,options:t});Dp(a,r)}else Dp(a,e)}),y.innerHTML="",Dp(y,a),u.settings.highlight&&(mp(y),m.query.length&&m.tokens.length&&Xd(m.tokens,t=>{fp(y,t.regex)}));var _=t=>{let e=u.render(t,{input:g});return e&&(b=!0,y.insertBefore(e,y.firstChild)),e};if(u.loading?_("loading"):u.settings.shouldLoad.call(u,g)?0===m.items.length&&_("no_results"):_("not_loading"),(l=u.canCreate(g))&&(h=_("option_create")),u.hasOptions=m.items.length>0||l,b){if(m.items.length>0){if(v||"single"!==u.settings.mode||null==u.items[0]||(v=u.getOption(u.items[0])),!y.contains(v)){let t=0;h&&!u.settings.addPrecedence&&(t=1),v=u.selectable()[t]}}else h&&(v=h);t&&!u.isOpen&&(u.open(),u.scrollToOption(v,"auto")),u.setActiveOption(v)}else u.clearActiveOption(),t&&u.isOpen&&u.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(t,e=!1){const i=this;if(Array.isArray(t))return i.addOptions(t,e),!1;const n=Tp(t[i.settings.valueField]);return null!==n&&!i.options.hasOwnProperty(n)&&(t.$order=t.$order||++i.order,t.$id=i.inputId+"-opt-"+t.$order,i.options[n]=t,i.lastQuery=null,e&&(i.userOptions[n]=e,i.trigger("option_add",n,t)),n)}addOptions(t,e=!1){Xd(t,t=>{this.addOption(t,e)})}registerOption(t){return this.addOption(t)}registerOptionGroup(t){var e=Tp(t[this.settings.optgroupValueField]);return null!==e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)}addOptionGroup(t,e){var i;e[this.settings.optgroupValueField]=t,(i=this.registerOptionGroup(e))&&this.trigger("optgroup_add",i,e)}removeOptionGroup(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.clearCache(),this.trigger("optgroup_remove",t))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(t,e){const i=this;var n,r;const o=Tp(t),s=Tp(e[i.settings.valueField]);if(null===o)return;const a=i.options[o];if(null==a)return;if("string"!=typeof s)throw new Error("Value must be set in option data");const l=i.getOption(o),c=i.getItem(o);if(e.$order=e.$order||a.$order,delete i.options[o],i.uncacheValue(s),i.options[s]=e,l){if(i.dropdown_content.contains(l)){const t=i._render("option",e);gp(l,t),i.activeOption===l&&i.setActiveOption(t)}l.remove()}c&&(-1!==(r=i.items.indexOf(o))&&i.items.splice(r,1,s),n=i._render("item",e),c.classList.contains("active")&&op(n,"active"),gp(c,n)),i.lastQuery=null}removeOption(t,e){const i=this;t=Lp(t),i.uncacheValue(t),delete i.userOptions[t],delete i.options[t],i.lastQuery=null,i.trigger("option_remove",t),i.removeItem(t,e)}clearOptions(t){const e=(t||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const i={};Xd(this.options,(t,n)=>{e(t,n)&&(i[n]=t)}),this.options=this.sifter.items=i,this.lastQuery=null,this.trigger("option_clear")}clearFilter(t,e){return this.items.indexOf(e)>=0}getOption(t,e=!1){const i=Tp(t);if(null===i)return null;const n=this.options[i];if(null!=n){if(n.$div)return n.$div;if(e)return this._render("option",n)}return null}getAdjacent(t,e,i="option"){var n,r=this;if(!t)return null;n="item"==i?r.controlChildren():r.dropdown_content.querySelectorAll("[data-selectable]");for(let i=0;i<n.length;i++)if(n[i]==t)return e>0?n[i+1]:n[i-1];return null}getItem(t){if("object"==typeof t)return t;var e=Tp(t);return null!==e?this.control.querySelector(`[data-value="${Np(e)}"]`):null}addItems(t,e){var i=this,n=Array.isArray(t)?t:[t];const r=(n=n.filter(t=>-1===i.items.indexOf(t)))[n.length-1];n.forEach(t=>{i.isPending=t!==r,i.addItem(t,e)})}addItem(t,e){$p(this,e?[]:["change","dropdown_close"],()=>{var i,n;const r=this,o=r.settings.mode,s=Tp(t);if((!s||-1===r.items.indexOf(s)||("single"===o&&r.close(),"single"!==o&&r.settings.duplicates))&&null!==s&&r.options.hasOwnProperty(s)&&("single"===o&&r.clear(e),"multi"!==o||!r.isFull())){if(i=r._render("item",r.options[s]),r.control.contains(i)&&(i=i.cloneNode(!0)),n=r.isFull(),r.items.splice(r.caretPos,0,s),r.insertAtCaret(i),r.isSetup){if(!r.isPending&&r.settings.hideSelected){let t=r.getOption(s),e=r.getAdjacent(t,1);e&&r.setActiveOption(e)}r.isPending||r.settings.closeAfterSelect||r.refreshOptions(r.isFocused&&"single"!==o),0!=r.settings.closeAfterSelect&&r.isFull()?r.close():r.isPending||r.positionDropdown(),r.trigger("item_add",s,i),r.isPending||r.updateOriginalInput({silent:e})}(!r.isPending||!n&&r.isFull())&&(r.inputState(),r.refreshState())}})}removeItem(t=null,e){const i=this;if(!(t=i.getItem(t)))return;var n,r;const o=t.dataset.value;n=pp(t),t.remove(),t.classList.contains("active")&&(r=i.activeItems.indexOf(t),i.activeItems.splice(r,1),sp(t,"active")),i.items.splice(n,1),i.lastQuery=null,!i.settings.persist&&i.userOptions.hasOwnProperty(o)&&i.removeOption(o,e),n<i.caretPos&&i.setCaret(i.caretPos-1),i.updateOriginalInput({silent:e}),i.refreshState(),i.positionDropdown(),i.trigger("item_remove",o,t)}createItem(t=null,e=(()=>{})){3===arguments.length&&(e=arguments[2]),"function"!=typeof e&&(e=()=>{});var i,n=this,r=n.caretPos;if(t=t||n.inputValue(),!n.canCreate(t))return e(),!1;n.lock();var o=!1,s=t=>{if(n.unlock(),!t||"object"!=typeof t)return e();var i=Tp(t[n.settings.valueField]);if("string"!=typeof i)return e();n.setTextboxValue(),n.addOption(t,!0),n.setCaret(r),n.addItem(i),e(t),o=!0};return i="function"==typeof n.settings.create?n.settings.create.call(this,t,s):{[n.settings.labelField]:t,[n.settings.valueField]:t},o||s(i),!0}refreshItems(){var t=this;t.lastQuery=null,t.isSetup&&t.addItems(t.items),t.updateOriginalInput(),t.refreshState()}refreshState(){const t=this;t.refreshValidityState();const e=t.isFull(),i=t.isLocked;t.wrapper.classList.toggle("rtl",t.rtl);const n=t.wrapper.classList;n.toggle("focus",t.isFocused),n.toggle("disabled",t.isDisabled),n.toggle("required",t.isRequired),n.toggle("invalid",!t.isValid),n.toggle("locked",i),n.toggle("full",e),n.toggle("input-active",t.isFocused&&!t.isInputHidden),n.toggle("dropdown-active",t.isOpen),n.toggle("has-options",dp(t.options)),n.toggle("has-items",t.items.length>0)}refreshValidityState(){var t=this;t.input.validity&&(t.isValid=t.input.validity.valid,t.isInvalid=!t.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(t={}){const e=this;var i,n;const r=e.input.querySelector('option[value=""]');if(e.is_select_tag){const t=[],s=e.input.querySelectorAll("option:checked").length;function o(i,n,o){return i||(i=tp('<option value="'+Mp(n)+'">'+Mp(o)+"</option>")),i!=r&&e.input.append(i),t.push(i),(i!=r||s>0)&&(i.selected=!0),i}e.input.querySelectorAll("option:checked").forEach(t=>{t.selected=!1}),0==e.items.length&&"single"==e.settings.mode?o(r,"",""):e.items.forEach(r=>{if(i=e.options[r],n=i[e.settings.labelField]||"",t.includes(i.$option)){o(e.input.querySelector(`option[value="${Np(r)}"]:not(:checked)`),r,n)}else i.$option=o(i.$option,r,n)})}else e.input.value=e.getValue();e.isSetup&&(t.silent||e.trigger("change",e.getValue()))}open(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,up(t.focus_node,{"aria-expanded":"true"}),t.refreshState(),rp(t.dropdown,{visibility:"hidden",display:"block"}),t.positionDropdown(),rp(t.dropdown,{visibility:"visible",display:"block"}),t.focus(),t.trigger("dropdown_open",t.dropdown))}close(t=!0){var e=this,i=e.isOpen;t&&(e.setTextboxValue(),"single"===e.settings.mode&&e.items.length&&e.hideInput()),e.isOpen=!1,up(e.focus_node,{"aria-expanded":"false"}),rp(e.dropdown,{display:"none"}),e.settings.hideSelected&&e.clearActiveOption(),e.refreshState(),i&&e.trigger("dropdown_close",e.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),i=t.offsetHeight+e.top+window.scrollY,n=e.left+window.scrollX;rp(this.dropdown,{width:e.width+"px",top:i+"px",left:n+"px"})}}clear(t){var e=this;if(e.items.length){var i=e.controlChildren();Xd(i,t=>{e.removeItem(t,!0)}),e.showInput(),t||e.updateOriginalInput(),e.trigger("clear")}}insertAtCaret(t){const e=this,i=e.caretPos,n=e.control;n.insertBefore(t,n.children[i]||null),e.setCaret(i+1)}deleteSelection(t){var e,i,n,r,o=this;e=t&&t.keyCode===Ap?-1:1,i=Hp(o.control_input);const s=[];if(o.activeItems.length)r=hp(o.activeItems,e),n=pp(r),e>0&&n++,Xd(o.activeItems,t=>s.push(t));else if((o.isFocused||"single"===o.settings.mode)&&o.items.length){const t=o.controlChildren();let n;e<0&&0===i.start&&0===i.length?n=t[o.caretPos-1]:e>0&&i.start===o.inputValue().length&&(n=t[o.caretPos]),void 0!==n&&s.push(n)}if(!o.shouldDelete(s,t))return!1;for(Ip(t,!0),void 0!==n&&o.setCaret(n);s.length;)o.removeItem(s.pop());return o.showInput(),o.positionDropdown(),o.refreshOptions(!1),!0}shouldDelete(t,e){const i=t.map(t=>t.dataset.value);return!(!i.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(i,e))}advanceSelection(t,e){var i,n,r=this;r.rtl&&(t*=-1),r.inputValue().length||(Pp(Cp,e)||Pp("shiftKey",e)?(n=(i=r.getLastActive(t))?i.classList.contains("active")?r.getAdjacent(i,t,"item"):i:t>0?r.control_input.nextElementSibling:r.control_input.previousElementSibling)&&(n.classList.contains("active")&&r.removeActiveItem(i),r.setActiveItemClass(n)):r.moveCaret(t))}moveCaret(t){}getLastActive(t){let e=this.control.querySelector(".last-active");if(e)return e;var i=this.control.querySelectorAll(".active");return i?hp(i,t):void 0}setCaret(t){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.isLocked=!0,this.refreshState()}unlock(){this.isLocked=!1,this.refreshState()}disable(){var t=this;t.input.disabled=!0,t.control_input.disabled=!0,t.focus_node.tabIndex=-1,t.isDisabled=!0,this.close(),t.lock()}enable(){var t=this;t.input.disabled=!1,t.control_input.disabled=!1,t.focus_node.tabIndex=t.tabIndex,t.isDisabled=!1,t.unlock()}destroy(){var t=this,e=t.revertSettings;t.trigger("destroy"),t.off(),t.wrapper.remove(),t.dropdown.remove(),t.input.innerHTML=e.innerHTML,t.input.tabIndex=e.tabIndex,sp(t.input,"tomselected","ts-hidden-accessible"),t._destroy(),delete t.input.tomselect}render(t,e){var i,n;const r=this;if("function"!=typeof this.settings.render[t])return null;if(!(n=r.settings.render[t].call(this,e,Mp)))return null;if(n=tp(n),"option"===t||"option_create"===t?e[r.settings.disabledField]?up(n,{"aria-disabled":"true"}):up(n,{"data-selectable":""}):"optgroup"===t&&(i=e.group[r.settings.optgroupValueField],up(n,{"data-group":i}),e.group[r.settings.disabledField]&&up(n,{"data-disabled":""})),"option"===t||"item"===t){const i=Lp(e[r.settings.valueField]);up(n,{"data-value":i}),"item"===t?(op(n,r.settings.itemClass),up(n,{"data-ts-item":""})):(op(n,r.settings.optionClass),up(n,{role:"option",id:e.$id}),e.$div=n,r.options[i]=e)}return n}_render(t,e){const i=this.render(t,e);if(null==i)throw"HTMLElement expected";return i}clearCache(){Xd(this.options,t=>{t.$div&&(t.$div.remove(),delete t.$div)})}uncacheValue(t){const e=this.getOption(t);e&&e.remove()}canCreate(t){return this.settings.create&&t.length>0&&this.settings.createFilter.call(this,t)}hook(t,e,i){var n=this,r=n[e];n[e]=function(){var e,o;return"after"===t&&(e=r.apply(n,arguments)),o=i.apply(n,arguments),"instead"===t?o:("before"===t&&(e=r.apply(n,arguments)),e)}}}function qp(){Rp(this.input,"change",()=>{this.sync()})}function Up(){var t=this,e=t.onOptionSelect;t.settings.hideSelected=!1;var i=function(t){setTimeout(()=>{var e=t.querySelector("input");e instanceof HTMLInputElement&&(t.classList.contains("selected")?e.checked=!0:e.checked=!1)},1)};t.hook("after","setupTemplates",()=>{var e=t.settings.render.option;t.settings.render.option=(i,n)=>{var r=tp(e.call(t,i,n)),o=document.createElement("input");o.addEventListener("click",(function(t){Ip(t)})),o.type="checkbox";const s=Tp(i[t.settings.valueField]);return s&&t.items.indexOf(s)>-1&&(o.checked=!0),r.prepend(o),r}}),t.on("item_remove",e=>{var n=t.getOption(e);n&&(n.classList.remove("selected"),i(n))}),t.on("item_add",e=>{var n=t.getOption(e);n&&i(n)}),t.hook("instead","onOptionSelect",(n,r)=>{if(r.classList.contains("selected"))return r.classList.remove("selected"),t.removeItem(r.dataset.value),t.refreshOptions(),void Ip(n,!0);e.call(t,n,r),i(r)})}function Wp(t){const e=this,i=Object.assign({className:"clear-button",title:"Clear All",html:t=>`<div class="${t.className}" title="${t.title}">⨯</div>`},t);e.on("initialize",()=>{var t=tp(i.html(i));t.addEventListener("click",t=>{e.isDisabled||(e.clear(),"single"===e.settings.mode&&e.settings.allowEmptyOption&&e.addItem(""),t.preventDefault(),t.stopPropagation())}),e.control.appendChild(t)})}function Yp(){var t=this;if(!$.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===t.settings.mode){var e=t.lock,i=t.unlock;t.hook("instead","lock",()=>{var i=$(t.control).data("sortable");return i&&i.disable(),e.call(t)}),t.hook("instead","unlock",()=>{var e=$(t.control).data("sortable");return e&&e.enable(),i.call(t)}),t.on("initialize",()=>{var e=$(t.control).sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:t.isLocked,start:(t,i)=>{i.placeholder.css("width",i.helper.css("width")),e.css({overflow:"visible"})},stop:()=>{e.css({overflow:"hidden"});var i=[];e.children("[data-value]").each((function(){this.dataset.value&&i.push(this.dataset.value)})),t.setValue(i)}})})}}function Gp(t){const e=this,i=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:t=>'<div class="'+t.headerClass+'"><div class="'+t.titleRowClass+'"><span class="'+t.labelClass+'">'+t.title+'</span><a class="'+t.closeClass+'">×</a></div></div>'},t);e.on("initialize",()=>{var t=tp(i.html(i)),n=t.querySelector("."+i.closeClass);n&&n.addEventListener("click",t=>{Ip(t,!0),e.close()}),e.dropdown.insertBefore(t,e.dropdown.firstChild)})}function Kp(){var t=this;t.hook("instead","setCaret",e=>{"single"!==t.settings.mode&&t.control.contains(t.control_input)?(e=Math.max(0,Math.min(t.items.length,e)))==t.caretPos||t.isPending||t.controlChildren().forEach((i,n)=>{n<e?t.control_input.insertAdjacentElement("beforebegin",i):t.control.appendChild(i)}):e=t.items.length,t.caretPos=e}),t.hook("instead","moveCaret",e=>{if(!t.isFocused)return;const i=t.getLastActive(e);if(i){const n=pp(i);t.setCaret(e>0?n+1:n),t.setActiveItem(),sp(i,"last-active")}else t.setCaret(t.caretPos+e)})}function Xp(){const t=this;t.settings.shouldOpen=!0,t.hook("before","setup",()=>{t.focus_node=t.control,op(t.control_input,"dropdown-input");const e=tp('<div class="dropdown-input-wrap">');e.append(t.control_input),t.dropdown.insertBefore(e,t.dropdown.firstChild);const i=tp('<input class="items-placeholder" tabindex="-1" />');i.placeholder=t.settings.placeholder||"",t.control.append(i)}),t.on("initialize",()=>{t.control_input.addEventListener("keydown",e=>{switch(e.keyCode){case yp:return t.isOpen&&(Ip(e,!0),t.close()),void t.clearActiveItems();case zp:t.focus_node.tabIndex=-1}return t.onKeyDown.call(t,e)}),t.on("blur",()=>{t.focus_node.tabIndex=t.isDisabled?-1:t.tabIndex}),t.on("dropdown_open",()=>{t.control_input.focus()});const e=t.onBlur;t.hook("instead","onBlur",i=>{if(!i||i.relatedTarget!=t.control_input)return e.call(t)}),Rp(t.control_input,"blur",()=>t.onBlur()),t.hook("before","close",()=>{t.isOpen&&t.focus_node.focus({preventScroll:!0})})})}function Zp(){var t=this;t.on("initialize",()=>{var e=document.createElement("span"),i=t.control_input;e.style.cssText="position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ",t.wrapper.appendChild(e);var n=["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"];for(const t of n)e.style[t]=i.style[t];var r=()=>{e.textContent=i.value,i.style.width=e.clientWidth+"px"};r(),t.on("update item_add item_remove",r),Rp(i,"input",r),Rp(i,"keyup",r),Rp(i,"blur",r),Rp(i,"update",r)})}function Qp(){var t=this,e=t.deleteSelection;this.hook("instead","deleteSelection",i=>!!t.activeItems.length&&e.call(t,i))}function Jp(){this.hook("instead","setActiveItem",()=>{}),this.hook("instead","selectAll",()=>{})}function tu(){var t=this,e=t.onKeyDown;t.hook("instead","onKeyDown",i=>{var n,r,o,s;if(!t.isOpen||i.keyCode!==_p&&i.keyCode!==xp)return e.call(t,i);t.ignoreHover=!0,s=cp(t.activeOption,"[data-group]"),n=pp(t.activeOption,"[data-selectable]"),s&&(s=i.keyCode===_p?s.previousSibling:s.nextSibling)&&(r=(o=s.querySelectorAll("[data-selectable]"))[Math.min(o.length-1,n)])&&t.setActiveOption(r)})}function eu(t){const e=Object.assign({label:"×",title:"Remove",className:"remove",append:!0},t);var i=this;if(e.append){var n='<a href="javascript:void(0)" class="'+e.className+'" tabindex="-1" title="'+Mp(e.title)+'">'+e.label+"</a>";i.hook("after","setupTemplates",()=>{var t=i.settings.render.item;i.settings.render.item=(e,r)=>{var o=tp(t.call(i,e,r)),s=tp(n);return o.appendChild(s),Rp(s,"mousedown",t=>{Ip(t,!0)}),Rp(s,"click",t=>{Ip(t,!0),i.isLocked||i.shouldDelete([o],t)&&(i.removeItem(o),i.refreshOptions(!1),i.inputState())}),o}})}}function iu(t){const e=this,i=Object.assign({text:t=>t[e.settings.labelField]},t);e.on("item_remove",(function(t){if(e.isFocused&&""===e.control_input.value.trim()){var n=e.options[t];n&&e.setTextboxValue(i.text.call(e,n))}}))}function nu(){const t=this,e=t.canLoad,i=t.clearActiveOption,n=t.loadCallback;var r,o,s={},a=!1,l=[];if(t.settings.shouldLoadMore||(t.settings.shouldLoadMore=()=>{if(r.clientHeight/(r.scrollHeight-r.scrollTop)>.9)return!0;if(t.activeOption){var e=t.selectable();if(Array.from(e).indexOf(t.activeOption)>=e.length-2)return!0}return!1}),!t.settings.firstUrl)throw"virtual_scroll plugin requires a firstUrl() method";t.settings.sortField=[{field:"$order"},{field:"$score"}];const c=e=>!("number"==typeof t.settings.maxOptions&&r.children.length>=t.settings.maxOptions)&&!(!(e in s)||!s[e]),h=(e,i)=>t.items.indexOf(i)>=0||l.indexOf(i)>=0;t.setNextUrl=(t,e)=>{s[t]=e},t.getUrl=e=>{if(e in s){const t=s[e];return s[e]=!1,t}return s={},t.settings.firstUrl.call(t,e)},t.hook("instead","clearActiveOption",()=>{if(!a)return i.call(t)}),t.hook("instead","canLoad",i=>i in s?c(i):e.call(t,i)),t.hook("instead","loadCallback",(e,i)=>{if(a){if(o){const i=e[0];void 0!==i&&(o.dataset.value=i[t.settings.valueField])}}else t.clearOptions(h);n.call(t,e,i),a=!1}),t.hook("after","refreshOptions",()=>{const e=t.lastValue;var i;c(e)?(i=t.render("loading_more",{query:e}))&&(i.setAttribute("data-selectable",""),o=i):e in s&&!r.querySelector(".no-results")&&(i=t.render("no_more_results",{query:e})),i&&(op(i,t.settings.optionClass),r.append(i))}),t.on("initialize",()=>{l=Object.keys(t.options),r=t.dropdown_content,t.settings.render=Object.assign({},{loading_more:()=>'<div class="loading-more-results">Loading more results ... </div>',no_more_results:()=>'<div class="no-more-results">No more results</div>'},t.settings.render),r.addEventListener("scroll",()=>{t.settings.shouldLoadMore.call(t)&&c(t.lastValue)&&(a||(a=!0,t.load.call(t,t.lastValue)))})})}function ru(t){if(document.getElementById("__pb-multi-select-css"))return;const e=P("../css/tom-select"),i=document.createElement("link");i.id="__pb-multi-select-css",i.href=`${e}/tom-select.${t}.min.css`,i.rel="stylesheet",document.head.appendChild(i)}jp.define("change_listener",qp),jp.define("checkbox_options",Up),jp.define("clear_button",Wp),jp.define("drag_drop",Yp),jp.define("dropdown_header",Gp),jp.define("caret_position",Kp),jp.define("dropdown_input",Xp),jp.define("input_autogrow",Zp),jp.define("no_backspace_delete",Qp),jp.define("no_active_items",Jp),jp.define("optgroup_columns",tu),jp.define("remove_button",eu),jp.define("restore_on_backspace",iu),jp.define("virtual_scroll",nu);const ou=t=>t?`<div>${G(t.text)}</div>`:"";class su extends(D(V)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{placeholder:{type:String},source:{type:String},closeAfterSelect:{type:Boolean,attribute:"close-after-select"},preload:{type:Boolean},onBlur:{type:String,attribute:"on-blur"},onChange:{type:String,attribute:"on-change"}})}get value(){return this._select?this._select.getValue():null}set value(t){this._select&&(this._select.clear(!0),this._select.sync(),this._select.setValue(t,!1),this._select.sync())}set renderItem(t){this.renderFunction=t}constructor(){super(),this.theme="default",this.source=null,this.closeAfterSelect=!1,this.preload=!1,this.renderFunction=ou,this.onBlur="pb-combo-box-blur",this.onChange="pb-combo-box-change",this.placeholder=""}connectedCallback(){super.connectedCallback(),this.subscribeTo("pb-i18n-update",()=>{this._select&&(this._select.settings.placeholder=G(this.placeholder),this._select.inputState(),this.source?this._select.refreshOptions(!1):(this._select.clearOptions(),this._select.sync()))})}firstUpdated(){ru(this.theme);let t=this.querySelector("select,input");t||(t=document.createElement("input"),this.appendChild(t)),t.autocomplete=!1,B("pb-page-ready",()=>{const e={};if(this.source){const t=this.toAbsoluteURL(this.source);e.labelField="text",e.valueField="value",e.searchField=[],e.preload=this.preload,e.load=(e,i)=>{fetch(`${t}?query=${encodeURIComponent(e)}`,{method:"GET",mode:"cors",credentials:"same-origin"}).then(t=>t.json()).then(t=>{i(t)}).catch(()=>{i()})},e.render={option:this.renderFunction,item:this.renderFunction}}e.placeholder=G(this.placeholder),e.closeAfterSelect=this.closeAfterSelect,e.onBlur=()=>this.emitTo(this.onBlur,{value:this.value}),e.onChange=()=>this.emitTo(this.onChange,{value:this.value}),this._select=new jp(t,e)})}createRenderRoot(){return this}}customElements.define("pb-combo-box",su);class au extends(D(V)){static get properties(){return Object.assign({src:{type:String},styles:{type:String},url:{type:String,reflect:!0,readOnly:!0},raw:{type:Boolean}},super.properties)}constructor(){super(),this.url="about:blank",this.raw=!1}firstUpdated(){super.firstUpdated(),this._iframe=this.shadowRoot.querySelector("iframe"),this._iframe.addEventListener("load",()=>{"about:blank"!==this._iframe.src&&(this._iframe.className="",this.emitTo("pb-end-update"))}),B("pb-page-ready",()=>{this.refresh()})}print(){this._iframe.contentWindow.print()}refresh(){this.emitTo("pb-start-update"),this._iframe.className="hidden",this._iframe.src="about:blank";const t=this.getDocument(),e=new URLSearchParams;t.odd&&e.set("odd",t.odd+".odd"),e.set("base",`${this.getEndpoint()}/${t.getCollection()}/`),this._getCustomStyles().forEach(t=>e.append("style",t));const i=e.toString();this.url=`${this.getEndpoint()}/api/document/${encodeURIComponent(t.path)}/print?${i}`;const n=new URLSearchParams(i);n.set("wc","true"),this.raw||(n.set("script",P("../lib/paged.polyfill.js")),n.append("style",P("../css/pagedjs/interface.css"))),this._iframe.src=`${this.getEndpoint()}/api/document/${encodeURIComponent(t.path)}/print?${n.toString()}`}render(){return I`
|
|
4491
4491
|
<iframe title="Preview" src="about:blank"></iframe>
|
|
4492
4492
|
`}_getCustomStyles(){let t=[];return this.styles&&(t=this.styles.split(/\s*,\s*/)),t}static get styles(){return R`
|
|
4493
4493
|
:host {
|
package/dist/pb-elements.json
CHANGED
|
@@ -6158,7 +6158,7 @@
|
|
|
6158
6158
|
},
|
|
6159
6159
|
{
|
|
6160
6160
|
"name": "group",
|
|
6161
|
-
"description": "If set, only users being members of the specified group are\nallowed to log in.",
|
|
6161
|
+
"description": "If set, only users being members of the specified group are\nallowed to log in.\nMultiple groups can be defined separating items by space and/or comma.",
|
|
6162
6162
|
"type": "string"
|
|
6163
6163
|
},
|
|
6164
6164
|
{
|
|
@@ -6247,7 +6247,7 @@
|
|
|
6247
6247
|
{
|
|
6248
6248
|
"name": "group",
|
|
6249
6249
|
"attribute": "group",
|
|
6250
|
-
"description": "If set, only users being members of the specified group are\nallowed to log in.",
|
|
6250
|
+
"description": "If set, only users being members of the specified group are\nallowed to log in.\nMultiple groups can be defined separating items by space and/or comma.",
|
|
6251
6251
|
"type": "string"
|
|
6252
6252
|
},
|
|
6253
6253
|
{
|
|
@@ -9452,7 +9452,7 @@
|
|
|
9452
9452
|
},
|
|
9453
9453
|
{
|
|
9454
9454
|
"name": "group",
|
|
9455
|
-
"description": "If set, requires the logged in user to be member of\nthe given group.",
|
|
9455
|
+
"description": "If set, requires the logged in user to be member of\nthe given group.\nMultiple groups can be defined separating items by space and/or comma.",
|
|
9456
9456
|
"type": "string"
|
|
9457
9457
|
},
|
|
9458
9458
|
{
|
|
@@ -9502,7 +9502,7 @@
|
|
|
9502
9502
|
{
|
|
9503
9503
|
"name": "group",
|
|
9504
9504
|
"attribute": "group",
|
|
9505
|
-
"description": "If set, requires the logged in user to be member of\nthe given group.",
|
|
9505
|
+
"description": "If set, requires the logged in user to be member of\nthe given group.\nMultiple groups can be defined separating items by space and/or comma.",
|
|
9506
9506
|
"type": "string"
|
|
9507
9507
|
},
|
|
9508
9508
|
{
|
|
@@ -10981,11 +10981,11 @@
|
|
|
10981
10981
|
"events": [
|
|
10982
10982
|
{
|
|
10983
10983
|
"name": "pb-refresh",
|
|
10984
|
-
"description": "if user
|
|
10984
|
+
"description": "fired if user navigates to another page within the viewer. Parameters to be passed\nwith the event will be copied from the `@id` URL declared in the `rendering` property of the canvas."
|
|
10985
10985
|
},
|
|
10986
10986
|
{
|
|
10987
|
-
"name": "pb-
|
|
10988
|
-
"description": "when received, opens the page denoted by the\n`order` property in the event (see `pb-facs-link`). Page counts start at 1."
|
|
10987
|
+
"name": "pb-show-annotation",
|
|
10988
|
+
"description": "when received, opens the the manifest given in `file` and the page denoted by the\n`order` property in the event (see `pb-facs-link`). Page counts start at 1."
|
|
10989
10989
|
}
|
|
10990
10990
|
]
|
|
10991
10991
|
},
|
package/dist/pb-tify.js
CHANGED
|
@@ -24,4 +24,4 @@ function s(e){return new s.Viewer(e)}(function(e){e.version={versionStr:"3.0.0",
|
|
|
24
24
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
25
25
|
* @license MIT
|
|
26
26
|
*/
|
|
27
|
-
var n=i("1fb5"),r=i("9152"),o=i("e3db");function s(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,i){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,i);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return u(this,e,t,i)}function u(e,t,i,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?v(e,t,i,n):"string"==typeof t?f(e,t,i):m(e,t)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t,i,n){return h(t),t<=0?l(e,t):void 0!==i?"string"==typeof n?l(e,t).fill(i,n):l(e,t).fill(i):l(e,t)}function p(e,t){if(h(t),e=l(e,t<0?0:0|y(t)),!c.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function f(e,t,i){if("string"==typeof i&&""!==i||(i="utf8"),!c.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var n=0|x(t,i),r=(e=l(e,n)).write(t,i);return r!==n&&(e=e.slice(0,r)),e}function g(e,t){var i=t.length<0?0:0|y(t.length);e=l(e,i);for(var n=0;n<i;n+=1)e[n]=255&t[n];return e}function v(e,t,i,n){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===i&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,i):new Uint8Array(t,i,n),c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=g(e,t),e}function m(e,t){if(c.isBuffer(t)){var i=0|y(t.length);return 0===(e=l(e,i)).length||t.copy(e,0,0,i),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||te(t.length)?l(e,0):g(e,t);if("Buffer"===t.type&&o(t.data))return g(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function y(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function w(e){return+e!=e&&(e=0),c.alloc(+e)}function x(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return J(e).length;default:if(n)return Y(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,i){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,i);case"utf8":case"utf-8":return D(this,t,i);case"ascii":return H(this,t,i);case"latin1":case"binary":return M(this,t,i);case"base64":return I(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function _(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function T(e,t,i,n,r){if(0===e.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=r?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(r)return-1;i=e.length-1}else if(i<0){if(!r)return-1;i=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:S(e,t,i,n,r);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):S(e,[t],i,n,r);throw new TypeError("val must be string, number or Buffer")}function S(e,t,i,n,r){var o,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,i/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(r){var u=-1;for(o=i;o<a;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*s}else-1!==u&&(o-=o-u),u=-1}else for(i+l>a&&(i=a-l),o=i;o>=0;o--){for(var h=!0,d=0;d<l;d++)if(c(e,o+d)!==c(t,d)){h=!1;break}if(h)return o}return-1}function E(e,t,i,n){i=Number(i)||0;var r=e.length-i;n?(n=Number(n))>r&&(n=r):n=r;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[i+s]=a}return s}function P(e,t,i,n){return ee(Y(t,e.length-i),e,i,n)}function C(e,t,i,n){return ee(K(t),e,i,n)}function R(e,t,i,n){return C(e,t,i,n)}function k(e,t,i,n){return ee(J(t),e,i,n)}function O(e,t,i,n){return ee(Q(t,e.length-i),e,i,n)}function I(e,t,i){return 0===t&&i===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,i))}function D(e,t,i){i=Math.min(e.length,i);for(var n=[],r=t;r<i;){var o,s,a,l,c=e[r],u=null,h=c>239?4:c>223?3:c>191?2:1;if(r+h<=i)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[r+1]))&&((l=(31&c)<<6|63&o)>127&&(u=l));break;case 3:o=e[r+1],s=e[r+2],128==(192&o)&&128==(192&s)&&((l=(15&c)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l));break;case 4:o=e[r+1],s=e[r+2],a=e[r+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&((l=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l))}null===u?(u=65533,h=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),r+=h}return L(n)}t.Buffer=c,t.SlowBuffer=w,t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:s(),t.kMaxLength=a(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,i){return u(null,e,t,i)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,i){return d(null,e,t,i)},c.allocUnsafe=function(e){return p(null,e)},c.allocUnsafeSlow=function(e){return p(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,n=t.length,r=0,o=Math.min(i,n);r<o;++r)if(e[r]!==t[r]){i=e[r],n=t[r];break}return i<n?-1:n<i?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=c.allocUnsafe(t),r=0;for(i=0;i<e.length;++i){var s=e[i];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,r),r+=s.length}return n},c.byteLength=x,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)_(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)_(this,t,t+3),_(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)_(this,t,t+7),_(this,t+1,t+6),_(this,t+2,t+5),_(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?D(this,0,e):b.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",i=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,i,n,r){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),t<0||i>e.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&t>=i)return 0;if(n>=r)return-1;if(t>=i)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(n>>>=0),s=(i>>>=0)-(t>>>=0),a=Math.min(o,s),l=this.slice(n,r),u=e.slice(t,i),h=0;h<a;++h)if(l[h]!==u[h]){o=l[h],s=u[h];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},c.prototype.indexOf=function(e,t,i){return T(this,e,t,i,!0)},c.prototype.lastIndexOf=function(e,t,i){return T(this,e,t,i,!1)},c.prototype.write=function(e,t,i,n){if(void 0===t)n="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)n=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}var r=this.length-t;if((void 0===i||i>r)&&(i=r),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return E(this,e,t,i);case"utf8":case"utf-8":return P(this,e,t,i);case"ascii":return C(this,e,t,i);case"latin1":case"binary":return R(this,e,t,i);case"base64":return k(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,i);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function L(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);for(var i="",n=0;n<t;)i+=String.fromCharCode.apply(String,e.slice(n,n+=A));return i}function H(e,t,i){var n="";i=Math.min(e.length,i);for(var r=t;r<i;++r)n+=String.fromCharCode(127&e[r]);return n}function M(e,t,i){var n="";i=Math.min(e.length,i);for(var r=t;r<i;++r)n+=String.fromCharCode(e[r]);return n}function B(e,t,i){var n=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>n)&&(i=n);for(var r="",o=t;o<i;++o)r+=X(e[o]);return r}function $(e,t,i){for(var n=e.slice(t,i),r="",o=0;o<n.length;o+=2)r+=String.fromCharCode(n[o]+256*n[o+1]);return r}function F(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,i,n,r,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<o)throw new RangeError('"value" argument is out of bounds');if(i+n>e.length)throw new RangeError("Index out of range")}function z(e,t,i,n){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-i,2);r<o;++r)e[i+r]=(t&255<<8*(n?r:1-r))>>>8*(n?r:1-r)}function V(e,t,i,n){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-i,4);r<o;++r)e[i+r]=t>>>8*(n?r:3-r)&255}function j(e,t,i,n,r,o){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function U(e,t,i,n,o){return o||j(e,t,i,4),r.write(e,t,i,n,23,4),i+4}function W(e,t,i,n,o){return o||j(e,t,i,8),r.write(e,t,i,n,52,8),i+8}c.prototype.slice=function(e,t){var i,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=c.prototype;else{var r=t-e;i=new c(r,void 0);for(var o=0;o<r;++o)i[o]=this[o+e]}return i},c.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||F(e,t,this.length);for(var n=this[e],r=1,o=0;++o<t&&(r*=256);)n+=this[e+o]*r;return n},c.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||F(e,t,this.length);for(var n=this[e+--t],r=1;t>0&&(r*=256);)n+=this[e+--t]*r;return n},c.prototype.readUInt8=function(e,t){return t||F(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||F(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||F(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||F(e,t,this.length);for(var n=this[e],r=1,o=0;++o<t&&(r*=256);)n+=this[e+o]*r;return n>=(r*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||F(e,t,this.length);for(var n=t,r=1,o=this[e+--n];n>0&&(r*=256);)o+=this[e+--n]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||F(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},c.prototype.readInt16BE=function(e,t){t||F(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},c.prototype.readInt32LE=function(e,t){return t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||F(e,4,this.length),r.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||F(e,4,this.length),r.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||F(e,8,this.length),r.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||F(e,8,this.length),r.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,i,n){(e=+e,t|=0,i|=0,n)||N(this,e,t,i,Math.pow(2,8*i)-1,0);var r=1,o=0;for(this[t]=255&e;++o<i&&(r*=256);)this[t+o]=e/r&255;return t+i},c.prototype.writeUIntBE=function(e,t,i,n){(e=+e,t|=0,i|=0,n)||N(this,e,t,i,Math.pow(2,8*i)-1,0);var r=i-1,o=1;for(this[t+r]=255&e;--r>=0&&(o*=256);)this[t+r]=e/o&255;return t+i},c.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):V(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):V(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);N(this,e,t,i,r-1,-r)}var o=0,s=1,a=0;for(this[t]=255&e;++o<i&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+i},c.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);N(this,e,t,i,r-1,-r)}var o=i-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+i},c.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):V(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):V(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,i){return U(this,e,t,!0,i)},c.prototype.writeFloatBE=function(e,t,i){return U(this,e,t,!1,i)},c.prototype.writeDoubleLE=function(e,t,i){return W(this,e,t,!0,i)},c.prototype.writeDoubleBE=function(e,t,i){return W(this,e,t,!1,i)},c.prototype.copy=function(e,t,i,n){if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);var r,o=n-i;if(this===e&&i<t&&t<n)for(r=o-1;r>=0;--r)e[r+t]=this[r+i];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(r=0;r<o;++r)e[r+t]=this[r+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+o),t);return o},c.prototype.fill=function(e,t,i,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var o;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(o=t;o<i;++o)this[o]=e;else{var s=c.isBuffer(e)?e:Y(new c(e,n).toString()),a=s.length;for(o=0;o<i-t;++o)this[o+t]=s[o%a]}return this};var G=/[^+\/0-9A-Za-z-_]/g;function q(e){if((e=Z(e).replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Z(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function X(e){return e<16?"0"+e.toString(16):e.toString(16)}function Y(e,t){var i;t=t||1/0;for(var n=e.length,r=null,o=[],s=0;s<n;++s){if((i=e.charCodeAt(s))>55295&&i<57344){if(!r){if(i>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}r=i;continue}if(i<56320){(t-=3)>-1&&o.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,i<128){if((t-=1)<0)break;o.push(i)}else if(i<2048){if((t-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function K(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}function Q(e,t){for(var i,n,r,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(i=e.charCodeAt(s))>>8,r=i%256,o.push(r),o.push(n);return o}function J(e){return n.toByteArray(q(e))}function ee(e,t,i,n){for(var r=0;r<n&&!(r+i>=t.length||r>=e.length);++r)t[r+i]=e[r];return r}function te(e){return e!=e}}).call(this,i("c8ba"))},b68a:function(e,t,i){e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},b980:function(e,t,i){var n=i("d039"),r=i("5c6c");e.exports=!n((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",r(1,7)),7!==e.stack)}))},bc3a:function(e,t,i){e.exports=i("cee4")},c04e:function(e,t,i){var n=i("c65b"),r=i("861d"),o=i("d9b5"),s=i("dc4a"),a=i("485a"),l=i("b622"),c=TypeError,u=l("toPrimitive");e.exports=function(e,t){if(!r(e)||o(e))return e;var i,l=s(e,u);if(l){if(void 0===t&&(t="default"),i=n(l,e,t),!r(i)||o(i))return i;throw c("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},c345:function(e,t,i){var n=i("c532"),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,i,o,s={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),i=n.trim(e.substr(o+1)),t){if(s[t]&&r.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([i]):s[t]?s[t]+", "+i:i}})),s):s}},c401:function(e,t,i){var n=i("c532"),r=i("4c3d");e.exports=function(e,t,i){var o=this||r;return n.forEach(i,(function(i){e=i.call(o,e,t)})),e}},c430:function(e,t){e.exports=!1},c532:function(e,t,i){var n=i("1d2b"),r=Object.prototype.toString,o=function(e){return function(t){var i=r.call(t);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())}}(Object.create(null));function s(e){return e=e.toLowerCase(),function(t){return o(t)===e}}function a(e){return Array.isArray(e)}function l(e){return void 0===e}function c(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var u=s("ArrayBuffer");function h(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer)}function d(e){return"string"==typeof e}function p(e){return"number"==typeof e}function f(e){return null!==e&&"object"==typeof e}function g(e){if("object"!==o(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var v=s("Date"),m=s("File"),y=s("Blob"),w=s("FileList");function x(e){return"[object Function]"===r.call(e)}function b(e){return f(e)&&x(e.pipe)}function _(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||r.call(e)===t||x(e.toString)&&e.toString()===t)}var T=s("URLSearchParams");function S(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function E(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document}function P(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var i=0,n=e.length;i<n;i++)t.call(null,e[i],i,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}function C(){var e={};function t(t,i){g(e[i])&&g(t)?e[i]=C(e[i],t):g(t)?e[i]=C({},t):a(t)?e[i]=t.slice():e[i]=t}for(var i=0,n=arguments.length;i<n;i++)P(arguments[i],t);return e}function R(e,t,i){return P(t,(function(t,r){e[r]=i&&"function"==typeof t?n(t,i):t})),e}function k(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}function O(e,t,i,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,i&&Object.assign(e.prototype,i)}function I(e,t,i){var n,r,o,s={};t=t||{};do{for(r=(n=Object.getOwnPropertyNames(e)).length;r-- >0;)s[o=n[r]]||(t[o]=e[o],s[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t}function D(e,t,i){e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=t.length;var n=e.indexOf(t,i);return-1!==n&&n===i}function A(e){if(!e)return null;var t=e.length;if(l(t))return null;for(var i=new Array(t);t-- >0;)i[t]=e[t];return i}var L=function(e){return function(t){return e&&t instanceof e}}("undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array));e.exports={isArray:a,isArrayBuffer:u,isBuffer:c,isFormData:_,isArrayBufferView:h,isString:d,isNumber:p,isObject:f,isPlainObject:g,isUndefined:l,isDate:v,isFile:m,isBlob:y,isFunction:x,isStream:b,isURLSearchParams:T,isStandardBrowserEnv:E,forEach:P,merge:C,extend:R,trim:S,stripBOM:k,inherits:O,toFlatObject:I,kindOf:o,kindOfTest:s,endsWith:D,toArray:A,isTypedArray:L,isFileList:w}},c65b:function(e,t,i){var n=i("40d5"),r=Function.prototype.call;e.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},c6b6:function(e,t,i){var n=i("e330"),r=n({}.toString),o=n("".slice);e.exports=function(e){return o(r(e),8,-1)}},c6cd:function(e,t,i){var n=i("da84"),r=i("6374"),o="__core-js_shared__",s=n[o]||r(o,{});e.exports=s},c770:function(e,t,i){var n=i("e330"),r=Error,o=n("".replace),s=String(r("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,l=a.test(s);e.exports=function(e,t){if(l&&"string"==typeof e&&!r.prepareStackTrace)for(;t--;)e=o(e,a,"");return e}},c8af:function(e,t,i){var n=i("c532");e.exports=function(e,t){n.forEach(e,(function(i,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=i,delete e[n])}))}},c8ba:function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},ca84:function(e,t,i){var n=i("e330"),r=i("1a2d"),o=i("fc6a"),s=i("4d64").indexOf,a=i("d012"),l=n([].push);e.exports=function(e,t){var i,n=o(e),c=0,u=[];for(i in n)!r(a,i)&&r(n,i)&&l(u,i);for(;t.length>c;)r(n,i=t[c++])&&(~s(u,i)||l(u,i));return u}},cafa:function(e,t,i){e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},cb2d:function(e,t,i){var n=i("1626"),r=i("9bf2"),o=i("13d2"),s=i("6374");e.exports=function(e,t,i,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:t;if(n(i)&&o(i,c,a),a.global)l?e[t]=i:s(t,i);else{try{a.unsafe?e[t]&&(l=!0):delete e[t]}catch(e){}l?e[t]=i:r.f(e,t,{value:i,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},cc12:function(e,t,i){var n=i("da84"),r=i("861d"),o=n.document,s=r(o)&&r(o.createElement);e.exports=function(e){return s?o.createElement(e):{}}},cee4:function(e,t,i){var n=i("c532"),r=i("1d2b"),o=i("0a06"),s=i("4a7b");function a(e){var t=new o(e),i=r(o.prototype.request,t);return n.extend(i,o.prototype,t),n.extend(i,t),i.create=function(t){return a(s(e,t))},i}var l=a(i("4c3d"));l.Axios=o,l.CanceledError=i("fb60"),l.CancelToken=i("8df4"),l.isCancel=i("2e67"),l.VERSION=i("5cce").version,l.toFormData=i("e467"),l.AxiosError=i("7917"),l.Cancel=l.CanceledError,l.all=function(e){return Promise.all(e)},l.spread=i("0df6"),l.isAxiosError=i("5f02"),e.exports=l,e.exports.default=l},d012:function(e,t){e.exports={}},d039:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},d066:function(e,t,i){var n=i("da84"),r=i("1626"),o=function(e){return r(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?o(n[e]):n[e]&&n[e][t]}},d1e7:function(e,t,i){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},d2bb:function(e,t,i){var n=i("e330"),r=i("825a"),o=i("3bbe");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{(e=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(i,[]),t=i instanceof Array}catch(e){}return function(i,n){return r(i),o(n),t?e(i,n):i.__proto__=n,i}}():void 0)},d925:function(e,t,i){e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},d9b5:function(e,t,i){var n=i("d066"),r=i("1626"),o=i("3a9b"),s=i("fdbf"),a=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return r(t)&&o(t.prototype,a(e))}},d9e2:function(e,t,i){var n=i("23e7"),r=i("da84"),o=i("2ba4"),s=i("e5cb"),a="WebAssembly",l=r[a],c=7!==Error("e",{cause:7}).cause,u=function(e,t){var i={};i[e]=s(e,t,c),n({global:!0,constructor:!0,arity:1,forced:c},i)},h=function(e,t){if(l&&l[e]){var i={};i[e]=s(a+"."+e,t,c),n({target:a,stat:!0,constructor:!0,arity:1,forced:c},i)}};u("Error",(function(e){return function(t){return o(e,this,arguments)}})),u("EvalError",(function(e){return function(t){return o(e,this,arguments)}})),u("RangeError",(function(e){return function(t){return o(e,this,arguments)}})),u("ReferenceError",(function(e){return function(t){return o(e,this,arguments)}})),u("SyntaxError",(function(e){return function(t){return o(e,this,arguments)}})),u("TypeError",(function(e){return function(t){return o(e,this,arguments)}})),u("URIError",(function(e){return function(t){return o(e,this,arguments)}})),h("CompileError",(function(e){return function(t){return o(e,this,arguments)}})),h("LinkError",(function(e){return function(t){return o(e,this,arguments)}})),h("RuntimeError",(function(e){return function(t){return o(e,this,arguments)}}))},da84:function(e,t,i){(function(t){var i=function(e){return e&&e.Math==Math&&e};e.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,i("c8ba"))},dc4a:function(e,t,i){var n=i("59ed");e.exports=function(e,t){var i=e[t];return null==i?void 0:n(i)}},df7c:function(e,t,i){(function(e){function i(e,t){for(var i=0,n=e.length-1;n>=0;n--){var r=e[n];"."===r?e.splice(n,1):".."===r?(e.splice(n,1),i++):i&&(e.splice(n,1),i--)}if(t)for(;i--;i)e.unshift("..");return e}function n(e){"string"!=typeof e&&(e+="");var t,i=0,n=-1,r=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!r){i=t+1;break}}else-1===n&&(r=!1,n=t+1);return-1===n?"":e.slice(i,n)}function r(e,t){if(e.filter)return e.filter(t);for(var i=[],n=0;n<e.length;n++)t(e[n],n,e)&&i.push(e[n]);return i}t.resolve=function(){for(var t="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var s=o>=0?arguments[o]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,n="/"===s.charAt(0))}return(n?"/":"")+(t=i(r(t.split("/"),(function(e){return!!e})),!n).join("/"))||"."},t.normalize=function(e){var n=t.isAbsolute(e),s="/"===o(e,-1);return(e=i(r(e.split("/"),(function(e){return!!e})),!n).join("/"))||n||(e="."),e&&s&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,i){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var i=e.length-1;i>=0&&""===e[i];i--);return t>i?[]:e.slice(t,i-t+1)}e=t.resolve(e).substr(1),i=t.resolve(i).substr(1);for(var r=n(e.split("/")),o=n(i.split("/")),s=Math.min(r.length,o.length),a=s,l=0;l<s;l++)if(r[l]!==o[l]){a=l;break}var c=[];for(l=a;l<r.length;l++)c.push("..");return(c=c.concat(o.slice(a))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),i=47===t,n=-1,r=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!r){n=o;break}}else r=!1;return-1===n?i?"/":".":i&&1===n?"/":e.slice(0,n)},t.basename=function(e,t){var i=n(e);return t&&i.substr(-1*t.length)===t&&(i=i.substr(0,i.length-t.length)),i},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,i=0,n=-1,r=!0,o=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===n&&(r=!1,n=s+1),46===a?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!r){i=s+1;break}}return-1===t||-1===n||0===o||1===o&&t===n-1&&t===i+1?"":e.slice(t,n)};var o="b"==="ab".substr(-1)?function(e,t,i){return e.substr(t,i)}:function(e,t,i){return t<0&&(t=e.length+t),e.substr(t,i)}}).call(this,i("4362"))},e330:function(e,t,i){var n=i("40d5"),r=Function.prototype,o=r.bind,s=r.call,a=n&&o.bind(s,s);e.exports=n?function(e){return e&&a(e)}:function(e){return e&&function(){return s.apply(e,arguments)}}},e391:function(e,t,i){var n=i("577e");e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},e3db:function(e,t){var i={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},e467:function(e,t,i){(function(t){var n=i("c532");function r(e,i){i=i||new FormData;var r=[];function o(e){return null===e?"":n.isDate(e)?e.toISOString():n.isArrayBuffer(e)||n.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):t.from(e):e}function s(e,t){if(n.isPlainObject(e)||n.isArray(e)){if(-1!==r.indexOf(e))throw Error("Circular reference detected in "+t);r.push(e),n.forEach(e,(function(e,r){if(!n.isUndefined(e)){var a,l=t?t+"."+r:r;if(e&&!t&&"object"==typeof e)if(n.endsWith(r,"{}"))e=JSON.stringify(e);else if(n.endsWith(r,"[]")&&(a=n.toArray(e)))return void a.forEach((function(e){!n.isUndefined(e)&&i.append(l,o(e))}));s(e,l)}})),r.pop()}else i.append(t,o(e))}return s(e),i}e.exports=r}).call(this,i("b639").Buffer)},e5cb:function(e,t,i){var n=i("d066"),r=i("1a2d"),o=i("9112"),s=i("3a9b"),a=i("d2bb"),l=i("e893"),c=i("aeb0"),u=i("7156"),h=i("e391"),d=i("ab36"),p=i("c770"),f=i("b980"),g=i("83ab"),v=i("c430");e.exports=function(e,t,i,m){var y="stackTraceLimit",w=m?2:1,x=e.split("."),b=x[x.length-1],_=n.apply(null,x);if(_){var T=_.prototype;if(!v&&r(T,"cause")&&delete T.cause,!i)return _;var S=n("Error"),E=t((function(e,t){var i=h(m?t:e,void 0),n=m?new _(e):new _;return void 0!==i&&o(n,"message",i),f&&o(n,"stack",p(n.stack,2)),this&&s(T,this)&&u(n,this,E),arguments.length>w&&d(n,arguments[w]),n}));if(E.prototype=T,"Error"!==b?a?a(E,S):l(E,S,{name:!0}):g&&y in _&&(c(E,_,y),c(E,_,"prepareStackTrace")),l(E,_),!v)try{T.name!==b&&o(T,"name",b),T.constructor=E}catch(e){}return E}}},e683:function(e,t,i){e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},e893:function(e,t,i){var n=i("1a2d"),r=i("56ef"),o=i("06cf"),s=i("9bf2");e.exports=function(e,t,i){for(var a=r(t),l=s.f,c=o.f,u=0;u<a.length;u++){var h=a[u];n(e,h)||i&&n(i,h)||l(e,h,c(t,h))}}},f5df:function(e,t,i){var n=i("00ee"),r=i("1626"),o=i("c6b6"),s=i("b622")("toStringTag"),a=Object,l="Arguments"==o(function(){return arguments}()),c=function(e,t){try{return e[t]}catch(e){}};e.exports=n?o:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=c(t=a(e),s))?i:l?o(t):"Object"==(n=o(t))&&r(t.callee)?"Arguments":n}},f675:function(e,t,i){},f6b4:function(e,t,i){var n=i("c532");function r(){this.handlers=[]}r.prototype.use=function(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=r},f772:function(e,t,i){var n=i("5692"),r=i("90e3"),o=n("keys");e.exports=function(e){return o[e]||(o[e]=r(e))}},fb60:function(e,t,i){var n=i("7917");function r(e){n.call(this,null==e?"canceled":e,n.ERR_CANCELED),this.name="CanceledError"}i("c532").inherits(r,n,{__CANCEL__:!0}),e.exports=r},fc6a:function(e,t,i){var n=i("44ad"),r=i("1d80");e.exports=function(e){return n(r(e))}},fdbf:function(e,t,i){var n=i("4930");e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}});class o extends(e(t)){static get properties(){return Object.assign({manifest:{type:String}},super.properties)}constructor(){super(),this.cssPath="../css/tify",this._initialPages=null}async connectedCallback(){super.connectedCallback(),r(this.cssPath),this.subscribeTo("pb-load-facsimile",e=>{e.detail&&e.detail.order&&this._tify&&(this._setPage?this._setPage(parseInt(e.detail.order,10)):this._initialPages=parseInt(e.detail.order,10))})}firstUpdated(){super.firstUpdated(),i("pb-page-ready",()=>{this._tify=new Tify({manifestUrl:this.toAbsoluteURL(this.manifest,this.getEndpoint())}),this._tify.ready.then(()=>{this.signalReady(),this._tify.setPage(this._initialPages);const{app:e}=this._tify;this._setPage=e.setPage,e.setPage=t=>{const i=Array.isArray(t)?t[0]:t,n=e.$root.canvases[i-1];this._switchPage(n),this._setPage(t)}});const e=document.createElement("div");e.style.height="100%",e.style.width="100%",this.appendChild(e),this._tify.mount(e)})}_switchPage(e){const t=e.rendering;if(t&&t.length>0){const e=new URL(t[0]["@id"]),i={};e.searchParams.forEach((e,t)=>{i[t]=e}),console.log("<pb-tify> page changed, emitting refresh with params %o",i),this.emitTo("pb-refresh",i)}}createRenderRoot(){return this}}customElements.define("pb-tify",o);export{o as PbTify};
|
|
27
|
+
var n=i("1fb5"),r=i("9152"),o=i("e3db");function s(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,i){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,i);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return u(this,e,t,i)}function u(e,t,i,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?v(e,t,i,n):"string"==typeof t?f(e,t,i):m(e,t)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t,i,n){return h(t),t<=0?l(e,t):void 0!==i?"string"==typeof n?l(e,t).fill(i,n):l(e,t).fill(i):l(e,t)}function p(e,t){if(h(t),e=l(e,t<0?0:0|y(t)),!c.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function f(e,t,i){if("string"==typeof i&&""!==i||(i="utf8"),!c.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var n=0|x(t,i),r=(e=l(e,n)).write(t,i);return r!==n&&(e=e.slice(0,r)),e}function g(e,t){var i=t.length<0?0:0|y(t.length);e=l(e,i);for(var n=0;n<i;n+=1)e[n]=255&t[n];return e}function v(e,t,i,n){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===i&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,i):new Uint8Array(t,i,n),c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=g(e,t),e}function m(e,t){if(c.isBuffer(t)){var i=0|y(t.length);return 0===(e=l(e,i)).length||t.copy(e,0,0,i),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||te(t.length)?l(e,0):g(e,t);if("Buffer"===t.type&&o(t.data))return g(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function y(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function w(e){return+e!=e&&(e=0),c.alloc(+e)}function x(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return J(e).length;default:if(n)return Y(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,i){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,i);case"utf8":case"utf-8":return D(this,t,i);case"ascii":return H(this,t,i);case"latin1":case"binary":return M(this,t,i);case"base64":return I(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function _(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function T(e,t,i,n,r){if(0===e.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=r?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(r)return-1;i=e.length-1}else if(i<0){if(!r)return-1;i=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:S(e,t,i,n,r);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):S(e,[t],i,n,r);throw new TypeError("val must be string, number or Buffer")}function S(e,t,i,n,r){var o,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,i/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(r){var u=-1;for(o=i;o<a;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*s}else-1!==u&&(o-=o-u),u=-1}else for(i+l>a&&(i=a-l),o=i;o>=0;o--){for(var h=!0,d=0;d<l;d++)if(c(e,o+d)!==c(t,d)){h=!1;break}if(h)return o}return-1}function E(e,t,i,n){i=Number(i)||0;var r=e.length-i;n?(n=Number(n))>r&&(n=r):n=r;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[i+s]=a}return s}function P(e,t,i,n){return ee(Y(t,e.length-i),e,i,n)}function C(e,t,i,n){return ee(K(t),e,i,n)}function R(e,t,i,n){return C(e,t,i,n)}function k(e,t,i,n){return ee(J(t),e,i,n)}function O(e,t,i,n){return ee(Q(t,e.length-i),e,i,n)}function I(e,t,i){return 0===t&&i===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,i))}function D(e,t,i){i=Math.min(e.length,i);for(var n=[],r=t;r<i;){var o,s,a,l,c=e[r],u=null,h=c>239?4:c>223?3:c>191?2:1;if(r+h<=i)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[r+1]))&&((l=(31&c)<<6|63&o)>127&&(u=l));break;case 3:o=e[r+1],s=e[r+2],128==(192&o)&&128==(192&s)&&((l=(15&c)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l));break;case 4:o=e[r+1],s=e[r+2],a=e[r+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&((l=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l))}null===u?(u=65533,h=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),r+=h}return L(n)}t.Buffer=c,t.SlowBuffer=w,t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:s(),t.kMaxLength=a(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,i){return u(null,e,t,i)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,i){return d(null,e,t,i)},c.allocUnsafe=function(e){return p(null,e)},c.allocUnsafeSlow=function(e){return p(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,n=t.length,r=0,o=Math.min(i,n);r<o;++r)if(e[r]!==t[r]){i=e[r],n=t[r];break}return i<n?-1:n<i?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=c.allocUnsafe(t),r=0;for(i=0;i<e.length;++i){var s=e[i];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,r),r+=s.length}return n},c.byteLength=x,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)_(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)_(this,t,t+3),_(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)_(this,t,t+7),_(this,t+1,t+6),_(this,t+2,t+5),_(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?D(this,0,e):b.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",i=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,i,n,r){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),t<0||i>e.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&t>=i)return 0;if(n>=r)return-1;if(t>=i)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(n>>>=0),s=(i>>>=0)-(t>>>=0),a=Math.min(o,s),l=this.slice(n,r),u=e.slice(t,i),h=0;h<a;++h)if(l[h]!==u[h]){o=l[h],s=u[h];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},c.prototype.indexOf=function(e,t,i){return T(this,e,t,i,!0)},c.prototype.lastIndexOf=function(e,t,i){return T(this,e,t,i,!1)},c.prototype.write=function(e,t,i,n){if(void 0===t)n="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)n=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}var r=this.length-t;if((void 0===i||i>r)&&(i=r),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return E(this,e,t,i);case"utf8":case"utf-8":return P(this,e,t,i);case"ascii":return C(this,e,t,i);case"latin1":case"binary":return R(this,e,t,i);case"base64":return k(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,i);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function L(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);for(var i="",n=0;n<t;)i+=String.fromCharCode.apply(String,e.slice(n,n+=A));return i}function H(e,t,i){var n="";i=Math.min(e.length,i);for(var r=t;r<i;++r)n+=String.fromCharCode(127&e[r]);return n}function M(e,t,i){var n="";i=Math.min(e.length,i);for(var r=t;r<i;++r)n+=String.fromCharCode(e[r]);return n}function B(e,t,i){var n=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>n)&&(i=n);for(var r="",o=t;o<i;++o)r+=X(e[o]);return r}function $(e,t,i){for(var n=e.slice(t,i),r="",o=0;o<n.length;o+=2)r+=String.fromCharCode(n[o]+256*n[o+1]);return r}function F(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,i,n,r,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<o)throw new RangeError('"value" argument is out of bounds');if(i+n>e.length)throw new RangeError("Index out of range")}function z(e,t,i,n){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-i,2);r<o;++r)e[i+r]=(t&255<<8*(n?r:1-r))>>>8*(n?r:1-r)}function V(e,t,i,n){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-i,4);r<o;++r)e[i+r]=t>>>8*(n?r:3-r)&255}function j(e,t,i,n,r,o){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function U(e,t,i,n,o){return o||j(e,t,i,4),r.write(e,t,i,n,23,4),i+4}function W(e,t,i,n,o){return o||j(e,t,i,8),r.write(e,t,i,n,52,8),i+8}c.prototype.slice=function(e,t){var i,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=c.prototype;else{var r=t-e;i=new c(r,void 0);for(var o=0;o<r;++o)i[o]=this[o+e]}return i},c.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||F(e,t,this.length);for(var n=this[e],r=1,o=0;++o<t&&(r*=256);)n+=this[e+o]*r;return n},c.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||F(e,t,this.length);for(var n=this[e+--t],r=1;t>0&&(r*=256);)n+=this[e+--t]*r;return n},c.prototype.readUInt8=function(e,t){return t||F(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||F(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||F(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||F(e,t,this.length);for(var n=this[e],r=1,o=0;++o<t&&(r*=256);)n+=this[e+o]*r;return n>=(r*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||F(e,t,this.length);for(var n=t,r=1,o=this[e+--n];n>0&&(r*=256);)o+=this[e+--n]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||F(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},c.prototype.readInt16BE=function(e,t){t||F(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},c.prototype.readInt32LE=function(e,t){return t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||F(e,4,this.length),r.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||F(e,4,this.length),r.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||F(e,8,this.length),r.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||F(e,8,this.length),r.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,i,n){(e=+e,t|=0,i|=0,n)||N(this,e,t,i,Math.pow(2,8*i)-1,0);var r=1,o=0;for(this[t]=255&e;++o<i&&(r*=256);)this[t+o]=e/r&255;return t+i},c.prototype.writeUIntBE=function(e,t,i,n){(e=+e,t|=0,i|=0,n)||N(this,e,t,i,Math.pow(2,8*i)-1,0);var r=i-1,o=1;for(this[t+r]=255&e;--r>=0&&(o*=256);)this[t+r]=e/o&255;return t+i},c.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):V(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):V(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);N(this,e,t,i,r-1,-r)}var o=0,s=1,a=0;for(this[t]=255&e;++o<i&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+i},c.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);N(this,e,t,i,r-1,-r)}var o=i-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+i},c.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):V(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):V(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,i){return U(this,e,t,!0,i)},c.prototype.writeFloatBE=function(e,t,i){return U(this,e,t,!1,i)},c.prototype.writeDoubleLE=function(e,t,i){return W(this,e,t,!0,i)},c.prototype.writeDoubleBE=function(e,t,i){return W(this,e,t,!1,i)},c.prototype.copy=function(e,t,i,n){if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);var r,o=n-i;if(this===e&&i<t&&t<n)for(r=o-1;r>=0;--r)e[r+t]=this[r+i];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(r=0;r<o;++r)e[r+t]=this[r+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+o),t);return o},c.prototype.fill=function(e,t,i,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var o;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(o=t;o<i;++o)this[o]=e;else{var s=c.isBuffer(e)?e:Y(new c(e,n).toString()),a=s.length;for(o=0;o<i-t;++o)this[o+t]=s[o%a]}return this};var G=/[^+\/0-9A-Za-z-_]/g;function q(e){if((e=Z(e).replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Z(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function X(e){return e<16?"0"+e.toString(16):e.toString(16)}function Y(e,t){var i;t=t||1/0;for(var n=e.length,r=null,o=[],s=0;s<n;++s){if((i=e.charCodeAt(s))>55295&&i<57344){if(!r){if(i>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}r=i;continue}if(i<56320){(t-=3)>-1&&o.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,i<128){if((t-=1)<0)break;o.push(i)}else if(i<2048){if((t-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function K(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}function Q(e,t){for(var i,n,r,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(i=e.charCodeAt(s))>>8,r=i%256,o.push(r),o.push(n);return o}function J(e){return n.toByteArray(q(e))}function ee(e,t,i,n){for(var r=0;r<n&&!(r+i>=t.length||r>=e.length);++r)t[r+i]=e[r];return r}function te(e){return e!=e}}).call(this,i("c8ba"))},b68a:function(e,t,i){e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},b980:function(e,t,i){var n=i("d039"),r=i("5c6c");e.exports=!n((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",r(1,7)),7!==e.stack)}))},bc3a:function(e,t,i){e.exports=i("cee4")},c04e:function(e,t,i){var n=i("c65b"),r=i("861d"),o=i("d9b5"),s=i("dc4a"),a=i("485a"),l=i("b622"),c=TypeError,u=l("toPrimitive");e.exports=function(e,t){if(!r(e)||o(e))return e;var i,l=s(e,u);if(l){if(void 0===t&&(t="default"),i=n(l,e,t),!r(i)||o(i))return i;throw c("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},c345:function(e,t,i){var n=i("c532"),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,i,o,s={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),i=n.trim(e.substr(o+1)),t){if(s[t]&&r.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([i]):s[t]?s[t]+", "+i:i}})),s):s}},c401:function(e,t,i){var n=i("c532"),r=i("4c3d");e.exports=function(e,t,i){var o=this||r;return n.forEach(i,(function(i){e=i.call(o,e,t)})),e}},c430:function(e,t){e.exports=!1},c532:function(e,t,i){var n=i("1d2b"),r=Object.prototype.toString,o=function(e){return function(t){var i=r.call(t);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())}}(Object.create(null));function s(e){return e=e.toLowerCase(),function(t){return o(t)===e}}function a(e){return Array.isArray(e)}function l(e){return void 0===e}function c(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var u=s("ArrayBuffer");function h(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer)}function d(e){return"string"==typeof e}function p(e){return"number"==typeof e}function f(e){return null!==e&&"object"==typeof e}function g(e){if("object"!==o(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var v=s("Date"),m=s("File"),y=s("Blob"),w=s("FileList");function x(e){return"[object Function]"===r.call(e)}function b(e){return f(e)&&x(e.pipe)}function _(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||r.call(e)===t||x(e.toString)&&e.toString()===t)}var T=s("URLSearchParams");function S(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function E(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document}function P(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var i=0,n=e.length;i<n;i++)t.call(null,e[i],i,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}function C(){var e={};function t(t,i){g(e[i])&&g(t)?e[i]=C(e[i],t):g(t)?e[i]=C({},t):a(t)?e[i]=t.slice():e[i]=t}for(var i=0,n=arguments.length;i<n;i++)P(arguments[i],t);return e}function R(e,t,i){return P(t,(function(t,r){e[r]=i&&"function"==typeof t?n(t,i):t})),e}function k(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}function O(e,t,i,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,i&&Object.assign(e.prototype,i)}function I(e,t,i){var n,r,o,s={};t=t||{};do{for(r=(n=Object.getOwnPropertyNames(e)).length;r-- >0;)s[o=n[r]]||(t[o]=e[o],s[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t}function D(e,t,i){e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=t.length;var n=e.indexOf(t,i);return-1!==n&&n===i}function A(e){if(!e)return null;var t=e.length;if(l(t))return null;for(var i=new Array(t);t-- >0;)i[t]=e[t];return i}var L=function(e){return function(t){return e&&t instanceof e}}("undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array));e.exports={isArray:a,isArrayBuffer:u,isBuffer:c,isFormData:_,isArrayBufferView:h,isString:d,isNumber:p,isObject:f,isPlainObject:g,isUndefined:l,isDate:v,isFile:m,isBlob:y,isFunction:x,isStream:b,isURLSearchParams:T,isStandardBrowserEnv:E,forEach:P,merge:C,extend:R,trim:S,stripBOM:k,inherits:O,toFlatObject:I,kindOf:o,kindOfTest:s,endsWith:D,toArray:A,isTypedArray:L,isFileList:w}},c65b:function(e,t,i){var n=i("40d5"),r=Function.prototype.call;e.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},c6b6:function(e,t,i){var n=i("e330"),r=n({}.toString),o=n("".slice);e.exports=function(e){return o(r(e),8,-1)}},c6cd:function(e,t,i){var n=i("da84"),r=i("6374"),o="__core-js_shared__",s=n[o]||r(o,{});e.exports=s},c770:function(e,t,i){var n=i("e330"),r=Error,o=n("".replace),s=String(r("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,l=a.test(s);e.exports=function(e,t){if(l&&"string"==typeof e&&!r.prepareStackTrace)for(;t--;)e=o(e,a,"");return e}},c8af:function(e,t,i){var n=i("c532");e.exports=function(e,t){n.forEach(e,(function(i,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=i,delete e[n])}))}},c8ba:function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},ca84:function(e,t,i){var n=i("e330"),r=i("1a2d"),o=i("fc6a"),s=i("4d64").indexOf,a=i("d012"),l=n([].push);e.exports=function(e,t){var i,n=o(e),c=0,u=[];for(i in n)!r(a,i)&&r(n,i)&&l(u,i);for(;t.length>c;)r(n,i=t[c++])&&(~s(u,i)||l(u,i));return u}},cafa:function(e,t,i){e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},cb2d:function(e,t,i){var n=i("1626"),r=i("9bf2"),o=i("13d2"),s=i("6374");e.exports=function(e,t,i,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:t;if(n(i)&&o(i,c,a),a.global)l?e[t]=i:s(t,i);else{try{a.unsafe?e[t]&&(l=!0):delete e[t]}catch(e){}l?e[t]=i:r.f(e,t,{value:i,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},cc12:function(e,t,i){var n=i("da84"),r=i("861d"),o=n.document,s=r(o)&&r(o.createElement);e.exports=function(e){return s?o.createElement(e):{}}},cee4:function(e,t,i){var n=i("c532"),r=i("1d2b"),o=i("0a06"),s=i("4a7b");function a(e){var t=new o(e),i=r(o.prototype.request,t);return n.extend(i,o.prototype,t),n.extend(i,t),i.create=function(t){return a(s(e,t))},i}var l=a(i("4c3d"));l.Axios=o,l.CanceledError=i("fb60"),l.CancelToken=i("8df4"),l.isCancel=i("2e67"),l.VERSION=i("5cce").version,l.toFormData=i("e467"),l.AxiosError=i("7917"),l.Cancel=l.CanceledError,l.all=function(e){return Promise.all(e)},l.spread=i("0df6"),l.isAxiosError=i("5f02"),e.exports=l,e.exports.default=l},d012:function(e,t){e.exports={}},d039:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},d066:function(e,t,i){var n=i("da84"),r=i("1626"),o=function(e){return r(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?o(n[e]):n[e]&&n[e][t]}},d1e7:function(e,t,i){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},d2bb:function(e,t,i){var n=i("e330"),r=i("825a"),o=i("3bbe");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{(e=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(i,[]),t=i instanceof Array}catch(e){}return function(i,n){return r(i),o(n),t?e(i,n):i.__proto__=n,i}}():void 0)},d925:function(e,t,i){e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},d9b5:function(e,t,i){var n=i("d066"),r=i("1626"),o=i("3a9b"),s=i("fdbf"),a=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return r(t)&&o(t.prototype,a(e))}},d9e2:function(e,t,i){var n=i("23e7"),r=i("da84"),o=i("2ba4"),s=i("e5cb"),a="WebAssembly",l=r[a],c=7!==Error("e",{cause:7}).cause,u=function(e,t){var i={};i[e]=s(e,t,c),n({global:!0,constructor:!0,arity:1,forced:c},i)},h=function(e,t){if(l&&l[e]){var i={};i[e]=s(a+"."+e,t,c),n({target:a,stat:!0,constructor:!0,arity:1,forced:c},i)}};u("Error",(function(e){return function(t){return o(e,this,arguments)}})),u("EvalError",(function(e){return function(t){return o(e,this,arguments)}})),u("RangeError",(function(e){return function(t){return o(e,this,arguments)}})),u("ReferenceError",(function(e){return function(t){return o(e,this,arguments)}})),u("SyntaxError",(function(e){return function(t){return o(e,this,arguments)}})),u("TypeError",(function(e){return function(t){return o(e,this,arguments)}})),u("URIError",(function(e){return function(t){return o(e,this,arguments)}})),h("CompileError",(function(e){return function(t){return o(e,this,arguments)}})),h("LinkError",(function(e){return function(t){return o(e,this,arguments)}})),h("RuntimeError",(function(e){return function(t){return o(e,this,arguments)}}))},da84:function(e,t,i){(function(t){var i=function(e){return e&&e.Math==Math&&e};e.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,i("c8ba"))},dc4a:function(e,t,i){var n=i("59ed");e.exports=function(e,t){var i=e[t];return null==i?void 0:n(i)}},df7c:function(e,t,i){(function(e){function i(e,t){for(var i=0,n=e.length-1;n>=0;n--){var r=e[n];"."===r?e.splice(n,1):".."===r?(e.splice(n,1),i++):i&&(e.splice(n,1),i--)}if(t)for(;i--;i)e.unshift("..");return e}function n(e){"string"!=typeof e&&(e+="");var t,i=0,n=-1,r=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!r){i=t+1;break}}else-1===n&&(r=!1,n=t+1);return-1===n?"":e.slice(i,n)}function r(e,t){if(e.filter)return e.filter(t);for(var i=[],n=0;n<e.length;n++)t(e[n],n,e)&&i.push(e[n]);return i}t.resolve=function(){for(var t="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var s=o>=0?arguments[o]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,n="/"===s.charAt(0))}return(n?"/":"")+(t=i(r(t.split("/"),(function(e){return!!e})),!n).join("/"))||"."},t.normalize=function(e){var n=t.isAbsolute(e),s="/"===o(e,-1);return(e=i(r(e.split("/"),(function(e){return!!e})),!n).join("/"))||n||(e="."),e&&s&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,i){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var i=e.length-1;i>=0&&""===e[i];i--);return t>i?[]:e.slice(t,i-t+1)}e=t.resolve(e).substr(1),i=t.resolve(i).substr(1);for(var r=n(e.split("/")),o=n(i.split("/")),s=Math.min(r.length,o.length),a=s,l=0;l<s;l++)if(r[l]!==o[l]){a=l;break}var c=[];for(l=a;l<r.length;l++)c.push("..");return(c=c.concat(o.slice(a))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),i=47===t,n=-1,r=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!r){n=o;break}}else r=!1;return-1===n?i?"/":".":i&&1===n?"/":e.slice(0,n)},t.basename=function(e,t){var i=n(e);return t&&i.substr(-1*t.length)===t&&(i=i.substr(0,i.length-t.length)),i},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,i=0,n=-1,r=!0,o=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===n&&(r=!1,n=s+1),46===a?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!r){i=s+1;break}}return-1===t||-1===n||0===o||1===o&&t===n-1&&t===i+1?"":e.slice(t,n)};var o="b"==="ab".substr(-1)?function(e,t,i){return e.substr(t,i)}:function(e,t,i){return t<0&&(t=e.length+t),e.substr(t,i)}}).call(this,i("4362"))},e330:function(e,t,i){var n=i("40d5"),r=Function.prototype,o=r.bind,s=r.call,a=n&&o.bind(s,s);e.exports=n?function(e){return e&&a(e)}:function(e){return e&&function(){return s.apply(e,arguments)}}},e391:function(e,t,i){var n=i("577e");e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},e3db:function(e,t){var i={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},e467:function(e,t,i){(function(t){var n=i("c532");function r(e,i){i=i||new FormData;var r=[];function o(e){return null===e?"":n.isDate(e)?e.toISOString():n.isArrayBuffer(e)||n.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):t.from(e):e}function s(e,t){if(n.isPlainObject(e)||n.isArray(e)){if(-1!==r.indexOf(e))throw Error("Circular reference detected in "+t);r.push(e),n.forEach(e,(function(e,r){if(!n.isUndefined(e)){var a,l=t?t+"."+r:r;if(e&&!t&&"object"==typeof e)if(n.endsWith(r,"{}"))e=JSON.stringify(e);else if(n.endsWith(r,"[]")&&(a=n.toArray(e)))return void a.forEach((function(e){!n.isUndefined(e)&&i.append(l,o(e))}));s(e,l)}})),r.pop()}else i.append(t,o(e))}return s(e),i}e.exports=r}).call(this,i("b639").Buffer)},e5cb:function(e,t,i){var n=i("d066"),r=i("1a2d"),o=i("9112"),s=i("3a9b"),a=i("d2bb"),l=i("e893"),c=i("aeb0"),u=i("7156"),h=i("e391"),d=i("ab36"),p=i("c770"),f=i("b980"),g=i("83ab"),v=i("c430");e.exports=function(e,t,i,m){var y="stackTraceLimit",w=m?2:1,x=e.split("."),b=x[x.length-1],_=n.apply(null,x);if(_){var T=_.prototype;if(!v&&r(T,"cause")&&delete T.cause,!i)return _;var S=n("Error"),E=t((function(e,t){var i=h(m?t:e,void 0),n=m?new _(e):new _;return void 0!==i&&o(n,"message",i),f&&o(n,"stack",p(n.stack,2)),this&&s(T,this)&&u(n,this,E),arguments.length>w&&d(n,arguments[w]),n}));if(E.prototype=T,"Error"!==b?a?a(E,S):l(E,S,{name:!0}):g&&y in _&&(c(E,_,y),c(E,_,"prepareStackTrace")),l(E,_),!v)try{T.name!==b&&o(T,"name",b),T.constructor=E}catch(e){}return E}}},e683:function(e,t,i){e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},e893:function(e,t,i){var n=i("1a2d"),r=i("56ef"),o=i("06cf"),s=i("9bf2");e.exports=function(e,t,i){for(var a=r(t),l=s.f,c=o.f,u=0;u<a.length;u++){var h=a[u];n(e,h)||i&&n(i,h)||l(e,h,c(t,h))}}},f5df:function(e,t,i){var n=i("00ee"),r=i("1626"),o=i("c6b6"),s=i("b622")("toStringTag"),a=Object,l="Arguments"==o(function(){return arguments}()),c=function(e,t){try{return e[t]}catch(e){}};e.exports=n?o:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=c(t=a(e),s))?i:l?o(t):"Object"==(n=o(t))&&r(t.callee)?"Arguments":n}},f675:function(e,t,i){},f6b4:function(e,t,i){var n=i("c532");function r(){this.handlers=[]}r.prototype.use=function(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=r},f772:function(e,t,i){var n=i("5692"),r=i("90e3"),o=n("keys");e.exports=function(e){return o[e]||(o[e]=r(e))}},fb60:function(e,t,i){var n=i("7917");function r(e){n.call(this,null==e?"canceled":e,n.ERR_CANCELED),this.name="CanceledError"}i("c532").inherits(r,n,{__CANCEL__:!0}),e.exports=r},fc6a:function(e,t,i){var n=i("44ad"),r=i("1d80");e.exports=function(e){return n(r(e))}},fdbf:function(e,t,i){var n=i("4930");e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}});class o extends(e(t)){static get properties(){return Object.assign({manifest:{type:String}},super.properties)}constructor(){super(),this.cssPath="../css/tify",this._initialPages=null}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),"manifest"===e&&i&&(this.manifest=i,this._initViewer())}async connectedCallback(){super.connectedCallback(),r(this.cssPath),this.subscribeTo("pb-show-annotation",e=>{if(e.detail){this._initialPages=e.detail.order?Number(e.detail.order):Number.POSITIVE_INFINITY,this._initialPages===Number.POSITIVE_INFINITY&&(this._initialPages=1);const t=e.detail.file||e.detail.url;t&&t!==this.manifest?(this.manifest=e.detail.file,this._initViewer()):this._setPage&&this._setPage(this._initialPages)}})}firstUpdated(){super.firstUpdated(),i("pb-page-ready",()=>{this._container=document.createElement("div"),this._container.style.height="100%",this._container.style.width="100%",this.appendChild(this._container),this._initViewer()})}_initViewer(){this.manifest&&(this._tify&&this._tify.destroy(),this._tify=new Tify({manifestUrl:this.toAbsoluteURL(this.manifest,this.getEndpoint())}),this._tify.ready.then(()=>{this.signalReady(),this._initialPages&&this._tify.setPage(this._initialPages);const{app:e}=this._tify;this._setPage=e.setPage,e.setPage=t=>{const i=Array.isArray(t)?t[0]:t,n=e.$root.canvases[i-1];this._switchPage(n),this._setPage(t)}}),this._tify.mount(this._container))}_switchPage(e){const t=e.rendering;if(t&&t.length>0){const e=new URL(t[0]["@id"]),i={};e.searchParams.forEach((e,t)=>{i[t]=e}),console.log("<pb-tify> page changed, emitting refresh with params %o",i),this.emitTo("pb-refresh",i)}}createRenderRoot(){return this}}customElements.define("pb-tify",o);export{o as PbTify};
|
package/package.json
CHANGED
package/pb-elements.json
CHANGED
|
@@ -6158,7 +6158,7 @@
|
|
|
6158
6158
|
},
|
|
6159
6159
|
{
|
|
6160
6160
|
"name": "group",
|
|
6161
|
-
"description": "If set, only users being members of the specified group are\nallowed to log in.",
|
|
6161
|
+
"description": "If set, only users being members of the specified group are\nallowed to log in.\nMultiple groups can be defined separating items by space and/or comma.",
|
|
6162
6162
|
"type": "string"
|
|
6163
6163
|
},
|
|
6164
6164
|
{
|
|
@@ -6247,7 +6247,7 @@
|
|
|
6247
6247
|
{
|
|
6248
6248
|
"name": "group",
|
|
6249
6249
|
"attribute": "group",
|
|
6250
|
-
"description": "If set, only users being members of the specified group are\nallowed to log in.",
|
|
6250
|
+
"description": "If set, only users being members of the specified group are\nallowed to log in.\nMultiple groups can be defined separating items by space and/or comma.",
|
|
6251
6251
|
"type": "string"
|
|
6252
6252
|
},
|
|
6253
6253
|
{
|
|
@@ -9452,7 +9452,7 @@
|
|
|
9452
9452
|
},
|
|
9453
9453
|
{
|
|
9454
9454
|
"name": "group",
|
|
9455
|
-
"description": "If set, requires the logged in user to be member of\nthe given group.",
|
|
9455
|
+
"description": "If set, requires the logged in user to be member of\nthe given group.\nMultiple groups can be defined separating items by space and/or comma.",
|
|
9456
9456
|
"type": "string"
|
|
9457
9457
|
},
|
|
9458
9458
|
{
|
|
@@ -9502,7 +9502,7 @@
|
|
|
9502
9502
|
{
|
|
9503
9503
|
"name": "group",
|
|
9504
9504
|
"attribute": "group",
|
|
9505
|
-
"description": "If set, requires the logged in user to be member of\nthe given group.",
|
|
9505
|
+
"description": "If set, requires the logged in user to be member of\nthe given group.\nMultiple groups can be defined separating items by space and/or comma.",
|
|
9506
9506
|
"type": "string"
|
|
9507
9507
|
},
|
|
9508
9508
|
{
|
|
@@ -10981,11 +10981,11 @@
|
|
|
10981
10981
|
"events": [
|
|
10982
10982
|
{
|
|
10983
10983
|
"name": "pb-refresh",
|
|
10984
|
-
"description": "if user
|
|
10984
|
+
"description": "fired if user navigates to another page within the viewer. Parameters to be passed\nwith the event will be copied from the `@id` URL declared in the `rendering` property of the canvas."
|
|
10985
10985
|
},
|
|
10986
10986
|
{
|
|
10987
|
-
"name": "pb-
|
|
10988
|
-
"description": "when received, opens the page denoted by the\n`order` property in the event (see `pb-facs-link`). Page counts start at 1."
|
|
10987
|
+
"name": "pb-show-annotation",
|
|
10988
|
+
"description": "when received, opens the the manifest given in `file` and the page denoted by the\n`order` property in the event (see `pb-facs-link`). Page counts start at 1."
|
|
10989
10989
|
}
|
|
10990
10990
|
]
|
|
10991
10991
|
},
|
package/src/pb-combo-box.js
CHANGED
|
@@ -157,7 +157,7 @@ export class PbComboBox extends pbMixin(LitElement) {
|
|
|
157
157
|
const url = this.toAbsoluteURL(this.source);
|
|
158
158
|
options.labelField = 'text';
|
|
159
159
|
options.valueField = 'value';
|
|
160
|
-
options.searchField = [
|
|
160
|
+
options.searchField = [];
|
|
161
161
|
options.preload = this.preload;
|
|
162
162
|
options.load = (query, callback) => {
|
|
163
163
|
fetch(`${url}?query=${encodeURIComponent(query)}`, {
|
package/src/pb-login.js
CHANGED
|
@@ -41,6 +41,7 @@ export class PbLogin extends pbMixin(LitElement) {
|
|
|
41
41
|
/**
|
|
42
42
|
* If set, only users being members of the specified group are
|
|
43
43
|
* allowed to log in.
|
|
44
|
+
* Multiple groups can be defined separating items by space and/or comma.
|
|
44
45
|
*/
|
|
45
46
|
group: {
|
|
46
47
|
type: String
|
|
@@ -268,9 +269,31 @@ export class PbLogin extends pbMixin(LitElement) {
|
|
|
268
269
|
this.emitTo('pb-login', resp);
|
|
269
270
|
}
|
|
270
271
|
|
|
272
|
+
/**
|
|
273
|
+
*
|
|
274
|
+
* @param {Array<String>} arr array containg string values (name of groups)
|
|
275
|
+
* @param {String} val value to check if it's in the array
|
|
276
|
+
* @returns true if the checked values is in the array
|
|
277
|
+
*/
|
|
278
|
+
_isItemInArray(arr, val) {
|
|
279
|
+
return arr.some((arrVal) => val === arrVal);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
*
|
|
284
|
+
* @param {object} info object returned by login function;
|
|
285
|
+
* contains groups the user is a member of
|
|
286
|
+
* @returns true if user is member of one of defined groups
|
|
287
|
+
*/
|
|
271
288
|
_checkGroup(info) {
|
|
272
289
|
if (this.group) {
|
|
273
|
-
|
|
290
|
+
let groupArray = this.group.split(/[\s+,]+/);
|
|
291
|
+
let exists = false;
|
|
292
|
+
if(info.groups)
|
|
293
|
+
groupArray.forEach(async (oneItem) => {
|
|
294
|
+
exists = this._isItemInArray(info.groups, oneItem) || exists;
|
|
295
|
+
});
|
|
296
|
+
return exists;
|
|
274
297
|
}
|
|
275
298
|
return true;
|
|
276
299
|
}
|
package/src/pb-restricted.js
CHANGED
|
@@ -29,7 +29,8 @@ export class PbRestricted extends pbMixin(LitElement) {
|
|
|
29
29
|
/**
|
|
30
30
|
* If set, requires the logged in user to be member of
|
|
31
31
|
* the given group.
|
|
32
|
-
|
|
32
|
+
* Multiple groups can be defined separating items by space and/or comma.
|
|
33
|
+
*/
|
|
33
34
|
group: {
|
|
34
35
|
type: String
|
|
35
36
|
}
|
|
@@ -78,6 +79,22 @@ export class PbRestricted extends pbMixin(LitElement) {
|
|
|
78
79
|
`;
|
|
79
80
|
}
|
|
80
81
|
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @param {Array<String>} arr array containg string values (name of groups)
|
|
85
|
+
* @param {String} val value to check if it's in the array
|
|
86
|
+
* @returns true if the checked values is in the array
|
|
87
|
+
*/
|
|
88
|
+
_isItemInArray(arr, val) {
|
|
89
|
+
return arr.some((arrVal) => val === arrVal);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @param {object} user user name returned by login function;
|
|
95
|
+
* @param {object} groups contains groups (an array) the logged user is a member of
|
|
96
|
+
* @returns true if user is member of one of defined groups
|
|
97
|
+
*/
|
|
81
98
|
_loggedIn(user, groups) {
|
|
82
99
|
if (user == null) {
|
|
83
100
|
return false;
|
|
@@ -86,7 +103,12 @@ export class PbRestricted extends pbMixin(LitElement) {
|
|
|
86
103
|
if (!groups) {
|
|
87
104
|
return false;
|
|
88
105
|
}
|
|
89
|
-
|
|
106
|
+
let groupArray = this.group.split(/[\s+,]+/);
|
|
107
|
+
let exists = false;
|
|
108
|
+
groupArray.forEach(async (oneItem) => {
|
|
109
|
+
exists = this._isItemInArray(groups, oneItem) || exists;
|
|
110
|
+
});
|
|
111
|
+
return exists;
|
|
90
112
|
}
|
|
91
113
|
return true;
|
|
92
114
|
}
|
package/src/pb-tify.js
CHANGED
|
@@ -20,10 +20,9 @@ function _injectStylesheet(path) {
|
|
|
20
20
|
* Requires a proper manifest listing the resources to show. `pb-facs-link`
|
|
21
21
|
* can be used to navigate to a page.
|
|
22
22
|
*
|
|
23
|
-
* @fires pb-refresh - if user
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* @fires pb-load-facsimile - when received, opens the page denoted by the
|
|
23
|
+
* @fires pb-refresh - fired if user navigates to another page within the viewer. Parameters to be passed
|
|
24
|
+
* with the event will be copied from the `@id` URL declared in the `rendering` property of the canvas.
|
|
25
|
+
* @fires pb-show-annotation - when received, opens the the manifest given in `file` and the page denoted by the
|
|
27
26
|
* `order` property in the event (see `pb-facs-link`). Page counts start at 1.
|
|
28
27
|
*/
|
|
29
28
|
export class PbTify extends pbMixin(LitElement) {
|
|
@@ -46,19 +45,33 @@ export class PbTify extends pbMixin(LitElement) {
|
|
|
46
45
|
this._initialPages = null;
|
|
47
46
|
}
|
|
48
47
|
|
|
48
|
+
attributeChangedCallback(name, oldVal, newVal) {
|
|
49
|
+
super.attributeChangedCallback(name, oldVal, newVal);
|
|
50
|
+
|
|
51
|
+
if (name === 'manifest' && newVal) {
|
|
52
|
+
this.manifest = newVal;
|
|
53
|
+
this._initViewer();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
49
57
|
async connectedCallback() {
|
|
50
58
|
super.connectedCallback();
|
|
51
59
|
|
|
52
60
|
_injectStylesheet(this.cssPath);
|
|
53
61
|
|
|
54
|
-
this.subscribeTo('pb-
|
|
55
|
-
if (ev.detail
|
|
62
|
+
this.subscribeTo('pb-show-annotation', (ev) => {
|
|
63
|
+
if (ev.detail) {
|
|
64
|
+
this._initialPages = ev.detail.order ? Number(ev.detail.order) : Number.POSITIVE_INFINITY;
|
|
65
|
+
if (this._initialPages === Number.POSITIVE_INFINITY) {
|
|
66
|
+
this._initialPages = 1;
|
|
67
|
+
}
|
|
68
|
+
const url = ev.detail.file || ev.detail.url;
|
|
69
|
+
if (url && url !== this.manifest) {
|
|
70
|
+
this.manifest = ev.detail.file;
|
|
71
|
+
this._initViewer();
|
|
56
72
|
// check if tify is already initialized
|
|
57
|
-
if (this._setPage) {
|
|
58
|
-
this._setPage(
|
|
59
|
-
} else {
|
|
60
|
-
// remember page and wait for tify
|
|
61
|
-
this._initialPages = parseInt(ev.detail.order, 10);
|
|
73
|
+
} else if (this._setPage) {
|
|
74
|
+
this._setPage(this._initialPages);
|
|
62
75
|
}
|
|
63
76
|
}
|
|
64
77
|
});
|
|
@@ -68,34 +81,48 @@ export class PbTify extends pbMixin(LitElement) {
|
|
|
68
81
|
super.firstUpdated();
|
|
69
82
|
|
|
70
83
|
waitOnce('pb-page-ready', () => {
|
|
71
|
-
this.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
this.
|
|
75
|
-
|
|
76
|
-
|
|
84
|
+
this._container = document.createElement('div');
|
|
85
|
+
this._container.style.height = '100%';
|
|
86
|
+
this._container.style.width = '100%';
|
|
87
|
+
this.appendChild(this._container);
|
|
88
|
+
|
|
89
|
+
this._initViewer();
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
_initViewer() {
|
|
94
|
+
if (!this.manifest) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (this._tify) {
|
|
99
|
+
this._tify.destroy();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
this._tify = new Tify({
|
|
103
|
+
manifestUrl: this.toAbsoluteURL(this.manifest, this.getEndpoint())
|
|
104
|
+
});
|
|
105
|
+
this._tify.ready.then(() => {
|
|
106
|
+
this.signalReady();
|
|
107
|
+
// open initial page if set earlier via pb-load-facsimile event
|
|
108
|
+
if (this._initialPages) {
|
|
77
109
|
this._tify.setPage(this._initialPages);
|
|
110
|
+
}
|
|
78
111
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
const container = document.createElement('div');
|
|
93
|
-
container.style.height = '100%';
|
|
94
|
-
container.style.width = '100%';
|
|
95
|
-
this.appendChild(container);
|
|
96
|
-
|
|
97
|
-
this._tify.mount(container);
|
|
112
|
+
// extend tify's setPage function to allow emitting an event
|
|
113
|
+
const {app} = this._tify;
|
|
114
|
+
this._setPage = app.setPage;
|
|
115
|
+
|
|
116
|
+
app.setPage = (pages) => {
|
|
117
|
+
const page = Array.isArray(pages) ? pages[0] : pages;
|
|
118
|
+
const canvas = app.$root.canvases[page - 1];
|
|
119
|
+
|
|
120
|
+
this._switchPage(canvas);
|
|
121
|
+
this._setPage(pages);
|
|
122
|
+
};
|
|
98
123
|
});
|
|
124
|
+
|
|
125
|
+
this._tify.mount(this._container);
|
|
99
126
|
}
|
|
100
127
|
|
|
101
128
|
_switchPage(canvas) {
|