@teipublisher/pb-components 2.26.1-next.3 → 3.0.0-next-4.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.
Files changed (262) hide show
  1. package/.github/workflows/docker-cypress.yml +53 -0
  2. package/.github/workflows/node.js.yml +70 -21
  3. package/.releaserc.json +7 -2
  4. package/CHANGELOG.md +363 -11
  5. package/Dockerfile +78 -70
  6. package/README.md +112 -4
  7. package/css/components.css +5 -5
  8. package/css/gridjs/mermaid.min.css +1 -1
  9. package/css/leaflet/Control.Geocoder.css +1 -126
  10. package/css/leaflet/images/layers.png +0 -0
  11. package/css/tify/tify.css +6 -5
  12. package/css/tom-select/tom-select.bootstrap4.min.css +1 -1
  13. package/css/tom-select/tom-select.bootstrap5.min.css +1 -1
  14. package/css/tom-select/tom-select.default.min.css +1 -1
  15. package/css/tom-select/tom-select.default.min.css.map +1 -0
  16. package/css/tom-select/tom-select.min.css +1 -1
  17. package/cypress.config.js +84 -0
  18. package/dist/api.html +1 -1
  19. package/dist/css/design-system.css +607 -0
  20. package/dist/demo/bundle-test.html +4 -3
  21. package/dist/demo/components.css +46 -1
  22. package/dist/demo/design-system.html +710 -0
  23. package/dist/demo/dts-client.html +2 -2
  24. package/dist/demo/pb-autocomplete.html +23 -11
  25. package/dist/demo/pb-autocomplete2.html +66 -55
  26. package/dist/demo/pb-autocomplete3.html +17 -8
  27. package/dist/demo/pb-blacklab-highlight.html +28 -11
  28. package/dist/demo/pb-blacklab-results.html +3 -2
  29. package/dist/demo/pb-browse-docs.html +24 -24
  30. package/dist/demo/pb-browse-docs2.html +3 -3
  31. package/dist/demo/pb-clipboard.html +32 -28
  32. package/dist/demo/pb-code-editor.html +6 -6
  33. package/dist/demo/pb-code-highlight.html +63 -63
  34. package/dist/demo/pb-codepen.html +1 -1
  35. package/dist/demo/pb-collapse.html +1 -1
  36. package/dist/demo/pb-collapse2.html +2 -2
  37. package/dist/demo/pb-combo-box.html +135 -130
  38. package/dist/demo/pb-custom-form.html +64 -55
  39. package/dist/demo/pb-dialog.html +12 -6
  40. package/dist/demo/pb-document.html +1 -1
  41. package/dist/demo/pb-download.html +68 -59
  42. package/dist/demo/pb-drawer.html +67 -46
  43. package/dist/demo/pb-drawer2.html +65 -58
  44. package/dist/demo/pb-edit-app.html +2 -2
  45. package/dist/demo/pb-edit-xml.html +1 -1
  46. package/dist/demo/pb-facsimile-2.html +26 -11
  47. package/dist/demo/pb-facsimile-3.html +25 -10
  48. package/dist/demo/pb-facsimile-dedup-test-2.html +48 -0
  49. package/dist/demo/pb-facsimile-dedup-test.html +48 -0
  50. package/dist/demo/pb-facsimile.html +4 -4
  51. package/dist/demo/pb-formula.html +1 -1
  52. package/dist/demo/pb-grid.html +22 -8
  53. package/dist/demo/pb-highlight.html +2 -2
  54. package/dist/demo/pb-i18n-simple.html +1 -0
  55. package/dist/demo/pb-i18n.html +15 -5
  56. package/dist/demo/pb-image-strip-standalone.html +2 -2
  57. package/dist/demo/pb-image-strip-view.html +2 -2
  58. package/dist/demo/pb-leaflet-map.html +3 -3
  59. package/dist/demo/pb-leaflet-map2.html +2 -2
  60. package/dist/demo/pb-leaflet-map3.html +3 -3
  61. package/dist/demo/pb-link.html +1 -1
  62. package/dist/demo/pb-load.html +2 -6
  63. package/dist/demo/pb-login.html +1 -3
  64. package/dist/demo/pb-manage-odds.html +9 -4
  65. package/dist/demo/pb-markdown.html +1 -1
  66. package/dist/demo/pb-media-query.html +2 -2
  67. package/dist/demo/pb-mei.html +2 -2
  68. package/dist/demo/pb-mei2.html +2 -2
  69. package/dist/demo/pb-message.html +2 -3
  70. package/dist/demo/pb-odd-editor.html +54 -52
  71. package/dist/demo/pb-page-header.html +27 -0
  72. package/dist/demo/pb-popover.html +1 -1
  73. package/dist/demo/pb-print-preview.html +2 -2
  74. package/dist/demo/pb-progress.html +4 -4
  75. package/dist/demo/pb-repeat.html +32 -36
  76. package/dist/demo/pb-search.html +16 -5
  77. package/dist/demo/pb-search2.html +4 -4
  78. package/dist/demo/pb-search3.html +3 -3
  79. package/dist/demo/pb-search4.html +3 -3
  80. package/dist/demo/pb-select-feature.html +4 -4
  81. package/dist/demo/pb-select-feature2.html +4 -4
  82. package/dist/demo/pb-select-feature3.html +2 -2
  83. package/dist/demo/pb-select-i18n.html +58 -53
  84. package/dist/demo/pb-select-odd.html +1 -1
  85. package/dist/demo/pb-select.html +190 -75
  86. package/dist/demo/pb-select2.html +91 -37
  87. package/dist/demo/pb-select3.html +109 -41
  88. package/dist/demo/pb-svg.html +1 -1
  89. package/dist/demo/pb-table-grid.html +26 -15
  90. package/dist/demo/pb-tabs.html +15 -7
  91. package/dist/demo/pb-tify.html +7 -7
  92. package/dist/demo/pb-timeline.html +1 -1
  93. package/dist/demo/pb-timeline2.html +1 -1
  94. package/dist/demo/pb-toggle-feature.html +26 -23
  95. package/dist/demo/pb-toggle-feature2.html +4 -4
  96. package/dist/demo/pb-toggle-feature3.html +2 -2
  97. package/dist/demo/pb-toggle-feature4.html +56 -54
  98. package/dist/demo/pb-version.html +2 -2
  99. package/dist/demo/pb-view.html +78 -40
  100. package/dist/demo/pb-view2.html +69 -46
  101. package/dist/demo/pb-view3.html +53 -48
  102. package/dist/demo/pb-view4.html +70 -49
  103. package/dist/demo/pb-zoom.html +2 -2
  104. package/dist/{es-global-bridge-d8ce175d.js → es-global-bridge-D8ZcUcx_.js} +0 -4
  105. package/dist/focus-mixin-VCsFap6b.js +768 -0
  106. package/dist/images/icons.svg +217 -0
  107. package/dist/jinn-codemirror-DETLdm08.js +1 -0
  108. package/dist/lib/openseadragon.min.js +80 -0
  109. package/dist/lib/openseadragon.min.js.map +1 -0
  110. package/dist/pb-code-editor.js +25 -20
  111. package/dist/pb-component-docs.js +414 -3225
  112. package/dist/pb-components-bundle.js +3046 -4402
  113. package/dist/pb-dialog-tklYGWfc.js +121 -0
  114. package/dist/pb-edit-app.js +208 -107
  115. package/dist/pb-elements.json +716 -249
  116. package/dist/pb-facsimile.js +46 -0
  117. package/dist/pb-i18n-C0NDma4h.js +1 -0
  118. package/dist/pb-leaflet-map.js +23 -23
  119. package/dist/pb-mei.js +152 -134
  120. package/dist/pb-mixin-DHoWQheB.js +1 -0
  121. package/dist/pb-odd-editor.js +1671 -1231
  122. package/dist/pb-tify.js +1 -27
  123. package/dist/unsafe-html-D5VGo9Oq.js +1 -0
  124. package/dist/urls-BEONu_g4.js +1 -0
  125. package/eslint.config.mjs +92 -0
  126. package/gh-pages.js +5 -3
  127. package/i18n/common/en.json +6 -0
  128. package/i18n/common/pl.json +2 -2
  129. package/images/icons.svg +217 -0
  130. package/index.html +0 -5
  131. package/lib/leaflet-src.js.map +1 -0
  132. package/lib/leaflet.markercluster-src.js.map +1 -0
  133. package/lib/openseadragon.min.js +6 -6
  134. package/package.json +56 -81
  135. package/pb-elements.json +716 -249
  136. package/rollup.config.mjs +312 -0
  137. package/src/assets/components.css +5 -5
  138. package/src/assets/design-system.css +607 -0
  139. package/src/authority/airtable.js +20 -21
  140. package/src/authority/anton.js +129 -129
  141. package/src/authority/custom.js +70 -27
  142. package/src/authority/geonames.js +38 -32
  143. package/src/authority/gnd.js +50 -42
  144. package/src/authority/kbga.js +136 -134
  145. package/src/authority/metagrid.js +44 -46
  146. package/src/authority/reconciliation.js +66 -68
  147. package/src/authority/registry.js +4 -4
  148. package/src/docs/demo-utils.js +91 -0
  149. package/src/docs/pb-component-docs.js +287 -147
  150. package/src/docs/pb-component-view.js +380 -273
  151. package/src/docs/pb-components-list.js +115 -51
  152. package/src/docs/pb-demo-snippet.js +199 -174
  153. package/src/dts-client.js +306 -303
  154. package/src/dts-select-endpoint.js +125 -85
  155. package/src/parse-date-service.js +184 -135
  156. package/src/pb-ajax.js +175 -173
  157. package/src/pb-authority-lookup.js +198 -158
  158. package/src/pb-autocomplete.js +731 -313
  159. package/src/pb-blacklab-highlight.js +266 -260
  160. package/src/pb-blacklab-results.js +230 -225
  161. package/src/pb-browse-docs.js +601 -484
  162. package/src/pb-browse.js +68 -65
  163. package/src/pb-clipboard.js +97 -76
  164. package/src/pb-code-editor.js +111 -103
  165. package/src/pb-code-highlight.js +234 -204
  166. package/src/pb-codepen.js +81 -73
  167. package/src/pb-collapse.js +265 -152
  168. package/src/pb-combo-box.js +191 -191
  169. package/src/pb-components-bundle.js +1 -7
  170. package/src/pb-components.js +2 -6
  171. package/src/pb-custom-form.js +230 -141
  172. package/src/pb-dialog.js +99 -63
  173. package/src/pb-document.js +118 -91
  174. package/src/pb-download.js +214 -198
  175. package/src/pb-drawer.js +146 -149
  176. package/src/pb-edit-app.js +471 -240
  177. package/src/pb-edit-xml.js +101 -98
  178. package/src/pb-events.js +126 -107
  179. package/src/pb-facs-link.js +130 -101
  180. package/src/pb-facsimile.js +494 -410
  181. package/src/pb-fetch.js +389 -0
  182. package/src/pb-formula.js +152 -154
  183. package/src/pb-geolocation.js +130 -132
  184. package/src/pb-grid-action.js +59 -56
  185. package/src/pb-grid.js +388 -228
  186. package/src/pb-highlight.js +142 -142
  187. package/src/pb-hotkeys.js +40 -42
  188. package/src/pb-i18n.js +115 -127
  189. package/src/pb-icon-button.js +108 -0
  190. package/src/pb-icon.js +283 -0
  191. package/src/pb-image-strip.js +85 -79
  192. package/src/pb-lang.js +142 -57
  193. package/src/pb-leaflet-map.js +551 -483
  194. package/src/pb-link.js +132 -126
  195. package/src/pb-load.js +495 -428
  196. package/src/pb-login.js +303 -248
  197. package/src/pb-manage-odds.js +384 -338
  198. package/src/pb-map-icon.js +90 -90
  199. package/src/pb-map-layer.js +86 -86
  200. package/src/pb-markdown.js +107 -110
  201. package/src/pb-media-query.js +75 -73
  202. package/src/pb-mei.js +523 -303
  203. package/src/pb-message.js +144 -98
  204. package/src/pb-mixin.js +268 -265
  205. package/src/pb-navigation.js +83 -96
  206. package/src/pb-observable.js +39 -39
  207. package/src/pb-odd-editor.js +1209 -948
  208. package/src/pb-odd-elementspec-editor.js +375 -310
  209. package/src/pb-odd-model-editor.js +1189 -941
  210. package/src/pb-odd-parameter-editor.js +269 -170
  211. package/src/pb-odd-rendition-editor.js +184 -131
  212. package/src/pb-page.js +451 -422
  213. package/src/pb-paginate.js +260 -178
  214. package/src/pb-panel.js +217 -183
  215. package/src/pb-popover-themes.js +16 -9
  216. package/src/pb-popover.js +297 -288
  217. package/src/pb-print-preview.js +128 -128
  218. package/src/pb-progress.js +52 -52
  219. package/src/pb-repeat.js +141 -108
  220. package/src/pb-restricted.js +85 -78
  221. package/src/pb-search.js +258 -230
  222. package/src/pb-select-feature.js +210 -126
  223. package/src/pb-select-odd.js +184 -118
  224. package/src/pb-select-template.js +113 -78
  225. package/src/pb-select.js +330 -229
  226. package/src/pb-split-list.js +181 -176
  227. package/src/pb-svg.js +81 -80
  228. package/src/pb-table-column.js +55 -55
  229. package/src/pb-table-grid.js +334 -205
  230. package/src/pb-tabs.js +238 -61
  231. package/src/pb-tify.js +3331 -126
  232. package/src/pb-timeline.js +394 -255
  233. package/src/pb-toggle-feature.js +196 -188
  234. package/src/pb-upload.js +201 -176
  235. package/src/pb-version.js +22 -34
  236. package/src/pb-view-annotate.js +138 -102
  237. package/src/pb-view.js +1722 -1272
  238. package/src/pb-zoom.js +144 -46
  239. package/src/search-result-service.js +256 -223
  240. package/src/seed-element.js +14 -22
  241. package/src/settings.js +4 -4
  242. package/src/theming.js +98 -91
  243. package/src/urls.js +403 -289
  244. package/src/utils.js +53 -51
  245. package/vite.config.js +86 -0
  246. package/.github/workflows/main.yml +0 -24
  247. package/.github/workflows/release.js.yml +0 -34
  248. package/css/pb-styles.css +0 -51
  249. package/dist/iron-form-3b8dcaa7.js +0 -210
  250. package/dist/jinn-codemirror-da0e2d1f.js +0 -1
  251. package/dist/paper-checkbox-515a5284.js +0 -1597
  252. package/dist/paper-icon-button-b1d31571.js +0 -398
  253. package/dist/paper-listbox-a3b7175c.js +0 -1265
  254. package/dist/pb-i18n-0611135a.js +0 -1
  255. package/dist/pb-mixin-b1caa22e.js +0 -158
  256. package/dist/polymer-hack.js +0 -1
  257. package/dist/vaadin-element-mixin-fe4a4883.js +0 -527
  258. package/lib/Control.Geocoder.min.js +0 -2
  259. package/lib/Control.Geocoder.min.js.map +0 -1
  260. package/src/assets/pb-styles.css +0 -51
  261. package/src/pb-light-dom.js +0 -41
  262. package/src/polymer-hack.js +0 -6
