@teipublisher/pb-components 3.2.0 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/node.js.yml +39 -2
- package/CHANGELOG.md +18 -0
- package/dist/pb-components-bundle.js +16 -19
- package/i18n/common/de.json +17 -0
- package/i18n/common/en.json +17 -0
- package/i18n/common/pl.json +17 -0
- package/package.json +1 -1
- package/src/pb-table-grid.js +103 -32
- package/.github/workflows/release.js.yml +0 -42
|
@@ -7,15 +7,19 @@ on:
|
|
|
7
7
|
push:
|
|
8
8
|
branches:
|
|
9
9
|
- develop
|
|
10
|
+
- master
|
|
10
11
|
|
|
11
12
|
workflow_dispatch:
|
|
12
13
|
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read # for checkout
|
|
16
|
+
|
|
13
17
|
jobs:
|
|
14
18
|
build:
|
|
15
19
|
runs-on: ubuntu-latest
|
|
16
20
|
steps:
|
|
17
21
|
- uses: actions/checkout@v6
|
|
18
|
-
- name: Use Node.js
|
|
22
|
+
- name: Use Node.js
|
|
19
23
|
uses: actions/setup-node@v6
|
|
20
24
|
with:
|
|
21
25
|
node-version: "22"
|
|
@@ -32,4 +36,37 @@ jobs:
|
|
|
32
36
|
with:
|
|
33
37
|
resource: http-get://localhost:8080/exist/apps/tei-publisher/index.html
|
|
34
38
|
- name: npm test
|
|
35
|
-
run: npm test
|
|
39
|
+
run: npm test
|
|
40
|
+
|
|
41
|
+
release:
|
|
42
|
+
name: Release
|
|
43
|
+
needs: [ build ]
|
|
44
|
+
if: github.event_name == 'push' && (github.ref == 'refs/heads/master')
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
permissions:
|
|
47
|
+
contents: write # to be able to publish a GitHub release
|
|
48
|
+
issues: write # to be able to comment on released issues
|
|
49
|
+
pull-requests: write # to be able to comment on released pull requests
|
|
50
|
+
id-token: write # to enable use of OIDC for trusted publishing and npm provenance
|
|
51
|
+
steps:
|
|
52
|
+
- uses: actions/checkout@v5
|
|
53
|
+
- uses: actions/setup-node@v5
|
|
54
|
+
with:
|
|
55
|
+
node-version: "22"
|
|
56
|
+
- name: npm install and build
|
|
57
|
+
run:
|
|
58
|
+
npm ci
|
|
59
|
+
npm run build:production
|
|
60
|
+
- name: Build docker image
|
|
61
|
+
run: docker build -t exist-db -f Dockerfile .
|
|
62
|
+
- name: Start docker image
|
|
63
|
+
run: docker run --publish 8080:8080 --detach exist-db
|
|
64
|
+
- name: Wait for eXist
|
|
65
|
+
uses: iFaxity/wait-on-action@v1
|
|
66
|
+
with:
|
|
67
|
+
resource: http-get://localhost:8080/exist/apps/tei-publisher/api/version
|
|
68
|
+
- run: npm test
|
|
69
|
+
- run: npx semantic-release
|
|
70
|
+
env:
|
|
71
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
72
|
+
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [3.2.2](https://github.com/eeditiones/tei-publisher-components/compare/v3.2.1...v3.2.2) (2026-04-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **pb-table-grid:** ensure column hiding works across pagination ([86dccef](https://github.com/eeditiones/tei-publisher-components/commit/86dccefe8b9a26e757ddc3407034b7c0aebb0c31))
|
|
7
|
+
|
|
8
|
+
## [3.2.1](https://github.com/eeditiones/tei-publisher-components/compare/v3.2.0...v3.2.1) (2026-03-31)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **pb-table-grid:** drop polymer controls ([408b1f9](https://github.com/eeditiones/tei-publisher-components/commit/408b1f99e27d34dd7565fafe53e489772561e384))
|
|
14
|
+
* **pb-table-grid:** i18n for navigation and toolbar ([9e91a9a](https://github.com/eeditiones/tei-publisher-components/commit/9e91a9a228bb8cc5206191032d1b60ba1210c6ad))
|
|
15
|
+
* **pb-table-grid:** race condition causes navigation to disappear ([1ecf7d9](https://github.com/eeditiones/tei-publisher-components/commit/1ecf7d9bbe68b0c9842d7d66c6bbd3e782766ee9))
|
|
16
|
+
* **pb-table-grid:** use translate in html literals ([515acfb](https://github.com/eeditiones/tei-publisher-components/commit/515acfb91536044eff241a0174b53f23f445106d))
|
|
17
|
+
* trigger release pipeline ([d63a335](https://github.com/eeditiones/tei-publisher-components/commit/d63a335614a9a0590df533623b4221bc2b9b0b05))
|
|
18
|
+
|
|
1
19
|
# [3.2.0](https://github.com/eeditiones/tei-publisher-components/compare/v3.1.0...v3.2.0) (2026-03-26)
|
|
2
20
|
|
|
3
21
|
|
|
@@ -501,7 +501,7 @@ const Z=e`
|
|
|
501
501
|
border-color: #999;
|
|
502
502
|
color: #999;
|
|
503
503
|
}
|
|
504
|
-
`}}customElements.define("pb-demo-snippet",et);class it{static subscribe(t,e,i,n=!1){const r=it._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=it._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]:[I]}static emit(t,e=null,i=null){const n=i||{};n.key=e||I;const r=new CustomEvent(t,{detail:n});document.dispatchEvent(r)}static ifReady(t){return Array.isArray(t)||(t=[t]),new Promise(e=>{const i=t.length;if(0===i)return void e();let n=i;t.forEach(t=>{if(t._isReady)return n-=1,void(0===n&&e());const i=t.addEventListener("pb-ready",()=>{n-=1,0===n&&(t.removeEventListener("pb-ready",i),e())})})})}}window.pbEvents||(window.pbEvents=it);const nt="3.2.0";class rt extends H{static get properties(){return Object.assign({version:{type:String,reflect:!0}},super.properties)}constructor(){super(),this.version=nt}connectedCallback(){if(super.connectedCallback(),!this.version){const t=O("../package.json");fetch(t).then(t=>t.json()).then(t=>{this.version=t.version})}}render(){return M`<span>${this.version?this.version:"unknown"}</span>`}createRenderRoot(){return this}}customElements.define("pb-version",rt);var ot="top",st="bottom",at="right",lt="left",ct="auto",ht=[ot,st,at,lt],dt="start",pt="end",ut="clippingParents",gt="viewport",ft="popper",mt="reference",vt=ht.reduce((function(t,e){return t.concat([e+"-"+dt,e+"-"+pt])}),[]),bt=[].concat(ht,[ct]).reduce((function(t,e){return t.concat([e,e+"-"+dt,e+"-"+pt])}),[]),yt=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function _t(t){return t?(t.nodeName||"").toLowerCase():null}function wt(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function xt(t){return t instanceof wt(t).Element||t instanceof Element}function kt(t){return t instanceof wt(t).HTMLElement||t instanceof HTMLElement}function At(t){return"undefined"!=typeof ShadowRoot&&(t instanceof wt(t).ShadowRoot||t instanceof ShadowRoot)}function St(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];kt(r)&&_t(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 zt(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}),{});kt(n)&&_t(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}}var Ct={name:"applyStyles",enabled:!0,phase:"write",fn:St,effect:zt,requires:["computeStyles"]};function Et(t){return t.split("-")[0]}var Lt=Math.max,Mt=Math.min,Tt=Math.round;function Ot(){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 $t(){return!/^((?!chrome|android).)*safari/i.test(Ot())}function Ht(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),r=1,o=1;e&&kt(t)&&(r=t.offsetWidth>0&&Tt(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Tt(n.height)/t.offsetHeight||1);var s=(xt(t)?wt(t):window).visualViewport,a=!$t()&&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 It(t){var e=Ht(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 Rt(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&At(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Pt(t){return wt(t).getComputedStyle(t)}function Vt(t){return["table","td","th"].indexOf(_t(t))>=0}function Ft(t){return((xt(t)?t.ownerDocument:t.document)||window.document).documentElement}function Nt(t){return"html"===_t(t)?t:t.assignedSlot||t.parentNode||(At(t)?t.host:null)||Ft(t)}function Dt(t){return kt(t)&&"fixed"!==Pt(t).position?t.offsetParent:null}function jt(t){var e=/firefox/i.test(Ot());if(/Trident/i.test(Ot())&&kt(t)&&"fixed"===Pt(t).position)return null;var i=Nt(t);for(At(i)&&(i=i.host);kt(i)&&["html","body"].indexOf(_t(i))<0;){var n=Pt(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 Bt(t){for(var e=wt(t),i=Dt(t);i&&Vt(i)&&"static"===Pt(i).position;)i=Dt(i);return i&&("html"===_t(i)||"body"===_t(i)&&"static"===Pt(i).position)?e:i||jt(t)||e}function qt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Ut(t,e,i){return Lt(t,Mt(e,i))}function Wt(t,e,i){var n=Ut(t,e,i);return n>i?i:n}function Yt(){return{top:0,right:0,bottom:0,left:0}}function Gt(t){return Object.assign({},Yt(),t)}function Zt(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var Kt=function(t,e){return Gt("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Zt(t,ht))};function Qt(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=Et(i.placement),l=qt(a),c=[lt,at].indexOf(a)>=0?"height":"width";if(o&&s){var h=Kt(r.padding,i),d=It(o),p="y"===l?ot:lt,u="y"===l?st:at,g=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],f=s[l]-i.rects.reference[l],m=Bt(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=Ut(y,w,_),k=l;i.modifiersData[n]=((e={})[k]=x,e.centerOffset=x-w,e)}}function Jt(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)))&&Rt(e.elements.popper,n)&&(e.elements.arrow=n)}function Xt(t){return t.split("-")[1]}var te={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ee(t,e){var i=t.x,n=t.y,r=e.devicePixelRatio||1;return{x:Tt(i*r)/r||0,y:Tt(n*r)/r||0}}function ie(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=lt,_=ot,w=window;if(c){var x=Bt(i),k="clientHeight",A="clientWidth";if(x===wt(i)&&"static"!==Pt(x=Ft(i)).position&&"absolute"===a&&(k="scrollHeight",A="scrollWidth"),x=x,r===ot||(r===lt||r===at)&&o===pt)_=st,f-=(d&&x===w&&w.visualViewport?w.visualViewport.height:x[k])-n.height,f*=l?1:-1;if(r===lt||(r===ot||r===st)&&o===pt)y=at,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&&te),C=!0===h?ee({x:u,y:f},wt(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 ne(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:Et(e.placement),variation:Xt(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,ie(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,ie(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 re={passive:!0};function oe(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=wt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,re)})),a&&l.addEventListener("resize",i.update,re),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,re)})),a&&l.removeEventListener("resize",i.update,re)}}var se={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(t){return t.replace(/left|right|bottom|top/g,(function(t){return se[t]}))}var le={start:"end",end:"start"};function ce(t){return t.replace(/start|end/g,(function(t){return le[t]}))}function he(t){var e=wt(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function de(t){return Ht(Ft(t)).left+he(t).scrollLeft}function pe(t,e){var i=wt(t),n=Ft(t),r=i.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=$t();(c||!c&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+de(t),y:l}}function ue(t){var e,i=Ft(t),n=he(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=Lt(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=Lt(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+de(t),l=-n.scrollTop;return"rtl"===Pt(r||i).direction&&(a+=Lt(i.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function ge(t){var e=Pt(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function fe(t){return["html","body","#document"].indexOf(_t(t))>=0?t.ownerDocument.body:kt(t)&&ge(t)?t:fe(Nt(t))}function me(t,e){var i;void 0===e&&(e=[]);var n=fe(t),r=n===(null==(i=t.ownerDocument)?void 0:i.body),o=wt(n),s=r?[o].concat(o.visualViewport||[],ge(n)?n:[]):n,a=e.concat(s);return r?a:a.concat(me(Nt(s)))}function ve(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function be(t,e){var i=Ht(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 ye(t,e,i){return e===gt?ve(pe(t,i)):xt(e)?be(e,i):ve(ue(Ft(t)))}function _e(t){var e=me(Nt(t)),i=["absolute","fixed"].indexOf(Pt(t).position)>=0&&kt(t)?Bt(t):t;return xt(i)?e.filter((function(t){return xt(t)&&Rt(t,i)&&"body"!==_t(t)})):[]}function we(t,e,i,n){var r="clippingParents"===e?_e(t):[].concat(e),o=[].concat(r,[i]),s=o[0],a=o.reduce((function(e,i){var r=ye(t,i,n);return e.top=Lt(r.top,e.top),e.right=Mt(r.right,e.right),e.bottom=Mt(r.bottom,e.bottom),e.left=Lt(r.left,e.left),e}),ye(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 xe(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?Et(r):null,s=r?Xt(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case ot:e={x:a,y:i.y-n.height};break;case st:e={x:a,y:i.y+i.height};break;case at:e={x:i.x+i.width,y:l};break;case lt:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?qt(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case dt:e[c]=e[c]-(i[h]/2-n[h]/2);break;case pt:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function ke(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?ut:a,c=i.rootBoundary,h=void 0===c?gt:c,d=i.elementContext,p=void 0===d?ft:d,u=i.altBoundary,g=void 0!==u&&u,f=i.padding,m=void 0===f?0:f,v=Gt("number"!=typeof m?m:Zt(m,ht)),b=p===ft?mt:ft,y=t.rects.popper,_=t.elements[g?b:p],w=we(xt(_)?_:_.contextElement||Ft(t.elements.popper),l,h,s),x=Ht(t.elements.reference),k=xe({reference:x,element:y,strategy:"absolute",placement:r}),A=ve(Object.assign({},y,k)),S=p===ft?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===ft&&C){var E=C[r];Object.keys(z).forEach((function(t){var e=[at,st].indexOf(t)>=0?1:-1,i=[ot,st].indexOf(t)>=0?"y":"x";z[t]+=E[i]*e}))}return z}function Ae(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?bt:l,h=Xt(n),d=h?a?vt:vt.filter((function(t){return Xt(t)===h})):ht,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]=ke(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[Et(i)],e}),{});return Object.keys(u).sort((function(t,e){return u[t]-u[e]}))}function Se(t){if(Et(t)===ct)return[];var e=ae(t);return[ce(t),e,ce(e)]}function ze(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=Et(m),b=l||(v===m||!g?[ae(m)]:Se(m)),y=[m].concat(b).reduce((function(t,i){return t.concat(Et(i)===ct?Ae(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=Et(z),E=Xt(z)===dt,L=[ot,st].indexOf(C)>=0,M=L?"width":"height",T=ke(e,{placement:z,boundary:h,rootBoundary:d,altBoundary:p,padding:c}),O=L?E?at:lt:E?st:ot;_[M]>w[M]&&(O=ae(O));var $=ae(O),H=[];if(o&&H.push(T[C]<=0),a&&H.push(T[O]<=0,T[$]<=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 Ce(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 Ee(t){return[ot,at,st,lt].some((function(e){return t[e]>=0}))}function Le(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=ke(e,{elementContext:"reference"}),a=ke(e,{altBoundary:!0}),l=Ce(s,n),c=Ce(a,r,o),h=Ee(l),d=Ee(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 Me(t,e,i){var n=Et(t),r=[lt,ot].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,[lt,at].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}function Te(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=bt.reduce((function(t,i){return t[i]=Me(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 Oe(t){var e=t.state,i=t.name;e.modifiersData[i]=xe({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}function $e(t){return"x"===t?"y":"x"}function He(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=ke(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),v=Et(e.placement),b=Xt(e.placement),y=!b,_=qt(v),w=$e(_),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 L,M="y"===_?ot:lt,T="y"===_?st:at,O="y"===_?"height":"width",$=x[_],H=$+m[M],I=$-m[T],R=u?-A[O]/2:0,P=b===dt?k[O]:A[O],V=b===dt?-A[O]:-k[O],F=e.elements.arrow,N=u&&F?It(F):{width:0,height:0},D=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Yt(),j=D[M],B=D[T],q=Ut(0,k[O],N[O]),U=y?k[O]/2-R-q-j-z.mainAxis:P-q-j-z.mainAxis,W=y?-k[O]/2+R+q+B+z.mainAxis:V+q+B+z.mainAxis,Y=e.elements.arrow&&Bt(e.elements.arrow),G=Y?"y"===_?Y.clientTop||0:Y.clientLeft||0:0,Z=null!=(L=null==C?void 0:C[_])?L:0,K=$+W-Z,Q=Ut(u?Mt(H,$+U-Z-G):H,$,u?Lt(I,K):I);x[_]=Q,E[_]=Q-$}if(a){var J,X="x"===_?ot:lt,tt="x"===_?st:at,et=x[w],it="y"===w?"height":"width",nt=et+m[X],rt=et-m[tt],ct=-1!==[ot,lt].indexOf(v),ht=null!=(J=null==C?void 0:C[w])?J:0,pt=ct?nt:et-k[it]-A[it]-ht+z.altAxis,ut=ct?et+k[it]+A[it]-ht-z.altAxis:rt,gt=u&&ct?Wt(pt,et,ut):Ut(u?pt:nt,et,u?ut:rt);x[w]=gt,E[w]=gt-et}e.modifiersData[n]=E}}function Ie(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Re(t){return t!==wt(t)&&kt(t)?Ie(t):he(t)}function Pe(t){var e=t.getBoundingClientRect(),i=Tt(e.width)/t.offsetWidth||1,n=Tt(e.height)/t.offsetHeight||1;return 1!==i||1!==n}function Ve(t,e,i){void 0===i&&(i=!1);var n=kt(e),r=kt(e)&&Pe(e),o=Ft(e),s=Ht(t,r,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!i)&&(("body"!==_t(e)||ge(o))&&(a=Re(e)),kt(e)?((l=Ht(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=de(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Fe(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 Ne(t){var e=Fe(t);return yt.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}function De(t){var e;return function(){return e||(e=new Promise((function(i){Promise.resolve().then((function(){e=void 0,i(t())}))}))),e}}function je(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 Be={placement:"bottom",modifiers:[],strategy:"absolute"};function qe(){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 Ue(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,r=e.defaultOptions,o=void 0===r?Be:r;return function(t,e,i){void 0===i&&(i=o);var r={placement:"bottom",orderedModifiers:[],options:Object.assign({},Be,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:xt(t)?me(t):t.contextElement?me(t.contextElement):[],popper:me(e)};var a=Ne(je([].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(qe(e,i)){r.rects={reference:Ve(e,Bt(i),"fixed"===r.options.strategy),popper:It(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:De((function(){return new Promise((function(t){l.forceUpdate(),t(r)}))})),destroy:function(){h(),a=!0}};if(!qe(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 We=Ue({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:oe,data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:Oe,data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ne,data:{}},Ct,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Te},{name:"flip",enabled:!0,phase:"main",fn:ze,requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:He,requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:Qt,effect:Jt,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Le}]}),Ye="tippy-box",Ge="tippy-content",Ze="tippy-backdrop",Ke="tippy-arrow",Qe="tippy-svg-arrow",Je={passive:!0,capture:!0},Xe=function(){return document.body};function ti(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function ei(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function ii(t,e){return"function"==typeof t?t.apply(void 0,e):t}function ni(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function ri(t){return t.split(/\s+/).filter(Boolean)}function oi(t){return[].concat(t)}function si(t,e){-1===t.indexOf(e)&&t.push(e)}function ai(t){return t.filter((function(e,i){return t.indexOf(e)===i}))}function li(t){return t.split("-")[0]}function ci(t){return[].slice.call(t)}function hi(t){return Object.keys(t).reduce((function(e,i){return void 0!==t[i]&&(e[i]=t[i]),e}),{})}function di(){return document.createElement("div")}function pi(t){return["Element","Fragment"].some((function(e){return ei(t,e)}))}function ui(t){return ei(t,"NodeList")}function gi(t){return ei(t,"MouseEvent")}function fi(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function mi(t){return pi(t)?[t]:ui(t)?ci(t):Array.isArray(t)?t:ci(document.querySelectorAll(t))}function vi(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function bi(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function yi(t){var e,i=oi(t)[0];return null!=i&&null!=(e=i.ownerDocument)&&e.body?i.ownerDocument:document}function _i(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=li(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 wi(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}function xi(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 ki={isTouch:!1},Ai=0;function Si(){ki.isTouch||(ki.isTouch=!0,window.performance&&document.addEventListener("mousemove",zi))}function zi(){var t=performance.now();t-Ai<20&&(ki.isTouch=!1,document.removeEventListener("mousemove",zi)),Ai=t}function Ci(){var t=document.activeElement;if(fi(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function Ei(){document.addEventListener("touchstart",Si,Je),window.addEventListener("blur",Ci)}var Li=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,Mi={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Ti={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Oi=Object.assign({appendTo:Xe,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},Mi,Ti),$i=Object.keys(Oi),Hi=function(t){Object.keys(t).forEach((function(e){Oi[e]=t[e]}))};function Ii(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=Oi[r])?n:o);return e}),{});return Object.assign({},t,e)}function Ri(t,e){return(e?Object.keys(Ii(Object.assign({},Oi,{plugins:e}))):$i).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 Pi(t,e){var i=Object.assign({},e,{content:ii(e.content,[t])},e.ignoreAttributes?{}:Ri(t,e.plugins));return i.aria=Object.assign({},Oi.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 Vi=function(){return"innerHTML"};function Fi(t,e){t[Vi()]=e}function Ni(t){var e=di();return!0===t?e.className=Ke:(e.className=Qe,pi(t)?e.appendChild(t):Fi(e,t)),e}function Di(t,e){pi(e.content)?(Fi(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Fi(t,e.content):t.textContent=e.content)}function ji(t){var e=t.firstElementChild,i=ci(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(Ge)})),arrow:i.find((function(t){return t.classList.contains(Ke)||t.classList.contains(Qe)})),backdrop:i.find((function(t){return t.classList.contains(Ze)}))}}function Bi(t){var e=di(),i=di();i.className=Ye,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=di();function r(i,n){var r=ji(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||Di(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Ni(n.arrow))):o.appendChild(Ni(n.arrow)):a&&o.removeChild(a)}return n.className=Ge,n.setAttribute("data-state","hidden"),Di(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Bi.$$tippy=!0;var qi=1,Ui=[],Wi=[];function Yi(t,e){var i,n,r,o,s,a,l,c=Pi(t,Object.assign({},Oi,Ii(hi(e)))),h=!1,d=!1,p=!1,u=!1,g=[],f=ni(K,c.interactiveDebounce),m=qi++,v=null,b=ai(c.plugins),y={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},_={id:m,reference:t,popper:di(),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&&M().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 L(){return l||t}function M(){var t=L().parentNode;return t?yi(t):document}function T(){return ji(x)}function O(t){return _.state.isMounted&&!_.state.isVisible||ki.isTouch||o&&"focus"===o.type?0:ti(_.props.delay,t?0:1,Oi.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;oi(_.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&&oi(_.props.triggerTarget||t).forEach((function(t){_.props.interactive?t.setAttribute("aria-expanded",_.state.isVisible&&t===L()?"true":"false"):t.removeAttribute("aria-expanded")}))}function P(){M().removeEventListener("mousemove",f),Ui=Ui.filter((function(t){return t!==f}))}function V(e){if(!ki.isTouch||!p&&"mousedown"!==e.type){var i=e.composedPath&&e.composedPath()[0]||e.target;if(!_.props.interactive||!xi(x,i)){if(oi(_.props.triggerTarget||t).some((function(t){return xi(t,i)}))){if(ki.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||j())}}}function F(){p=!0}function N(){p=!1}function D(){var t=M();t.addEventListener("mousedown",V,!0),t.addEventListener("touchend",V,Je),t.addEventListener("touchstart",N,Je),t.addEventListener("touchmove",F,Je)}function j(){var t=M();t.removeEventListener("mousedown",V,!0),t.removeEventListener("touchend",V,Je),t.removeEventListener("touchstart",N,Je),t.removeEventListener("touchmove",F,Je)}function B(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=T().box;function n(t){t.target===i&&(wi(i,"remove",n),e())}if(0===t)return e();wi(i,"remove",s),wi(i,"add",n),s=n}function W(e,i,n){void 0===n&&(n=!1),oi(_.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",Z,{passive:!0}),W("touchend",Q,{passive:!0})),ri(_.props.trigger).forEach((function(t){if("manual"!==t)switch(W(t,Z),t){case"mouseenter":W("mouseleave",Q);break;case"focus":W(Li?"focusout":"blur",J);break;case"focusin":W("focusout",J)}}))}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 Z(t){var e,i=!1;if(_.state.isEnabled&&!X(t)&&!d){var n="focus"===(null==(e=o)?void 0:e.type);o=t,l=t.currentTarget,R(),!_.state.isVisible&&gi(t)&&Ui.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 K(t){var e=t.target,i=L().contains(e)||x.contains(e);"mousemove"===t.type&&i||_i(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 Q(t){X(t)||_.props.trigger.indexOf("click")>=0&&h||(_.props.interactive?_.hideWithInteractivity(t):ot(t))}function J(t){_.props.trigger.indexOf("focusin")<0&&t.target!==L()||_.props.interactive&&t.relatedTarget&&x.contains(t.relatedTarget)||ot(t)}function X(t){return!!ki.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()?ji(x).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||L()}: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=T().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=We(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=L();(t=_.props.interactive&&e===Xe||"parent"===e?i.parentNode:ii(e,[i])).contains(x)||t.appendChild(x),_.state.isMounted=!0,tt()}function nt(){return ci(x.querySelectorAll("[data-tippy-root]"))}function rt(t){_.clearDelayTimeouts(),t&&H("onTrigger",[_,t]),D();var e=O(!0),n=z(),r=n[0],o=n[1];ki.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 j()}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=Pi(t,Object.assign({},i,hi(e),{ignoreAttributes:!0}));_.props=n,Y(),i.interactiveDebounce!==n.interactiveDebounce&&(P(),f=ni(K,n.interactiveDebounce)),i.triggerTarget&&!n.triggerTarget?oi(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=ki.isTouch&&!_.props.touch,r=ti(_.props.duration,0,Oi.duration);if(!(t||e||i||n||L().hasAttribute("disabled")||(H("onShow",[_],!1),!1===_.props.onShow(_)))){if(_.state.isVisible=!0,E()&&(x.style.visibility="visible"),$(),D(),_.state.isMounted||(x.style.transition="none"),E()){var o=T();vi([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=T(),i=e.box,n=e.content;vi([i,n],r),bi([i,n],"visible")}I(),R(),si(Wi,_),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=ti(_.props.duration,1,Oi.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(),j(),$(!0),E()){var r=T(),o=r.box,s=r.content;_.props.animation&&(vi([o,s],n),bi([o,s],"hidden"))}I(),R(),_.props.animation?E()&&B(n,_.unmount):_.unmount()}}function ut(t){M().addEventListener("mousemove",f),si(Ui,f),f(t)}function gt(){_.state.isVisible&&_.hide(),_.state.isMounted&&(et(),nt().forEach((function(t){t._tippy.unmount()})),x.parentNode&&x.parentNode.removeChild(x),Wi=Wi.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 Gi(t,e){void 0===e&&(e={});var i=Oi.plugins.concat(e.plugins||[]);Ei();var n=Object.assign({},e,{plugins:i}),r=mi(t).reduce((function(t,e){var i=e&&Yi(e,n);return i&&t.push(i),t}),[]);return pi(t)?r[0]:r}function Zi(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,(t,e)=>0==+t?"":0===e?t.toLowerCase():t.toUpperCase()).replace("-","")}Gi.defaultProps=Oi,Gi.setDefaultProps=Hi,Gi.currentInput=ki,Object.assign({},Ct,{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)}}),Gi.setDefaultProps({render:Bi});const Ki='\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: clamp(\n calc(var(--pb-popover-font-size, 1rem) * var(--pb-min-zoom, 0.5)), \n calc(var(--pb-popover-font-size, 1rem) * var(--pb-zoom-factor)), \n calc(var(--pb-popover-font-size, 1rem) * var(--pb-max-zoom, 3.0))\n );\n line-height: calc(var(--pb-popover-line-height, 1.5) * var(--pb-zoom-factor));\n\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',Qi='\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',Ji="\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 }",Xi="\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",tn="\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 en=Object.freeze({__proto__:null,camelize:Zi,base:Ki,lightBorder:Qi,light:Ji,material:Xi,translucent:tn});function nn(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 rn(t,e){if(nn(t,"base",Ki),e&&"none"!==e){const i=Zi(e),n=en[i];n&&nn(t,i,n)}}class on extends(R(H)){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?M`<div class="hidden"><slot></slot></div>`:M`<span id="link" part="trigger" class="${this.persistent?"persistent":""}"
|
|
504
|
+
`}}customElements.define("pb-demo-snippet",et);class it{static subscribe(t,e,i,n=!1){const r=it._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=it._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]:[I]}static emit(t,e=null,i=null){const n=i||{};n.key=e||I;const r=new CustomEvent(t,{detail:n});document.dispatchEvent(r)}static ifReady(t){return Array.isArray(t)||(t=[t]),new Promise(e=>{const i=t.length;if(0===i)return void e();let n=i;t.forEach(t=>{if(t._isReady)return n-=1,void(0===n&&e());const i=t.addEventListener("pb-ready",()=>{n-=1,0===n&&(t.removeEventListener("pb-ready",i),e())})})})}}window.pbEvents||(window.pbEvents=it);const nt="3.2.2";class rt extends H{static get properties(){return Object.assign({version:{type:String,reflect:!0}},super.properties)}constructor(){super(),this.version=nt}connectedCallback(){if(super.connectedCallback(),!this.version){const t=O("../package.json");fetch(t).then(t=>t.json()).then(t=>{this.version=t.version})}}render(){return M`<span>${this.version?this.version:"unknown"}</span>`}createRenderRoot(){return this}}customElements.define("pb-version",rt);var ot="top",st="bottom",at="right",lt="left",ct="auto",ht=[ot,st,at,lt],dt="start",pt="end",ut="clippingParents",gt="viewport",ft="popper",mt="reference",vt=ht.reduce((function(t,e){return t.concat([e+"-"+dt,e+"-"+pt])}),[]),bt=[].concat(ht,[ct]).reduce((function(t,e){return t.concat([e,e+"-"+dt,e+"-"+pt])}),[]),yt=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function _t(t){return t?(t.nodeName||"").toLowerCase():null}function wt(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function xt(t){return t instanceof wt(t).Element||t instanceof Element}function kt(t){return t instanceof wt(t).HTMLElement||t instanceof HTMLElement}function At(t){return"undefined"!=typeof ShadowRoot&&(t instanceof wt(t).ShadowRoot||t instanceof ShadowRoot)}function St(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];kt(r)&&_t(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 zt(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}),{});kt(n)&&_t(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}}var Ct={name:"applyStyles",enabled:!0,phase:"write",fn:St,effect:zt,requires:["computeStyles"]};function Et(t){return t.split("-")[0]}var Lt=Math.max,Mt=Math.min,Tt=Math.round;function Ot(){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 $t(){return!/^((?!chrome|android).)*safari/i.test(Ot())}function Ht(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),r=1,o=1;e&&kt(t)&&(r=t.offsetWidth>0&&Tt(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Tt(n.height)/t.offsetHeight||1);var s=(xt(t)?wt(t):window).visualViewport,a=!$t()&&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 It(t){var e=Ht(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 Rt(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&At(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Pt(t){return wt(t).getComputedStyle(t)}function Vt(t){return["table","td","th"].indexOf(_t(t))>=0}function Ft(t){return((xt(t)?t.ownerDocument:t.document)||window.document).documentElement}function Nt(t){return"html"===_t(t)?t:t.assignedSlot||t.parentNode||(At(t)?t.host:null)||Ft(t)}function Dt(t){return kt(t)&&"fixed"!==Pt(t).position?t.offsetParent:null}function jt(t){var e=/firefox/i.test(Ot());if(/Trident/i.test(Ot())&&kt(t)&&"fixed"===Pt(t).position)return null;var i=Nt(t);for(At(i)&&(i=i.host);kt(i)&&["html","body"].indexOf(_t(i))<0;){var n=Pt(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 Bt(t){for(var e=wt(t),i=Dt(t);i&&Vt(i)&&"static"===Pt(i).position;)i=Dt(i);return i&&("html"===_t(i)||"body"===_t(i)&&"static"===Pt(i).position)?e:i||jt(t)||e}function qt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Ut(t,e,i){return Lt(t,Mt(e,i))}function Wt(t,e,i){var n=Ut(t,e,i);return n>i?i:n}function Yt(){return{top:0,right:0,bottom:0,left:0}}function Gt(t){return Object.assign({},Yt(),t)}function Zt(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var Kt=function(t,e){return Gt("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Zt(t,ht))};function Qt(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=Et(i.placement),l=qt(a),c=[lt,at].indexOf(a)>=0?"height":"width";if(o&&s){var h=Kt(r.padding,i),d=It(o),p="y"===l?ot:lt,u="y"===l?st:at,g=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],f=s[l]-i.rects.reference[l],m=Bt(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=Ut(y,w,_),k=l;i.modifiersData[n]=((e={})[k]=x,e.centerOffset=x-w,e)}}function Jt(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)))&&Rt(e.elements.popper,n)&&(e.elements.arrow=n)}function Xt(t){return t.split("-")[1]}var te={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ee(t,e){var i=t.x,n=t.y,r=e.devicePixelRatio||1;return{x:Tt(i*r)/r||0,y:Tt(n*r)/r||0}}function ie(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=lt,_=ot,w=window;if(c){var x=Bt(i),k="clientHeight",A="clientWidth";if(x===wt(i)&&"static"!==Pt(x=Ft(i)).position&&"absolute"===a&&(k="scrollHeight",A="scrollWidth"),x=x,r===ot||(r===lt||r===at)&&o===pt)_=st,f-=(d&&x===w&&w.visualViewport?w.visualViewport.height:x[k])-n.height,f*=l?1:-1;if(r===lt||(r===ot||r===st)&&o===pt)y=at,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&&te),C=!0===h?ee({x:u,y:f},wt(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 ne(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:Et(e.placement),variation:Xt(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,ie(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,ie(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 re={passive:!0};function oe(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=wt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,re)})),a&&l.addEventListener("resize",i.update,re),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,re)})),a&&l.removeEventListener("resize",i.update,re)}}var se={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(t){return t.replace(/left|right|bottom|top/g,(function(t){return se[t]}))}var le={start:"end",end:"start"};function ce(t){return t.replace(/start|end/g,(function(t){return le[t]}))}function he(t){var e=wt(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function de(t){return Ht(Ft(t)).left+he(t).scrollLeft}function pe(t,e){var i=wt(t),n=Ft(t),r=i.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=$t();(c||!c&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+de(t),y:l}}function ue(t){var e,i=Ft(t),n=he(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=Lt(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=Lt(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+de(t),l=-n.scrollTop;return"rtl"===Pt(r||i).direction&&(a+=Lt(i.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function ge(t){var e=Pt(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function fe(t){return["html","body","#document"].indexOf(_t(t))>=0?t.ownerDocument.body:kt(t)&&ge(t)?t:fe(Nt(t))}function me(t,e){var i;void 0===e&&(e=[]);var n=fe(t),r=n===(null==(i=t.ownerDocument)?void 0:i.body),o=wt(n),s=r?[o].concat(o.visualViewport||[],ge(n)?n:[]):n,a=e.concat(s);return r?a:a.concat(me(Nt(s)))}function ve(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function be(t,e){var i=Ht(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 ye(t,e,i){return e===gt?ve(pe(t,i)):xt(e)?be(e,i):ve(ue(Ft(t)))}function _e(t){var e=me(Nt(t)),i=["absolute","fixed"].indexOf(Pt(t).position)>=0&&kt(t)?Bt(t):t;return xt(i)?e.filter((function(t){return xt(t)&&Rt(t,i)&&"body"!==_t(t)})):[]}function we(t,e,i,n){var r="clippingParents"===e?_e(t):[].concat(e),o=[].concat(r,[i]),s=o[0],a=o.reduce((function(e,i){var r=ye(t,i,n);return e.top=Lt(r.top,e.top),e.right=Mt(r.right,e.right),e.bottom=Mt(r.bottom,e.bottom),e.left=Lt(r.left,e.left),e}),ye(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 xe(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?Et(r):null,s=r?Xt(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case ot:e={x:a,y:i.y-n.height};break;case st:e={x:a,y:i.y+i.height};break;case at:e={x:i.x+i.width,y:l};break;case lt:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?qt(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case dt:e[c]=e[c]-(i[h]/2-n[h]/2);break;case pt:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function ke(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?ut:a,c=i.rootBoundary,h=void 0===c?gt:c,d=i.elementContext,p=void 0===d?ft:d,u=i.altBoundary,g=void 0!==u&&u,f=i.padding,m=void 0===f?0:f,v=Gt("number"!=typeof m?m:Zt(m,ht)),b=p===ft?mt:ft,y=t.rects.popper,_=t.elements[g?b:p],w=we(xt(_)?_:_.contextElement||Ft(t.elements.popper),l,h,s),x=Ht(t.elements.reference),k=xe({reference:x,element:y,strategy:"absolute",placement:r}),A=ve(Object.assign({},y,k)),S=p===ft?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===ft&&C){var E=C[r];Object.keys(z).forEach((function(t){var e=[at,st].indexOf(t)>=0?1:-1,i=[ot,st].indexOf(t)>=0?"y":"x";z[t]+=E[i]*e}))}return z}function Ae(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?bt:l,h=Xt(n),d=h?a?vt:vt.filter((function(t){return Xt(t)===h})):ht,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]=ke(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[Et(i)],e}),{});return Object.keys(u).sort((function(t,e){return u[t]-u[e]}))}function Se(t){if(Et(t)===ct)return[];var e=ae(t);return[ce(t),e,ce(e)]}function ze(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=Et(m),b=l||(v===m||!g?[ae(m)]:Se(m)),y=[m].concat(b).reduce((function(t,i){return t.concat(Et(i)===ct?Ae(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=Et(z),E=Xt(z)===dt,L=[ot,st].indexOf(C)>=0,M=L?"width":"height",T=ke(e,{placement:z,boundary:h,rootBoundary:d,altBoundary:p,padding:c}),O=L?E?at:lt:E?st:ot;_[M]>w[M]&&(O=ae(O));var $=ae(O),H=[];if(o&&H.push(T[C]<=0),a&&H.push(T[O]<=0,T[$]<=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 Ce(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 Ee(t){return[ot,at,st,lt].some((function(e){return t[e]>=0}))}function Le(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=ke(e,{elementContext:"reference"}),a=ke(e,{altBoundary:!0}),l=Ce(s,n),c=Ce(a,r,o),h=Ee(l),d=Ee(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 Me(t,e,i){var n=Et(t),r=[lt,ot].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,[lt,at].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}function Te(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=bt.reduce((function(t,i){return t[i]=Me(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 Oe(t){var e=t.state,i=t.name;e.modifiersData[i]=xe({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}function $e(t){return"x"===t?"y":"x"}function He(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=ke(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),v=Et(e.placement),b=Xt(e.placement),y=!b,_=qt(v),w=$e(_),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 L,M="y"===_?ot:lt,T="y"===_?st:at,O="y"===_?"height":"width",$=x[_],H=$+m[M],I=$-m[T],R=u?-A[O]/2:0,P=b===dt?k[O]:A[O],V=b===dt?-A[O]:-k[O],F=e.elements.arrow,N=u&&F?It(F):{width:0,height:0},D=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Yt(),j=D[M],B=D[T],q=Ut(0,k[O],N[O]),U=y?k[O]/2-R-q-j-z.mainAxis:P-q-j-z.mainAxis,W=y?-k[O]/2+R+q+B+z.mainAxis:V+q+B+z.mainAxis,Y=e.elements.arrow&&Bt(e.elements.arrow),G=Y?"y"===_?Y.clientTop||0:Y.clientLeft||0:0,Z=null!=(L=null==C?void 0:C[_])?L:0,K=$+W-Z,Q=Ut(u?Mt(H,$+U-Z-G):H,$,u?Lt(I,K):I);x[_]=Q,E[_]=Q-$}if(a){var J,X="x"===_?ot:lt,tt="x"===_?st:at,et=x[w],it="y"===w?"height":"width",nt=et+m[X],rt=et-m[tt],ct=-1!==[ot,lt].indexOf(v),ht=null!=(J=null==C?void 0:C[w])?J:0,pt=ct?nt:et-k[it]-A[it]-ht+z.altAxis,ut=ct?et+k[it]+A[it]-ht-z.altAxis:rt,gt=u&&ct?Wt(pt,et,ut):Ut(u?pt:nt,et,u?ut:rt);x[w]=gt,E[w]=gt-et}e.modifiersData[n]=E}}function Ie(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Re(t){return t!==wt(t)&&kt(t)?Ie(t):he(t)}function Pe(t){var e=t.getBoundingClientRect(),i=Tt(e.width)/t.offsetWidth||1,n=Tt(e.height)/t.offsetHeight||1;return 1!==i||1!==n}function Ve(t,e,i){void 0===i&&(i=!1);var n=kt(e),r=kt(e)&&Pe(e),o=Ft(e),s=Ht(t,r,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!i)&&(("body"!==_t(e)||ge(o))&&(a=Re(e)),kt(e)?((l=Ht(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=de(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Fe(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 Ne(t){var e=Fe(t);return yt.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}function De(t){var e;return function(){return e||(e=new Promise((function(i){Promise.resolve().then((function(){e=void 0,i(t())}))}))),e}}function je(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 Be={placement:"bottom",modifiers:[],strategy:"absolute"};function qe(){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 Ue(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,r=e.defaultOptions,o=void 0===r?Be:r;return function(t,e,i){void 0===i&&(i=o);var r={placement:"bottom",orderedModifiers:[],options:Object.assign({},Be,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:xt(t)?me(t):t.contextElement?me(t.contextElement):[],popper:me(e)};var a=Ne(je([].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(qe(e,i)){r.rects={reference:Ve(e,Bt(i),"fixed"===r.options.strategy),popper:It(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:De((function(){return new Promise((function(t){l.forceUpdate(),t(r)}))})),destroy:function(){h(),a=!0}};if(!qe(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 We=Ue({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:oe,data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:Oe,data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ne,data:{}},Ct,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Te},{name:"flip",enabled:!0,phase:"main",fn:ze,requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:He,requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:Qt,effect:Jt,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Le}]}),Ye="tippy-box",Ge="tippy-content",Ze="tippy-backdrop",Ke="tippy-arrow",Qe="tippy-svg-arrow",Je={passive:!0,capture:!0},Xe=function(){return document.body};function ti(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function ei(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function ii(t,e){return"function"==typeof t?t.apply(void 0,e):t}function ni(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function ri(t){return t.split(/\s+/).filter(Boolean)}function oi(t){return[].concat(t)}function si(t,e){-1===t.indexOf(e)&&t.push(e)}function ai(t){return t.filter((function(e,i){return t.indexOf(e)===i}))}function li(t){return t.split("-")[0]}function ci(t){return[].slice.call(t)}function hi(t){return Object.keys(t).reduce((function(e,i){return void 0!==t[i]&&(e[i]=t[i]),e}),{})}function di(){return document.createElement("div")}function pi(t){return["Element","Fragment"].some((function(e){return ei(t,e)}))}function ui(t){return ei(t,"NodeList")}function gi(t){return ei(t,"MouseEvent")}function fi(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function mi(t){return pi(t)?[t]:ui(t)?ci(t):Array.isArray(t)?t:ci(document.querySelectorAll(t))}function vi(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function bi(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function yi(t){var e,i=oi(t)[0];return null!=i&&null!=(e=i.ownerDocument)&&e.body?i.ownerDocument:document}function _i(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=li(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 wi(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}function xi(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 ki={isTouch:!1},Ai=0;function Si(){ki.isTouch||(ki.isTouch=!0,window.performance&&document.addEventListener("mousemove",zi))}function zi(){var t=performance.now();t-Ai<20&&(ki.isTouch=!1,document.removeEventListener("mousemove",zi)),Ai=t}function Ci(){var t=document.activeElement;if(fi(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function Ei(){document.addEventListener("touchstart",Si,Je),window.addEventListener("blur",Ci)}var Li=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,Mi={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Ti={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Oi=Object.assign({appendTo:Xe,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},Mi,Ti),$i=Object.keys(Oi),Hi=function(t){Object.keys(t).forEach((function(e){Oi[e]=t[e]}))};function Ii(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=Oi[r])?n:o);return e}),{});return Object.assign({},t,e)}function Ri(t,e){return(e?Object.keys(Ii(Object.assign({},Oi,{plugins:e}))):$i).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 Pi(t,e){var i=Object.assign({},e,{content:ii(e.content,[t])},e.ignoreAttributes?{}:Ri(t,e.plugins));return i.aria=Object.assign({},Oi.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 Vi=function(){return"innerHTML"};function Fi(t,e){t[Vi()]=e}function Ni(t){var e=di();return!0===t?e.className=Ke:(e.className=Qe,pi(t)?e.appendChild(t):Fi(e,t)),e}function Di(t,e){pi(e.content)?(Fi(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Fi(t,e.content):t.textContent=e.content)}function ji(t){var e=t.firstElementChild,i=ci(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(Ge)})),arrow:i.find((function(t){return t.classList.contains(Ke)||t.classList.contains(Qe)})),backdrop:i.find((function(t){return t.classList.contains(Ze)}))}}function Bi(t){var e=di(),i=di();i.className=Ye,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=di();function r(i,n){var r=ji(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||Di(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Ni(n.arrow))):o.appendChild(Ni(n.arrow)):a&&o.removeChild(a)}return n.className=Ge,n.setAttribute("data-state","hidden"),Di(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Bi.$$tippy=!0;var qi=1,Ui=[],Wi=[];function Yi(t,e){var i,n,r,o,s,a,l,c=Pi(t,Object.assign({},Oi,Ii(hi(e)))),h=!1,d=!1,p=!1,u=!1,g=[],f=ni(K,c.interactiveDebounce),m=qi++,v=null,b=ai(c.plugins),y={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},_={id:m,reference:t,popper:di(),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&&M().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 L(){return l||t}function M(){var t=L().parentNode;return t?yi(t):document}function T(){return ji(x)}function O(t){return _.state.isMounted&&!_.state.isVisible||ki.isTouch||o&&"focus"===o.type?0:ti(_.props.delay,t?0:1,Oi.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;oi(_.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&&oi(_.props.triggerTarget||t).forEach((function(t){_.props.interactive?t.setAttribute("aria-expanded",_.state.isVisible&&t===L()?"true":"false"):t.removeAttribute("aria-expanded")}))}function P(){M().removeEventListener("mousemove",f),Ui=Ui.filter((function(t){return t!==f}))}function V(e){if(!ki.isTouch||!p&&"mousedown"!==e.type){var i=e.composedPath&&e.composedPath()[0]||e.target;if(!_.props.interactive||!xi(x,i)){if(oi(_.props.triggerTarget||t).some((function(t){return xi(t,i)}))){if(ki.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||j())}}}function F(){p=!0}function N(){p=!1}function D(){var t=M();t.addEventListener("mousedown",V,!0),t.addEventListener("touchend",V,Je),t.addEventListener("touchstart",N,Je),t.addEventListener("touchmove",F,Je)}function j(){var t=M();t.removeEventListener("mousedown",V,!0),t.removeEventListener("touchend",V,Je),t.removeEventListener("touchstart",N,Je),t.removeEventListener("touchmove",F,Je)}function B(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=T().box;function n(t){t.target===i&&(wi(i,"remove",n),e())}if(0===t)return e();wi(i,"remove",s),wi(i,"add",n),s=n}function W(e,i,n){void 0===n&&(n=!1),oi(_.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",Z,{passive:!0}),W("touchend",Q,{passive:!0})),ri(_.props.trigger).forEach((function(t){if("manual"!==t)switch(W(t,Z),t){case"mouseenter":W("mouseleave",Q);break;case"focus":W(Li?"focusout":"blur",J);break;case"focusin":W("focusout",J)}}))}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 Z(t){var e,i=!1;if(_.state.isEnabled&&!X(t)&&!d){var n="focus"===(null==(e=o)?void 0:e.type);o=t,l=t.currentTarget,R(),!_.state.isVisible&&gi(t)&&Ui.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 K(t){var e=t.target,i=L().contains(e)||x.contains(e);"mousemove"===t.type&&i||_i(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 Q(t){X(t)||_.props.trigger.indexOf("click")>=0&&h||(_.props.interactive?_.hideWithInteractivity(t):ot(t))}function J(t){_.props.trigger.indexOf("focusin")<0&&t.target!==L()||_.props.interactive&&t.relatedTarget&&x.contains(t.relatedTarget)||ot(t)}function X(t){return!!ki.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()?ji(x).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||L()}: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=T().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=We(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=L();(t=_.props.interactive&&e===Xe||"parent"===e?i.parentNode:ii(e,[i])).contains(x)||t.appendChild(x),_.state.isMounted=!0,tt()}function nt(){return ci(x.querySelectorAll("[data-tippy-root]"))}function rt(t){_.clearDelayTimeouts(),t&&H("onTrigger",[_,t]),D();var e=O(!0),n=z(),r=n[0],o=n[1];ki.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 j()}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=Pi(t,Object.assign({},i,hi(e),{ignoreAttributes:!0}));_.props=n,Y(),i.interactiveDebounce!==n.interactiveDebounce&&(P(),f=ni(K,n.interactiveDebounce)),i.triggerTarget&&!n.triggerTarget?oi(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=ki.isTouch&&!_.props.touch,r=ti(_.props.duration,0,Oi.duration);if(!(t||e||i||n||L().hasAttribute("disabled")||(H("onShow",[_],!1),!1===_.props.onShow(_)))){if(_.state.isVisible=!0,E()&&(x.style.visibility="visible"),$(),D(),_.state.isMounted||(x.style.transition="none"),E()){var o=T();vi([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=T(),i=e.box,n=e.content;vi([i,n],r),bi([i,n],"visible")}I(),R(),si(Wi,_),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=ti(_.props.duration,1,Oi.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(),j(),$(!0),E()){var r=T(),o=r.box,s=r.content;_.props.animation&&(vi([o,s],n),bi([o,s],"hidden"))}I(),R(),_.props.animation?E()&&B(n,_.unmount):_.unmount()}}function ut(t){M().addEventListener("mousemove",f),si(Ui,f),f(t)}function gt(){_.state.isVisible&&_.hide(),_.state.isMounted&&(et(),nt().forEach((function(t){t._tippy.unmount()})),x.parentNode&&x.parentNode.removeChild(x),Wi=Wi.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 Gi(t,e){void 0===e&&(e={});var i=Oi.plugins.concat(e.plugins||[]);Ei();var n=Object.assign({},e,{plugins:i}),r=mi(t).reduce((function(t,e){var i=e&&Yi(e,n);return i&&t.push(i),t}),[]);return pi(t)?r[0]:r}function Zi(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,(t,e)=>0==+t?"":0===e?t.toLowerCase():t.toUpperCase()).replace("-","")}Gi.defaultProps=Oi,Gi.setDefaultProps=Hi,Gi.currentInput=ki,Object.assign({},Ct,{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)}}),Gi.setDefaultProps({render:Bi});const Ki='\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: clamp(\n calc(var(--pb-popover-font-size, 1rem) * var(--pb-min-zoom, 0.5)), \n calc(var(--pb-popover-font-size, 1rem) * var(--pb-zoom-factor)), \n calc(var(--pb-popover-font-size, 1rem) * var(--pb-max-zoom, 3.0))\n );\n line-height: calc(var(--pb-popover-line-height, 1.5) * var(--pb-zoom-factor));\n\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',Qi='\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',Ji="\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 }",Xi="\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",tn="\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 en=Object.freeze({__proto__:null,camelize:Zi,base:Ki,lightBorder:Qi,light:Ji,material:Xi,translucent:tn});function nn(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 rn(t,e){if(nn(t,"base",Ki),e&&"none"!==e){const i=Zi(e),n=en[i];n&&nn(t,i,n)}}class on extends(R(H)){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?M`<div class="hidden"><slot></slot></div>`:M`<span id="link" part="trigger" class="${this.persistent?"persistent":""}"
|
|
505
505
|
><slot name="default"><slot></slot></slot></span
|
|
506
506
|
><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=L(this,"--pb-popover-theme","none")),this.placement||(this.placement=L(this,"--pb-popover-placement","auto")),this.fallbackPlacement||(this.fallbackPlacement=L(this,"--pb-popover-fallback-placement",null)),this.persistent||(this.persistent=L(this,"--pb-popover-persistent",!1)),this.trigger||(this.trigger=L(this,"--pb-popover-trigger",null)),!this.touch){const t=L(this,"--pb-popover-touch","hold");this.touch="true"===t||t}}_injectStyles(){this._checkCSSProperties(),rn(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=Gi(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[T`
|
|
507
507
|
:host {
|
|
@@ -3831,25 +3831,22 @@ const ll=t({is:"iron-label",listeners:{tap:"_tapHandler"},properties:{for:{type:
|
|
|
3831
3831
|
.current {
|
|
3832
3832
|
padding: 0 0.5rem;
|
|
3833
3833
|
}
|
|
3834
|
-
`}}function El(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ll(t,e,i){return e&&El(t.prototype,e),i&&El(t,i),t}function Ml(){return(Ml=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function Tl(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Ol(t,e)}function Ol(t,e){return(Ol=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hl(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function Il(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Hl(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Hl(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}customElements.define("pb-blacklab-highlight",Cl);var Rl,Pl,Vl,Fl,Nl,Dl,jl,Bl={},ql=[],Ul=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Wl(t,e){for(var i in e)t[i]=e[i];return t}function Yl(t){var e=t.parentNode;e&&e.removeChild(t)}function Gl(t,e,i){var n,r,o,s={};for(o in e)"key"==o?n=e[o]:"ref"==o?r=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?Rl.call(arguments,2):i),"function"==typeof t&&null!=t.defaultProps)for(o in t.defaultProps)void 0===s[o]&&(s[o]=t.defaultProps[o]);return Zl(t,s,n,r,null)}function Zl(t,e,i,n,r){var o={type:t,props:e,key:i,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++Vl:r};return null==r&&null!=Pl.vnode&&Pl.vnode(o),o}function Kl(t){return t.children}function Ql(t,e){this.props=t,this.context=e}function Jl(t,e){if(null==e)return t.__?Jl(t.__,t.__.__k.indexOf(t)+1):null;for(var i;e<t.__k.length;e++)if(null!=(i=t.__k[e])&&null!=i.__e)return i.__e;return"function"==typeof t.type?Jl(t):null}function Xl(t){var e,i;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(i=t.__k[e])&&null!=i.__e){t.__e=t.__c.base=i.__e;break}return Xl(t)}}function tc(t){(!t.__d&&(t.__d=!0)&&Nl.push(t)&&!ec.__r++||Dl!==Pl.debounceRendering)&&((Dl=Pl.debounceRendering)||setTimeout)(ec)}function ec(){for(var t;ec.__r=Nl.length;)t=Nl.sort((function(t,e){return t.__v.__b-e.__v.__b})),Nl=[],t.some((function(t){var e,i,n,r,o,s;t.__d&&(o=(r=(e=t).__v).__e,(s=e.__P)&&(i=[],(n=Wl({},r)).__v=r.__v+1,cc(s,r,n,e.__n,void 0!==s.ownerSVGElement,null!=r.__h?[o]:null,i,null==o?Jl(r):o,r.__h),hc(i,r),r.__e!=o&&Xl(r)))}))}function ic(t,e,i,n,r,o,s,a,l,c){var h,d,p,u,g,f,m,v=n&&n.__k||ql,b=v.length;for(i.__k=[],h=0;h<e.length;h++)if(null!=(u=i.__k[h]=null==(u=e[h])||"boolean"==typeof u?null:"string"==typeof u||"number"==typeof u||"bigint"==typeof u?Zl(null,u,null,null,u):Array.isArray(u)?Zl(Kl,{children:u},null,null,null):u.__b>0?Zl(u.type,u.props,u.key,null,u.__v):u)){if(u.__=i,u.__b=i.__b+1,null===(p=v[h])||p&&u.key==p.key&&u.type===p.type)v[h]=void 0;else for(d=0;d<b;d++){if((p=v[d])&&u.key==p.key&&u.type===p.type){v[d]=void 0;break}p=null}cc(t,u,p=p||Bl,r,o,s,a,l,c),g=u.__e,(d=u.ref)&&p.ref!=d&&(m||(m=[]),p.ref&&m.push(p.ref,null,u),m.push(d,u.__c||g,u)),null!=g?(null==f&&(f=g),"function"==typeof u.type&&u.__k===p.__k?u.__d=l=nc(u,l,t):l=rc(t,u,p,v,g,l),"function"==typeof i.type&&(i.__d=l)):l&&p.__e==l&&l.parentNode!=t&&(l=Jl(p))}for(i.__e=f,h=b;h--;)null!=v[h]&&("function"==typeof i.type&&null!=v[h].__e&&v[h].__e==i.__d&&(i.__d=Jl(n,h+1)),uc(v[h],v[h]));if(m)for(h=0;h<m.length;h++)pc(m[h],m[++h],m[++h])}function nc(t,e,i){for(var n,r=t.__k,o=0;r&&o<r.length;o++)(n=r[o])&&(n.__=t,e="function"==typeof n.type?nc(n,e,i):rc(i,n,n,r,n.__e,e));return e}function rc(t,e,i,n,r,o){var s,a,l;if(void 0!==e.__d)s=e.__d,e.__d=void 0;else if(null==i||r!=o||null==r.parentNode)t:if(null==o||o.parentNode!==t)t.appendChild(r),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<n.length;l+=2)if(a==r)break t;t.insertBefore(r,o),s=o}return void 0!==s?s:r.nextSibling}function oc(t,e,i){"-"===e[0]?t.setProperty(e,i):t[e]=null==i?"":"number"!=typeof i||Ul.test(e)?i:i+"px"}function sc(t,e,i,n,r){var o;t:if("style"===e)if("string"==typeof i)t.style.cssText=i;else{if("string"==typeof n&&(t.style.cssText=n=""),n)for(e in n)i&&e in i||oc(t.style,e,"");if(i)for(e in i)n&&i[e]===n[e]||oc(t.style,e,i[e])}else if("o"===e[0]&&"n"===e[1])o=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=i,i?n||t.addEventListener(e,o?lc:ac,o):t.removeEventListener(e,o?lc:ac,o);else if("dangerouslySetInnerHTML"!==e){if(r)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==i?"":i;break t}catch(t){}"function"==typeof i||(null!=i&&(!1!==i||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,i):t.removeAttribute(e))}}function ac(t){this.l[t.type+!1](Pl.event?Pl.event(t):t)}function lc(t){this.l[t.type+!0](Pl.event?Pl.event(t):t)}function cc(t,e,i,n,r,o,s,a,l){var c,h,d,p,u,g,f,m,v,b,y,_,w,x=e.type;if(void 0!==e.constructor)return null;null!=i.__h&&(l=i.__h,a=e.__e=i.__e,e.__h=null,o=[a]),(c=Pl.__b)&&c(e);try{t:if("function"==typeof x){if(m=e.props,v=(c=x.contextType)&&n[c.__c],b=c?v?v.props.value:c.__:n,i.__c?f=(h=e.__c=i.__c).__=h.__E:("prototype"in x&&x.prototype.render?e.__c=h=new x(m,b):(e.__c=h=new Ql(m,b),h.constructor=x,h.render=gc),v&&v.sub(h),h.props=m,h.state||(h.state={}),h.context=b,h.__n=n,d=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=x.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=Wl({},h.__s)),Wl(h.__s,x.getDerivedStateFromProps(m,h.__s))),p=h.props,u=h.state,d)null==x.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==x.getDerivedStateFromProps&&m!==p&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,b),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,b)||e.__v===i.__v){h.props=m,h.state=h.__s,e.__v!==i.__v&&(h.__d=!1),h.__v=e,e.__e=i.__e,e.__k=i.__k,e.__k.forEach((function(t){t&&(t.__=e)})),h.__h.length&&s.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,b),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(p,u,g)}))}if(h.context=b,h.props=m,h.__v=e,h.__P=t,y=Pl.__r,_=0,"prototype"in x&&x.prototype.render)h.state=h.__s,h.__d=!1,y&&y(e),c=h.render(h.props,h.state,h.context);else do{h.__d=!1,y&&y(e),c=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++_<25);h.state=h.__s,null!=h.getChildContext&&(n=Wl(Wl({},n),h.getChildContext())),d||null==h.getSnapshotBeforeUpdate||(g=h.getSnapshotBeforeUpdate(p,u)),w=null!=c&&c.type===Kl&&null==c.key?c.props.children:c,ic(t,Array.isArray(w)?w:[w],e,i,n,r,o,s,a,l),h.base=e.__e,e.__h=null,h.__h.length&&s.push(h),f&&(h.__E=h.__=null),h.__e=!1}else null==o&&e.__v===i.__v?(e.__k=i.__k,e.__e=i.__e):e.__e=dc(i.__e,e,i,n,r,o,s,l);(c=Pl.diffed)&&c(e)}catch(t){e.__v=null,(l||null!=o)&&(e.__e=a,e.__h=!!l,o[o.indexOf(a)]=null),Pl.__e(t,e,i)}}function hc(t,e){Pl.__c&&Pl.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){Pl.__e(t,e.__v)}}))}function dc(t,e,i,n,r,o,s,a){var l,c,h,d=i.props,p=e.props,u=e.type,g=0;if("svg"===u&&(r=!0),null!=o)for(;g<o.length;g++)if((l=o[g])&&"setAttribute"in l==!!u&&(u?l.localName===u:3===l.nodeType)){t=l,o[g]=null;break}if(null==t){if(null===u)return document.createTextNode(p);t=r?document.createElementNS("http://www.w3.org/2000/svg",u):document.createElement(u,p.is&&p),o=null,a=!1}if(null===u)d===p||a&&t.data===p||(t.data=p);else{if(o=o&&Rl.call(t.childNodes),c=(d=i.props||Bl).dangerouslySetInnerHTML,h=p.dangerouslySetInnerHTML,!a){if(null!=o)for(d={},g=0;g<t.attributes.length;g++)d[t.attributes[g].name]=t.attributes[g].value;(h||c)&&(h&&(c&&h.__html==c.__html||h.__html===t.innerHTML)||(t.innerHTML=h&&h.__html||""))}if(function(t,e,i,n,r){var o;for(o in i)"children"===o||"key"===o||o in e||sc(t,o,null,i[o],n);for(o in e)r&&"function"!=typeof e[o]||"children"===o||"key"===o||"value"===o||"checked"===o||i[o]===e[o]||sc(t,o,e[o],i[o],n)}(t,p,d,r,a),h)e.__k=[];else if(g=e.props.children,ic(t,Array.isArray(g)?g:[g],e,i,n,r&&"foreignObject"!==u,o,s,o?o[0]:i.__k&&Jl(i,0),a),null!=o)for(g=o.length;g--;)null!=o[g]&&Yl(o[g]);a||("value"in p&&void 0!==(g=p.value)&&(g!==t.value||"progress"===u&&!g||"option"===u&&g!==d.value)&&sc(t,"value",g,d.value,!1),"checked"in p&&void 0!==(g=p.checked)&&g!==t.checked&&sc(t,"checked",g,d.checked,!1))}return t}function pc(t,e,i){try{"function"==typeof t?t(e):t.current=e}catch(t){Pl.__e(t,i)}}function uc(t,e,i){var n,r;if(Pl.unmount&&Pl.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||pc(n,null,e)),null!=(n=t.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(t){Pl.__e(t,e)}n.base=n.__P=null}if(n=t.__k)for(r=0;r<n.length;r++)n[r]&&uc(n[r],e,"function"!=typeof t.type);i||null==t.__e||Yl(t.__e),t.__e=t.__d=void 0}function gc(t,e,i){return this.constructor(t,i)}function fc(t,e,i){var n,r,o;Pl.__&&Pl.__(t,e),r=(n="function"==typeof i)?null:i&&i.__k||e.__k,o=[],cc(e,t=(!n&&i||e).__k=Gl(Kl,null,[t]),r||Bl,Bl,void 0!==e.ownerSVGElement,!n&&i?[i]:r?null:e.firstChild?Rl.call(e.childNodes):null,o,!n&&i?i:r?r.__e:e.firstChild,n),hc(o,t)}function mc(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}Rl=ql.slice,Pl={__e:function(t,e,i,n){for(var r,o,s;e=e.__;)if((r=e.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(t)),s=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t,n||{}),s=r.__d),s)return r.__E=r}catch(e){t=e}throw t}},Vl=0,Fl=function(t){return null!=t&&void 0===t.constructor},Ql.prototype.setState=function(t,e){var i;i=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Wl({},this.state),"function"==typeof t&&(t=t(Wl({},i),this.props)),t&&Wl(i,t),null!=t&&this.__v&&(e&&this.__h.push(e),tc(this))},Ql.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),tc(this))},Ql.prototype.render=Kl,Nl=[],ec.__r=0,jl=0;var vc=function(){function t(t){this._id=void 0,this._id=t||mc()}return Ll(t,[{key:"id",get:function(){return this._id}}]),t}(),bc={search:{placeholder:"Type a keyword..."},sort:{sortAsc:"Sort column ascending",sortDesc:"Sort column descending"},pagination:{previous:"Previous",next:"Next",navigate:function(t,e){return"Page "+t+" of "+e},page:function(t){return"Page "+t},showing:"Showing",of:"of",to:"to",results:"results"},loading:"Loading...",noRecordsFound:"No matching records found",error:"An error happened while fetching the data"},yc=function(){function t(t){this._language=void 0,this._defaultLanguage=void 0,this._language=t,this._defaultLanguage=bc}var e=t.prototype;return e.getString=function(t,e){if(!e||!t)return null;var i=t.split("."),n=i[0];if(e[n]){var r=e[n];return"string"==typeof r?function(){return r}:"function"==typeof r?r:this.getString(i.slice(1).join("."),r)}return null},e.translate=function(t){var e;return(e=this.getString(t,this._language)||this.getString(t,this._defaultLanguage))?e.apply(void 0,[].slice.call(arguments,1)):t},t}(),_c=function(t){function e(e,i){var n,r;return(n=t.call(this,e,i)||this).config=void 0,n._=void 0,n.config=function(t){if(!t)return null;var e=Object.keys(t);return e.length?t[e[0]].props.value:null}(i),n.config&&(n._=(r=n.config.translator,function(t){return r.translate.apply(r,[t].concat([].slice.call(arguments,1)))})),n}return Tl(e,t),e}(Ql),wc=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype.render=function(){return Gl(this.props.parentElement,{dangerouslySetInnerHTML:{__html:this.props.content}})},e}(_c);function xc(t,e){return Gl(wc,{content:t,parentElement:e})}wc.defaultProps={parentElement:"span"};var kc,Ac=function(t){function e(e){var i;return(i=t.call(this)||this).data=void 0,i.update(e),i}Tl(e,t);var i=e.prototype;return i.cast=function(t){return t instanceof HTMLElement?xc(t.outerHTML):t},i.update=function(t){return this.data=this.cast(t),this},e}(vc),Sc=function(t){function e(e){var i;return(i=t.call(this)||this)._cells=void 0,i.cells=e||[],i}Tl(e,t);var i=e.prototype;return i.cell=function(t){return this._cells[t]},i.toArray=function(){return this.cells.map((function(t){return t.data}))},e.fromCells=function(t){return new e(t.map((function(t){return new Ac(t.data)})))},Ll(e,[{key:"cells",get:function(){return this._cells},set:function(t){this._cells=t}},{key:"length",get:function(){return this.cells.length}}]),e}(vc),zc=function(t){function e(e){var i;return(i=t.call(this)||this)._rows=void 0,i._length=void 0,i.rows=e instanceof Array?e:e instanceof Sc?[e]:[],i}return Tl(e,t),e.prototype.toArray=function(){return this.rows.map((function(t){return t.toArray()}))},e.fromRows=function(t){return new e(t.map((function(t){return Sc.fromCells(t.cells)})))},e.fromArray=function(t){return new e((t=function(t){return!t[0]||t[0]instanceof Array?t:[t]}(t)).map((function(t){return new Sc(t.map((function(t){return new Ac(t)})))})))},Ll(e,[{key:"rows",get:function(){return this._rows},set:function(t){this._rows=t}},{key:"length",get:function(){return this._length||this.rows.length},set:function(t){this._length=t}}]),e}(vc),Cc=function(){function t(){this.callbacks=void 0}var e=t.prototype;return e.init=function(t){this.callbacks||(this.callbacks={}),t&&!this.callbacks[t]&&(this.callbacks[t]=[])},e.on=function(t,e){return this.init(t),this.callbacks[t].push(e),this},e.off=function(t,e){var i=t;return this.init(),this.callbacks[i]&&0!==this.callbacks[i].length?(this.callbacks[i]=this.callbacks[i].filter((function(t){return t!=e})),this):this},e.emit=function(t){var e=arguments,i=t;return this.init(i),this.callbacks[i].length>0&&(this.callbacks[i].forEach((function(t){return t.apply(void 0,[].slice.call(e,1))})),!0)},t}();!function(t){t[t.Initiator=0]="Initiator",t[t.ServerFilter=1]="ServerFilter",t[t.ServerSort=2]="ServerSort",t[t.ServerLimit=3]="ServerLimit",t[t.Extractor=4]="Extractor",t[t.Transformer=5]="Transformer",t[t.Filter=6]="Filter",t[t.Sort=7]="Sort",t[t.Limit=8]="Limit"}(kc||(kc={}));var Ec=function(t){function e(e){var i;return(i=t.call(this)||this).id=void 0,i._props=void 0,i._props={},i.id=mc(),e&&i.setProps(e),i}Tl(e,t);var i=e.prototype;return i.process=function(){var t=[].slice.call(arguments);this.validateProps instanceof Function&&this.validateProps.apply(this,t),this.emit.apply(this,["beforeProcess"].concat(t));var e=this._process.apply(this,t);return this.emit.apply(this,["afterProcess"].concat(t)),e},i.setProps=function(t){return Object.assign(this._props,t),this.emit("propsUpdated",this),this},Ll(e,[{key:"props",get:function(){return this._props}}]),e}(Cc),Lc=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype._process=function(t){return this.props.keyword?(e=String(this.props.keyword).trim(),i=this.props.columns,n=this.props.ignoreHiddenColumns,r=t,o=this.props.selector,e=e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),new zc(r.rows.filter((function(t,r){return t.cells.some((function(t,s){if(!t)return!1;if(n&&i&&i[s]&&"object"==typeof i[s]&&i[s].hidden)return!1;var a="";if("function"==typeof o)a=o(t.data,r,s);else if("object"==typeof t.data){var l=t.data;l&&l.props&&l.props.content&&(a=l.props.content)}else a=String(t.data);return new RegExp(e,"gi").test(a)}))})))):t;var e,i,n,r,o},Ll(e,[{key:"type",get:function(){return kc.Filter}}]),e}(Ec);function Mc(){return""+"gridjs"+[].slice.call(arguments).reduce((function(t,e){return t+"-"+e}),"")}function Tc(){return[].slice.call(arguments).filter((function(t){return t})).reduce((function(t,e){return(t||"")+" "+e}),"").trim()||null}var Oc,$c=function(t){function e(e){var i;return(i=t.call(this)||this)._state=void 0,i.dispatcher=void 0,i.dispatcher=e,i._state=i.getInitialState(),e.register(i._handle.bind($l(i))),i}Tl(e,t);var i=e.prototype;return i._handle=function(t){this.handle(t.type,t.payload)},i.setState=function(t){var e=this._state;this._state=t,this.emit("updated",t,e)},Ll(e,[{key:"state",get:function(){return this._state}}]),e}(Cc),Hc=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.getInitialState=function(){return{keyword:null}},i.handle=function(t,e){"SEARCH_KEYWORD"===t&&this.search(e.keyword)},i.search=function(t){this.setState({keyword:t})},e}($c),Ic=function(){function t(t){this.dispatcher=void 0,this.dispatcher=t}return t.prototype.dispatch=function(t,e){this.dispatcher.dispatch({type:t,payload:e})},t}(),Rc=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype.search=function(t){this.dispatch("SEARCH_KEYWORD",{keyword:t})},e}(Ic),Pc=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype._process=function(t){if(!this.props.keyword)return t;var e={};return this.props.url&&(e.url=this.props.url(t.url,this.props.keyword)),this.props.body&&(e.body=this.props.body(t.body,this.props.keyword)),Ml({},t,e)},Ll(e,[{key:"type",get:function(){return kc.ServerFilter}}]),e}(Ec),Vc=new(function(){function t(){}var e=t.prototype;return e.format=function(t,e){return"[Grid.js] ["+e.toUpperCase()+"]: "+t},e.error=function(t,e){void 0===e&&(e=!1);var i=this.format(t,"error");if(e)throw Error(i);console.error(i)},e.warn=function(t){console.warn(this.format(t,"warn"))},e.info=function(t){console.info(this.format(t,"info"))},t}()),Fc=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e}(_c);!function(t){t[t.Header=0]="Header",t[t.Footer=1]="Footer",t[t.Cell=2]="Cell"}(Oc||(Oc={}));var Nc=function(){function t(){this.plugins=void 0,this.plugins=[]}var e=t.prototype;return e.get=function(t){var e=this.plugins.filter((function(e){return e.id===t}));return e.length>0?e[0]:null},e.add=function(t){return t.id?null!==this.get(t.id)?(Vc.error("Duplicate plugin ID: "+t.id),this):(this.plugins.push(t),this):(Vc.error("Plugin ID cannot be empty"),this)},e.remove=function(t){return this.plugins.splice(this.plugins.indexOf(this.get(t)),1),this},e.list=function(t){return(null!=t||null!=t?this.plugins.filter((function(e){return e.position===t})):this.plugins).sort((function(t,e){return t.order-e.order}))},t}(),Dc=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype.render=function(){var t=this;if(this.props.pluginId){var e=this.config.plugin.get(this.props.pluginId);return e?Gl(Kl,{},Gl(e.component,Ml({plugin:e},e.props,this.props.props))):null}return void 0!==this.props.position?Gl(Kl,{},this.config.plugin.list(this.props.position).map((function(e){return Gl(e.component,Ml({plugin:e},e.props,t.props.props))}))):null},e}(_c),jc=function(t){function e(e,i){var n;(n=t.call(this,e,i)||this).searchProcessor=void 0,n.actions=void 0,n.store=void 0,n.storeUpdatedFn=void 0,n.actions=new Rc(n.config.dispatcher),n.store=new Hc(n.config.dispatcher);var r,o=e.keyword;return e.enabled&&(o&&n.actions.search(o),n.storeUpdatedFn=n.storeUpdated.bind($l(n)),n.store.on("updated",n.storeUpdatedFn),r=e.server?new Pc({keyword:e.keyword,url:e.server.url,body:e.server.body}):new Lc({keyword:e.keyword,columns:n.config.header&&n.config.header.columns,ignoreHiddenColumns:e.ignoreHiddenColumns||void 0===e.ignoreHiddenColumns,selector:e.selector}),n.searchProcessor=r,n.config.pipeline.register(r)),n}Tl(e,t);var i=e.prototype;return i.componentWillUnmount=function(){this.config.pipeline.unregister(this.searchProcessor),this.store.off("updated",this.storeUpdatedFn)},i.storeUpdated=function(t){this.searchProcessor.setProps({keyword:t.keyword})},i.onChange=function(t){this.actions.search(t.target.value)},i.render=function(){if(!this.props.enabled)return null;var t,e,i,n=this.onChange.bind(this);return this.searchProcessor instanceof Pc&&(t=n,e=this.props.debounceTimeout,n=function(){var n=arguments;return new Promise((function(r){i&&clearTimeout(i),i=setTimeout((function(){return r(t.apply(void 0,[].slice.call(n)))}),e)}))}),Gl("div",{className:Mc(Tc("search",this.config.className.search))},Gl("input",{type:"search",placeholder:this._("search.placeholder"),"aria-label":this._("search.placeholder"),onInput:n,className:Tc(Mc("input"),Mc("search","input")),value:this.store.state.keyword}))},e}(Fc);jc.defaultProps={debounceTimeout:250};var Bc=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.validateProps=function(){if(isNaN(Number(this.props.limit))||isNaN(Number(this.props.page)))throw Error("Invalid parameters passed")},i._process=function(t){var e=this.props.page;return new zc(t.rows.slice(e*this.props.limit,(e+1)*this.props.limit))},Ll(e,[{key:"type",get:function(){return kc.Limit}}]),e}(Ec),qc=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype._process=function(t){var e={};return this.props.url&&(e.url=this.props.url(t.url,this.props.page,this.props.limit)),this.props.body&&(e.body=this.props.body(t.body,this.props.page,this.props.limit)),Ml({},t,e)},Ll(e,[{key:"type",get:function(){return kc.ServerLimit}}]),e}(Ec),Uc=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).processor=void 0,n.onUpdateFn=void 0,n.setTotalFromTabularFn=void 0,n.state={limit:e.limit,page:e.page||0,total:0},n}Tl(e,t);var i=e.prototype;return i.componentWillMount=function(){var t,e=this;this.props.enabled&&(this.setTotalFromTabularFn=this.setTotalFromTabular.bind(this),this.props.server?(t=new qc({limit:this.state.limit,page:this.state.page,url:this.props.server.url,body:this.props.server.body}),this.config.pipeline.on("afterProcess",this.setTotalFromTabularFn)):(t=new Bc({limit:this.state.limit,page:this.state.page})).on("beforeProcess",this.setTotalFromTabularFn),this.processor=t,this.config.pipeline.register(t),this.config.pipeline.on("error",(function(){e.setState({total:0,page:0})})))},i.setTotalFromTabular=function(t){this.setTotal(t.length)},i.onUpdate=function(t){this.props.resetPageOnUpdate&&t!==this.processor&&this.setPage(0)},i.componentDidMount=function(){this.onUpdateFn=this.onUpdate.bind(this),this.config.pipeline.on("updated",this.onUpdateFn)},i.componentWillUnmount=function(){this.config.pipeline.unregister(this.processor),this.config.pipeline.off("updated",this.onUpdateFn)},i.setPage=function(t){if(t>=this.pages||t<0||t===this.state.page)return null;this.setState({page:t}),this.processor.setProps({page:t})},i.setTotal=function(t){this.setState({total:t})},i.renderPages=function(){var t=this;if(this.props.buttonsCount<=0)return null;var e=Math.min(this.pages,this.props.buttonsCount),i=Math.min(this.state.page,Math.floor(e/2));return this.state.page+Math.floor(e/2)>=this.pages&&(i=e-(this.pages-this.state.page)),Gl(Kl,null,this.pages>e&&this.state.page-i>0&&Gl(Kl,null,Gl("button",{tabIndex:0,role:"button",onClick:this.setPage.bind(this,0),title:this._("pagination.firstPage"),"aria-label":this._("pagination.firstPage"),className:this.config.className.paginationButton},this._("1")),Gl("button",{tabIndex:-1,className:Tc(Mc("spread"),this.config.className.paginationButton)},"...")),Array.from(Array(e).keys()).map((function(e){return t.state.page+(e-i)})).map((function(e){return Gl("button",{tabIndex:0,role:"button",onClick:t.setPage.bind(t,e),className:Tc(t.state.page===e?Tc(Mc("currentPage"),t.config.className.paginationButtonCurrent):null,t.config.className.paginationButton),title:t._("pagination.page",e+1),"aria-label":t._("pagination.page",e+1)},t._(""+(e+1)))})),this.pages>e&&this.pages>this.state.page+i+1&&Gl(Kl,null,Gl("button",{tabIndex:-1,className:Tc(Mc("spread"),this.config.className.paginationButton)},"..."),Gl("button",{tabIndex:0,role:"button",onClick:this.setPage.bind(this,this.pages-1),title:this._("pagination.page",this.pages),"aria-label":this._("pagination.page",this.pages),className:this.config.className.paginationButton},this._(""+this.pages))))},i.renderSummary=function(){return Gl(Kl,null,this.props.summary&&this.state.total>0&&Gl("div",{role:"status","aria-live":"polite",className:Tc(Mc("summary"),this.config.className.paginationSummary),title:this._("pagination.navigate",this.state.page+1,this.pages)},this._("pagination.showing")," ",Gl("b",null,this._(""+(this.state.page*this.state.limit+1)))," ",this._("pagination.to")," ",Gl("b",null,this._(""+Math.min((this.state.page+1)*this.state.limit,this.state.total)))," ",this._("pagination.of")," ",Gl("b",null,this._(""+this.state.total))," ",this._("pagination.results")))},i.render=function(){return this.props.enabled?Gl("div",{className:Tc(Mc("pagination"),this.config.className.pagination)},this.renderSummary(),Gl("div",{className:Mc("pages")},this.props.prevButton&&Gl("button",{tabIndex:0,role:"button",disabled:0===this.state.page,onClick:this.setPage.bind(this,this.state.page-1),title:this._("pagination.previous"),"aria-label":this._("pagination.previous"),className:Tc(this.config.className.paginationButton,this.config.className.paginationButtonPrev)},this._("pagination.previous")),this.renderPages(),this.props.nextButton&&Gl("button",{tabIndex:0,role:"button",disabled:this.pages===this.state.page+1||0===this.pages,onClick:this.setPage.bind(this,this.state.page+1),title:this._("pagination.next"),"aria-label":this._("pagination.next"),className:Tc(this.config.className.paginationButton,this.config.className.paginationButtonNext)},this._("pagination.next")))):null},Ll(e,[{key:"pages",get:function(){return Math.ceil(this.state.total/this.state.limit)}}]),e}(Fc);function Wc(t,e){return"string"==typeof t?t.indexOf("%")>-1?e/100*parseInt(t,10):parseInt(t,10):t}function Yc(t){return t?Math.floor(t)+"px":""}Uc.defaultProps={summary:!0,nextButton:!0,prevButton:!0,buttonsCount:3,limit:10,resetPageOnUpdate:!0};var Gc=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).tableElement=void 0,n.tableClassName=void 0,n.tableStyle=void 0,n.tableElement=n.props.tableRef.current.base.cloneNode(!0),n.tableElement.style.position="absolute",n.tableElement.style.width="100%",n.tableElement.style.zIndex="-2147483640",n.tableElement.style.visibility="hidden",n.tableClassName=n.tableElement.className,n.tableStyle=n.tableElement.style.cssText,n}Tl(e,t);var i=e.prototype;return i.widths=function(){this.tableElement.className=this.tableClassName+" "+Mc("shadowTable"),this.tableElement.style.tableLayout="auto",this.tableElement.style.width="auto",this.tableElement.style.padding="0",this.tableElement.style.margin="0",this.tableElement.style.border="none",this.tableElement.style.outline="none";var t=Array.from(this.base.parentNode.querySelectorAll("thead th")).reduce((function(t,e){var i;return e.style.width=e.clientWidth+"px",Ml(((i={})[e.getAttribute("data-column-id")]={minWidth:e.clientWidth},i),t)}),{});return this.tableElement.className=this.tableClassName,this.tableElement.style.cssText=this.tableStyle,this.tableElement.style.tableLayout="auto",Array.from(this.base.parentNode.querySelectorAll("thead th")).reduce((function(t,e){return t[e.getAttribute("data-column-id")].width=e.clientWidth,t}),t)},i.render=function(){var t=this;return this.props.tableRef.current?Gl("div",{ref:function(e){e&&e.appendChild(t.tableElement)}}):null},e}(_c);function Zc(t){if(!t)return"";var e=t.split(" ");return 1===e.length&&/([a-z][A-Z])+/g.test(t)?t:e.map((function(t,e){return 0==e?t.toLowerCase():t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()})).join("")}var Kc=function(t){function e(){var e;return(e=t.call(this)||this)._columns=void 0,e._columns=[],e}Tl(e,t);var i=e.prototype;return i.adjustWidth=function(t){var i=t.container,n=t.tableRef,r=t.tempRef,o=t.tempRef||!0;if(!i)return this;var s=i.clientWidth,a={current:null},l={};if(n.current&&o){var c=Gl(Gc,{tableRef:n});c.ref=a,fc(c,r.current),l=a.current.widths()}for(var h,d=Il(e.tabularFormat(this.columns).reduce((function(t,e){return t.concat(e)}),[]));!(h=d()).done;){var p=h.value;p.columns&&p.columns.length>0||(!p.width&&o?p.id in l&&(p.width=Yc(l[p.id].width),p.minWidth=Yc(l[p.id].minWidth)):p.width=Yc(Wc(p.width,s)))}return n.current&&o&&fc(null,r.current),this},i.setSort=function(t,e){for(var i,n=Il(e||this.columns||[]);!(i=n()).done;){var r=i.value;r.columns&&r.columns.length>0&&(r.sort={enabled:!1}),void 0===r.sort&&t.sort&&(r.sort={enabled:!0}),r.sort?"object"==typeof r.sort&&(r.sort=Ml({enabled:!0},r.sort)):r.sort={enabled:!1},r.columns&&this.setSort(t,r.columns)}},i.setFixedHeader=function(t,e){for(var i,n=Il(e||this.columns||[]);!(i=n()).done;){var r=i.value;void 0===r.fixedHeader&&(r.fixedHeader=t.fixedHeader),r.columns&&this.setFixedHeader(t,r.columns)}},i.setResizable=function(t,e){for(var i,n=Il(e||this.columns||[]);!(i=n()).done;){var r=i.value;void 0===r.resizable&&(r.resizable=t.resizable),r.columns&&this.setResizable(t,r.columns)}},i.setID=function(t){for(var e,i=Il(t||this.columns||[]);!(e=i()).done;){var n=e.value;n.id||"string"!=typeof n.name||(n.id=Zc(n.name)),n.id||Vc.error('Could not find a valid ID for one of the columns. Make sure a valid "id" is set for all columns.'),n.columns&&this.setID(n.columns)}},i.populatePlugins=function(t,e){for(var i,n=Il(e);!(i=n()).done;){var r=i.value;void 0!==r.plugin&&t.plugin.add(Ml({id:r.id,props:{}},r.plugin,{position:Oc.Cell}))}},e.fromColumns=function(t){for(var i,n=new e,r=Il(t);!(i=r()).done;){var o=i.value;if("string"==typeof o||Fl(o))n.columns.push({name:o});else if("object"==typeof o){var s=o;s.columns&&(s.columns=e.fromColumns(s.columns).columns),"object"==typeof s.plugin&&void 0===s.data&&(s.data=null),n.columns.push(o)}}return n},e.fromUserConfig=function(t){var i=new e;return t.from?i.columns=e.fromHTMLTable(t.from).columns:t.columns?i.columns=e.fromColumns(t.columns).columns:!t.data||"object"!=typeof t.data[0]||t.data[0]instanceof Array||(i.columns=Object.keys(t.data[0]).map((function(t){return{name:t}}))),i.columns.length?(i.setID(),i.setSort(t),i.setFixedHeader(t),i.setResizable(t),i.populatePlugins(t,i.columns),i):null},e.fromHTMLTable=function(t){for(var i,n=new e,r=Il(t.querySelector("thead").querySelectorAll("th"));!(i=r()).done;){var o=i.value;n.columns.push({name:o.innerHTML,width:o.width})}return n},e.tabularFormat=function(t){var e=[],i=t||[],n=[];if(i&&i.length){e.push(i);for(var r,o=Il(i);!(r=o()).done;){var s=r.value;s.columns&&s.columns.length&&(n=n.concat(s.columns))}n.length&&(e=e.concat(this.tabularFormat(n)))}return e},e.leafColumns=function(t){var e=[],i=t||[];if(i&&i.length)for(var n,r=Il(i);!(n=r()).done;){var o=n.value;o.columns&&0!==o.columns.length||e.push(o),o.columns&&(e=e.concat(this.leafColumns(o.columns)))}return e},e.maximumDepth=function(t){return this.tabularFormat([t]).length-1},Ll(e,[{key:"columns",get:function(){return this._columns},set:function(t){this._columns=t}},{key:"visibleColumns",get:function(){return this._columns.filter((function(t){return!t.hidden}))}}]),e}(vc),Qc=function(){function t(){this._callbacks=void 0,this._isDispatching=void 0,this._isHandled=void 0,this._isPending=void 0,this._lastID=void 0,this._pendingPayload=void 0,this._callbacks={},this._isDispatching=!1,this._isHandled={},this._isPending={},this._lastID=1}var e=t.prototype;return e.register=function(t){var e="ID_"+this._lastID++;return this._callbacks[e]=t,e},e.unregister=function(t){if(!this._callbacks[t])throw Error("Dispatcher.unregister(...): "+t+" does not map to a registered callback.");delete this._callbacks[t]},e.waitFor=function(t){if(!this._isDispatching)throw Error("Dispatcher.waitFor(...): Must be invoked while dispatching.");for(var e=0;e<t.length;e++){var i=t[e];if(this._isPending[i]){if(!this._isHandled[i])throw Error("Dispatcher.waitFor(...): Circular dependency detected while ' +\n 'waiting for "+i+".")}else{if(!this._callbacks[i])throw Error("Dispatcher.waitFor(...): "+i+" does not map to a registered callback.");this._invokeCallback(i)}}},e.dispatch=function(t){if(this._isDispatching)throw Error("Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch.");this._startDispatching(t);try{for(var e in this._callbacks)this._isPending[e]||this._invokeCallback(e)}finally{this._stopDispatching()}},e.isDispatching=function(){return this._isDispatching},e._invokeCallback=function(t){this._isPending[t]=!0,this._callbacks[t](this._pendingPayload),this._isHandled[t]=!0},e._startDispatching=function(t){for(var e in this._callbacks)this._isPending[e]=!1,this._isHandled[e]=!1;this._pendingPayload=t,this._isDispatching=!0},e._stopDispatching=function(){delete this._pendingPayload,this._isDispatching=!1},t}(),Jc=function(){},Xc=function(t){function e(e){var i;return(i=t.call(this)||this).data=void 0,i.set(e),i}Tl(e,t);var i=e.prototype;return i.get=function(){try{return Promise.resolve(this.data()).then((function(t){return{data:t,total:t.length}}))}catch(t){return Promise.reject(t)}},i.set=function(t){return t instanceof Array?this.data=function(){return t}:t instanceof Function&&(this.data=t),this},e}(Jc),th=function(t){function e(e){var i;return(i=t.call(this)||this).options=void 0,i.options=e,i}Tl(e,t);var i=e.prototype;return i.handler=function(t){return"function"==typeof this.options.handle?this.options.handle(t):t.ok?t.json():(Vc.error("Could not fetch data: "+t.status+" - "+t.statusText,!0),null)},i.get=function(t){var e=Ml({},this.options,t);return"function"==typeof e.data?e.data(e):fetch(e.url,e).then(this.handler.bind(this)).then((function(t){return{data:e.then(t),total:"function"==typeof e.total?e.total(t):void 0}}))},e}(Jc),eh=function(){function t(){}return t.createFromUserConfig=function(t){var e=null;return t.data&&(e=new Xc(t.data)),t.from&&(e=new Xc(this.tableElementToArray(t.from)),t.from.style.display="none"),t.server&&(e=new th(t.server)),e||Vc.error("Could not determine the storage type",!0),e},t.tableElementToArray=function(t){for(var e,i,n=[],r=Il(t.querySelector("tbody").querySelectorAll("tr"));!(e=r()).done;){for(var o,s=[],a=Il(e.value.querySelectorAll("td"));!(o=a()).done;){var l=o.value;1===l.childNodes.length&&l.childNodes[0].nodeType===Node.TEXT_NODE?s.push((i=l.innerHTML,(new DOMParser).parseFromString(i,"text/html").documentElement.textContent)):s.push(xc(l.innerHTML))}n.push(s)}return n},t}(),ih="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function nh(t,e,i){if(!t.s){if(i instanceof rh){if(!i.s)return void(i.o=nh.bind(null,t,e));1&e&&(e=i.s),i=i.v}if(i&&i.then)return void i.then(nh.bind(null,t,e),nh.bind(null,t,2));t.s=e,t.v=i;var n=t.o;n&&n(t)}}var rh=function(){function t(){}return t.prototype.then=function(e,i){var n=new t,r=this.s;if(r){var o=1&r?e:i;if(o){try{nh(n,1,o(this.v))}catch(t){nh(n,2,t)}return n}return this}return this.o=function(t){try{var r=t.v;1&t.s?nh(n,1,e?e(r):r):i?nh(n,1,i(r)):nh(n,2,r)}catch(t){nh(n,2,t)}},n},t}();function oh(t){return t instanceof rh&&1&t.s}var sh,ah=function(t){function e(e){var i;return(i=t.call(this)||this)._steps=new Map,i.cache=new Map,i.lastProcessorIndexUpdated=-1,e&&e.forEach((function(t){return i.register(t)})),i}Tl(e,t);var i=e.prototype;return i.clearCache=function(){this.cache=new Map,this.lastProcessorIndexUpdated=-1},i.register=function(t,e){if(void 0===e&&(e=null),null===t.type)throw Error("Processor type is not defined");t.on("propsUpdated",this.processorPropsUpdated.bind(this)),this.addProcessorByPriority(t,e),this.afterRegistered(t)},i.unregister=function(t){if(t){var e=this._steps.get(t.type);e&&e.length&&(this._steps.set(t.type,e.filter((function(e){return e!=t}))),this.emit("updated",t))}},i.addProcessorByPriority=function(t,e){var i=this._steps.get(t.type);if(!i){var n=[];this._steps.set(t.type,n),i=n}if(null===e||e<0)i.push(t);else if(i[e]){var r=i.slice(0,e-1),o=i.slice(e+1);this._steps.set(t.type,r.concat(t).concat(o))}else i[e]=t},i.getStepsByType=function(t){return this.steps.filter((function(e){return e.type===t}))},i.getSortedProcessorTypes=function(){return Object.keys(kc).filter((function(t){return!isNaN(Number(t))})).map((function(t){return Number(t)}))},i.process=function(t){try{var e=this,i=function(t){return e.lastProcessorIndexUpdated=r.length,e.emit("afterProcess",o),o},n=e.lastProcessorIndexUpdated,r=e.steps,o=t,s=function(t,i){try{var s=function(t,e,i){if("function"==typeof t[ih]){var n,r,o,s=t[ih]();if(function t(i){try{for(;!(n=s.next()).done;)if((i=e(n.value))&&i.then){if(!oh(i))return void i.then(t,o||(o=nh.bind(null,r=new rh,2)));i=i.v}r?nh(r,1,i):r=i}catch(t){nh(r||(r=new rh),2,t)}}(),s.return){var a=function(t){try{n.done||s.return()}catch(t){}return t};if(r&&r.then)return r.then(a,(function(t){throw a(t)}));a()}return r}if(!("length"in t))throw new TypeError("Object is not iterable");for(var l=[],c=0;c<t.length;c++)l.push(t[c]);return function(t,e,i){var n,r,o=-1;return function i(s){try{for(;++o<t.length;)if((s=e(o))&&s.then){if(!oh(s))return void s.then(i,r||(r=nh.bind(null,n=new rh,2)));s=s.v}n?nh(n,1,s):n=s}catch(t){nh(n||(n=new rh),2,t)}}(),n}(l,(function(t){return e(l[t])}))}(r,(function(t){var i=e.findProcessorIndexByID(t.id),r=function(){if(i>=n)return Promise.resolve(t.process(o)).then((function(i){e.cache.set(t.id,o=i)}));o=e.cache.get(t.id)}();if(r&&r.then)return r.then((function(){}))}))}catch(t){return i(t)}return s&&s.then?s.then(void 0,i):s}(0,(function(t){throw Vc.error(t),e.emit("error",o),t}));return Promise.resolve(s&&s.then?s.then(i):i())}catch(t){return Promise.reject(t)}},i.findProcessorIndexByID=function(t){return this.steps.findIndex((function(e){return e.id==t}))},i.setLastProcessorIndex=function(t){var e=this.findProcessorIndexByID(t.id);this.lastProcessorIndexUpdated>e&&(this.lastProcessorIndexUpdated=e)},i.processorPropsUpdated=function(t){this.setLastProcessorIndex(t),this.emit("propsUpdated"),this.emit("updated",t)},i.afterRegistered=function(t){this.setLastProcessorIndex(t),this.emit("afterRegister"),this.emit("updated",t)},Ll(e,[{key:"steps",get:function(){for(var t,e=[],i=Il(this.getSortedProcessorTypes());!(t=i()).done;){var n=this._steps.get(t.value);n&&n.length&&(e=e.concat(n))}return e.filter((function(t){return t}))}}]),e}(Cc),lh=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype._process=function(t){try{return Promise.resolve(this.props.storage.get(t))}catch(t){return Promise.reject(t)}},Ll(e,[{key:"type",get:function(){return kc.Extractor}}]),e}(Ec),ch=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype._process=function(t){var e=zc.fromArray(t.data);return e.length=t.total,e},Ll(e,[{key:"type",get:function(){return kc.Transformer}}]),e}(Ec),hh=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype._process=function(){return Object.entries(this.props.serverStorageOptions).filter((function(t){return"function"!=typeof t[1]})).reduce((function(t,e){var i;return Ml({},t,((i={})[e[0]]=e[1],i))}),{})},Ll(e,[{key:"type",get:function(){return kc.Initiator}}]),e}(Ec),dh=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.castData=function(t){if(!t||!t.length)return[];if(!this.props.header||!this.props.header.columns)return t;var e=Kc.leafColumns(this.props.header.columns);return t[0]instanceof Array?t.map((function(t){var i=0;return e.map((function(e,n){return void 0!==e.data?(i++,"function"==typeof e.data?e.data(t):e.data):t[n-i]}))})):"object"!=typeof t[0]||t[0]instanceof Array?[]:t.map((function(t){return e.map((function(e,i){return void 0!==e.data?"function"==typeof e.data?e.data(t):e.data:e.id?t[e.id]:(Vc.error("Could not find the correct cell for column at position "+i+".\n Make sure either 'id' or 'selector' is defined for all columns."),null)}))}))},i._process=function(t){return{data:this.castData(t.data),total:t.total}},Ll(e,[{key:"type",get:function(){return kc.Transformer}}]),e}(Ec),ph=function(){function t(){}return t.createFromConfig=function(t){var e=new ah;return t.storage instanceof th&&e.register(new hh({serverStorageOptions:t.server})),e.register(new lh({storage:t.storage})),e.register(new dh({header:t.header})),e.register(new ch),e},t}(),uh=function(){function t(e){this._userConfig=void 0,Object.assign(this,Ml({},t.defaultConfig(),e)),this._userConfig={}}var e=t.prototype;return e.assign=function(t){for(var e=0,i=Object.keys(t);e<i.length;e++){var n=i[e];"_userConfig"!==n&&(this[n]=t[n])}return this},e.update=function(e){return e?(this._userConfig=Ml({},this._userConfig,e),this.assign(t.fromUserConfig(this._userConfig)),this):this},t.defaultConfig=function(){return{plugin:new Nc,dispatcher:new Qc,tableRef:{current:null},tempRef:{current:null},width:"100%",height:"auto",autoWidth:!0,style:{},className:{}}},t.fromUserConfig=function(e){var i=new t(e);return i._userConfig=e,"boolean"==typeof e.sort&&e.sort&&i.assign({sort:{multiColumn:!0}}),i.assign({header:Kc.fromUserConfig(i)}),i.assign({storage:eh.createFromUserConfig(e)}),i.assign({pipeline:ph.createFromConfig(i)}),i.assign({translator:new yc(e.language)}),i.plugin.add({id:"search",position:Oc.Header,component:jc,props:Ml({enabled:!0===e.search||e.search instanceof Object},e.search)}),i.plugin.add({id:"pagination",position:Oc.Footer,component:Uc,props:Ml({enabled:!0===e.pagination||e.pagination instanceof Object},e.pagination)}),e.plugins&&e.plugins.forEach((function(t){return i.plugin.add(t)})),i},t}();!function(t){t[t.Init=0]="Init",t[t.Loading=1]="Loading",t[t.Loaded=2]="Loaded",t[t.Rendered=3]="Rendered",t[t.Error=4]="Error"}(sh||(sh={}));var gh,fh,mh,vh=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.content=function(){return this.props.column&&"function"==typeof this.props.column.formatter?this.props.column.formatter(this.props.cell.data,this.props.row,this.props.column):this.props.column&&this.props.column.plugin?Gl(Dc,{pluginId:this.props.column.id,props:{column:this.props.column,cell:this.props.cell,row:this.props.row}}):this.props.cell.data},i.handleClick=function(t){this.props.messageCell||this.config.eventEmitter.emit("cellClick",t,this.props.cell,this.props.column,this.props.row)},i.getCustomAttributes=function(t){return t?"function"==typeof t.attributes?t.attributes(this.props.cell.data,this.props.row,this.props.column):t.attributes:{}},i.render=function(){return Gl("td",Ml({role:this.props.role,colSpan:this.props.colSpan,"data-column-id":this.props.column&&this.props.column.id,className:Tc(Mc("td"),this.props.className,this.config.className.td),style:Ml({},this.props.style,this.config.style.td),onClick:this.handleClick.bind(this)},this.getCustomAttributes(this.props.column)),this.content())},e}(_c),bh=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.getColumn=function(t){if(this.props.header){var e=Kc.leafColumns(this.props.header.columns);if(e)return e[t]}return null},i.handleClick=function(t){this.props.messageRow||this.config.eventEmitter.emit("rowClick",t,this.props.row)},i.getChildren=function(){var t=this;return this.props.children?this.props.children:Gl(Kl,null,this.props.row.cells.map((function(e,i){var n=t.getColumn(i);return n&&n.hidden?null:Gl(vh,{key:e.id,cell:e,row:t.props.row,column:n})})))},i.render=function(){return Gl("tr",{className:Tc(Mc("tr"),this.config.className.tr),onClick:this.handleClick.bind(this)},this.getChildren())},e}(_c),yh=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype.render=function(){return Gl(bh,{messageRow:!0},Gl(vh,{role:"alert",colSpan:this.props.colSpan,messageCell:!0,cell:new Ac(this.props.message),className:Tc(Mc("message"),this.props.className?this.props.className:null)}))},e}(_c),_h=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.headerLength=function(){return this.props.header?this.props.header.visibleColumns.length:0},i.render=function(){var t=this;return Gl("tbody",{className:Tc(Mc("tbody"),this.config.className.tbody)},this.props.data&&this.props.data.rows.map((function(e){return Gl(bh,{key:e.id,row:e,header:t.props.header})})),this.props.status===sh.Loading&&(!this.props.data||0===this.props.data.length)&&Gl(yh,{message:this._("loading"),colSpan:this.headerLength(),className:Tc(Mc("loading"),this.config.className.loading)}),this.props.status===sh.Rendered&&this.props.data&&0===this.props.data.length&&Gl(yh,{message:this._("noRecordsFound"),colSpan:this.headerLength(),className:Tc(Mc("notfound"),this.config.className.notfound)}),this.props.status===sh.Error&&Gl(yh,{message:this._("error"),colSpan:this.headerLength(),className:Tc(Mc("error"),this.config.className.error)}))},e}(_c),wh=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.validateProps=function(){for(var t,e=Il(this.props.columns);!(t=e()).done;){var i=t.value;void 0===i.direction&&(i.direction=1),1!==i.direction&&-1!==i.direction&&Vc.error("Invalid sort direction "+i.direction)}},i.compare=function(t,e){return t>e?1:t<e?-1:0},i.compareWrapper=function(t,e){for(var i,n=0,r=Il(this.props.columns);!(i=r()).done;){var o=i.value;if(0!==n)break;var s=t.cells[o.index].data,a=e.cells[o.index].data;n|="function"==typeof o.compare?o.compare(s,a)*o.direction:this.compare(s,a)*o.direction}return n},i._process=function(t){var e=[].concat(t.rows);e.sort(this.compareWrapper.bind(this));var i=new zc(e);return i.length=t.length,i},Ll(e,[{key:"type",get:function(){return kc.Sort}}]),e}(Ec),xh=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.getInitialState=function(){return[]},i.handle=function(t,e){"SORT_COLUMN"===t?this.sortColumn(e.index,e.direction,e.multi,e.compare):"SORT_COLUMN_TOGGLE"===t&&this.sortToggle(e.index,e.multi,e.compare)},i.sortToggle=function(t,e,i){var n=[].concat(this.state).find((function(e){return e.index===t}));this.sortColumn(t,n&&1===n.direction?-1:1,e,i)},i.sortColumn=function(t,e,i,n){var r=[].concat(this.state),o=r.length,s=r.find((function(e){return e.index===t})),a=!1,l=!1,c=!1,h=!1;if(void 0!==s?i?-1===s.direction?c=!0:h=!0:1===o?h=!0:o>1&&(l=!0,a=!0):0===o?a=!0:o>0&&!i?(a=!0,l=!0):o>0&&i&&(a=!0),l&&(r=[]),a)r.push({index:t,direction:e,compare:n});else if(h){var d=r.indexOf(s);r[d].direction=e}else if(c){var p=r.indexOf(s);r.splice(p,1)}this.setState(r)},e}($c),kh=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.sortColumn=function(t,e,i,n){this.dispatch("SORT_COLUMN",{index:t,direction:e,multi:i,compare:n})},i.sortToggle=function(t,e,i){this.dispatch("SORT_COLUMN_TOGGLE",{index:t,multi:e,compare:i})},e}(Ic),Ah=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype._process=function(t){var e={};return this.props.url&&(e.url=this.props.url(t.url,this.props.columns)),this.props.body&&(e.body=this.props.body(t.body,this.props.columns)),Ml({},t,e)},Ll(e,[{key:"type",get:function(){return kc.ServerSort}}]),e}(Ec),Sh=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).sortProcessor=void 0,n.actions=void 0,n.store=void 0,n.updateStateFn=void 0,n.updateSortProcessorFn=void 0,n.actions=new kh(n.config.dispatcher),n.store=new xh(n.config.dispatcher),e.enabled&&(n.sortProcessor=n.getOrCreateSortProcessor(),n.updateStateFn=n.updateState.bind($l(n)),n.store.on("updated",n.updateStateFn),n.state={direction:0}),n}Tl(e,t);var i=e.prototype;return i.componentWillUnmount=function(){this.config.pipeline.unregister(this.sortProcessor),this.store.off("updated",this.updateStateFn),this.updateSortProcessorFn&&this.store.off("updated",this.updateSortProcessorFn)},i.updateState=function(){var t=this,e=this.store.state.find((function(e){return e.index===t.props.index}));this.setState(e?{direction:e.direction}:{direction:0})},i.updateSortProcessor=function(t){this.sortProcessor.setProps({columns:t})},i.getOrCreateSortProcessor=function(){var t=kc.Sort;this.config.sort&&"object"==typeof this.config.sort.server&&(t=kc.ServerSort);var e,i=this.config.pipeline.getStepsByType(t);return i.length>0?e=i[0]:(this.updateSortProcessorFn=this.updateSortProcessor.bind(this),this.store.on("updated",this.updateSortProcessorFn),e=t===kc.ServerSort?new Ah(Ml({columns:this.store.state},this.config.sort.server)):new wh({columns:this.store.state}),this.config.pipeline.register(e)),e},i.changeDirection=function(t){t.preventDefault(),t.stopPropagation(),this.actions.sortToggle(this.props.index,!0===t.shiftKey&&this.config.sort.multiColumn,this.props.compare)},i.render=function(){if(!this.props.enabled)return null;var t=this.state.direction,e="neutral";return 1===t?e="asc":-1===t&&(e="desc"),Gl("button",{tabIndex:-1,"aria-label":this._("sort.sort"+(1===t?"Desc":"Asc")),title:this._("sort.sort"+(1===t?"Desc":"Asc")),className:Tc(Mc("sort"),Mc("sort",e),this.config.className.sort),onClick:this.changeDirection.bind(this)})},e}(_c),zh=function(t){function e(){for(var e,i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];return(e=t.call.apply(t,[this].concat(n))||this).moveFn=void 0,e.upFn=void 0,e}Tl(e,t);var i=e.prototype;return i.getPageX=function(t){return t instanceof MouseEvent?Math.floor(t.pageX):Math.floor(t.changedTouches[0].pageX)},i.start=function(t){var e,i,n,r,o;t.stopPropagation(),this.setState({offsetStart:parseInt(this.props.thRef.current.style.width,10)-this.getPageX(t)}),this.upFn=this.end.bind(this),this.moveFn=(e=this.move.bind(this),void 0===(i=10)&&(i=100),function(){var t=[].slice.call(arguments);n?(clearTimeout(r),r=setTimeout((function(){Date.now()-o>=i&&(e.apply(void 0,t),o=Date.now())}),Math.max(i-(Date.now()-o),0))):(e.apply(void 0,t),o=Date.now(),n=!0)}),document.addEventListener("mouseup",this.upFn),document.addEventListener("touchend",this.upFn),document.addEventListener("mousemove",this.moveFn),document.addEventListener("touchmove",this.moveFn)},i.move=function(t){t.stopPropagation();var e=this.props.thRef.current;this.state.offsetStart+this.getPageX(t)>=parseInt(e.style.minWidth,10)&&(e.style.width=this.state.offsetStart+this.getPageX(t)+"px")},i.end=function(t){t.stopPropagation(),document.removeEventListener("mouseup",this.upFn),document.removeEventListener("mousemove",this.moveFn),document.removeEventListener("touchmove",this.moveFn),document.removeEventListener("touchend",this.upFn)},i.render=function(){return Gl("div",{className:Tc(Mc("th"),Mc("resizable")),onMouseDown:this.start.bind(this),onTouchStart:this.start.bind(this),onClick:function(t){return t.stopPropagation()}})},e}(_c),Ch=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).sortRef={current:null},n.thRef={current:null},n.state={style:{}},n}Tl(e,t);var i=e.prototype;return i.isSortable=function(){return this.props.column.sort.enabled},i.isResizable=function(){return this.props.column.resizable},i.onClick=function(t){t.stopPropagation(),this.isSortable()&&this.sortRef.current.changeDirection(t)},i.keyDown=function(t){this.isSortable()&&13===t.which&&this.onClick(t)},i.componentDidMount=function(){var t=this;setTimeout((function(){if(t.props.column.fixedHeader&&t.thRef.current){var e=t.thRef.current.offsetTop;"number"==typeof e&&t.setState({style:{top:e}})}}),0)},i.content=function(){return void 0!==this.props.column.name?this.props.column.name:void 0!==this.props.column.plugin?Gl(Dc,{pluginId:this.props.column.plugin.id,props:{column:this.props.column}}):null},i.getCustomAttributes=function(){var t=this.props.column;return t?"function"==typeof t.attributes?t.attributes(null,null,this.props.column):t.attributes:{}},i.render=function(){var t={};return this.isSortable()&&(t.tabIndex=0),Gl("th",Ml({ref:this.thRef,"data-column-id":this.props.column&&this.props.column.id,className:Tc(Mc("th"),this.isSortable()?Mc("th","sort"):null,this.props.column.fixedHeader?Mc("th","fixed"):null,this.config.className.th),onClick:this.onClick.bind(this),style:Ml({},this.config.style.th,{minWidth:this.props.column.minWidth,width:this.props.column.width},this.state.style,this.props.style),onKeyDown:this.keyDown.bind(this),rowSpan:this.props.rowSpan>1?this.props.rowSpan:void 0,colSpan:this.props.colSpan>1?this.props.colSpan:void 0},this.getCustomAttributes(),t),Gl("div",{className:Mc("th","content")},this.content()),this.isSortable()&&Gl(Sh,Ml({ref:this.sortRef,index:this.props.index},this.props.column.sort)),this.isResizable()&&this.props.index<this.config.header.visibleColumns.length-1&&Gl(zh,{column:this.props.column,thRef:this.thRef}))},e}(_c),Eh=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.renderColumn=function(t,e,i,n){var r=function(t,e,i){var n=Kc.maximumDepth(t),r=i-e;return{rowSpan:Math.floor(r-n-n/r),colSpan:t.columns&&t.columns.length||1}}(t,e,n);return Gl(Ch,{column:t,index:i,colSpan:r.colSpan,rowSpan:r.rowSpan})},i.renderRow=function(t,e,i){var n=this,r=Kc.leafColumns(this.props.header.columns);return Gl(bh,null,t.map((function(t){return t.hidden?null:n.renderColumn(t,e,r.indexOf(t),i)})))},i.renderRows=function(){var t=this,e=Kc.tabularFormat(this.props.header.columns);return e.map((function(i,n){return t.renderRow(i,n,e.length)}))},i.render=function(){return this.props.header?Gl("thead",{key:this.props.header.id,className:Tc(Mc("thead"),this.config.className.thead)},this.renderRows()):null},e}(_c),Lh=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype.render=function(){return Gl("table",{role:"grid",className:Tc(Mc("table"),this.config.className.table),style:Ml({},this.config.style.table,{height:this.props.height})},Gl(Eh,{header:this.props.header}),Gl(_h,{data:this.props.data,status:this.props.status,header:this.props.header}))},e}(_c),Mh=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).headerRef={current:null},n.state={isActive:!0},n}Tl(e,t);var i=e.prototype;return i.componentDidMount=function(){0===this.headerRef.current.children.length&&this.setState({isActive:!1})},i.render=function(){return this.state.isActive?Gl("div",{ref:this.headerRef,className:Tc(Mc("head"),this.config.className.header),style:Ml({},this.config.style.header)},Gl(Dc,{position:Oc.Header})):null},e}(_c),Th=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).footerRef={current:null},n.state={isActive:!0},n}Tl(e,t);var i=e.prototype;return i.componentDidMount=function(){0===this.footerRef.current.children.length&&this.setState({isActive:!1})},i.render=function(){return this.state.isActive?Gl("div",{ref:this.footerRef,className:Tc(Mc("footer"),this.config.className.footer),style:Ml({},this.config.style.footer)},Gl(Dc,{position:Oc.Footer})):null},e}(_c),Oh=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).configContext=void 0,n.processPipelineFn=void 0,n.configContext=function(t,e){var i={__c:e="__cC"+jl++,__:null,Consumer:function(t,e){return t.children(e)},Provider:function(t){var i,n;return this.getChildContext||(i=[],(n={})[e]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&i.some(tc)},this.sub=function(t){i.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){i.splice(i.indexOf(t),1),e&&e.call(t)}}),t.children}};return i.Provider.__=i.Consumer.contextType=i}(),n.state={status:sh.Loading,header:e.header,data:null},n}Tl(e,t);var i=e.prototype;return i.processPipeline=function(){try{var t=this;t.props.config.eventEmitter.emit("beforeLoad"),t.setState({status:sh.Loading});var e=function(e,i){try{var n=Promise.resolve(t.props.pipeline.process()).then((function(e){t.setState({data:e,status:sh.Loaded}),t.props.config.eventEmitter.emit("load",e)}))}catch(t){return i(t)}return n&&n.then?n.then(void 0,i):n}(0,(function(e){Vc.error(e),t.setState({status:sh.Error,data:null})}));return Promise.resolve(e&&e.then?e.then((function(){})):void 0)}catch(t){return Promise.reject(t)}},i.componentDidMount=function(){try{var t=this,e=t.props.config;return Promise.resolve(t.processPipeline()).then((function(){e.header&&t.state.data&&t.state.data.length&&t.setState({header:e.header.adjustWidth(e)}),t.processPipelineFn=t.processPipeline.bind(t),t.props.pipeline.on("updated",t.processPipelineFn)}))}catch(t){return Promise.reject(t)}},i.componentWillUnmount=function(){this.props.pipeline.off("updated",this.processPipelineFn)},i.componentDidUpdate=function(t,e){e.status!=sh.Rendered&&this.state.status==sh.Loaded&&(this.setState({status:sh.Rendered}),this.props.config.eventEmitter.emit("ready"))},i.render=function(){return Gl(this.configContext.Provider,{value:this.props.config},Gl("div",{role:"complementary",className:Tc("gridjs",Mc("container"),this.state.status===sh.Loading?Mc("loading"):null,this.props.config.className.container),style:Ml({},this.props.config.style.container,{width:this.props.width})},this.state.status===sh.Loading&&Gl("div",{className:Mc("loading-bar")}),Gl(Mh,null),Gl("div",{className:Mc("wrapper"),style:{height:this.props.height}},Gl(Lh,{ref:this.props.config.tableRef,data:this.state.data,header:this.state.header,width:this.props.width,height:this.props.height,status:this.state.status})),Gl(Th,null),Gl("div",{ref:this.props.config.tempRef,id:"gridjs-temp",className:Mc("temp")})))},e}(_c),$h=function(t){function e(e){var i;return(i=t.call(this)||this).config=void 0,i.plugin=void 0,i.config=new uh({instance:$l(i),eventEmitter:$l(i)}).update(e),i.plugin=i.config.plugin,i}Tl(e,t);var i=e.prototype;return i.updateConfig=function(t){return this.config.update(t),this},i.createElement=function(){return Gl(Oh,{config:this.config,pipeline:this.config.pipeline,header:this.config.header,width:this.config.width,height:this.config.height})},i.forceRender=function(){return this.config&&this.config.container||Vc.error("Container is empty. Make sure you call render() before forceRender()",!0),this.config.pipeline.clearCache(),fc(null,this.config.container),fc(this.createElement(),this.config.container),this},i.render=function(t){return t||Vc.error("Container element cannot be null",!0),t.childNodes.length>0?(Vc.error("The container element "+t+" is not empty. Make sure the container is empty and call render() again"),this):(this.config.container=t,fc(this.createElement(),t),this)},e}(Cc),Hh=[],Ih=[],Rh=Pl.__b,Ph=Pl.__r,Vh=Pl.diffed,Fh=Pl.__c,Nh=Pl.unmount;function Dh(){for(var t;t=Hh.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Bh),t.__H.__h.forEach(qh),t.__H.__h=[]}catch(e){t.__H.__h=[],Pl.__e(e,t.__v)}}Pl.__b=function(t){gh=null,Rh&&Rh(t)},Pl.__r=function(t){Ph&&Ph(t);var e=(gh=t.__c).__H;e&&(fh===gh?(e.__h=[],gh.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=Ih,t.__N=t.i=void 0}))):(e.__h.forEach(Bh),e.__h.forEach(qh),e.__h=[])),fh=gh},Pl.diffed=function(t){Vh&&Vh(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==Hh.push(e)&&mh===Pl.requestAnimationFrame||((mh=Pl.requestAnimationFrame)||function(t){var e,i=function(){clearTimeout(n),jh&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(i,100);jh&&(e=requestAnimationFrame(i))})(Dh)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==Ih&&(t.__=t.__V),t.i=void 0,t.__V=Ih}))),fh=gh=null},Pl.__c=function(t,e){e.some((function(t){try{t.__h.forEach(Bh),t.__h=t.__h.filter((function(t){return!t.__||qh(t)}))}catch(i){e.some((function(t){t.__h&&(t.__h=[])})),e=[],Pl.__e(i,t.__v)}})),Fh&&Fh(t,e)},Pl.unmount=function(t){Nh&&Nh(t);var e,i=t.__c;i&&i.__H&&(i.__H.__.forEach((function(t){try{Bh(t)}catch(t){e=t}})),e&&Pl.__e(e,i.__v))};var jh="function"==typeof requestAnimationFrame;function Bh(t){var e=gh,i=t.__c;"function"==typeof i&&(t.__c=void 0,i()),gh=e}function qh(t){var e=gh;t.__c=t.__(),gh=e}class Uh extends H{static get properties(){return Object.assign({label:{type:String},property:{type:String},sort:{type:Boolean},width:{type:String}},super.properties)}constructor(){super(),this.label="no-label",this.property=null,this.sort=!1,this.width=null}connectedCallback(){super.connectedCallback()}data(){const t={name:xc(`<pb-i18n key="${this.label}">${this.label}</pb-i18n>`),sort:{enabled:this.sort},formatter:t=>xc(t)};return this.property&&(t.id=this.property),this.width&&(t.width=this.width),t}}customElements.define("pb-table-column",Uh);class Wh extends(x(R(H))){static get properties(){return Object.assign({source:{type:String},cssPath:{type:String,attribute:"css-path"},resizable:{type:Boolean},subforms:{type:String},perPage:{type:Number,attribute:"per-page"},height:{type:String},search:{type:Boolean},paginationTop:{type:Boolean,attribute:"pagination-top"},visibleColumns:{type:Array,attribute:"visible-columns"},_params:{type:Object}},super.properties)}constructor(){super(),this.cssPath="../css/gridjs",this._params={},this.resizable=!1,this.search=!1,this.paginationTop=!1,this.perPage=10,this.height=null,this.fixedHeader=!1,this.visibleColumns=null,this._pbColumns=[],this._columns=[],this._selectedRow=null,this._onTableClick=this._onTableClick.bind(this),this._onDocumentClick=this._onDocumentClick.bind(this)}async connectedCallback(){if(super.connectedCallback(),document.addEventListener("click",this._onDocumentClick),this.subscribeTo("pb-search-resubmit",t=>{this._submit()}),xn.subscribe(this,t=>{this._params=t,this._submit()}),this.subscribeTo("pb-i18n-update",t=>{const e=this.language&&this.language!==t.detail.language;this.language=t.detail.language,e&&this._submit()},[]),!this.height){const t=getComputedStyle(this).getPropertyValue("--pb-table-grid-height");this.height=t||"auto"}const t=await A([O(this.cssPath)+"/mermaid.min.css"]),e=[...this.shadowRoot.adoptedStyleSheets,t],i=E(this);i&&e.push(i),this.shadowRoot.adoptedStyleSheets=e}disconnectedCallback(){document.removeEventListener("click",this._onDocumentClick),super.disconnectedCallback()}firstUpdated(){const t=this.shadowRoot.getElementById("table");t.addEventListener("click",this._onTableClick),this._pbColumns=Array.from(this.querySelectorAll("pb-table-column")),this._columns=this._getColumnsConfig(),V("pb-page-ready",e=>{e&&e.language&&(this.language=e.language),this._params=xn.state;const i=this.toAbsoluteURL(this.source),n={height:this.height,fixedHeader:!0,columns:this._columns,resizable:this.resizable,server:{url:i,then:t=>t.results,total:t=>t.count},sort:{multiColumn:!1,enabled:!0,server:{url:(t,e)=>{if(!e.length)return t;const i=e[0];return`${t}${t.indexOf("?")>-1?"&":"?"}order=${this._columns[i.index].id}&dir=${1===i.direction?"asc":"desc"}`}}},pagination:{enabled:!0,limit:this.perPage,server:{url:(t,e,i)=>{const n=this.shadowRoot.getElementById("form");n&&Object.assign(this._params,n.serializeForm()),this._params=this._paramsFromSubforms(this._params),this._params.limit=i,this._params.start=e*i+1,this.language&&(this._params.language=this.language),xn.commit(this,this._params);const r=Object.assign({},this._params);return Object.keys(r).forEach(t=>{null===r[t]&&delete r[t]}),`${t}${t.indexOf("?")>-1?"&":"?"}${new URLSearchParams(r).toString()}`}}}};this.grid=new $h(n),this.paginationTop&&(this.grid.plugin.get("pagination").position=Oc.Header),this.grid.on("load",()=>{this._clearRowSelection(),this.emitTo("pb-results-received",{params:this._params}),this._applyColumnVisibilityToDom()}),this.grid.render(t)})}updated(t){t.has("visibleColumns")&&this.grid&&(this._columns=this._getColumnsConfig(),this._applyColumnVisibilityToDom())}_visibleColumnsAsSet(){return Array.isArray(this.visibleColumns)?new Set(this.visibleColumns):null}_columnId(t,e){return e.id||t.property||t.label}_getColumnsConfig(){const t=this._visibleColumnsAsSet();return this._pbColumns.map(e=>{const i=e.data(),n=this._columnId(e,i);return t?Object.assign(Object.assign({},i),{},{hidden:!t.has(n)}):i})}_applyColumnVisibilityToDom(){const t=this._visibleColumnsAsSet(),e=this.shadowRoot.querySelector(".gridjs-table");e&&this._columns.forEach((i,n)=>{var r,o;const s=i.id||(null===(r=this._pbColumns[n])||void 0===r?void 0:r.property)||(null===(o=this._pbColumns[n])||void 0===o?void 0:o.label),a=!!t&&!t.has(s);e.querySelectorAll(`th:nth-child(${n+1}), td:nth-child(${n+1})`).forEach(t=>{t.style.display=a?"none":""})})}_onTableClick(t){const e=t.target.closest("tbody tr");e&&this._toggleRowSelection(e)}_onDocumentClick(t){t.composedPath().includes(this)||this._clearRowSelection()}_toggleRowSelection(t){this._selectedRow!==t?(this._clearRowSelection(),this._selectedRow=t,this._selectedRow.classList.add("grid-row-selected")):this._clearRowSelection()}_clearRowSelection(){this._selectedRow&&(this._selectedRow.classList.remove("grid-row-selected"),this._selectedRow=null)}_submit(){this.grid.forceRender()}_paramsFromSubforms(t){return this.subforms&&document.querySelectorAll(this.subforms).forEach(e=>{e.serializeForm&&Object.assign(t,e.serializeForm())}),t}render(){return M`
|
|
3834
|
+
`}}function El(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ll(t,e,i){return e&&El(t.prototype,e),i&&El(t,i),t}function Ml(){return(Ml=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function Tl(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Ol(t,e)}function Ol(t,e){return(Ol=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hl(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function Il(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Hl(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Hl(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}customElements.define("pb-blacklab-highlight",Cl);var Rl,Pl,Vl,Fl,Nl,Dl,jl,Bl={},ql=[],Ul=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Wl(t,e){for(var i in e)t[i]=e[i];return t}function Yl(t){var e=t.parentNode;e&&e.removeChild(t)}function Gl(t,e,i){var n,r,o,s={};for(o in e)"key"==o?n=e[o]:"ref"==o?r=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?Rl.call(arguments,2):i),"function"==typeof t&&null!=t.defaultProps)for(o in t.defaultProps)void 0===s[o]&&(s[o]=t.defaultProps[o]);return Zl(t,s,n,r,null)}function Zl(t,e,i,n,r){var o={type:t,props:e,key:i,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++Vl:r};return null==r&&null!=Pl.vnode&&Pl.vnode(o),o}function Kl(t){return t.children}function Ql(t,e){this.props=t,this.context=e}function Jl(t,e){if(null==e)return t.__?Jl(t.__,t.__.__k.indexOf(t)+1):null;for(var i;e<t.__k.length;e++)if(null!=(i=t.__k[e])&&null!=i.__e)return i.__e;return"function"==typeof t.type?Jl(t):null}function Xl(t){var e,i;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(i=t.__k[e])&&null!=i.__e){t.__e=t.__c.base=i.__e;break}return Xl(t)}}function tc(t){(!t.__d&&(t.__d=!0)&&Nl.push(t)&&!ec.__r++||Dl!==Pl.debounceRendering)&&((Dl=Pl.debounceRendering)||setTimeout)(ec)}function ec(){for(var t;ec.__r=Nl.length;)t=Nl.sort((function(t,e){return t.__v.__b-e.__v.__b})),Nl=[],t.some((function(t){var e,i,n,r,o,s;t.__d&&(o=(r=(e=t).__v).__e,(s=e.__P)&&(i=[],(n=Wl({},r)).__v=r.__v+1,cc(s,r,n,e.__n,void 0!==s.ownerSVGElement,null!=r.__h?[o]:null,i,null==o?Jl(r):o,r.__h),hc(i,r),r.__e!=o&&Xl(r)))}))}function ic(t,e,i,n,r,o,s,a,l,c){var h,d,p,u,g,f,m,v=n&&n.__k||ql,b=v.length;for(i.__k=[],h=0;h<e.length;h++)if(null!=(u=i.__k[h]=null==(u=e[h])||"boolean"==typeof u?null:"string"==typeof u||"number"==typeof u||"bigint"==typeof u?Zl(null,u,null,null,u):Array.isArray(u)?Zl(Kl,{children:u},null,null,null):u.__b>0?Zl(u.type,u.props,u.key,null,u.__v):u)){if(u.__=i,u.__b=i.__b+1,null===(p=v[h])||p&&u.key==p.key&&u.type===p.type)v[h]=void 0;else for(d=0;d<b;d++){if((p=v[d])&&u.key==p.key&&u.type===p.type){v[d]=void 0;break}p=null}cc(t,u,p=p||Bl,r,o,s,a,l,c),g=u.__e,(d=u.ref)&&p.ref!=d&&(m||(m=[]),p.ref&&m.push(p.ref,null,u),m.push(d,u.__c||g,u)),null!=g?(null==f&&(f=g),"function"==typeof u.type&&u.__k===p.__k?u.__d=l=nc(u,l,t):l=rc(t,u,p,v,g,l),"function"==typeof i.type&&(i.__d=l)):l&&p.__e==l&&l.parentNode!=t&&(l=Jl(p))}for(i.__e=f,h=b;h--;)null!=v[h]&&("function"==typeof i.type&&null!=v[h].__e&&v[h].__e==i.__d&&(i.__d=Jl(n,h+1)),uc(v[h],v[h]));if(m)for(h=0;h<m.length;h++)pc(m[h],m[++h],m[++h])}function nc(t,e,i){for(var n,r=t.__k,o=0;r&&o<r.length;o++)(n=r[o])&&(n.__=t,e="function"==typeof n.type?nc(n,e,i):rc(i,n,n,r,n.__e,e));return e}function rc(t,e,i,n,r,o){var s,a,l;if(void 0!==e.__d)s=e.__d,e.__d=void 0;else if(null==i||r!=o||null==r.parentNode)t:if(null==o||o.parentNode!==t)t.appendChild(r),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<n.length;l+=2)if(a==r)break t;t.insertBefore(r,o),s=o}return void 0!==s?s:r.nextSibling}function oc(t,e,i){"-"===e[0]?t.setProperty(e,i):t[e]=null==i?"":"number"!=typeof i||Ul.test(e)?i:i+"px"}function sc(t,e,i,n,r){var o;t:if("style"===e)if("string"==typeof i)t.style.cssText=i;else{if("string"==typeof n&&(t.style.cssText=n=""),n)for(e in n)i&&e in i||oc(t.style,e,"");if(i)for(e in i)n&&i[e]===n[e]||oc(t.style,e,i[e])}else if("o"===e[0]&&"n"===e[1])o=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=i,i?n||t.addEventListener(e,o?lc:ac,o):t.removeEventListener(e,o?lc:ac,o);else if("dangerouslySetInnerHTML"!==e){if(r)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==i?"":i;break t}catch(t){}"function"==typeof i||(null!=i&&(!1!==i||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,i):t.removeAttribute(e))}}function ac(t){this.l[t.type+!1](Pl.event?Pl.event(t):t)}function lc(t){this.l[t.type+!0](Pl.event?Pl.event(t):t)}function cc(t,e,i,n,r,o,s,a,l){var c,h,d,p,u,g,f,m,v,b,y,_,w,x=e.type;if(void 0!==e.constructor)return null;null!=i.__h&&(l=i.__h,a=e.__e=i.__e,e.__h=null,o=[a]),(c=Pl.__b)&&c(e);try{t:if("function"==typeof x){if(m=e.props,v=(c=x.contextType)&&n[c.__c],b=c?v?v.props.value:c.__:n,i.__c?f=(h=e.__c=i.__c).__=h.__E:("prototype"in x&&x.prototype.render?e.__c=h=new x(m,b):(e.__c=h=new Ql(m,b),h.constructor=x,h.render=gc),v&&v.sub(h),h.props=m,h.state||(h.state={}),h.context=b,h.__n=n,d=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=x.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=Wl({},h.__s)),Wl(h.__s,x.getDerivedStateFromProps(m,h.__s))),p=h.props,u=h.state,d)null==x.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==x.getDerivedStateFromProps&&m!==p&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,b),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,b)||e.__v===i.__v){h.props=m,h.state=h.__s,e.__v!==i.__v&&(h.__d=!1),h.__v=e,e.__e=i.__e,e.__k=i.__k,e.__k.forEach((function(t){t&&(t.__=e)})),h.__h.length&&s.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,b),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(p,u,g)}))}if(h.context=b,h.props=m,h.__v=e,h.__P=t,y=Pl.__r,_=0,"prototype"in x&&x.prototype.render)h.state=h.__s,h.__d=!1,y&&y(e),c=h.render(h.props,h.state,h.context);else do{h.__d=!1,y&&y(e),c=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++_<25);h.state=h.__s,null!=h.getChildContext&&(n=Wl(Wl({},n),h.getChildContext())),d||null==h.getSnapshotBeforeUpdate||(g=h.getSnapshotBeforeUpdate(p,u)),w=null!=c&&c.type===Kl&&null==c.key?c.props.children:c,ic(t,Array.isArray(w)?w:[w],e,i,n,r,o,s,a,l),h.base=e.__e,e.__h=null,h.__h.length&&s.push(h),f&&(h.__E=h.__=null),h.__e=!1}else null==o&&e.__v===i.__v?(e.__k=i.__k,e.__e=i.__e):e.__e=dc(i.__e,e,i,n,r,o,s,l);(c=Pl.diffed)&&c(e)}catch(t){e.__v=null,(l||null!=o)&&(e.__e=a,e.__h=!!l,o[o.indexOf(a)]=null),Pl.__e(t,e,i)}}function hc(t,e){Pl.__c&&Pl.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){Pl.__e(t,e.__v)}}))}function dc(t,e,i,n,r,o,s,a){var l,c,h,d=i.props,p=e.props,u=e.type,g=0;if("svg"===u&&(r=!0),null!=o)for(;g<o.length;g++)if((l=o[g])&&"setAttribute"in l==!!u&&(u?l.localName===u:3===l.nodeType)){t=l,o[g]=null;break}if(null==t){if(null===u)return document.createTextNode(p);t=r?document.createElementNS("http://www.w3.org/2000/svg",u):document.createElement(u,p.is&&p),o=null,a=!1}if(null===u)d===p||a&&t.data===p||(t.data=p);else{if(o=o&&Rl.call(t.childNodes),c=(d=i.props||Bl).dangerouslySetInnerHTML,h=p.dangerouslySetInnerHTML,!a){if(null!=o)for(d={},g=0;g<t.attributes.length;g++)d[t.attributes[g].name]=t.attributes[g].value;(h||c)&&(h&&(c&&h.__html==c.__html||h.__html===t.innerHTML)||(t.innerHTML=h&&h.__html||""))}if(function(t,e,i,n,r){var o;for(o in i)"children"===o||"key"===o||o in e||sc(t,o,null,i[o],n);for(o in e)r&&"function"!=typeof e[o]||"children"===o||"key"===o||"value"===o||"checked"===o||i[o]===e[o]||sc(t,o,e[o],i[o],n)}(t,p,d,r,a),h)e.__k=[];else if(g=e.props.children,ic(t,Array.isArray(g)?g:[g],e,i,n,r&&"foreignObject"!==u,o,s,o?o[0]:i.__k&&Jl(i,0),a),null!=o)for(g=o.length;g--;)null!=o[g]&&Yl(o[g]);a||("value"in p&&void 0!==(g=p.value)&&(g!==t.value||"progress"===u&&!g||"option"===u&&g!==d.value)&&sc(t,"value",g,d.value,!1),"checked"in p&&void 0!==(g=p.checked)&&g!==t.checked&&sc(t,"checked",g,d.checked,!1))}return t}function pc(t,e,i){try{"function"==typeof t?t(e):t.current=e}catch(t){Pl.__e(t,i)}}function uc(t,e,i){var n,r;if(Pl.unmount&&Pl.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||pc(n,null,e)),null!=(n=t.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(t){Pl.__e(t,e)}n.base=n.__P=null}if(n=t.__k)for(r=0;r<n.length;r++)n[r]&&uc(n[r],e,"function"!=typeof t.type);i||null==t.__e||Yl(t.__e),t.__e=t.__d=void 0}function gc(t,e,i){return this.constructor(t,i)}function fc(t,e,i){var n,r,o;Pl.__&&Pl.__(t,e),r=(n="function"==typeof i)?null:i&&i.__k||e.__k,o=[],cc(e,t=(!n&&i||e).__k=Gl(Kl,null,[t]),r||Bl,Bl,void 0!==e.ownerSVGElement,!n&&i?[i]:r?null:e.firstChild?Rl.call(e.childNodes):null,o,!n&&i?i:r?r.__e:e.firstChild,n),hc(o,t)}function mc(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}Rl=ql.slice,Pl={__e:function(t,e,i,n){for(var r,o,s;e=e.__;)if((r=e.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(t)),s=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t,n||{}),s=r.__d),s)return r.__E=r}catch(e){t=e}throw t}},Vl=0,Fl=function(t){return null!=t&&void 0===t.constructor},Ql.prototype.setState=function(t,e){var i;i=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Wl({},this.state),"function"==typeof t&&(t=t(Wl({},i),this.props)),t&&Wl(i,t),null!=t&&this.__v&&(e&&this.__h.push(e),tc(this))},Ql.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),tc(this))},Ql.prototype.render=Kl,Nl=[],ec.__r=0,jl=0;var vc=function(){function t(t){this._id=void 0,this._id=t||mc()}return Ll(t,[{key:"id",get:function(){return this._id}}]),t}(),bc={search:{placeholder:"Type a keyword..."},sort:{sortAsc:"Sort column ascending",sortDesc:"Sort column descending"},pagination:{previous:"Previous",next:"Next",navigate:function(t,e){return"Page "+t+" of "+e},page:function(t){return"Page "+t},showing:"Showing",of:"of",to:"to",results:"results"},loading:"Loading...",noRecordsFound:"No matching records found",error:"An error happened while fetching the data"},yc=function(){function t(t){this._language=void 0,this._defaultLanguage=void 0,this._language=t,this._defaultLanguage=bc}var e=t.prototype;return e.getString=function(t,e){if(!e||!t)return null;var i=t.split("."),n=i[0];if(e[n]){var r=e[n];return"string"==typeof r?function(){return r}:"function"==typeof r?r:this.getString(i.slice(1).join("."),r)}return null},e.translate=function(t){var e;return(e=this.getString(t,this._language)||this.getString(t,this._defaultLanguage))?e.apply(void 0,[].slice.call(arguments,1)):t},t}(),_c=function(t){function e(e,i){var n,r;return(n=t.call(this,e,i)||this).config=void 0,n._=void 0,n.config=function(t){if(!t)return null;var e=Object.keys(t);return e.length?t[e[0]].props.value:null}(i),n.config&&(n._=(r=n.config.translator,function(t){return r.translate.apply(r,[t].concat([].slice.call(arguments,1)))})),n}return Tl(e,t),e}(Ql),wc=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype.render=function(){return Gl(this.props.parentElement,{dangerouslySetInnerHTML:{__html:this.props.content}})},e}(_c);function xc(t,e){return Gl(wc,{content:t,parentElement:e})}wc.defaultProps={parentElement:"span"};var kc,Ac=function(t){function e(e){var i;return(i=t.call(this)||this).data=void 0,i.update(e),i}Tl(e,t);var i=e.prototype;return i.cast=function(t){return t instanceof HTMLElement?xc(t.outerHTML):t},i.update=function(t){return this.data=this.cast(t),this},e}(vc),Sc=function(t){function e(e){var i;return(i=t.call(this)||this)._cells=void 0,i.cells=e||[],i}Tl(e,t);var i=e.prototype;return i.cell=function(t){return this._cells[t]},i.toArray=function(){return this.cells.map((function(t){return t.data}))},e.fromCells=function(t){return new e(t.map((function(t){return new Ac(t.data)})))},Ll(e,[{key:"cells",get:function(){return this._cells},set:function(t){this._cells=t}},{key:"length",get:function(){return this.cells.length}}]),e}(vc),zc=function(t){function e(e){var i;return(i=t.call(this)||this)._rows=void 0,i._length=void 0,i.rows=e instanceof Array?e:e instanceof Sc?[e]:[],i}return Tl(e,t),e.prototype.toArray=function(){return this.rows.map((function(t){return t.toArray()}))},e.fromRows=function(t){return new e(t.map((function(t){return Sc.fromCells(t.cells)})))},e.fromArray=function(t){return new e((t=function(t){return!t[0]||t[0]instanceof Array?t:[t]}(t)).map((function(t){return new Sc(t.map((function(t){return new Ac(t)})))})))},Ll(e,[{key:"rows",get:function(){return this._rows},set:function(t){this._rows=t}},{key:"length",get:function(){return this._length||this.rows.length},set:function(t){this._length=t}}]),e}(vc),Cc=function(){function t(){this.callbacks=void 0}var e=t.prototype;return e.init=function(t){this.callbacks||(this.callbacks={}),t&&!this.callbacks[t]&&(this.callbacks[t]=[])},e.on=function(t,e){return this.init(t),this.callbacks[t].push(e),this},e.off=function(t,e){var i=t;return this.init(),this.callbacks[i]&&0!==this.callbacks[i].length?(this.callbacks[i]=this.callbacks[i].filter((function(t){return t!=e})),this):this},e.emit=function(t){var e=arguments,i=t;return this.init(i),this.callbacks[i].length>0&&(this.callbacks[i].forEach((function(t){return t.apply(void 0,[].slice.call(e,1))})),!0)},t}();!function(t){t[t.Initiator=0]="Initiator",t[t.ServerFilter=1]="ServerFilter",t[t.ServerSort=2]="ServerSort",t[t.ServerLimit=3]="ServerLimit",t[t.Extractor=4]="Extractor",t[t.Transformer=5]="Transformer",t[t.Filter=6]="Filter",t[t.Sort=7]="Sort",t[t.Limit=8]="Limit"}(kc||(kc={}));var Ec=function(t){function e(e){var i;return(i=t.call(this)||this).id=void 0,i._props=void 0,i._props={},i.id=mc(),e&&i.setProps(e),i}Tl(e,t);var i=e.prototype;return i.process=function(){var t=[].slice.call(arguments);this.validateProps instanceof Function&&this.validateProps.apply(this,t),this.emit.apply(this,["beforeProcess"].concat(t));var e=this._process.apply(this,t);return this.emit.apply(this,["afterProcess"].concat(t)),e},i.setProps=function(t){return Object.assign(this._props,t),this.emit("propsUpdated",this),this},Ll(e,[{key:"props",get:function(){return this._props}}]),e}(Cc),Lc=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype._process=function(t){return this.props.keyword?(e=String(this.props.keyword).trim(),i=this.props.columns,n=this.props.ignoreHiddenColumns,r=t,o=this.props.selector,e=e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),new zc(r.rows.filter((function(t,r){return t.cells.some((function(t,s){if(!t)return!1;if(n&&i&&i[s]&&"object"==typeof i[s]&&i[s].hidden)return!1;var a="";if("function"==typeof o)a=o(t.data,r,s);else if("object"==typeof t.data){var l=t.data;l&&l.props&&l.props.content&&(a=l.props.content)}else a=String(t.data);return new RegExp(e,"gi").test(a)}))})))):t;var e,i,n,r,o},Ll(e,[{key:"type",get:function(){return kc.Filter}}]),e}(Ec);function Mc(){return""+"gridjs"+[].slice.call(arguments).reduce((function(t,e){return t+"-"+e}),"")}function Tc(){return[].slice.call(arguments).filter((function(t){return t})).reduce((function(t,e){return(t||"")+" "+e}),"").trim()||null}var Oc,$c=function(t){function e(e){var i;return(i=t.call(this)||this)._state=void 0,i.dispatcher=void 0,i.dispatcher=e,i._state=i.getInitialState(),e.register(i._handle.bind($l(i))),i}Tl(e,t);var i=e.prototype;return i._handle=function(t){this.handle(t.type,t.payload)},i.setState=function(t){var e=this._state;this._state=t,this.emit("updated",t,e)},Ll(e,[{key:"state",get:function(){return this._state}}]),e}(Cc),Hc=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.getInitialState=function(){return{keyword:null}},i.handle=function(t,e){"SEARCH_KEYWORD"===t&&this.search(e.keyword)},i.search=function(t){this.setState({keyword:t})},e}($c),Ic=function(){function t(t){this.dispatcher=void 0,this.dispatcher=t}return t.prototype.dispatch=function(t,e){this.dispatcher.dispatch({type:t,payload:e})},t}(),Rc=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype.search=function(t){this.dispatch("SEARCH_KEYWORD",{keyword:t})},e}(Ic),Pc=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype._process=function(t){if(!this.props.keyword)return t;var e={};return this.props.url&&(e.url=this.props.url(t.url,this.props.keyword)),this.props.body&&(e.body=this.props.body(t.body,this.props.keyword)),Ml({},t,e)},Ll(e,[{key:"type",get:function(){return kc.ServerFilter}}]),e}(Ec),Vc=new(function(){function t(){}var e=t.prototype;return e.format=function(t,e){return"[Grid.js] ["+e.toUpperCase()+"]: "+t},e.error=function(t,e){void 0===e&&(e=!1);var i=this.format(t,"error");if(e)throw Error(i);console.error(i)},e.warn=function(t){console.warn(this.format(t,"warn"))},e.info=function(t){console.info(this.format(t,"info"))},t}()),Fc=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e}(_c);!function(t){t[t.Header=0]="Header",t[t.Footer=1]="Footer",t[t.Cell=2]="Cell"}(Oc||(Oc={}));var Nc=function(){function t(){this.plugins=void 0,this.plugins=[]}var e=t.prototype;return e.get=function(t){var e=this.plugins.filter((function(e){return e.id===t}));return e.length>0?e[0]:null},e.add=function(t){return t.id?null!==this.get(t.id)?(Vc.error("Duplicate plugin ID: "+t.id),this):(this.plugins.push(t),this):(Vc.error("Plugin ID cannot be empty"),this)},e.remove=function(t){return this.plugins.splice(this.plugins.indexOf(this.get(t)),1),this},e.list=function(t){return(null!=t||null!=t?this.plugins.filter((function(e){return e.position===t})):this.plugins).sort((function(t,e){return t.order-e.order}))},t}(),Dc=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype.render=function(){var t=this;if(this.props.pluginId){var e=this.config.plugin.get(this.props.pluginId);return e?Gl(Kl,{},Gl(e.component,Ml({plugin:e},e.props,this.props.props))):null}return void 0!==this.props.position?Gl(Kl,{},this.config.plugin.list(this.props.position).map((function(e){return Gl(e.component,Ml({plugin:e},e.props,t.props.props))}))):null},e}(_c),jc=function(t){function e(e,i){var n;(n=t.call(this,e,i)||this).searchProcessor=void 0,n.actions=void 0,n.store=void 0,n.storeUpdatedFn=void 0,n.actions=new Rc(n.config.dispatcher),n.store=new Hc(n.config.dispatcher);var r,o=e.keyword;return e.enabled&&(o&&n.actions.search(o),n.storeUpdatedFn=n.storeUpdated.bind($l(n)),n.store.on("updated",n.storeUpdatedFn),r=e.server?new Pc({keyword:e.keyword,url:e.server.url,body:e.server.body}):new Lc({keyword:e.keyword,columns:n.config.header&&n.config.header.columns,ignoreHiddenColumns:e.ignoreHiddenColumns||void 0===e.ignoreHiddenColumns,selector:e.selector}),n.searchProcessor=r,n.config.pipeline.register(r)),n}Tl(e,t);var i=e.prototype;return i.componentWillUnmount=function(){this.config.pipeline.unregister(this.searchProcessor),this.store.off("updated",this.storeUpdatedFn)},i.storeUpdated=function(t){this.searchProcessor.setProps({keyword:t.keyword})},i.onChange=function(t){this.actions.search(t.target.value)},i.render=function(){if(!this.props.enabled)return null;var t,e,i,n=this.onChange.bind(this);return this.searchProcessor instanceof Pc&&(t=n,e=this.props.debounceTimeout,n=function(){var n=arguments;return new Promise((function(r){i&&clearTimeout(i),i=setTimeout((function(){return r(t.apply(void 0,[].slice.call(n)))}),e)}))}),Gl("div",{className:Mc(Tc("search",this.config.className.search))},Gl("input",{type:"search",placeholder:this._("search.placeholder"),"aria-label":this._("search.placeholder"),onInput:n,className:Tc(Mc("input"),Mc("search","input")),value:this.store.state.keyword}))},e}(Fc);jc.defaultProps={debounceTimeout:250};var Bc=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.validateProps=function(){if(isNaN(Number(this.props.limit))||isNaN(Number(this.props.page)))throw Error("Invalid parameters passed")},i._process=function(t){var e=this.props.page;return new zc(t.rows.slice(e*this.props.limit,(e+1)*this.props.limit))},Ll(e,[{key:"type",get:function(){return kc.Limit}}]),e}(Ec),qc=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype._process=function(t){var e={};return this.props.url&&(e.url=this.props.url(t.url,this.props.page,this.props.limit)),this.props.body&&(e.body=this.props.body(t.body,this.props.page,this.props.limit)),Ml({},t,e)},Ll(e,[{key:"type",get:function(){return kc.ServerLimit}}]),e}(Ec),Uc=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).processor=void 0,n.onUpdateFn=void 0,n.setTotalFromTabularFn=void 0,n.state={limit:e.limit,page:e.page||0,total:0},n}Tl(e,t);var i=e.prototype;return i.componentWillMount=function(){var t,e=this;this.props.enabled&&(this.setTotalFromTabularFn=this.setTotalFromTabular.bind(this),this.props.server?(t=new qc({limit:this.state.limit,page:this.state.page,url:this.props.server.url,body:this.props.server.body}),this.config.pipeline.on("afterProcess",this.setTotalFromTabularFn)):(t=new Bc({limit:this.state.limit,page:this.state.page})).on("beforeProcess",this.setTotalFromTabularFn),this.processor=t,this.config.pipeline.register(t),this.config.pipeline.on("error",(function(){e.setState({total:0,page:0})})))},i.setTotalFromTabular=function(t){this.setTotal(t.length)},i.onUpdate=function(t){this.props.resetPageOnUpdate&&t!==this.processor&&this.setPage(0)},i.componentDidMount=function(){this.onUpdateFn=this.onUpdate.bind(this),this.config.pipeline.on("updated",this.onUpdateFn)},i.componentWillUnmount=function(){this.config.pipeline.unregister(this.processor),this.config.pipeline.off("updated",this.onUpdateFn)},i.setPage=function(t){if(t>=this.pages||t<0||t===this.state.page)return null;this.setState({page:t}),this.processor.setProps({page:t})},i.setTotal=function(t){this.setState({total:t})},i.renderPages=function(){var t=this;if(this.props.buttonsCount<=0)return null;var e=Math.min(this.pages,this.props.buttonsCount),i=Math.min(this.state.page,Math.floor(e/2));return this.state.page+Math.floor(e/2)>=this.pages&&(i=e-(this.pages-this.state.page)),Gl(Kl,null,this.pages>e&&this.state.page-i>0&&Gl(Kl,null,Gl("button",{tabIndex:0,role:"button",onClick:this.setPage.bind(this,0),title:this._("pagination.firstPage"),"aria-label":this._("pagination.firstPage"),className:this.config.className.paginationButton},this._("1")),Gl("button",{tabIndex:-1,className:Tc(Mc("spread"),this.config.className.paginationButton)},"...")),Array.from(Array(e).keys()).map((function(e){return t.state.page+(e-i)})).map((function(e){return Gl("button",{tabIndex:0,role:"button",onClick:t.setPage.bind(t,e),className:Tc(t.state.page===e?Tc(Mc("currentPage"),t.config.className.paginationButtonCurrent):null,t.config.className.paginationButton),title:t._("pagination.page",e+1),"aria-label":t._("pagination.page",e+1)},t._(""+(e+1)))})),this.pages>e&&this.pages>this.state.page+i+1&&Gl(Kl,null,Gl("button",{tabIndex:-1,className:Tc(Mc("spread"),this.config.className.paginationButton)},"..."),Gl("button",{tabIndex:0,role:"button",onClick:this.setPage.bind(this,this.pages-1),title:this._("pagination.page",this.pages),"aria-label":this._("pagination.page",this.pages),className:this.config.className.paginationButton},this._(""+this.pages))))},i.renderSummary=function(){return Gl(Kl,null,this.props.summary&&this.state.total>0&&Gl("div",{role:"status","aria-live":"polite",className:Tc(Mc("summary"),this.config.className.paginationSummary),title:this._("pagination.navigate",this.state.page+1,this.pages)},this._("pagination.showing")," ",Gl("b",null,this._(""+(this.state.page*this.state.limit+1)))," ",this._("pagination.to")," ",Gl("b",null,this._(""+Math.min((this.state.page+1)*this.state.limit,this.state.total)))," ",this._("pagination.of")," ",Gl("b",null,this._(""+this.state.total))," ",this._("pagination.results")))},i.render=function(){return this.props.enabled?Gl("div",{className:Tc(Mc("pagination"),this.config.className.pagination)},this.renderSummary(),Gl("div",{className:Mc("pages")},this.props.prevButton&&Gl("button",{tabIndex:0,role:"button",disabled:0===this.state.page,onClick:this.setPage.bind(this,this.state.page-1),title:this._("pagination.previous"),"aria-label":this._("pagination.previous"),className:Tc(this.config.className.paginationButton,this.config.className.paginationButtonPrev)},this._("pagination.previous")),this.renderPages(),this.props.nextButton&&Gl("button",{tabIndex:0,role:"button",disabled:this.pages===this.state.page+1||0===this.pages,onClick:this.setPage.bind(this,this.state.page+1),title:this._("pagination.next"),"aria-label":this._("pagination.next"),className:Tc(this.config.className.paginationButton,this.config.className.paginationButtonNext)},this._("pagination.next")))):null},Ll(e,[{key:"pages",get:function(){return Math.ceil(this.state.total/this.state.limit)}}]),e}(Fc);function Wc(t,e){return"string"==typeof t?t.indexOf("%")>-1?e/100*parseInt(t,10):parseInt(t,10):t}function Yc(t){return t?Math.floor(t)+"px":""}Uc.defaultProps={summary:!0,nextButton:!0,prevButton:!0,buttonsCount:3,limit:10,resetPageOnUpdate:!0};var Gc=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).tableElement=void 0,n.tableClassName=void 0,n.tableStyle=void 0,n.tableElement=n.props.tableRef.current.base.cloneNode(!0),n.tableElement.style.position="absolute",n.tableElement.style.width="100%",n.tableElement.style.zIndex="-2147483640",n.tableElement.style.visibility="hidden",n.tableClassName=n.tableElement.className,n.tableStyle=n.tableElement.style.cssText,n}Tl(e,t);var i=e.prototype;return i.widths=function(){this.tableElement.className=this.tableClassName+" "+Mc("shadowTable"),this.tableElement.style.tableLayout="auto",this.tableElement.style.width="auto",this.tableElement.style.padding="0",this.tableElement.style.margin="0",this.tableElement.style.border="none",this.tableElement.style.outline="none";var t=Array.from(this.base.parentNode.querySelectorAll("thead th")).reduce((function(t,e){var i;return e.style.width=e.clientWidth+"px",Ml(((i={})[e.getAttribute("data-column-id")]={minWidth:e.clientWidth},i),t)}),{});return this.tableElement.className=this.tableClassName,this.tableElement.style.cssText=this.tableStyle,this.tableElement.style.tableLayout="auto",Array.from(this.base.parentNode.querySelectorAll("thead th")).reduce((function(t,e){return t[e.getAttribute("data-column-id")].width=e.clientWidth,t}),t)},i.render=function(){var t=this;return this.props.tableRef.current?Gl("div",{ref:function(e){e&&e.appendChild(t.tableElement)}}):null},e}(_c);function Zc(t){if(!t)return"";var e=t.split(" ");return 1===e.length&&/([a-z][A-Z])+/g.test(t)?t:e.map((function(t,e){return 0==e?t.toLowerCase():t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()})).join("")}var Kc=function(t){function e(){var e;return(e=t.call(this)||this)._columns=void 0,e._columns=[],e}Tl(e,t);var i=e.prototype;return i.adjustWidth=function(t){var i=t.container,n=t.tableRef,r=t.tempRef,o=t.tempRef||!0;if(!i)return this;var s=i.clientWidth,a={current:null},l={};if(n.current&&o){var c=Gl(Gc,{tableRef:n});c.ref=a,fc(c,r.current),l=a.current.widths()}for(var h,d=Il(e.tabularFormat(this.columns).reduce((function(t,e){return t.concat(e)}),[]));!(h=d()).done;){var p=h.value;p.columns&&p.columns.length>0||(!p.width&&o?p.id in l&&(p.width=Yc(l[p.id].width),p.minWidth=Yc(l[p.id].minWidth)):p.width=Yc(Wc(p.width,s)))}return n.current&&o&&fc(null,r.current),this},i.setSort=function(t,e){for(var i,n=Il(e||this.columns||[]);!(i=n()).done;){var r=i.value;r.columns&&r.columns.length>0&&(r.sort={enabled:!1}),void 0===r.sort&&t.sort&&(r.sort={enabled:!0}),r.sort?"object"==typeof r.sort&&(r.sort=Ml({enabled:!0},r.sort)):r.sort={enabled:!1},r.columns&&this.setSort(t,r.columns)}},i.setFixedHeader=function(t,e){for(var i,n=Il(e||this.columns||[]);!(i=n()).done;){var r=i.value;void 0===r.fixedHeader&&(r.fixedHeader=t.fixedHeader),r.columns&&this.setFixedHeader(t,r.columns)}},i.setResizable=function(t,e){for(var i,n=Il(e||this.columns||[]);!(i=n()).done;){var r=i.value;void 0===r.resizable&&(r.resizable=t.resizable),r.columns&&this.setResizable(t,r.columns)}},i.setID=function(t){for(var e,i=Il(t||this.columns||[]);!(e=i()).done;){var n=e.value;n.id||"string"!=typeof n.name||(n.id=Zc(n.name)),n.id||Vc.error('Could not find a valid ID for one of the columns. Make sure a valid "id" is set for all columns.'),n.columns&&this.setID(n.columns)}},i.populatePlugins=function(t,e){for(var i,n=Il(e);!(i=n()).done;){var r=i.value;void 0!==r.plugin&&t.plugin.add(Ml({id:r.id,props:{}},r.plugin,{position:Oc.Cell}))}},e.fromColumns=function(t){for(var i,n=new e,r=Il(t);!(i=r()).done;){var o=i.value;if("string"==typeof o||Fl(o))n.columns.push({name:o});else if("object"==typeof o){var s=o;s.columns&&(s.columns=e.fromColumns(s.columns).columns),"object"==typeof s.plugin&&void 0===s.data&&(s.data=null),n.columns.push(o)}}return n},e.fromUserConfig=function(t){var i=new e;return t.from?i.columns=e.fromHTMLTable(t.from).columns:t.columns?i.columns=e.fromColumns(t.columns).columns:!t.data||"object"!=typeof t.data[0]||t.data[0]instanceof Array||(i.columns=Object.keys(t.data[0]).map((function(t){return{name:t}}))),i.columns.length?(i.setID(),i.setSort(t),i.setFixedHeader(t),i.setResizable(t),i.populatePlugins(t,i.columns),i):null},e.fromHTMLTable=function(t){for(var i,n=new e,r=Il(t.querySelector("thead").querySelectorAll("th"));!(i=r()).done;){var o=i.value;n.columns.push({name:o.innerHTML,width:o.width})}return n},e.tabularFormat=function(t){var e=[],i=t||[],n=[];if(i&&i.length){e.push(i);for(var r,o=Il(i);!(r=o()).done;){var s=r.value;s.columns&&s.columns.length&&(n=n.concat(s.columns))}n.length&&(e=e.concat(this.tabularFormat(n)))}return e},e.leafColumns=function(t){var e=[],i=t||[];if(i&&i.length)for(var n,r=Il(i);!(n=r()).done;){var o=n.value;o.columns&&0!==o.columns.length||e.push(o),o.columns&&(e=e.concat(this.leafColumns(o.columns)))}return e},e.maximumDepth=function(t){return this.tabularFormat([t]).length-1},Ll(e,[{key:"columns",get:function(){return this._columns},set:function(t){this._columns=t}},{key:"visibleColumns",get:function(){return this._columns.filter((function(t){return!t.hidden}))}}]),e}(vc),Qc=function(){function t(){this._callbacks=void 0,this._isDispatching=void 0,this._isHandled=void 0,this._isPending=void 0,this._lastID=void 0,this._pendingPayload=void 0,this._callbacks={},this._isDispatching=!1,this._isHandled={},this._isPending={},this._lastID=1}var e=t.prototype;return e.register=function(t){var e="ID_"+this._lastID++;return this._callbacks[e]=t,e},e.unregister=function(t){if(!this._callbacks[t])throw Error("Dispatcher.unregister(...): "+t+" does not map to a registered callback.");delete this._callbacks[t]},e.waitFor=function(t){if(!this._isDispatching)throw Error("Dispatcher.waitFor(...): Must be invoked while dispatching.");for(var e=0;e<t.length;e++){var i=t[e];if(this._isPending[i]){if(!this._isHandled[i])throw Error("Dispatcher.waitFor(...): Circular dependency detected while ' +\n 'waiting for "+i+".")}else{if(!this._callbacks[i])throw Error("Dispatcher.waitFor(...): "+i+" does not map to a registered callback.");this._invokeCallback(i)}}},e.dispatch=function(t){if(this._isDispatching)throw Error("Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch.");this._startDispatching(t);try{for(var e in this._callbacks)this._isPending[e]||this._invokeCallback(e)}finally{this._stopDispatching()}},e.isDispatching=function(){return this._isDispatching},e._invokeCallback=function(t){this._isPending[t]=!0,this._callbacks[t](this._pendingPayload),this._isHandled[t]=!0},e._startDispatching=function(t){for(var e in this._callbacks)this._isPending[e]=!1,this._isHandled[e]=!1;this._pendingPayload=t,this._isDispatching=!0},e._stopDispatching=function(){delete this._pendingPayload,this._isDispatching=!1},t}(),Jc=function(){},Xc=function(t){function e(e){var i;return(i=t.call(this)||this).data=void 0,i.set(e),i}Tl(e,t);var i=e.prototype;return i.get=function(){try{return Promise.resolve(this.data()).then((function(t){return{data:t,total:t.length}}))}catch(t){return Promise.reject(t)}},i.set=function(t){return t instanceof Array?this.data=function(){return t}:t instanceof Function&&(this.data=t),this},e}(Jc),th=function(t){function e(e){var i;return(i=t.call(this)||this).options=void 0,i.options=e,i}Tl(e,t);var i=e.prototype;return i.handler=function(t){return"function"==typeof this.options.handle?this.options.handle(t):t.ok?t.json():(Vc.error("Could not fetch data: "+t.status+" - "+t.statusText,!0),null)},i.get=function(t){var e=Ml({},this.options,t);return"function"==typeof e.data?e.data(e):fetch(e.url,e).then(this.handler.bind(this)).then((function(t){return{data:e.then(t),total:"function"==typeof e.total?e.total(t):void 0}}))},e}(Jc),eh=function(){function t(){}return t.createFromUserConfig=function(t){var e=null;return t.data&&(e=new Xc(t.data)),t.from&&(e=new Xc(this.tableElementToArray(t.from)),t.from.style.display="none"),t.server&&(e=new th(t.server)),e||Vc.error("Could not determine the storage type",!0),e},t.tableElementToArray=function(t){for(var e,i,n=[],r=Il(t.querySelector("tbody").querySelectorAll("tr"));!(e=r()).done;){for(var o,s=[],a=Il(e.value.querySelectorAll("td"));!(o=a()).done;){var l=o.value;1===l.childNodes.length&&l.childNodes[0].nodeType===Node.TEXT_NODE?s.push((i=l.innerHTML,(new DOMParser).parseFromString(i,"text/html").documentElement.textContent)):s.push(xc(l.innerHTML))}n.push(s)}return n},t}(),ih="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function nh(t,e,i){if(!t.s){if(i instanceof rh){if(!i.s)return void(i.o=nh.bind(null,t,e));1&e&&(e=i.s),i=i.v}if(i&&i.then)return void i.then(nh.bind(null,t,e),nh.bind(null,t,2));t.s=e,t.v=i;var n=t.o;n&&n(t)}}var rh=function(){function t(){}return t.prototype.then=function(e,i){var n=new t,r=this.s;if(r){var o=1&r?e:i;if(o){try{nh(n,1,o(this.v))}catch(t){nh(n,2,t)}return n}return this}return this.o=function(t){try{var r=t.v;1&t.s?nh(n,1,e?e(r):r):i?nh(n,1,i(r)):nh(n,2,r)}catch(t){nh(n,2,t)}},n},t}();function oh(t){return t instanceof rh&&1&t.s}var sh,ah=function(t){function e(e){var i;return(i=t.call(this)||this)._steps=new Map,i.cache=new Map,i.lastProcessorIndexUpdated=-1,e&&e.forEach((function(t){return i.register(t)})),i}Tl(e,t);var i=e.prototype;return i.clearCache=function(){this.cache=new Map,this.lastProcessorIndexUpdated=-1},i.register=function(t,e){if(void 0===e&&(e=null),null===t.type)throw Error("Processor type is not defined");t.on("propsUpdated",this.processorPropsUpdated.bind(this)),this.addProcessorByPriority(t,e),this.afterRegistered(t)},i.unregister=function(t){if(t){var e=this._steps.get(t.type);e&&e.length&&(this._steps.set(t.type,e.filter((function(e){return e!=t}))),this.emit("updated",t))}},i.addProcessorByPriority=function(t,e){var i=this._steps.get(t.type);if(!i){var n=[];this._steps.set(t.type,n),i=n}if(null===e||e<0)i.push(t);else if(i[e]){var r=i.slice(0,e-1),o=i.slice(e+1);this._steps.set(t.type,r.concat(t).concat(o))}else i[e]=t},i.getStepsByType=function(t){return this.steps.filter((function(e){return e.type===t}))},i.getSortedProcessorTypes=function(){return Object.keys(kc).filter((function(t){return!isNaN(Number(t))})).map((function(t){return Number(t)}))},i.process=function(t){try{var e=this,i=function(t){return e.lastProcessorIndexUpdated=r.length,e.emit("afterProcess",o),o},n=e.lastProcessorIndexUpdated,r=e.steps,o=t,s=function(t,i){try{var s=function(t,e,i){if("function"==typeof t[ih]){var n,r,o,s=t[ih]();if(function t(i){try{for(;!(n=s.next()).done;)if((i=e(n.value))&&i.then){if(!oh(i))return void i.then(t,o||(o=nh.bind(null,r=new rh,2)));i=i.v}r?nh(r,1,i):r=i}catch(t){nh(r||(r=new rh),2,t)}}(),s.return){var a=function(t){try{n.done||s.return()}catch(t){}return t};if(r&&r.then)return r.then(a,(function(t){throw a(t)}));a()}return r}if(!("length"in t))throw new TypeError("Object is not iterable");for(var l=[],c=0;c<t.length;c++)l.push(t[c]);return function(t,e,i){var n,r,o=-1;return function i(s){try{for(;++o<t.length;)if((s=e(o))&&s.then){if(!oh(s))return void s.then(i,r||(r=nh.bind(null,n=new rh,2)));s=s.v}n?nh(n,1,s):n=s}catch(t){nh(n||(n=new rh),2,t)}}(),n}(l,(function(t){return e(l[t])}))}(r,(function(t){var i=e.findProcessorIndexByID(t.id),r=function(){if(i>=n)return Promise.resolve(t.process(o)).then((function(i){e.cache.set(t.id,o=i)}));o=e.cache.get(t.id)}();if(r&&r.then)return r.then((function(){}))}))}catch(t){return i(t)}return s&&s.then?s.then(void 0,i):s}(0,(function(t){throw Vc.error(t),e.emit("error",o),t}));return Promise.resolve(s&&s.then?s.then(i):i())}catch(t){return Promise.reject(t)}},i.findProcessorIndexByID=function(t){return this.steps.findIndex((function(e){return e.id==t}))},i.setLastProcessorIndex=function(t){var e=this.findProcessorIndexByID(t.id);this.lastProcessorIndexUpdated>e&&(this.lastProcessorIndexUpdated=e)},i.processorPropsUpdated=function(t){this.setLastProcessorIndex(t),this.emit("propsUpdated"),this.emit("updated",t)},i.afterRegistered=function(t){this.setLastProcessorIndex(t),this.emit("afterRegister"),this.emit("updated",t)},Ll(e,[{key:"steps",get:function(){for(var t,e=[],i=Il(this.getSortedProcessorTypes());!(t=i()).done;){var n=this._steps.get(t.value);n&&n.length&&(e=e.concat(n))}return e.filter((function(t){return t}))}}]),e}(Cc),lh=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype._process=function(t){try{return Promise.resolve(this.props.storage.get(t))}catch(t){return Promise.reject(t)}},Ll(e,[{key:"type",get:function(){return kc.Extractor}}]),e}(Ec),ch=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype._process=function(t){var e=zc.fromArray(t.data);return e.length=t.total,e},Ll(e,[{key:"type",get:function(){return kc.Transformer}}]),e}(Ec),hh=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype._process=function(){return Object.entries(this.props.serverStorageOptions).filter((function(t){return"function"!=typeof t[1]})).reduce((function(t,e){var i;return Ml({},t,((i={})[e[0]]=e[1],i))}),{})},Ll(e,[{key:"type",get:function(){return kc.Initiator}}]),e}(Ec),dh=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.castData=function(t){if(!t||!t.length)return[];if(!this.props.header||!this.props.header.columns)return t;var e=Kc.leafColumns(this.props.header.columns);return t[0]instanceof Array?t.map((function(t){var i=0;return e.map((function(e,n){return void 0!==e.data?(i++,"function"==typeof e.data?e.data(t):e.data):t[n-i]}))})):"object"!=typeof t[0]||t[0]instanceof Array?[]:t.map((function(t){return e.map((function(e,i){return void 0!==e.data?"function"==typeof e.data?e.data(t):e.data:e.id?t[e.id]:(Vc.error("Could not find the correct cell for column at position "+i+".\n Make sure either 'id' or 'selector' is defined for all columns."),null)}))}))},i._process=function(t){return{data:this.castData(t.data),total:t.total}},Ll(e,[{key:"type",get:function(){return kc.Transformer}}]),e}(Ec),ph=function(){function t(){}return t.createFromConfig=function(t){var e=new ah;return t.storage instanceof th&&e.register(new hh({serverStorageOptions:t.server})),e.register(new lh({storage:t.storage})),e.register(new dh({header:t.header})),e.register(new ch),e},t}(),uh=function(){function t(e){this._userConfig=void 0,Object.assign(this,Ml({},t.defaultConfig(),e)),this._userConfig={}}var e=t.prototype;return e.assign=function(t){for(var e=0,i=Object.keys(t);e<i.length;e++){var n=i[e];"_userConfig"!==n&&(this[n]=t[n])}return this},e.update=function(e){return e?(this._userConfig=Ml({},this._userConfig,e),this.assign(t.fromUserConfig(this._userConfig)),this):this},t.defaultConfig=function(){return{plugin:new Nc,dispatcher:new Qc,tableRef:{current:null},tempRef:{current:null},width:"100%",height:"auto",autoWidth:!0,style:{},className:{}}},t.fromUserConfig=function(e){var i=new t(e);return i._userConfig=e,"boolean"==typeof e.sort&&e.sort&&i.assign({sort:{multiColumn:!0}}),i.assign({header:Kc.fromUserConfig(i)}),i.assign({storage:eh.createFromUserConfig(e)}),i.assign({pipeline:ph.createFromConfig(i)}),i.assign({translator:new yc(e.language)}),i.plugin.add({id:"search",position:Oc.Header,component:jc,props:Ml({enabled:!0===e.search||e.search instanceof Object},e.search)}),i.plugin.add({id:"pagination",position:Oc.Footer,component:Uc,props:Ml({enabled:!0===e.pagination||e.pagination instanceof Object},e.pagination)}),e.plugins&&e.plugins.forEach((function(t){return i.plugin.add(t)})),i},t}();!function(t){t[t.Init=0]="Init",t[t.Loading=1]="Loading",t[t.Loaded=2]="Loaded",t[t.Rendered=3]="Rendered",t[t.Error=4]="Error"}(sh||(sh={}));var gh,fh,mh,vh=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.content=function(){return this.props.column&&"function"==typeof this.props.column.formatter?this.props.column.formatter(this.props.cell.data,this.props.row,this.props.column):this.props.column&&this.props.column.plugin?Gl(Dc,{pluginId:this.props.column.id,props:{column:this.props.column,cell:this.props.cell,row:this.props.row}}):this.props.cell.data},i.handleClick=function(t){this.props.messageCell||this.config.eventEmitter.emit("cellClick",t,this.props.cell,this.props.column,this.props.row)},i.getCustomAttributes=function(t){return t?"function"==typeof t.attributes?t.attributes(this.props.cell.data,this.props.row,this.props.column):t.attributes:{}},i.render=function(){return Gl("td",Ml({role:this.props.role,colSpan:this.props.colSpan,"data-column-id":this.props.column&&this.props.column.id,className:Tc(Mc("td"),this.props.className,this.config.className.td),style:Ml({},this.props.style,this.config.style.td),onClick:this.handleClick.bind(this)},this.getCustomAttributes(this.props.column)),this.content())},e}(_c),bh=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.getColumn=function(t){if(this.props.header){var e=Kc.leafColumns(this.props.header.columns);if(e)return e[t]}return null},i.handleClick=function(t){this.props.messageRow||this.config.eventEmitter.emit("rowClick",t,this.props.row)},i.getChildren=function(){var t=this;return this.props.children?this.props.children:Gl(Kl,null,this.props.row.cells.map((function(e,i){var n=t.getColumn(i);return n&&n.hidden?null:Gl(vh,{key:e.id,cell:e,row:t.props.row,column:n})})))},i.render=function(){return Gl("tr",{className:Tc(Mc("tr"),this.config.className.tr),onClick:this.handleClick.bind(this)},this.getChildren())},e}(_c),yh=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype.render=function(){return Gl(bh,{messageRow:!0},Gl(vh,{role:"alert",colSpan:this.props.colSpan,messageCell:!0,cell:new Ac(this.props.message),className:Tc(Mc("message"),this.props.className?this.props.className:null)}))},e}(_c),_h=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.headerLength=function(){return this.props.header?this.props.header.visibleColumns.length:0},i.render=function(){var t=this;return Gl("tbody",{className:Tc(Mc("tbody"),this.config.className.tbody)},this.props.data&&this.props.data.rows.map((function(e){return Gl(bh,{key:e.id,row:e,header:t.props.header})})),this.props.status===sh.Loading&&(!this.props.data||0===this.props.data.length)&&Gl(yh,{message:this._("loading"),colSpan:this.headerLength(),className:Tc(Mc("loading"),this.config.className.loading)}),this.props.status===sh.Rendered&&this.props.data&&0===this.props.data.length&&Gl(yh,{message:this._("noRecordsFound"),colSpan:this.headerLength(),className:Tc(Mc("notfound"),this.config.className.notfound)}),this.props.status===sh.Error&&Gl(yh,{message:this._("error"),colSpan:this.headerLength(),className:Tc(Mc("error"),this.config.className.error)}))},e}(_c),wh=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.validateProps=function(){for(var t,e=Il(this.props.columns);!(t=e()).done;){var i=t.value;void 0===i.direction&&(i.direction=1),1!==i.direction&&-1!==i.direction&&Vc.error("Invalid sort direction "+i.direction)}},i.compare=function(t,e){return t>e?1:t<e?-1:0},i.compareWrapper=function(t,e){for(var i,n=0,r=Il(this.props.columns);!(i=r()).done;){var o=i.value;if(0!==n)break;var s=t.cells[o.index].data,a=e.cells[o.index].data;n|="function"==typeof o.compare?o.compare(s,a)*o.direction:this.compare(s,a)*o.direction}return n},i._process=function(t){var e=[].concat(t.rows);e.sort(this.compareWrapper.bind(this));var i=new zc(e);return i.length=t.length,i},Ll(e,[{key:"type",get:function(){return kc.Sort}}]),e}(Ec),xh=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.getInitialState=function(){return[]},i.handle=function(t,e){"SORT_COLUMN"===t?this.sortColumn(e.index,e.direction,e.multi,e.compare):"SORT_COLUMN_TOGGLE"===t&&this.sortToggle(e.index,e.multi,e.compare)},i.sortToggle=function(t,e,i){var n=[].concat(this.state).find((function(e){return e.index===t}));this.sortColumn(t,n&&1===n.direction?-1:1,e,i)},i.sortColumn=function(t,e,i,n){var r=[].concat(this.state),o=r.length,s=r.find((function(e){return e.index===t})),a=!1,l=!1,c=!1,h=!1;if(void 0!==s?i?-1===s.direction?c=!0:h=!0:1===o?h=!0:o>1&&(l=!0,a=!0):0===o?a=!0:o>0&&!i?(a=!0,l=!0):o>0&&i&&(a=!0),l&&(r=[]),a)r.push({index:t,direction:e,compare:n});else if(h){var d=r.indexOf(s);r[d].direction=e}else if(c){var p=r.indexOf(s);r.splice(p,1)}this.setState(r)},e}($c),kh=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.sortColumn=function(t,e,i,n){this.dispatch("SORT_COLUMN",{index:t,direction:e,multi:i,compare:n})},i.sortToggle=function(t,e,i){this.dispatch("SORT_COLUMN_TOGGLE",{index:t,multi:e,compare:i})},e}(Ic),Ah=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype._process=function(t){var e={};return this.props.url&&(e.url=this.props.url(t.url,this.props.columns)),this.props.body&&(e.body=this.props.body(t.body,this.props.columns)),Ml({},t,e)},Ll(e,[{key:"type",get:function(){return kc.ServerSort}}]),e}(Ec),Sh=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).sortProcessor=void 0,n.actions=void 0,n.store=void 0,n.updateStateFn=void 0,n.updateSortProcessorFn=void 0,n.actions=new kh(n.config.dispatcher),n.store=new xh(n.config.dispatcher),e.enabled&&(n.sortProcessor=n.getOrCreateSortProcessor(),n.updateStateFn=n.updateState.bind($l(n)),n.store.on("updated",n.updateStateFn),n.state={direction:0}),n}Tl(e,t);var i=e.prototype;return i.componentWillUnmount=function(){this.config.pipeline.unregister(this.sortProcessor),this.store.off("updated",this.updateStateFn),this.updateSortProcessorFn&&this.store.off("updated",this.updateSortProcessorFn)},i.updateState=function(){var t=this,e=this.store.state.find((function(e){return e.index===t.props.index}));this.setState(e?{direction:e.direction}:{direction:0})},i.updateSortProcessor=function(t){this.sortProcessor.setProps({columns:t})},i.getOrCreateSortProcessor=function(){var t=kc.Sort;this.config.sort&&"object"==typeof this.config.sort.server&&(t=kc.ServerSort);var e,i=this.config.pipeline.getStepsByType(t);return i.length>0?e=i[0]:(this.updateSortProcessorFn=this.updateSortProcessor.bind(this),this.store.on("updated",this.updateSortProcessorFn),e=t===kc.ServerSort?new Ah(Ml({columns:this.store.state},this.config.sort.server)):new wh({columns:this.store.state}),this.config.pipeline.register(e)),e},i.changeDirection=function(t){t.preventDefault(),t.stopPropagation(),this.actions.sortToggle(this.props.index,!0===t.shiftKey&&this.config.sort.multiColumn,this.props.compare)},i.render=function(){if(!this.props.enabled)return null;var t=this.state.direction,e="neutral";return 1===t?e="asc":-1===t&&(e="desc"),Gl("button",{tabIndex:-1,"aria-label":this._("sort.sort"+(1===t?"Desc":"Asc")),title:this._("sort.sort"+(1===t?"Desc":"Asc")),className:Tc(Mc("sort"),Mc("sort",e),this.config.className.sort),onClick:this.changeDirection.bind(this)})},e}(_c),zh=function(t){function e(){for(var e,i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];return(e=t.call.apply(t,[this].concat(n))||this).moveFn=void 0,e.upFn=void 0,e}Tl(e,t);var i=e.prototype;return i.getPageX=function(t){return t instanceof MouseEvent?Math.floor(t.pageX):Math.floor(t.changedTouches[0].pageX)},i.start=function(t){var e,i,n,r,o;t.stopPropagation(),this.setState({offsetStart:parseInt(this.props.thRef.current.style.width,10)-this.getPageX(t)}),this.upFn=this.end.bind(this),this.moveFn=(e=this.move.bind(this),void 0===(i=10)&&(i=100),function(){var t=[].slice.call(arguments);n?(clearTimeout(r),r=setTimeout((function(){Date.now()-o>=i&&(e.apply(void 0,t),o=Date.now())}),Math.max(i-(Date.now()-o),0))):(e.apply(void 0,t),o=Date.now(),n=!0)}),document.addEventListener("mouseup",this.upFn),document.addEventListener("touchend",this.upFn),document.addEventListener("mousemove",this.moveFn),document.addEventListener("touchmove",this.moveFn)},i.move=function(t){t.stopPropagation();var e=this.props.thRef.current;this.state.offsetStart+this.getPageX(t)>=parseInt(e.style.minWidth,10)&&(e.style.width=this.state.offsetStart+this.getPageX(t)+"px")},i.end=function(t){t.stopPropagation(),document.removeEventListener("mouseup",this.upFn),document.removeEventListener("mousemove",this.moveFn),document.removeEventListener("touchmove",this.moveFn),document.removeEventListener("touchend",this.upFn)},i.render=function(){return Gl("div",{className:Tc(Mc("th"),Mc("resizable")),onMouseDown:this.start.bind(this),onTouchStart:this.start.bind(this),onClick:function(t){return t.stopPropagation()}})},e}(_c),Ch=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).sortRef={current:null},n.thRef={current:null},n.state={style:{}},n}Tl(e,t);var i=e.prototype;return i.isSortable=function(){return this.props.column.sort.enabled},i.isResizable=function(){return this.props.column.resizable},i.onClick=function(t){t.stopPropagation(),this.isSortable()&&this.sortRef.current.changeDirection(t)},i.keyDown=function(t){this.isSortable()&&13===t.which&&this.onClick(t)},i.componentDidMount=function(){var t=this;setTimeout((function(){if(t.props.column.fixedHeader&&t.thRef.current){var e=t.thRef.current.offsetTop;"number"==typeof e&&t.setState({style:{top:e}})}}),0)},i.content=function(){return void 0!==this.props.column.name?this.props.column.name:void 0!==this.props.column.plugin?Gl(Dc,{pluginId:this.props.column.plugin.id,props:{column:this.props.column}}):null},i.getCustomAttributes=function(){var t=this.props.column;return t?"function"==typeof t.attributes?t.attributes(null,null,this.props.column):t.attributes:{}},i.render=function(){var t={};return this.isSortable()&&(t.tabIndex=0),Gl("th",Ml({ref:this.thRef,"data-column-id":this.props.column&&this.props.column.id,className:Tc(Mc("th"),this.isSortable()?Mc("th","sort"):null,this.props.column.fixedHeader?Mc("th","fixed"):null,this.config.className.th),onClick:this.onClick.bind(this),style:Ml({},this.config.style.th,{minWidth:this.props.column.minWidth,width:this.props.column.width},this.state.style,this.props.style),onKeyDown:this.keyDown.bind(this),rowSpan:this.props.rowSpan>1?this.props.rowSpan:void 0,colSpan:this.props.colSpan>1?this.props.colSpan:void 0},this.getCustomAttributes(),t),Gl("div",{className:Mc("th","content")},this.content()),this.isSortable()&&Gl(Sh,Ml({ref:this.sortRef,index:this.props.index},this.props.column.sort)),this.isResizable()&&this.props.index<this.config.header.visibleColumns.length-1&&Gl(zh,{column:this.props.column,thRef:this.thRef}))},e}(_c),Eh=function(t){function e(){return t.apply(this,arguments)||this}Tl(e,t);var i=e.prototype;return i.renderColumn=function(t,e,i,n){var r=function(t,e,i){var n=Kc.maximumDepth(t),r=i-e;return{rowSpan:Math.floor(r-n-n/r),colSpan:t.columns&&t.columns.length||1}}(t,e,n);return Gl(Ch,{column:t,index:i,colSpan:r.colSpan,rowSpan:r.rowSpan})},i.renderRow=function(t,e,i){var n=this,r=Kc.leafColumns(this.props.header.columns);return Gl(bh,null,t.map((function(t){return t.hidden?null:n.renderColumn(t,e,r.indexOf(t),i)})))},i.renderRows=function(){var t=this,e=Kc.tabularFormat(this.props.header.columns);return e.map((function(i,n){return t.renderRow(i,n,e.length)}))},i.render=function(){return this.props.header?Gl("thead",{key:this.props.header.id,className:Tc(Mc("thead"),this.config.className.thead)},this.renderRows()):null},e}(_c),Lh=function(t){function e(){return t.apply(this,arguments)||this}return Tl(e,t),e.prototype.render=function(){return Gl("table",{role:"grid",className:Tc(Mc("table"),this.config.className.table),style:Ml({},this.config.style.table,{height:this.props.height})},Gl(Eh,{header:this.props.header}),Gl(_h,{data:this.props.data,status:this.props.status,header:this.props.header}))},e}(_c),Mh=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).headerRef={current:null},n.state={isActive:!0},n}Tl(e,t);var i=e.prototype;return i.componentDidMount=function(){0===this.headerRef.current.children.length&&this.setState({isActive:!1})},i.render=function(){return this.state.isActive?Gl("div",{ref:this.headerRef,className:Tc(Mc("head"),this.config.className.header),style:Ml({},this.config.style.header)},Gl(Dc,{position:Oc.Header})):null},e}(_c),Th=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).footerRef={current:null},n.state={isActive:!0},n}Tl(e,t);var i=e.prototype;return i.componentDidMount=function(){0===this.footerRef.current.children.length&&this.setState({isActive:!1})},i.render=function(){return this.state.isActive?Gl("div",{ref:this.footerRef,className:Tc(Mc("footer"),this.config.className.footer),style:Ml({},this.config.style.footer)},Gl(Dc,{position:Oc.Footer})):null},e}(_c),Oh=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).configContext=void 0,n.processPipelineFn=void 0,n.configContext=function(t,e){var i={__c:e="__cC"+jl++,__:null,Consumer:function(t,e){return t.children(e)},Provider:function(t){var i,n;return this.getChildContext||(i=[],(n={})[e]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&i.some(tc)},this.sub=function(t){i.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){i.splice(i.indexOf(t),1),e&&e.call(t)}}),t.children}};return i.Provider.__=i.Consumer.contextType=i}(),n.state={status:sh.Loading,header:e.header,data:null},n}Tl(e,t);var i=e.prototype;return i.processPipeline=function(){try{var t=this;t.props.config.eventEmitter.emit("beforeLoad"),t.setState({status:sh.Loading});var e=function(e,i){try{var n=Promise.resolve(t.props.pipeline.process()).then((function(e){t.setState({data:e,status:sh.Loaded}),t.props.config.eventEmitter.emit("load",e)}))}catch(t){return i(t)}return n&&n.then?n.then(void 0,i):n}(0,(function(e){Vc.error(e),t.setState({status:sh.Error,data:null})}));return Promise.resolve(e&&e.then?e.then((function(){})):void 0)}catch(t){return Promise.reject(t)}},i.componentDidMount=function(){try{var t=this,e=t.props.config;return Promise.resolve(t.processPipeline()).then((function(){e.header&&t.state.data&&t.state.data.length&&t.setState({header:e.header.adjustWidth(e)}),t.processPipelineFn=t.processPipeline.bind(t),t.props.pipeline.on("updated",t.processPipelineFn)}))}catch(t){return Promise.reject(t)}},i.componentWillUnmount=function(){this.props.pipeline.off("updated",this.processPipelineFn)},i.componentDidUpdate=function(t,e){e.status!=sh.Rendered&&this.state.status==sh.Loaded&&(this.setState({status:sh.Rendered}),this.props.config.eventEmitter.emit("ready"))},i.render=function(){return Gl(this.configContext.Provider,{value:this.props.config},Gl("div",{role:"complementary",className:Tc("gridjs",Mc("container"),this.state.status===sh.Loading?Mc("loading"):null,this.props.config.className.container),style:Ml({},this.props.config.style.container,{width:this.props.width})},this.state.status===sh.Loading&&Gl("div",{className:Mc("loading-bar")}),Gl(Mh,null),Gl("div",{className:Mc("wrapper"),style:{height:this.props.height}},Gl(Lh,{ref:this.props.config.tableRef,data:this.state.data,header:this.state.header,width:this.props.width,height:this.props.height,status:this.state.status})),Gl(Th,null),Gl("div",{ref:this.props.config.tempRef,id:"gridjs-temp",className:Mc("temp")})))},e}(_c),$h=function(t){function e(e){var i;return(i=t.call(this)||this).config=void 0,i.plugin=void 0,i.config=new uh({instance:$l(i),eventEmitter:$l(i)}).update(e),i.plugin=i.config.plugin,i}Tl(e,t);var i=e.prototype;return i.updateConfig=function(t){return this.config.update(t),this},i.createElement=function(){return Gl(Oh,{config:this.config,pipeline:this.config.pipeline,header:this.config.header,width:this.config.width,height:this.config.height})},i.forceRender=function(){return this.config&&this.config.container||Vc.error("Container is empty. Make sure you call render() before forceRender()",!0),this.config.pipeline.clearCache(),fc(null,this.config.container),fc(this.createElement(),this.config.container),this},i.render=function(t){return t||Vc.error("Container element cannot be null",!0),t.childNodes.length>0?(Vc.error("The container element "+t+" is not empty. Make sure the container is empty and call render() again"),this):(this.config.container=t,fc(this.createElement(),t),this)},e}(Cc),Hh=[],Ih=[],Rh=Pl.__b,Ph=Pl.__r,Vh=Pl.diffed,Fh=Pl.__c,Nh=Pl.unmount;function Dh(){for(var t;t=Hh.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Bh),t.__H.__h.forEach(qh),t.__H.__h=[]}catch(e){t.__H.__h=[],Pl.__e(e,t.__v)}}Pl.__b=function(t){gh=null,Rh&&Rh(t)},Pl.__r=function(t){Ph&&Ph(t);var e=(gh=t.__c).__H;e&&(fh===gh?(e.__h=[],gh.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=Ih,t.__N=t.i=void 0}))):(e.__h.forEach(Bh),e.__h.forEach(qh),e.__h=[])),fh=gh},Pl.diffed=function(t){Vh&&Vh(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==Hh.push(e)&&mh===Pl.requestAnimationFrame||((mh=Pl.requestAnimationFrame)||function(t){var e,i=function(){clearTimeout(n),jh&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(i,100);jh&&(e=requestAnimationFrame(i))})(Dh)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==Ih&&(t.__=t.__V),t.i=void 0,t.__V=Ih}))),fh=gh=null},Pl.__c=function(t,e){e.some((function(t){try{t.__h.forEach(Bh),t.__h=t.__h.filter((function(t){return!t.__||qh(t)}))}catch(i){e.some((function(t){t.__h&&(t.__h=[])})),e=[],Pl.__e(i,t.__v)}})),Fh&&Fh(t,e)},Pl.unmount=function(t){Nh&&Nh(t);var e,i=t.__c;i&&i.__H&&(i.__H.__.forEach((function(t){try{Bh(t)}catch(t){e=t}})),e&&Pl.__e(e,i.__v))};var jh="function"==typeof requestAnimationFrame;function Bh(t){var e=gh,i=t.__c;"function"==typeof i&&(t.__c=void 0,i()),gh=e}function qh(t){var e=gh;t.__c=t.__(),gh=e}class Uh extends H{static get properties(){return Object.assign({label:{type:String},property:{type:String},sort:{type:Boolean},width:{type:String}},super.properties)}constructor(){super(),this.label="no-label",this.property=null,this.sort=!1,this.width=null}connectedCallback(){super.connectedCallback()}data(){const t={name:xc(`<pb-i18n key="${this.label}">${this.label}</pb-i18n>`),sort:{enabled:this.sort},formatter:t=>xc(t)};return this.property&&(t.id=this.property),this.width&&(t.width=this.width),t}}customElements.define("pb-table-column",Uh);class Wh extends(x(R(H))){static get properties(){return Object.assign({source:{type:String},cssPath:{type:String,attribute:"css-path"},resizable:{type:Boolean},subforms:{type:String},perPage:{type:Number,attribute:"per-page"},height:{type:String},search:{type:Boolean},paginationTop:{type:Boolean,attribute:"pagination-top"},visibleColumns:{type:Array,attribute:"visible-columns"},_params:{type:Object}},super.properties)}constructor(){super(),this.cssPath="../css/gridjs",this._params={},this.resizable=!1,this.search=!1,this.paginationTop=!1,this.perPage=10,this.height=null,this.fixedHeader=!1,this.visibleColumns=null,this._pbColumns=[],this._columns=[],this._selectedRow=null,this._gridI18nInitialized=!1,this._visibilityApplyFrame=null,this._onTableClick=this._onTableClick.bind(this),this._onDocumentClick=this._onDocumentClick.bind(this)}_applyPaginationPosition(){if(!this.grid||!this.grid.plugin)return;const t=this.grid.plugin.get("pagination");t&&(t.position=this.paginationTop?Oc.Header:Oc.Footer)}async connectedCallback(){if(super.connectedCallback(),document.addEventListener("click",this._onDocumentClick),this.subscribeTo("pb-search-resubmit",t=>{this._submit()}),xn.subscribe(this,t=>{this._params=t,this._submit()}),this.subscribeTo("pb-i18n-update",t=>{const e=this.language!==t.detail.language;this.language=t.detail.language;const i=!this._gridI18nInitialized;(e||i)&&this.grid&&(this._gridI18nInitialized=!0,e&&(this._applyPaginationPosition(),this._submit()))},[]),!this.height){const t=getComputedStyle(this).getPropertyValue("--pb-table-grid-height");this.height=t||"auto"}const t=await A([O(this.cssPath)+"/mermaid.min.css"]),e=[...this.shadowRoot.adoptedStyleSheets,t],i=E(this);i&&e.push(i),this.shadowRoot.adoptedStyleSheets=e}disconnectedCallback(){null!==this._visibilityApplyFrame&&(cancelAnimationFrame(this._visibilityApplyFrame),this._visibilityApplyFrame=null),document.removeEventListener("click",this._onDocumentClick),super.disconnectedCallback()}firstUpdated(){const t=this.shadowRoot.getElementById("table");t.addEventListener("click",this._onTableClick),this._pbColumns=Array.from(this.querySelectorAll("pb-table-column")),this._columns=this._getColumnsConfig(),V("pb-page-ready",e=>{e&&e.language&&(this.language=e.language),this._params=xn.state;const i=this.toAbsoluteURL(this.source),n={height:this.height,fixedHeader:!0,columns:this._columns,language:this._gridLanguageConfig(),resizable:this.resizable,server:{url:i,then:t=>t.results,total:t=>t.count},sort:{multiColumn:!1,enabled:!0,server:{url:(t,e)=>{if(!e.length)return t;const i=e[0];return`${t}${t.indexOf("?")>-1?"&":"?"}order=${this._columns[i.index].id}&dir=${1===i.direction?"asc":"desc"}`}}},pagination:{enabled:!0,limit:this.perPage,server:{url:(t,e,i)=>{const n=this.shadowRoot.getElementById("search-form");n&&Object.assign(this._params,this._serializeForm(n)),this._params=this._paramsFromSubforms(this._params),this._params.limit=i,this._params.start=e*i+1,this.language&&(this._params.language=this.language),xn.commit(this,this._params);const r=Object.assign({},this._params);return Object.keys(r).forEach(t=>{null===r[t]&&delete r[t]}),`${t}${t.indexOf("?")>-1?"&":"?"}${new URLSearchParams(r).toString()}`}}}};this.grid=new $h(n),this._applyPaginationPosition(),this.grid.on("ready",()=>{this._clearRowSelection(),this.paginationTop&&(this.grid.plugin.get("pagination").position=Oc.Header),this.emitTo("pb-results-received",{params:this._params}),this._scheduleColumnVisibilityReapply()}),this.grid.render(t)})}updated(t){t.has("visibleColumns")&&this.grid&&(this._columns=this._getColumnsConfig(),this._applyColumnVisibilityToDom())}_visibleColumnsAsSet(){return Array.isArray(this.visibleColumns)?new Set(this.visibleColumns):null}_columnId(t,e){return e.id||t.property||t.label}_getColumnsConfig(){const t=this._visibleColumnsAsSet();return this._pbColumns.map(e=>{const i=e.data(),n=this._columnId(e,i);return t?Object.assign(Object.assign({},i),{},{hidden:!t.has(n)}):i})}_applyColumnVisibilityToDom(){const t=this._visibleColumnsAsSet(),e=this.shadowRoot.querySelector(".gridjs-table");e&&this._columns.forEach((i,n)=>{var r,o;const s=i.id||(null===(r=this._pbColumns[n])||void 0===r?void 0:r.property)||(null===(o=this._pbColumns[n])||void 0===o?void 0:o.label),a=!!t&&!t.has(s);e.querySelectorAll(`th:nth-child(${n+1}), td:nth-child(${n+1})`).forEach(t=>{t.style.display=a?"none":""})})}_scheduleColumnVisibilityReapply(){null!==this._visibilityApplyFrame&&cancelAnimationFrame(this._visibilityApplyFrame),this._visibilityApplyFrame=requestAnimationFrame(()=>{this._visibilityApplyFrame=null,this._applyColumnVisibilityToDom()})}_onTableClick(t){const e=t.target.closest("tbody tr");e&&this._toggleRowSelection(e)}_onDocumentClick(t){t.composedPath().includes(this)||this._clearRowSelection()}_toggleRowSelection(t){this._selectedRow!==t?(this._clearRowSelection(),this._selectedRow=t,this._selectedRow.classList.add("grid-row-selected")):this._clearRowSelection()}_clearRowSelection(){this._selectedRow&&(this._selectedRow.classList.remove("grid-row-selected"),this._selectedRow=null)}_submit(){this.grid.forceRender()}_gridLanguageConfig(){return{search:{placeholder:()=>q("tableGrid.searchPlaceholder")},sort:{sortAsc:()=>q("tableGrid.sortAsc"),sortDesc:()=>q("tableGrid.sortDesc")},pagination:{previous:()=>q("tableGrid.previous"),next:()=>q("tableGrid.next"),navigate:(t,e)=>q("tableGrid.navigate",{page:t,pages:e}),page:t=>q("tableGrid.page",{page:t}),showing:()=>q("tableGrid.showing"),to:()=>q("tableGrid.to"),of:()=>q("tableGrid.of"),results:()=>q("tableGrid.results")},loading:()=>q("tableGrid.loading"),noRecordsFound:()=>q("tableGrid.noRecordsFound"),error:()=>q("tableGrid.error")}}_paramsFromSubforms(t){return this.subforms&&document.querySelectorAll(this.subforms).forEach(e=>{e.serializeForm&&Object.assign(t,e.serializeForm())}),t}_serializeForm(t){const e={};return new FormData(t).forEach((t,i)=>{e[i]=t}),e}render(){return M`
|
|
3835
3835
|
${this.search?M`
|
|
3836
|
-
<
|
|
3837
|
-
<
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
</paper-input>
|
|
3851
|
-
</form>
|
|
3852
|
-
</iron-form>
|
|
3836
|
+
<form id="search-form" action="">
|
|
3837
|
+
<input
|
|
3838
|
+
id="search"
|
|
3839
|
+
name="search"
|
|
3840
|
+
type="search"
|
|
3841
|
+
.value="${this._params.search||""}"
|
|
3842
|
+
aria-label="${j("tableGrid.search")}"
|
|
3843
|
+
placeholder="${j("tableGrid.searchPlaceholder")}"
|
|
3844
|
+
@keyup="${t=>"Enter"===t.key?this._submit():null}"
|
|
3845
|
+
/>
|
|
3846
|
+
<button type="button" @click="${this._submit}">
|
|
3847
|
+
${j("tableGrid.search")}
|
|
3848
|
+
</button>
|
|
3849
|
+
</form>
|
|
3853
3850
|
`:null}
|
|
3854
3851
|
<div id="table"></div>
|
|
3855
3852
|
`}static get styles(){return T`
|
package/i18n/common/de.json
CHANGED
|
@@ -126,6 +126,23 @@
|
|
|
126
126
|
"content": "Inhalte durchsuchen",
|
|
127
127
|
"scope": "Suchbereich"
|
|
128
128
|
},
|
|
129
|
+
"tableGrid": {
|
|
130
|
+
"search": "Suche",
|
|
131
|
+
"searchPlaceholder": "Schlüsselwort eingeben...",
|
|
132
|
+
"sortAsc": "Spalte aufsteigend sortieren",
|
|
133
|
+
"sortDesc": "Spalte absteigend sortieren",
|
|
134
|
+
"previous": "Vorherige",
|
|
135
|
+
"next": "Nächste",
|
|
136
|
+
"navigate": "Seite {{page}} von {{pages}}",
|
|
137
|
+
"page": "Seite {{page}}",
|
|
138
|
+
"showing": "Anzeigen",
|
|
139
|
+
"to": "zu",
|
|
140
|
+
"of": "von",
|
|
141
|
+
"results": "Ergebnisse",
|
|
142
|
+
"loading": "Laden...",
|
|
143
|
+
"noRecordsFound": "Keine passenden Einträge gefunden",
|
|
144
|
+
"error": "Ein Fehler ist aufgetreten, während die Daten abgerufen wurden"
|
|
145
|
+
},
|
|
129
146
|
"dts": {
|
|
130
147
|
"endpoint": "Server wählen",
|
|
131
148
|
"note": "Experimentell: Zugriff auf externe Editionen über DTS API",
|
package/i18n/common/en.json
CHANGED
|
@@ -126,6 +126,23 @@
|
|
|
126
126
|
"content": "Search content",
|
|
127
127
|
"scope": "Query scope"
|
|
128
128
|
},
|
|
129
|
+
"tableGrid": {
|
|
130
|
+
"search": "Search",
|
|
131
|
+
"searchPlaceholder": "Type a keyword...",
|
|
132
|
+
"sortAsc": "Sort column ascending",
|
|
133
|
+
"sortDesc": "Sort column descending",
|
|
134
|
+
"previous": "Previous",
|
|
135
|
+
"next": "Next",
|
|
136
|
+
"navigate": "Page {{page}} of {{pages}}",
|
|
137
|
+
"page": "Page {{page}}",
|
|
138
|
+
"showing": "Showing",
|
|
139
|
+
"to": "to",
|
|
140
|
+
"of": "of",
|
|
141
|
+
"results": "results",
|
|
142
|
+
"loading": "Loading...",
|
|
143
|
+
"noRecordsFound": "No matching records found",
|
|
144
|
+
"error": "An error occurred while fetching data"
|
|
145
|
+
},
|
|
129
146
|
"dts": {
|
|
130
147
|
"endpoint": "Select Endpoint",
|
|
131
148
|
"note": "Experimental: access other editions which expose the DTS API",
|
package/i18n/common/pl.json
CHANGED
|
@@ -126,6 +126,23 @@
|
|
|
126
126
|
"content": "Przeszukaj zawartość",
|
|
127
127
|
"scope": "Obszar kwerendy"
|
|
128
128
|
},
|
|
129
|
+
"tableGrid": {
|
|
130
|
+
"search": "Szukaj",
|
|
131
|
+
"searchPlaceholder": "Wpisz słowo kluczowe...",
|
|
132
|
+
"sortAsc": "Sortuj kolumnę rosnąco",
|
|
133
|
+
"sortDesc": "Sortuj kolumnę malejąco",
|
|
134
|
+
"previous": "Poprzednia",
|
|
135
|
+
"next": "Następna",
|
|
136
|
+
"navigate": "Strona {{page}} z {{pages}}",
|
|
137
|
+
"page": "Strona {{page}}",
|
|
138
|
+
"showing": "Wyświetlanie",
|
|
139
|
+
"to": "do",
|
|
140
|
+
"of": "z",
|
|
141
|
+
"results": "wyników",
|
|
142
|
+
"loading": "Ładowanie...",
|
|
143
|
+
"noRecordsFound": "Brak pasujących rekordów",
|
|
144
|
+
"error": "Wystąpił błąd podczas pobierania danych"
|
|
145
|
+
},
|
|
129
146
|
"dts": {
|
|
130
147
|
"endpoint": "Wybierz Endpoint",
|
|
131
148
|
"note": "Wersja eksperymentalna: uzyskaj dostęp do edycji, które udostępniają API DTS",
|
package/package.json
CHANGED
package/src/pb-table-grid.js
CHANGED
|
@@ -3,13 +3,9 @@ import { Grid, PluginPosition } from 'gridjs';
|
|
|
3
3
|
import { pbMixin, waitOnce } from './pb-mixin.js';
|
|
4
4
|
import { resolveURL } from './utils.js';
|
|
5
5
|
import { importStyles, loadStylesheets, themableMixin } from './theming.js';
|
|
6
|
-
import '@polymer/paper-input/paper-input';
|
|
7
|
-
import '@polymer/iron-icons';
|
|
8
|
-
import '@polymer/iron-form';
|
|
9
|
-
import '@polymer/paper-icon-button';
|
|
10
6
|
import './pb-table-column.js';
|
|
11
7
|
import { registry } from './urls.js';
|
|
12
|
-
import { translate } from './pb-i18n.js';
|
|
8
|
+
import { get as i18n, translate } from './pb-i18n.js';
|
|
13
9
|
|
|
14
10
|
/**
|
|
15
11
|
* A table grid based on [gridjs](https://gridjs.io/), which loads its data from a server endpoint
|
|
@@ -114,10 +110,25 @@ export class PbTableGrid extends themableMixin(pbMixin(LitElement)) {
|
|
|
114
110
|
this._pbColumns = [];
|
|
115
111
|
this._columns = [];
|
|
116
112
|
this._selectedRow = null;
|
|
113
|
+
this._gridI18nInitialized = false;
|
|
114
|
+
this._visibilityApplyFrame = null;
|
|
117
115
|
this._onTableClick = this._onTableClick.bind(this);
|
|
118
116
|
this._onDocumentClick = this._onDocumentClick.bind(this);
|
|
119
117
|
}
|
|
120
118
|
|
|
119
|
+
_applyPaginationPosition() {
|
|
120
|
+
if (!this.grid || !this.grid.plugin) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
const paginationPlugin = this.grid.plugin.get('pagination');
|
|
124
|
+
if (!paginationPlugin) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
paginationPlugin.position = this.paginationTop
|
|
128
|
+
? PluginPosition.Header
|
|
129
|
+
: PluginPosition.Footer;
|
|
130
|
+
}
|
|
131
|
+
|
|
121
132
|
async connectedCallback() {
|
|
122
133
|
super.connectedCallback();
|
|
123
134
|
document.addEventListener('click', this._onDocumentClick);
|
|
@@ -134,10 +145,15 @@ export class PbTableGrid extends themableMixin(pbMixin(LitElement)) {
|
|
|
134
145
|
this.subscribeTo(
|
|
135
146
|
'pb-i18n-update',
|
|
136
147
|
ev => {
|
|
137
|
-
const needsRefresh = this.language
|
|
148
|
+
const needsRefresh = this.language !== ev.detail.language;
|
|
138
149
|
this.language = ev.detail.language;
|
|
139
|
-
|
|
140
|
-
|
|
150
|
+
const needsInitialI18nRefresh = !this._gridI18nInitialized;
|
|
151
|
+
if ((needsRefresh || needsInitialI18nRefresh) && this.grid) {
|
|
152
|
+
this._gridI18nInitialized = true;
|
|
153
|
+
if (needsRefresh) {
|
|
154
|
+
this._applyPaginationPosition();
|
|
155
|
+
this._submit();
|
|
156
|
+
}
|
|
141
157
|
}
|
|
142
158
|
},
|
|
143
159
|
[],
|
|
@@ -166,6 +182,10 @@ export class PbTableGrid extends themableMixin(pbMixin(LitElement)) {
|
|
|
166
182
|
}
|
|
167
183
|
|
|
168
184
|
disconnectedCallback() {
|
|
185
|
+
if (this._visibilityApplyFrame !== null) {
|
|
186
|
+
cancelAnimationFrame(this._visibilityApplyFrame);
|
|
187
|
+
this._visibilityApplyFrame = null;
|
|
188
|
+
}
|
|
169
189
|
document.removeEventListener('click', this._onDocumentClick);
|
|
170
190
|
super.disconnectedCallback();
|
|
171
191
|
}
|
|
@@ -186,6 +206,7 @@ export class PbTableGrid extends themableMixin(pbMixin(LitElement)) {
|
|
|
186
206
|
height: this.height,
|
|
187
207
|
fixedHeader: true,
|
|
188
208
|
columns: this._columns,
|
|
209
|
+
language: this._gridLanguageConfig(),
|
|
189
210
|
resizable: this.resizable,
|
|
190
211
|
server: {
|
|
191
212
|
url,
|
|
@@ -210,9 +231,9 @@ export class PbTableGrid extends themableMixin(pbMixin(LitElement)) {
|
|
|
210
231
|
limit: this.perPage,
|
|
211
232
|
server: {
|
|
212
233
|
url: (prev, page, limit) => {
|
|
213
|
-
const form = this.shadowRoot.getElementById('form');
|
|
234
|
+
const form = this.shadowRoot.getElementById('search-form');
|
|
214
235
|
if (form) {
|
|
215
|
-
Object.assign(this._params,
|
|
236
|
+
Object.assign(this._params, this._serializeForm(form));
|
|
216
237
|
}
|
|
217
238
|
this._params = this._paramsFromSubforms(this._params);
|
|
218
239
|
this._params.limit = limit;
|
|
@@ -238,15 +259,17 @@ export class PbTableGrid extends themableMixin(pbMixin(LitElement)) {
|
|
|
238
259
|
};
|
|
239
260
|
|
|
240
261
|
this.grid = new Grid(config);
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}
|
|
244
|
-
this.grid.on('load', () => {
|
|
262
|
+
this._applyPaginationPosition();
|
|
263
|
+
this.grid.on('ready', () => {
|
|
245
264
|
this._clearRowSelection();
|
|
265
|
+
if (this.paginationTop) {
|
|
266
|
+
// `forceRender()` can reset GridJS plugin state; re-apply after each ready event.
|
|
267
|
+
this.grid.plugin.get('pagination').position = PluginPosition.Header;
|
|
268
|
+
}
|
|
246
269
|
this.emitTo('pb-results-received', {
|
|
247
270
|
params: this._params,
|
|
248
271
|
});
|
|
249
|
-
this.
|
|
272
|
+
this._scheduleColumnVisibilityReapply();
|
|
250
273
|
});
|
|
251
274
|
|
|
252
275
|
this.grid.render(table);
|
|
@@ -293,6 +316,16 @@ export class PbTableGrid extends themableMixin(pbMixin(LitElement)) {
|
|
|
293
316
|
});
|
|
294
317
|
}
|
|
295
318
|
|
|
319
|
+
_scheduleColumnVisibilityReapply() {
|
|
320
|
+
if (this._visibilityApplyFrame !== null) {
|
|
321
|
+
cancelAnimationFrame(this._visibilityApplyFrame);
|
|
322
|
+
}
|
|
323
|
+
this._visibilityApplyFrame = requestAnimationFrame(() => {
|
|
324
|
+
this._visibilityApplyFrame = null;
|
|
325
|
+
this._applyColumnVisibilityToDom();
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
|
|
296
329
|
_onTableClick(event) {
|
|
297
330
|
const row = event.target.closest('tbody tr');
|
|
298
331
|
if (!row) {
|
|
@@ -329,6 +362,38 @@ export class PbTableGrid extends themableMixin(pbMixin(LitElement)) {
|
|
|
329
362
|
this.grid.forceRender();
|
|
330
363
|
}
|
|
331
364
|
|
|
365
|
+
_gridLanguageConfig() {
|
|
366
|
+
return {
|
|
367
|
+
search: {
|
|
368
|
+
placeholder: () => i18n('tableGrid.searchPlaceholder'),
|
|
369
|
+
},
|
|
370
|
+
sort: {
|
|
371
|
+
sortAsc: () => i18n('tableGrid.sortAsc'),
|
|
372
|
+
sortDesc: () => i18n('tableGrid.sortDesc'),
|
|
373
|
+
},
|
|
374
|
+
pagination: {
|
|
375
|
+
previous: () => i18n('tableGrid.previous'),
|
|
376
|
+
next: () => i18n('tableGrid.next'),
|
|
377
|
+
navigate: (page, pages) =>
|
|
378
|
+
i18n('tableGrid.navigate', {
|
|
379
|
+
page,
|
|
380
|
+
pages,
|
|
381
|
+
}),
|
|
382
|
+
page: page =>
|
|
383
|
+
i18n('tableGrid.page', {
|
|
384
|
+
page,
|
|
385
|
+
}),
|
|
386
|
+
showing: () => i18n('tableGrid.showing'),
|
|
387
|
+
to: () => i18n('tableGrid.to'),
|
|
388
|
+
of: () => i18n('tableGrid.of'),
|
|
389
|
+
results: () => i18n('tableGrid.results'),
|
|
390
|
+
},
|
|
391
|
+
loading: () => i18n('tableGrid.loading'),
|
|
392
|
+
noRecordsFound: () => i18n('tableGrid.noRecordsFound'),
|
|
393
|
+
error: () => i18n('tableGrid.error'),
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
|
|
332
397
|
_paramsFromSubforms(params) {
|
|
333
398
|
if (this.subforms) {
|
|
334
399
|
document.querySelectorAll(this.subforms).forEach(form => {
|
|
@@ -340,27 +405,33 @@ export class PbTableGrid extends themableMixin(pbMixin(LitElement)) {
|
|
|
340
405
|
return params;
|
|
341
406
|
}
|
|
342
407
|
|
|
408
|
+
_serializeForm(form) {
|
|
409
|
+
const data = {};
|
|
410
|
+
const formData = new FormData(form);
|
|
411
|
+
formData.forEach((value, key) => {
|
|
412
|
+
data[key] = value;
|
|
413
|
+
});
|
|
414
|
+
return data;
|
|
415
|
+
}
|
|
416
|
+
|
|
343
417
|
render() {
|
|
344
418
|
return html`
|
|
345
419
|
${this.search
|
|
346
420
|
? html`
|
|
347
|
-
<
|
|
348
|
-
<
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
</paper-input>
|
|
362
|
-
</form>
|
|
363
|
-
</iron-form>
|
|
421
|
+
<form id="search-form" action="">
|
|
422
|
+
<input
|
|
423
|
+
id="search"
|
|
424
|
+
name="search"
|
|
425
|
+
type="search"
|
|
426
|
+
.value="${this._params.search || ''}"
|
|
427
|
+
aria-label="${translate('tableGrid.search')}"
|
|
428
|
+
placeholder="${translate('tableGrid.searchPlaceholder')}"
|
|
429
|
+
@keyup="${e => (e.key === 'Enter' ? this._submit() : null)}"
|
|
430
|
+
/>
|
|
431
|
+
<button type="button" @click="${this._submit}">
|
|
432
|
+
${translate('tableGrid.search')}
|
|
433
|
+
</button>
|
|
434
|
+
</form>
|
|
364
435
|
`
|
|
365
436
|
: null}
|
|
366
437
|
<div id="table"></div>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
name: Release npm package
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
- next-3
|
|
8
|
-
|
|
9
|
-
permissions:
|
|
10
|
-
contents: read # for checkout
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
release:
|
|
14
|
-
name: Release
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
permissions:
|
|
17
|
-
contents: write # to be able to publish a GitHub release
|
|
18
|
-
issues: write # to be able to comment on released issues
|
|
19
|
-
pull-requests: write # to be able to comment on released pull requests
|
|
20
|
-
id-token: write # to enable use of OIDC for trusted publishing and npm provenance
|
|
21
|
-
steps:
|
|
22
|
-
- uses: actions/checkout@v5
|
|
23
|
-
- uses: actions/setup-node@v5
|
|
24
|
-
with:
|
|
25
|
-
node-version: "22"
|
|
26
|
-
- name: npm install and build
|
|
27
|
-
run:
|
|
28
|
-
npm ci
|
|
29
|
-
npm run build:production
|
|
30
|
-
- name: Build docker image
|
|
31
|
-
run: docker build -t exist-db -f Dockerfile .
|
|
32
|
-
- name: Start docker image
|
|
33
|
-
run: docker run --publish 8080:8080 --detach exist-db
|
|
34
|
-
- name: Wait for eXist
|
|
35
|
-
uses: iFaxity/wait-on-action@v1
|
|
36
|
-
with:
|
|
37
|
-
resource: http-get://localhost:8080/exist/apps/tei-publisher/api/version
|
|
38
|
-
- run: npm test
|
|
39
|
-
- run: npx semantic-release
|
|
40
|
-
env:
|
|
41
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
42
|
-
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
|