@@ -1 +0,0 @@
1
- import{L as t,N as e,A as n,f as s}from"./pb-mixin-b1caa22e.js";const i=new Map;let a;function o(t){a=t}function r(t){return t instanceof e?t.startNode.isConnected:t instanceof n?t.committer.element.isConnected:t.element.isConnected}function c(){Object.keys(i).forEach(t=>{r(t)||i.delete(t)})}function l(t){"requestIdleCallback"in window?window.requestIdleCallback(t):setTimeout(t)}function d(t,e){const n=e();t.value!==n&&(t.setValue(n),t.commit())}function u(t){a=t.t,i.forEach((t,e)=>{r(e)&&d(e,t)})}function p(t,e){return a?a(t,e):t}const h=s(t=>e=>{i.set(e,t),d(e,t)}),b=(t,e)=>h(()=>p(t,e));document.addEventListener("pb-i18n-update",t=>{u(t.detail)}),setInterval(()=>l(()=>c()),6e4);class f extends t{static get properties(){return Object.assign(Object.assign({},super.properties),{},{key:{type:String},options:{type:Object},_translated:{type:String}})}constructor(){super(),this.key="missing-key",this._options=null,this._translated=null}connectedCallback(){super.connectedCallback(),this._fallback=this.innerHTML,document.addEventListener("pb-i18n-update",this._translate.bind(this)),this._translate()}set options(t){this._options=t,this._translate()}_translate(){const t=p(this.key,this._options);t&&t!==this.key?this._translated=t:this._translated=null}render(){return this._translated?this._translated:this._fallback}createRenderRoot(){return this}}customElements.define("pb-i18n",f);export{p as g,o as i,b as t};
@@ -1,158 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
4
- * This code may only be used under the BSD style license found at
5
- * http://polymer.github.io/LICENSE.txt
6
- * The complete set of authors may be found at
7
- * http://polymer.github.io/AUTHORS.txt
8
- * The complete set of contributors may be found at
9
- * http://polymer.github.io/CONTRIBUTORS.txt
10
- * Code distributed by Google as part of the polymer project is also
11
- * subject to an additional IP rights grant found at
12
- * http://polymer.github.io/PATENTS.txt
13
- */
14
- const t="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,e=(t,e,s=null,i=null)=>{for(;e!==s;){const s=e.nextSibling;t.insertBefore(e,i),e=s}},s=(t,e,s=null)=>{for(;e!==s;){const s=e.nextSibling;t.removeChild(e),e=s}},i=`{{lit-${String(Math.random()).slice(2)}}}`,n=`\x3c!--${i}--\x3e`,r=new RegExp(`${i}|${n}`),o="$lit$";class a{constructor(t,e){this.parts=[],this.element=e;const s=[],n=[],a=document.createTreeWalker(e.content,133,null,!1);let c=0,u=-1,p=0;const{strings:m,values:{length:_}}=t;for(;p<_;){const t=a.nextNode();if(null!==t){if(u++,1===t.nodeType){if(t.hasAttributes()){const e=t.attributes,{length:s}=e;let i=0;for(let t=0;t<s;t++)l(e[t].name,o)&&i++;for(;i-- >0;){const e=m[p],s=d.exec(e)[2],i=s.toLowerCase()+o,n=t.getAttribute(i);t.removeAttribute(i);const a=n.split(r);this.parts.push({type:"attribute",index:u,name:s,strings:a}),p+=a.length-1}}"TEMPLATE"===t.tagName&&(n.push(t),a.currentNode=t.content)}else if(3===t.nodeType){const e=t.data;if(e.indexOf(i)>=0){const i=t.parentNode,n=e.split(r),a=n.length-1;for(let e=0;e<a;e++){let s,r=n[e];if(""===r)s=h();else{const t=d.exec(r);null!==t&&l(t[2],o)&&(r=r.slice(0,t.index)+t[1]+t[2].slice(0,-o.length)+t[3]),s=document.createTextNode(r)}i.insertBefore(s,t),this.parts.push({type:"node",index:++u})}""===n[a]?(i.insertBefore(h(),t),s.push(t)):t.data=n[a],p+=a}}else if(8===t.nodeType)if(t.data===i){const e=t.parentNode;null!==t.previousSibling&&u!==c||(u++,e.insertBefore(h(),t)),c=u,this.parts.push({type:"node",index:u}),null===t.nextSibling?t.data="":(s.push(t),u--),p++}else{let e=-1;for(;-1!==(e=t.data.indexOf(i,e+1));)this.parts.push({type:"node",index:-1}),p++}}else a.currentNode=n.pop()}for(const t of s)t.parentNode.removeChild(t)}}const l=(t,e)=>{const s=t.length-e.length;return s>=0&&t.slice(s)===e},c=t=>-1!==t.index,h=()=>document.createComment(""),d=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,u=133;function p(t,e){const{element:{content:s},parts:i}=t,n=document.createTreeWalker(s,u,null,!1);let r=_(i),o=i[r],a=-1,l=0;const c=[];let h=null;for(;n.nextNode();){a++;const t=n.currentNode;for(t.previousSibling===h&&(h=null),e.has(t)&&(c.push(t),null===h&&(h=t)),null!==h&&l++;void 0!==o&&o.index===a;)o.index=null!==h?-1:o.index-l,r=_(i,r),o=i[r]}c.forEach(t=>t.parentNode.removeChild(t))}const m=t=>{let e=11===t.nodeType?0:1;const s=document.createTreeWalker(t,u,null,!1);for(;s.nextNode();)e++;return e},_=(t,e=-1)=>{for(let s=e+1;s<t.length;s++){const e=t[s];if(c(e))return s}return-1};function f(t,e,s=null){const{element:{content:i},parts:n}=t;if(null==s)return void i.appendChild(e);const r=document.createTreeWalker(i,u,null,!1);let o=_(n),a=0,l=-1;for(;r.nextNode();){l++;for(r.currentNode===s&&(a=m(e),s.parentNode.insertBefore(e,s));-1!==o&&n[o].index===l;){if(a>0){for(;-1!==o;)n[o].index+=a,o=_(n,o);return}o=_(n,o)}}}
15
- /**
16
- * @license
17
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
18
- * This code may only be used under the BSD style license found at
19
- * http://polymer.github.io/LICENSE.txt
20
- * The complete set of authors may be found at
21
- * http://polymer.github.io/AUTHORS.txt
22
- * The complete set of contributors may be found at
23
- * http://polymer.github.io/CONTRIBUTORS.txt
24
- * Code distributed by Google as part of the polymer project is also
25
- * subject to an additional IP rights grant found at
26
- * http://polymer.github.io/PATENTS.txt
27
- */const y=new WeakMap,g=t=>(...e)=>{const s=t(...e);return y.set(s,!0),s},S=t=>"function"==typeof t&&y.has(t),b={},w={};
28
- /**
29
- * @license
30
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
31
- * This code may only be used under the BSD style license found at
32
- * http://polymer.github.io/LICENSE.txt
33
- * The complete set of authors may be found at
34
- * http://polymer.github.io/AUTHORS.txt
35
- * The complete set of contributors may be found at
36
- * http://polymer.github.io/CONTRIBUTORS.txt
37
- * Code distributed by Google as part of the polymer project is also
38
- * subject to an additional IP rights grant found at
39
- * http://polymer.github.io/PATENTS.txt
40
- */
41
- class v{constructor(t,e,s){this.__parts=[],this.template=t,this.processor=e,this.options=s}update(t){let e=0;for(const s of this.__parts)void 0!==s&&s.setValue(t[e]),e++;for(const t of this.__parts)void 0!==t&&t.commit()}_clone(){const e=t?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),s=[],i=this.template.parts,n=document.createTreeWalker(e,133,null,!1);let r,o=0,a=0,l=n.nextNode();for(;o<i.length;)if(r=i[o],c(r)){for(;a<r.index;)a++,"TEMPLATE"===l.nodeName&&(s.push(l),n.currentNode=l.content),null===(l=n.nextNode())&&(n.currentNode=s.pop(),l=n.nextNode());if("node"===r.type){const t=this.processor.handleTextExpression(this.options);t.insertAfterNode(l.previousSibling),this.__parts.push(t)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,r.name,r.strings,this.options));o++}else this.__parts.push(void 0),o++;return t&&(document.adoptNode(e),customElements.upgrade(e)),e}}
42
- /**
43
- * @license
44
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
45
- * This code may only be used under the BSD style license found at
46
- * http://polymer.github.io/LICENSE.txt
47
- * The complete set of authors may be found at
48
- * http://polymer.github.io/AUTHORS.txt
49
- * The complete set of contributors may be found at
50
- * http://polymer.github.io/CONTRIBUTORS.txt
51
- * Code distributed by Google as part of the polymer project is also
52
- * subject to an additional IP rights grant found at
53
- * http://polymer.github.io/PATENTS.txt
54
- */const P=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:t=>t}),x=` ${i} `;class C{constructor(t,e,s,i){this.strings=t,this.values=e,this.type=s,this.processor=i}getHTML(){const t=this.strings.length-1;let e="",s=!1;for(let r=0;r<t;r++){const t=this.strings[r],a=t.lastIndexOf("\x3c!--");s=(a>-1||s)&&-1===t.indexOf("--\x3e",a+1);const l=d.exec(t);e+=null===l?t+(s?x:n):t.substr(0,l.index)+l[1]+l[2]+o+l[3]+i}return e+=this.strings[t],e}getTemplateElement(){const t=document.createElement("template");let e=this.getHTML();return void 0!==P&&(e=P.createHTML(e)),t.innerHTML=e,t}}
55
- /**
56
- * @license
57
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
58
- * This code may only be used under the BSD style license found at
59
- * http://polymer.github.io/LICENSE.txt
60
- * The complete set of authors may be found at
61
- * http://polymer.github.io/AUTHORS.txt
62
- * The complete set of contributors may be found at
63
- * http://polymer.github.io/CONTRIBUTORS.txt
64
- * Code distributed by Google as part of the polymer project is also
65
- * subject to an additional IP rights grant found at
66
- * http://polymer.github.io/PATENTS.txt
67
- */const N=t=>null===t||!("object"==typeof t||"function"==typeof t),E=t=>Array.isArray(t)||!(!t||!t[Symbol.iterator]);class T{constructor(t,e,s){this.dirty=!0,this.element=t,this.name=e,this.strings=s,this.parts=[];for(let t=0;t<s.length-1;t++)this.parts[t]=this._createPart()}_createPart(){return new A(this)}_getValue(){const t=this.strings,e=t.length-1,s=this.parts;if(1===e&&""===t[0]&&""===t[1]){const t=s[0].value;if("symbol"==typeof t)return String(t);if("string"==typeof t||!E(t))return t}let i="";for(let n=0;n<e;n++){i+=t[n];const e=s[n];if(void 0!==e){const t=e.value;if(N(t)||!E(t))i+="string"==typeof t?t:String(t);else for(const e of t)i+="string"==typeof e?e:String(e)}}return i+=t[e],i}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class A{constructor(t){this.value=void 0,this.committer=t}setValue(t){t===b||N(t)&&t===this.value||(this.value=t,S(t)||(this.committer.dirty=!0))}commit(){for(;S(this.value);){const t=this.value;this.value=b,t(this)}this.value!==b&&this.committer.commit()}}class V{constructor(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}appendInto(t){this.startNode=t.appendChild(h()),this.endNode=t.appendChild(h())}insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling}appendIntoPart(t){t.__insert(this.startNode=h()),t.__insert(this.endNode=h())}insertAfterPart(t){t.__insert(this.startNode=h()),this.endNode=t.endNode,t.endNode=this.startNode}setValue(t){this.__pendingValue=t}commit(){if(null===this.startNode.parentNode)return;for(;S(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=b,t(this)}const t=this.__pendingValue;t!==b&&(N(t)?t!==this.value&&this.__commitText(t):t instanceof C?this.__commitTemplateResult(t):t instanceof Node?this.__commitNode(t):E(t)?this.__commitIterable(t):t===w?(this.value=w,this.clear()):this.__commitText(t))}__insert(t){this.endNode.parentNode.insertBefore(t,this.endNode)}__commitNode(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)}__commitText(t){const e=this.startNode.nextSibling,s="string"==typeof(t=null==t?"":t)?t:String(t);e===this.endNode.previousSibling&&3===e.nodeType?e.data=s:this.__commitNode(document.createTextNode(s)),this.value=t}__commitTemplateResult(t){const e=this.options.templateFactory(t);if(this.value instanceof v&&this.value.template===e)this.value.update(t.values);else{const s=new v(e,t.processor,this.options),i=s._clone();s.update(t.values),this.__commitNode(i),this.value=s}}__commitIterable(t){Array.isArray(this.value)||(this.value=[],this.clear());const e=this.value;let s,i=0;for(const n of t)s=e[i],void 0===s&&(s=new V(this.options),e.push(s),0===i?s.appendIntoPart(this):s.insertAfterPart(e[i-1])),s.setValue(n),s.commit(),i++;i<e.length&&(e.length=i,this.clear(s&&s.endNode))}clear(t=this.startNode){s(this.startNode.parentNode,t.nextSibling,this.endNode)}}class U{constructor(t,e,s){if(this.value=void 0,this.__pendingValue=void 0,2!==s.length||""!==s[0]||""!==s[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=s}setValue(t){this.__pendingValue=t}commit(){for(;S(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=b,t(this)}if(this.__pendingValue===b)return;const t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=b}}class O extends T{constructor(t,e,s){super(t,e,s),this.single=2===s.length&&""===s[0]&&""===s[1]}_createPart(){return new R(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class R extends A{}let k=!1;(()=>{try{const t={get capture(){return k=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}})();class L{constructor(t,e,s){this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=s,this.__boundHandleEvent=t=>this.handleEvent(t)}setValue(t){this.__pendingValue=t}commit(){for(;S(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=b,t(this)}if(this.__pendingValue===b)return;const t=this.__pendingValue,e=this.value,s=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),i=null!=t&&(null==e||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=M(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=b}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const M=t=>t&&(k?{capture:t.capture,passive:t.passive,once:t.once}:t.capture)
68
- /**
69
- * @license
70
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
71
- * This code may only be used under the BSD style license found at
72
- * http://polymer.github.io/LICENSE.txt
73
- * The complete set of authors may be found at
74
- * http://polymer.github.io/AUTHORS.txt
75
- * The complete set of contributors may be found at
76
- * http://polymer.github.io/CONTRIBUTORS.txt
77
- * Code distributed by Google as part of the polymer project is also
78
- * subject to an additional IP rights grant found at
79
- * http://polymer.github.io/PATENTS.txt
80
- */;function j(t){let e=I.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},I.set(t.type,e));let s=e.stringsArray.get(t.strings);if(void 0!==s)return s;const n=t.strings.join(i);return s=e.keyString.get(n),void 0===s&&(s=new a(t,t.getTemplateElement()),e.keyString.set(n,s)),e.stringsArray.set(t.strings,s),s}const I=new Map,q=new WeakMap,F=(t,e,i)=>{let n=q.get(e);void 0===n&&(s(e,e.firstChild),q.set(e,n=new V(Object.assign({templateFactory:j},i))),n.appendInto(e)),n.setValue(t),n.commit()};
81
- /**
82
- * @license
83
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
84
- * This code may only be used under the BSD style license found at
85
- * http://polymer.github.io/LICENSE.txt
86
- * The complete set of authors may be found at
87
- * http://polymer.github.io/AUTHORS.txt
88
- * The complete set of contributors may be found at
89
- * http://polymer.github.io/CONTRIBUTORS.txt
90
- * Code distributed by Google as part of the polymer project is also
91
- * subject to an additional IP rights grant found at
92
- * http://polymer.github.io/PATENTS.txt
93
- */
94
- /**
95
- * @license
96
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
97
- * This code may only be used under the BSD style license found at
98
- * http://polymer.github.io/LICENSE.txt
99
- * The complete set of authors may be found at
100
- * http://polymer.github.io/AUTHORS.txt
101
- * The complete set of contributors may be found at
102
- * http://polymer.github.io/CONTRIBUTORS.txt
103
- * Code distributed by Google as part of the polymer project is also
104
- * subject to an additional IP rights grant found at
105
- * http://polymer.github.io/PATENTS.txt
106
- */
107
- class B{handleAttributeExpressions(t,e,s,i){const n=e[0];if("."===n){return new O(t,e.slice(1),s).parts}if("@"===n)return[new L(t,e.slice(1),i.eventContext)];if("?"===n)return[new U(t,e.slice(1),s)];return new T(t,e,s).parts}handleTextExpression(t){return new V(t)}}const H=new B;
108
- /**
109
- * @license
110
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
111
- * This code may only be used under the BSD style license found at
112
- * http://polymer.github.io/LICENSE.txt
113
- * The complete set of authors may be found at
114
- * http://polymer.github.io/AUTHORS.txt
115
- * The complete set of contributors may be found at
116
- * http://polymer.github.io/CONTRIBUTORS.txt
117
- * Code distributed by Google as part of the polymer project is also
118
- * subject to an additional IP rights grant found at
119
- * http://polymer.github.io/PATENTS.txt
120
- */"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const $=(t,...e)=>new C(t,e,"html",H)
121
- /**
122
- * @license
123
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
124
- * This code may only be used under the BSD style license found at
125
- * http://polymer.github.io/LICENSE.txt
126
- * The complete set of authors may be found at
127
- * http://polymer.github.io/AUTHORS.txt
128
- * The complete set of contributors may be found at
129
- * http://polymer.github.io/CONTRIBUTORS.txt
130
- * Code distributed by Google as part of the polymer project is also
131
- * subject to an additional IP rights grant found at
132
- * http://polymer.github.io/PATENTS.txt
133
- */,z=(t,e)=>`${t}--${e}`;let W=!0;void 0===window.ShadyCSS?W=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),W=!1);const J=t=>e=>{const s=z(e.type,t);let n=I.get(s);void 0===n&&(n={stringsArray:new WeakMap,keyString:new Map},I.set(s,n));let r=n.stringsArray.get(e.strings);if(void 0!==r)return r;const o=e.strings.join(i);if(r=n.keyString.get(o),void 0===r){const s=e.getTemplateElement();W&&window.ShadyCSS.prepareTemplateDom(s,t),r=new a(e,s),n.keyString.set(o,r)}return n.stringsArray.set(e.strings,r),r},D=["html","svg"],Z=t=>{D.forEach(e=>{const s=I.get(z(e,t));void 0!==s&&s.keyString.forEach(t=>{const{element:{content:e}}=t,s=new Set;Array.from(e.querySelectorAll("style")).forEach(t=>{s.add(t)}),p(t,s)})})},G=new Set,K=(t,e,s)=>{G.add(t);const i=s?s.element:document.createElement("template"),n=e.querySelectorAll("style"),{length:r}=n;if(0===r)return void window.ShadyCSS.prepareTemplateStyles(i,t);const o=document.createElement("style");for(let t=0;t<r;t++){const e=n[t];e.parentNode.removeChild(e),o.textContent+=e.textContent}Z(t);const a=i.content;s?f(s,o,a.firstChild):a.insertBefore(o,a.firstChild),window.ShadyCSS.prepareTemplateStyles(i,t);const l=a.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==l)e.insertBefore(l.cloneNode(!0),e.firstChild);else if(s){a.insertBefore(o,a.firstChild);const t=new Set;t.add(o),p(s,t)}},Q=(t,e,i)=>{if(!i||"object"!=typeof i||!i.scopeName)throw new Error("The `scopeName` option is required.");const n=i.scopeName,r=q.has(e),o=W&&11===e.nodeType&&!!e.host,a=o&&!G.has(n),l=a?document.createDocumentFragment():e;if(F(t,l,Object.assign({templateFactory:J(n)},i)),a){const t=q.get(l);q.delete(l);const i=t.value instanceof v?t.value.template:void 0;K(n,l,i),s(e,e.firstChild),e.appendChild(l),q.set(e,t)}!r&&o&&window.ShadyCSS.styleElement(e.host)};window.JSCompiler_renameProperty=(t,e)=>t;const X={toAttribute(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){switch(e){case Boolean:return null!==t;case Number:return null===t?null:Number(t);case Object:case Array:return JSON.parse(t)}return t}},Y=(t,e)=>e!==t&&(e==e||t==t),tt={attribute:!0,type:String,converter:X,reflect:!1,hasChanged:Y},et=1,st=4,it=8,nt=16,rt="finalized";class ot extends HTMLElement{constructor(){super(),this.initialize()}static get observedAttributes(){this.finalize();const t=[];return this._classProperties.forEach((e,s)=>{const i=this._attributeNameForProperty(s,e);void 0!==i&&(this._attributeToPropertyMap.set(i,s),t.push(i))}),t}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const t=Object.getPrototypeOf(this)._classProperties;void 0!==t&&t.forEach((t,e)=>this._classProperties.set(e,t))}}static createProperty(t,e=tt){if(this._ensureClassProperties(),this._classProperties.set(t,e),e.noAccessor||this.prototype.hasOwnProperty(t))return;const s="symbol"==typeof t?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){const n=this[t];this[e]=i,this.requestUpdateInternal(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this._classProperties&&this._classProperties.get(t)||tt}static finalize(){const t=Object.getPrototypeOf(this);if(t.hasOwnProperty(rt)||t.finalize(),this[rt]=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const t=this.properties,e=[...Object.getOwnPropertyNames(t),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[]];for(const s of e)this.createProperty(s,t[s])}}static _attributeNameForProperty(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}static _valueHasChanged(t,e,s=Y){return s(t,e)}static _propertyValueFromAttribute(t,e){const s=e.type,i=e.converter||X,n="function"==typeof i?i:i.fromAttribute;return n?n(t,s):t}static _propertyValueToAttribute(t,e){if(void 0===e.reflect)return;const s=e.type,i=e.converter;return(i&&i.toAttribute||X.toAttribute)(t,s)}initialize(){this._updateState=0,this._updatePromise=new Promise(t=>this._enableUpdatingResolver=t),this._changedProperties=new Map,this._saveInstanceProperties(),this.requestUpdateInternal()}_saveInstanceProperties(){this.constructor._classProperties.forEach((t,e)=>{if(this.hasOwnProperty(e)){const t=this[e];delete this[e],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(e,t)}})}_applyInstanceProperties(){this._instanceProperties.forEach((t,e)=>this[e]=t),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(t,e,s){e!==s&&this._attributeToProperty(t,s)}_propertyToAttribute(t,e,s=tt){const i=this.constructor,n=i._attributeNameForProperty(t,s);if(void 0!==n){const t=i._propertyValueToAttribute(e,s);if(void 0===t)return;this._updateState=this._updateState|it,null==t?this.removeAttribute(n):this.setAttribute(n,t),this._updateState=this._updateState&~it}}_attributeToProperty(t,e){if(this._updateState&it)return;const s=this.constructor,i=s._attributeToPropertyMap.get(t);if(void 0!==i){const t=s.getPropertyOptions(i);this._updateState=this._updateState|nt,this[i]=s._propertyValueFromAttribute(e,t),this._updateState=this._updateState&~nt}}requestUpdateInternal(t,e,s){let i=!0;if(void 0!==t){const n=this.constructor;s=s||n.getPropertyOptions(t),n._valueHasChanged(this[t],e,s.hasChanged)?(this._changedProperties.has(t)||this._changedProperties.set(t,e),!0!==s.reflect||this._updateState&nt||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(t,s))):i=!1}!this._hasRequestedUpdate&&i&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(t,e){return this.requestUpdateInternal(t,e),this.updateComplete}async _enqueueUpdate(){this._updateState=this._updateState|st;try{await this._updatePromise}catch(t){}const t=this.performUpdate();return null!=t&&await t,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return this._updateState&st}get hasUpdated(){return this._updateState&et}performUpdate(){if(!this._hasRequestedUpdate)return;this._instanceProperties&&this._applyInstanceProperties();let t=!1;const e=this._changedProperties;try{t=this.shouldUpdate(e),t?this.update(e):this._markUpdated()}catch(e){throw t=!1,this._markUpdated(),e}t&&(this._updateState&et||(this._updateState=this._updateState|et,this.firstUpdated(e)),this.updated(e))}_markUpdated(){this._changedProperties=new Map,this._updateState=this._updateState&~st}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._updatePromise}shouldUpdate(t){return!0}update(t){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((t,e)=>this._propertyToAttribute(e,this[e],t)),this._reflectingProperties=void 0),this._markUpdated()}updated(t){}firstUpdated(t){}}ot[rt]=!0;
134
- /**
135
- @license
136
- Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
137
- This code may only be used under the BSD style license found at
138
- http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
139
- http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
140
- found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
141
- part of the polymer project is also subject to an additional IP rights grant
142
- found at http://polymer.github.io/PATENTS.txt
143
- */
144
- const at=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,lt=Symbol();class ct{constructor(t,e){if(e!==lt)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){return void 0===this._styleSheet&&(at?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}const ht=t=>new ct(String(t),lt),dt=t=>{if(t instanceof ct)return t.cssText;if("number"==typeof t)return t;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${t}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)},ut=(t,...e)=>{const s=e.reduce((e,s,i)=>e+dt(s)+t[i+1],t[0]);return new ct(s,lt)};
145
- /**
146
- * @license
147
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
148
- * This code may only be used under the BSD style license found at
149
- * http://polymer.github.io/LICENSE.txt
150
- * The complete set of authors may be found at
151
- * http://polymer.github.io/AUTHORS.txt
152
- * The complete set of contributors may be found at
153
- * http://polymer.github.io/CONTRIBUTORS.txt
154
- * Code distributed by Google as part of the polymer project is also
155
- * subject to an additional IP rights grant found at
156
- * http://polymer.github.io/PATENTS.txt
157
- */
158
- (window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");const pt={};class mt extends ot{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const t=this.getStyles();if(Array.isArray(t)){const e=(t,s)=>t.reduceRight((t,s)=>Array.isArray(s)?e(s,t):(t.add(s),t),s),s=e(t,new Set),i=[];s.forEach(t=>i.unshift(t)),this._styles=i}else this._styles=void 0===t?[]:[t];this._styles=this._styles.map(t=>{if(t instanceof CSSStyleSheet&&!at){const e=Array.prototype.slice.call(t.cssRules).reduce((t,e)=>t+e.cssText,"");return ht(e)}return t})}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow(this.constructor.shadowRootOptions)}adoptStyles(){const t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?at?this.renderRoot.adoptedStyleSheets=t.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map(t=>t.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(t){const e=this.render();super.update(t),e!==pt&&this.constructor.render(e,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(t=>{const e=document.createElement("style");e.textContent=t.cssText,this.renderRoot.appendChild(e)}))}render(){return pt}}function _t(t){const e=document.querySelector("script[src*=pb-components]");return e?new URL(t,e.src).href:new URL(t,window.location.href).href}function ft(t,e){var s,i,n;for(t=(t+"").split("."),e=(e+"").split("."),n=Math.max(t.length,e.length),s=0;s<n;s++)if(void 0===t[s]&&(t[s]="0"),void 0===e[s]&&(e[s]="0"),0!==(i=parseInt(t[s],10)-parseInt(e[s],10)))return i<0?-1:1;return 0}function yt(t,e){return ft(t,e)>=0}function gt(t,e,s){const i=getComputedStyle(t).getPropertyValue(e);if(i)try{return JSON.parse(i)}catch(t){return s}return s}mt.finalized=!0,mt.render=Q,mt.shadowRootOptions={mode:"open"},window.TeiPublisher||(window.TeiPublisher={},TeiPublisher.url=new URL(window.location.href));const St=new Set,bt=new Map,wt="__default__";function vt(){bt.clear()}function Pt(t,e){bt.has(t)?e(bt.get(t)):document.addEventListener(t,s=>{bt.set(t,s.detail),e(s.detail)},{once:!0})}function xt(t){const e=t.getAttribute("emit-config");if(e){const t=JSON.parse(e);return Object.keys(t)}const s=t.getAttribute("emit");return s?[s]:[wt]}function Ct(t){const e=t.getAttribute("subscribe-config");if(e){const t=JSON.parse(e);return Object.keys(t)}const s=t.getAttribute("subscribe");return s?[s]:[wt]}const Nt=t=>class extends t{static get properties(){return{subscribe:{type:String},subscribeConfig:{type:Object,attribute:"subscribe-config"},emit:{type:String},emitConfig:{type:Object,attribute:"emit-config"},waitFor:{type:String,attribute:"wait-for"},_isReady:{type:Boolean},disabled:{type:Boolean,reflect:!0},_endpoint:{type:String},_apiVersion:{type:String}}}constructor(){super(),this._isReady=!1,this.disabled=!1,this._subscriptions=new Map}connectedCallback(){super.connectedCallback(),Pt("pb-page-ready",t=>{this._endpoint=t.endpoint,this._apiVersion=t.apiVersion})}disconnectedCallback(){super.disconnectedCallback(),this._subscriptions.forEach((t,e)=>{t.forEach(t=>{document.removeEventListener(e,t)})})}command(t,e){"disable"===t&&(this.disabled=e)}wait(t){const e=()=>{const e=Array.from(document.querySelectorAll(this.waitFor)).filter(t=>this.emitsOnSameChannel(t)),s=e.length;if(0===s)return void t();let i=s;e.forEach(e=>{if(e._isReady)return i-=1,void(0===i&&t());const s=e.addEventListener("pb-ready",n=>{n.detail.source!==this&&(i-=1,0===i&&(e.removeEventListener("pb-ready",s),t()))})})};this.waitFor?"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{e()}):e():t()}waitForChannel(t){if(this.subscribeConfig)for(const e in this.subscribeConfig)this.subscribeConfig[e].forEach(s=>{if("pb-ready"===s&&St.has(e))return t()});else if(this.subscribe&&St.has(this.subscribe)||!this.subscribe&&St.has("__default__"))return t();const e=this.subscribeTo("pb-ready",s=>{s.detail._source!=this&&(e.forEach(t=>document.removeEventListener("pb-ready",t)),t())})}static waitOnce(t,e){Pt(t,e)}signalReady(t="pb-ready",e){this._isReady=!0,bt.set(t,e),this.dispatchEvent(new CustomEvent(t,{detail:{data:e,source:this}})),this.emitTo(t,e)}emitsOnSameChannel(t){const e=Ct(this),s=xt(t);return 0===e.length&&0===s.length||e.some(t=>s.includes(t))}subscribeTo(t,e,s){let i;i=s?0===s.length?[wt]:s:Ct(this);const n=i.map(s=>{const i=t=>{t.detail&&t.detail.key&&t.detail.key===s&&e(t)};return document.addEventListener(t,i),i});return this._subscriptions.set(t,n),n}emitTo(t,e,s){let i;i=s?0===s.length?[wt]:s:xt(this),i.forEach(s=>this._emit(s,t,e))}_emit(t,e,s){"pb-ready"===e&&St.add(t);const i=Object.assign({key:t,_source:this},s),n=new CustomEvent(e,{detail:i,composed:!0,bubbles:!0});this.dispatchEvent(n)}getDocument(){if(this.src){const t=document.getElementById(this.src);if(t)return t}return null}getParameter(t,e){const s=TeiPublisher.url.searchParams&&TeiPublisher.url.searchParams.getAll(t);return s&&1==s.length?s[0]:s&&s.length>1?s:e}getParameters(){const t={};for(let e of TeiPublisher.url.searchParams.keys())t[e]=this.getParameter(e);return t}getUrl(){return TeiPublisher.url}getEndpoint(){return this._endpoint}toAbsoluteURL(t,e){if(/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(t))return t;const s=""===e?"":e||this.getEndpoint();let i;return i="."===s?new URL(window.location.href):"about:"===window.location.protocol?document.baseURI:new URL(s+"/",`${window.location.protocol}//${window.location.host}`),new URL(t,i).href}minApiVersion(t){return ft(this._apiVersion,t)>=0}lessThanApiVersion(t){return ft(this._apiVersion,t)<0}compareApiVersion(t){return ft(this._apiVersion,t)}};export{A,mt as L,V as N,Ct as a,ft as b,ut as c,wt as d,vt as e,g as f,gt as g,$ as h,N as i,h as j,e as k,s as l,yt as m,Nt as p,_t as r,Pt as w};
@@ -1 +0,0 @@
1
- window.polymerSkipLoadingFontRoboto=!0;