@trintel/zooy 1.0.16 → 1.1.1

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 (213) hide show
  1. package/dist/chunks/component-library-registry-BBQV6Kpv.js +1 -0
  2. package/dist/chunks/component-library-registry-DB5UeqC2.js +58 -0
  3. package/dist/chunks/register-D3pWAXhm.js +266 -0
  4. package/dist/chunks/register-D7SMu1Gy.js +1372 -0
  5. package/dist/chunks/register-HYODt48Q.js +1 -0
  6. package/dist/chunks/register-g5KUNRdI.js +1 -0
  7. package/dist/chunks/tree-utils-B2JEGXHR.js +267 -0
  8. package/dist/chunks/tree-utils-BYnipT-p.js +1 -0
  9. package/dist/chunks/zoo-CY2QpG41.js +52 -0
  10. package/dist/chunks/zoo-DgdxBjlN.js +390 -0
  11. package/dist/zooy.cjs.js +19 -1
  12. package/dist/zooy.es.js +1298 -20
  13. package/package.json +8 -6
  14. package/dist/chunks/16-30f5E9no.js +0 -1
  15. package/dist/chunks/16-4Ffg4DOO.js +0 -1
  16. package/dist/chunks/16-8pr5mbIO.js +0 -28
  17. package/dist/chunks/16-B56B50XT.js +0 -1
  18. package/dist/chunks/16-BFJN6B6d.js +0 -39
  19. package/dist/chunks/16-BTonF5Je.js +0 -29
  20. package/dist/chunks/16-BXti8Tu-.js +0 -62
  21. package/dist/chunks/16-BiShwKPX.js +0 -28
  22. package/dist/chunks/16-BwDdccyH.js +0 -33
  23. package/dist/chunks/16-C7Xs-wKv.js +0 -1
  24. package/dist/chunks/16-CDRTWf-C.js +0 -21
  25. package/dist/chunks/16-CMCRqVYz.js +0 -1
  26. package/dist/chunks/16-CSWwhDUY.js +0 -21
  27. package/dist/chunks/16-CpNRIuiB.js +0 -1
  28. package/dist/chunks/16-CqC9427V.js +0 -21
  29. package/dist/chunks/16-Cubm18Em.js +0 -1
  30. package/dist/chunks/16-D3Ol0pdg.js +0 -21
  31. package/dist/chunks/16-DH311Of_.js +0 -1
  32. package/dist/chunks/16-Dlq3qxDh.js +0 -1
  33. package/dist/chunks/16-Drl9-5Gn.js +0 -21
  34. package/dist/chunks/16-Dt4v0bcc.js +0 -1
  35. package/dist/chunks/16-DylBiJnm.js +0 -1
  36. package/dist/chunks/20-CQLnFcRb.js +0 -84
  37. package/dist/chunks/20-Df0dXwyx.js +0 -1
  38. package/dist/chunks/button-D3QMXGP6.js +0 -66
  39. package/dist/chunks/button-cEVHuDC9.js +0 -272
  40. package/dist/chunks/button-skeleton-BuDQrAgi.js +0 -21
  41. package/dist/chunks/button-skeleton-CxKOKEQr.js +0 -49
  42. package/dist/chunks/carbon-element-CbfPUYRT.js +0 -1
  43. package/dist/chunks/carbon-element-DzDuXiyl.js +0 -25
  44. package/dist/chunks/checkbox-B_b_oOJ5.js +0 -40
  45. package/dist/chunks/checkbox-CsuLOYIT.js +0 -201
  46. package/dist/chunks/class-map-BwrbvkxB.js +0 -5
  47. package/dist/chunks/class-map-CgGieoOz.js +0 -32
  48. package/dist/chunks/collection-helpers-Bk68Vaau.js +0 -7
  49. package/dist/chunks/collection-helpers-afBvMQaC.js +0 -1
  50. package/dist/chunks/content-switcher-item-C1gdd6k4.js +0 -351
  51. package/dist/chunks/content-switcher-item-c0sXBGJ-.js +0 -27
  52. package/dist/chunks/defs-C88lSWuJ.js +0 -1
  53. package/dist/chunks/defs-Do0OvCKd.js +0 -1165
  54. package/dist/chunks/directive-Dp4ZTz-F.js +0 -5
  55. package/dist/chunks/directive-kLG6oqUu.js +0 -27
  56. package/dist/chunks/dropdown-item-T1jCm1fo.js +0 -69
  57. package/dist/chunks/dropdown-item-Wc8Nj3w-.js +0 -632
  58. package/dist/chunks/focus-B3iymVyL.js +0 -1
  59. package/dist/chunks/focus-WnKGH_xB.js +0 -20
  60. package/dist/chunks/form-D6Tce4-W.js +0 -1
  61. package/dist/chunks/form-DpI-v6DA.js +0 -20
  62. package/dist/chunks/host-listener-CN245INl.js +0 -37
  63. package/dist/chunks/host-listener-DD3oGxvg.js +0 -16
  64. package/dist/chunks/host-listener-gxrTpxgv.js +0 -1
  65. package/dist/chunks/host-listener-rUcT_LUW.js +0 -1
  66. package/dist/chunks/icon-loader-CTCoE5GC.js +0 -7
  67. package/dist/chunks/icon-loader-C_ze306U.js +0 -1
  68. package/dist/chunks/icon-loader-utils-DSajrZop.js +0 -117
  69. package/dist/chunks/icon-loader-utils-DxaQOvJB.js +0 -5
  70. package/dist/chunks/if-defined-7syLabv-.js +0 -10
  71. package/dist/chunks/if-defined-CfI-rREy.js +0 -5
  72. package/dist/chunks/if-non-empty-CsjL_4Ck.js +0 -5
  73. package/dist/chunks/if-non-empty-Dp8CFMva.js +0 -1
  74. package/dist/chunks/index-24ucriY6.js +0 -4
  75. package/dist/chunks/index-5uuGFlSc.js +0 -1
  76. package/dist/chunks/index-ACUVets3.js +0 -188
  77. package/dist/chunks/index-B-VOos8Q.js +0 -108
  78. package/dist/chunks/index-B-qA_3dy.js +0 -52
  79. package/dist/chunks/index-B0PkuE0I.js +0 -188
  80. package/dist/chunks/index-B1QlHHpn.js +0 -381
  81. package/dist/chunks/index-B2dVOGmx.js +0 -458
  82. package/dist/chunks/index-BEAD73rD.js +0 -17
  83. package/dist/chunks/index-BEyeMcZh.js +0 -25
  84. package/dist/chunks/index-BJ3okuBC.js +0 -78
  85. package/dist/chunks/index-BJNdKx6x.js +0 -23
  86. package/dist/chunks/index-BL8xz2V4.js +0 -161
  87. package/dist/chunks/index-BL_Y57_H.js +0 -57
  88. package/dist/chunks/index-BLxE94Et.js +0 -3
  89. package/dist/chunks/index-BP0bDhTG.js +0 -2340
  90. package/dist/chunks/index-BUXzbqzT.js +0 -364
  91. package/dist/chunks/index-BVDZj6Fh.js +0 -76
  92. package/dist/chunks/index-BWqDKfds.js +0 -62
  93. package/dist/chunks/index-BaVSzIan.js +0 -79
  94. package/dist/chunks/index-BatQ1Mfz.js +0 -25
  95. package/dist/chunks/index-BefBe_sK.js +0 -19
  96. package/dist/chunks/index-BekoThXC.js +0 -49
  97. package/dist/chunks/index-BnOH6_4r.js +0 -103
  98. package/dist/chunks/index-Bnfa6YBY.js +0 -71
  99. package/dist/chunks/index-BrtdLKIG.js +0 -455
  100. package/dist/chunks/index-BtFYirUg.js +0 -44
  101. package/dist/chunks/index-BtHVJn7K.js +0 -75
  102. package/dist/chunks/index-Bu7ZAHDG.js +0 -12
  103. package/dist/chunks/index-BxRbUwdY.js +0 -30
  104. package/dist/chunks/index-ByQl0Dwz.js +0 -9
  105. package/dist/chunks/index-C-PAoN2Y.js +0 -25
  106. package/dist/chunks/index-C2-pFkgT.js +0 -406
  107. package/dist/chunks/index-C2r3MkpB.js +0 -252
  108. package/dist/chunks/index-C5DwYOee.js +0 -89
  109. package/dist/chunks/index-C5euLddc.js +0 -46
  110. package/dist/chunks/index-C89rc2i5.js +0 -35
  111. package/dist/chunks/index-C8IUL9KS.js +0 -22
  112. package/dist/chunks/index-C99Nf_aK.js +0 -15
  113. package/dist/chunks/index-CDaECc1q.js +0 -12
  114. package/dist/chunks/index-CIeU44CB.js +0 -97
  115. package/dist/chunks/index-CL8Un64Y.js +0 -150
  116. package/dist/chunks/index-CQ1zfW-Z.js +0 -22
  117. package/dist/chunks/index-CR6HxSEn.js +0 -15
  118. package/dist/chunks/index-CSH8oUIN.js +0 -36
  119. package/dist/chunks/index-CTB8Esah.js +0 -1
  120. package/dist/chunks/index-CX6f-3xD.js +0 -563
  121. package/dist/chunks/index-CXSCYGFC.js +0 -452
  122. package/dist/chunks/index-CZQ45Dj9.js +0 -1
  123. package/dist/chunks/index-Cc-HBEN2.js +0 -150
  124. package/dist/chunks/index-Cf3ALdZ-.js +0 -4
  125. package/dist/chunks/index-Cid77wr3.js +0 -45
  126. package/dist/chunks/index-ClBPGpC0.js +0 -129
  127. package/dist/chunks/index-CmXHpydu.js +0 -121
  128. package/dist/chunks/index-CsaKV6jI.js +0 -511
  129. package/dist/chunks/index-CvxrJ8vE.js +0 -39
  130. package/dist/chunks/index-Cy6EogCp.js +0 -429
  131. package/dist/chunks/index-CyTN35KA.js +0 -424
  132. package/dist/chunks/index-D3hwHwSn.js +0 -243
  133. package/dist/chunks/index-D6Eg6Zh4.js +0 -22
  134. package/dist/chunks/index-D7GY2E-B.js +0 -8
  135. package/dist/chunks/index-DCqxl0e0.js +0 -26
  136. package/dist/chunks/index-DDKqKtU4.js +0 -15
  137. package/dist/chunks/index-DHksIe-y.js +0 -1
  138. package/dist/chunks/index-DI-PunST.js +0 -224
  139. package/dist/chunks/index-DIWoAC3Z.js +0 -74
  140. package/dist/chunks/index-DLWyvZrE.js +0 -21
  141. package/dist/chunks/index-DLa-KLg_.js +0 -881
  142. package/dist/chunks/index-DLwGUJd2.js +0 -25
  143. package/dist/chunks/index-DMIKb9St.js +0 -2
  144. package/dist/chunks/index-DOfvb1f6.js +0 -79
  145. package/dist/chunks/index-DQoGlgyI.js +0 -1
  146. package/dist/chunks/index-DR8UmItB.js +0 -1
  147. package/dist/chunks/index-DUiT0Yz_.js +0 -57
  148. package/dist/chunks/index-DW1p-hc-.js +0 -1604
  149. package/dist/chunks/index-DbPU3mfX.js +0 -368
  150. package/dist/chunks/index-DgI4_4yz.js +0 -37
  151. package/dist/chunks/index-DhPg7DCD.js +0 -1
  152. package/dist/chunks/index-Dj-7w7wt.js +0 -65
  153. package/dist/chunks/index-DjSdHUmw.js +0 -284
  154. package/dist/chunks/index-DpCo2duE.js +0 -87
  155. package/dist/chunks/index-DqLDehu6.js +0 -111
  156. package/dist/chunks/index-Ds3e0NlH.js +0 -285
  157. package/dist/chunks/index-DsKNYemW.js +0 -295
  158. package/dist/chunks/index-DwGKd66A.js +0 -259
  159. package/dist/chunks/index-FAwjNd-C.js +0 -4
  160. package/dist/chunks/index-HTZtnvAV.js +0 -81
  161. package/dist/chunks/index-JUJu4Jsu.js +0 -235
  162. package/dist/chunks/index-JmiGhJR9.js +0 -1
  163. package/dist/chunks/index-K3aE8_a_.js +0 -45
  164. package/dist/chunks/index-LVNWqV95.js +0 -683
  165. package/dist/chunks/index-NduNWecG.js +0 -88
  166. package/dist/chunks/index-QOHPo0v8.js +0 -19
  167. package/dist/chunks/index-TnoTOPwm.js +0 -158
  168. package/dist/chunks/index-UIEjSWhu.js +0 -58
  169. package/dist/chunks/index-WQ40q6Fp.js +0 -77
  170. package/dist/chunks/index-a_56_OA-.js +0 -776
  171. package/dist/chunks/index-azaqRvif.js +0 -27
  172. package/dist/chunks/index-dT_yGOFJ.js +0 -1
  173. package/dist/chunks/index-kjtnf5Y1.js +0 -66
  174. package/dist/chunks/index-lOiJBnZe.js +0 -160
  175. package/dist/chunks/index-sl9jQQX-.js +0 -36
  176. package/dist/chunks/index-vkfOeAd5.js +0 -260
  177. package/dist/chunks/index-z2pAR1iR.js +0 -337
  178. package/dist/chunks/loading-icon-9-L_8sVv.js +0 -16
  179. package/dist/chunks/loading-icon-CMPQny72.js +0 -24
  180. package/dist/chunks/main-CXPn-jnk.js +0 -4260
  181. package/dist/chunks/main-CZIPBRMI.js +0 -88
  182. package/dist/chunks/on-BPhwbVf3.js +0 -10
  183. package/dist/chunks/on-XRofyGQh.js +0 -1
  184. package/dist/chunks/property-BIgIlh0E.js +0 -5
  185. package/dist/chunks/property-CTp3Zz2M.js +0 -36
  186. package/dist/chunks/query-CbRg6ZGy.js +0 -23
  187. package/dist/chunks/query-Dh8joWcT.js +0 -9
  188. package/dist/chunks/radio-group-manager-DBAEmhDM.js +0 -1
  189. package/dist/chunks/radio-group-manager-Du5wSOS1.js +0 -102
  190. package/dist/chunks/register-BgvWUC9m.js +0 -11035
  191. package/dist/chunks/register-CFDNay1l.js +0 -1
  192. package/dist/chunks/register-DyYwnhHb.js +0 -2157
  193. package/dist/chunks/register-HH_4Uw0Q.js +0 -1678
  194. package/dist/chunks/search-CC47funo.js +0 -241
  195. package/dist/chunks/search-DB4cjN-w.js +0 -31
  196. package/dist/chunks/select-item-D6rKfA9z.js +0 -80
  197. package/dist/chunks/select-item-Dj2fYOn6.js +0 -364
  198. package/dist/chunks/settings-Bgpv8zuU.js +0 -62
  199. package/dist/chunks/settings-jvP7vP60.js +0 -66
  200. package/dist/chunks/shared-enums-BJDDuJr7.js +0 -1
  201. package/dist/chunks/shared-enums-DALKjQ7e.js +0 -7
  202. package/dist/chunks/state-4XYw1ZN5.js +0 -12
  203. package/dist/chunks/state-BoZ0xvIn.js +0 -5
  204. package/dist/chunks/text-input-BUBwT5gK.js +0 -68
  205. package/dist/chunks/text-input-Dpl3TIYz.js +0 -372
  206. package/dist/chunks/tooltip-content-BV1N7BVi.js +0 -3
  207. package/dist/chunks/tooltip-content-UQcG3dlT.js +0 -135
  208. package/dist/chunks/tslib.es6-B07k2eac.js +0 -1
  209. package/dist/chunks/tslib.es6-C5gLNDSD.js +0 -160
  210. package/dist/chunks/unsafe-html-CCJqBESk.js +0 -5
  211. package/dist/chunks/unsafe-html-KUWR4Xn7.js +0 -27
  212. package/dist/chunks/validity-BMLNCMmP.js +0 -1
  213. package/dist/chunks/validity-CTz7ivUd.js +0 -59
@@ -1,88 +0,0 @@
1
- "use strict";const numericString="0123456789".split("");[...numericString];const alphaLower="abcdefghijklmnopqrstuvwxyz".split(""),alphaUpper="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");[...alphaLower,...alphaUpper,...numericString];new Map().set("true",!0).set("false",!1);const compose=(...U)=>(...w)=>U.reduce((D,O)=>F=>D(O(F)))(...w),identity=U=>U,whatType=U=>typeof U,isDef=U=>U!==void 0,isUndefined=U=>U===void 0,isDefAndNotNull=U=>U!=null,isString=U=>whatType(U)==="string",isNumber=U=>whatType(U)==="number"&&!Number.isNaN(U),isObject=U=>(U&&typeof U=="object"&&!(U instanceof Array)&&!(U instanceof Set)&&!(U instanceof Map)&&!(U instanceof Date))===!0,isArray=U=>U instanceof Array,reverse=U=>Array.from(U).reduce((w,D)=>[D,...w],[]),toLowerCase=U=>U.toLowerCase(),toString$1=U=>U+"",toNumber=U=>+U;compose(toLowerCase,toString$1);const makeRandomString=()=>{let U=2147483648;return Math.floor(Math.random()*U).toString(36)+Math.abs(Math.floor(Math.random()*U)^Date.now()).toString(36)},stripLeadingChar=U=>w=>w.startsWith(U)?w.slice(U.length):w,join=U=>w=>w.join(U);compose(join(""),reverse);const pathOr=(U,w)=>D=>{const O=w.reduce((F,q)=>{try{return F[maybeNumber(q)]}catch{return}},D);return O===void 0?U:O},objToPaths=(U,w=[],D=[])=>(Object.entries(U).forEach(([O,F])=>{isObject(F)?objToPaths(F,[...w,O],D):D.push([[...w,O],F])}),D),randomId=U=>{const w=makeRandomString();return U?w.substr(0,U):w},maybeNumber=U=>{if(U===null||whatType(U)==="string"&&U.length>1&&U.startsWith("0")&&!U.startsWith("0."))return U;const w=1*U;return w>Number.MAX_SAFE_INTEGER||Number.isNaN(w)?U:w};compose(toNumber,join(""),reverse,toString$1);class Evt extends EventTarget{#t=!1;#e=!1;#s=new Map;#r=new Set;#n=new Set;static makeEvent(w,D){return new CustomEvent(w,{detail:D})}set debugMode(w){if(typeof w!="boolean")throw new Error("This must be a boolean");this.#t=w}get debugMode(){return this.#t}get disposed(){return this.#e}get listeningTo(){return this.#s}get isObservedBy(){return this.#r}get activeIntervals(){return this.#n}debugMe(...w){this.#t&&console.log.apply(null,[this.constructor.name,"DEBUG:",...w])}isListenedToBy(w){this.#r.add(w)}listen(w,D,O,F=!1){w.addEventListener(D,O,F);const q=this.listeningTo.get(w)||{};q[D]=()=>w.removeEventListener(D,O,F),this.listeningTo.set(w,q),isDef(w.isListenedToBy)&&w.isListenedToBy(this)}stopBeingListenedTo(){for(const w of this.isObservedBy)w.stopListeningTo(this),this.isObservedBy.delete(w)}stopListeningTo(w,D){w&&this.listeningTo.has(w)&&(isDef(w.isObservedBy)&&w.isObservedBy.delete(this),isDef(D)?(Object.entries(this.listeningTo.get(w)).forEach(([O,F])=>{O===D&&F()}),Object.keys(this.listeningTo.get(w)).length||this.listeningTo.delete(w)):(Object.values(this.listeningTo.get(w)).forEach(O=>O()),this.listeningTo.delete(w)))}removeAllListener(){for(const w of this.listeningTo.keys())this.stopListeningTo(w)}clearAllIntervals(){for(const w of this.activeIntervals)clearInterval(w),this.activeIntervals.delete(w)}doOnBeat(w,D){const O=setInterval(w,D);this.activeIntervals.add(O)}disposeInternal(){this.stopBeingListenedTo(),this.removeAllListener(),this.clearAllIntervals(),this.#e=!0}dispose(){this.disposeInternal()}}class ZooyEventData{constructor(w,D){this.value_=w,this.data_=D||{}}getValue(){return this.value_}getData(){return this.data_}}const UiEventType={COMP:randomId(),COMP_DRAG_START:randomId(),COMP_DRAG_MOVE:randomId(),COMP_DRAG_END:randomId(),PANEL:randomId(),VIEW:randomId(),SPLIT:randomId(),SPLIT_WILL_OPEN:randomId(),SPLIT_DID_OPEN:randomId(),SPLIT_WILL_CLOSE:randomId(),SPLIT_DID_CLOSE:randomId(),SPLIT_TRANSITION_END:randomId(),READY:randomId(),PANEL_MINIMIZE:randomId(),FORM_SUBMIT_SUCCESS:randomId()},format=U=>{const D=Math.floor((new Date-U)/1e3),O=[{name:"year",seconds:31536e3},{name:"month",seconds:2592e3},{name:"week",seconds:604800},{name:"day",seconds:86400},{name:"hour",seconds:3600},{name:"minute",seconds:60},{name:"second",seconds:1}];if(D<0){const F=Math.abs(D);for(const q of O){const W=Math.floor(F/q.seconds);if(W>=1)return new Intl.RelativeTimeFormat("en",{numeric:"auto"}).format(W,q.name)}return"just now"}for(const F of O){const q=Math.floor(D/F.seconds);if(q>=1)return new Intl.RelativeTimeFormat("en",{numeric:"auto"}).format(-q,F.name)}return"just now"},getInputChecked_=function(U){return U.checked?U.value:null},getSelectSingle_=function(U){const w=U.selectedIndex;return w>=0?U.options[w].value:null},getSelectMultiple_=function(U){const w=[];for(let D,O=0;D=U.options[O];O++)D.selected&&w.push(D.value);return w.length?w:null},getValue=function(U){const w=U.type;switch(isString(w)&&w.toLowerCase()){case"checkbox":case"radio":return getInputChecked_(U);case"select-one":return getSelectSingle_(U);case"select-multiple":return getSelectMultiple_(U);default:return U.value!==null&&U.value!==void 0?U.value:null}},formToJSON=U=>[...U].reduce((w,D)=>(w[D.name]=D.value,w),{}),replaceNode=(U,w)=>{const D=w.parentNode;D&&D.replaceChild(U,w)},removeNode=U=>U&&U.parentNode?U.parentNode.removeChild(U):null,insertSiblingAfter=(U,w)=>{w.parentNode&&w.parentNode.insertBefore(U,w.nextSibling)},isInPage=U=>U===document.body?!1:document.body.contains(U),getPos=U=>[U.offsetLeft,U.offsetTop],randomColour=U=>[1,2,3].map(()=>Math.floor(Math.random()*256)+1).reduce((w,D)=>`${w}${D},`,"rgba(")+`${U||.5}`,totalWidth=U=>{const w=window.getComputedStyle(U),D=U.offsetWidth,O=parseFloat(w.marginLeft)+parseFloat(w.marginRight),F=parseFloat(w.paddingLeft)+parseFloat(w.paddingRight),q=parseFloat(w.borderLeftWidth)+parseFloat(w.borderRightWidth);return D+O-F+q},totalHeight=U=>{const w=window.getComputedStyle(U),D=U.offsetHeight,O=parseFloat(w.marginTop)+parseFloat(w.marginBottom),F=parseFloat(w.paddingTop)+parseFloat(w.paddingBottom),q=parseFloat(w.borderTopWidth)+parseFloat(w.borderBottomWidth);return D+O-F+q},evalScripts=comp=>arr=>{arr&&Array.from(arr).forEach(s=>{(function(){eval(s.text)}).bind(comp)()})},evalModules=U=>w=>{w&&Array.from(w).forEach(D=>{(function(){const O=document.createElement("script");O.type="module",O.textContent=D.textContent;const F=U.getElement(),q=getElDataMap(D).zv_comp_access;q&&(F.zvComponent=U,F.classList.add(q)),F.appendChild(O)}).bind(U)()})},splitScripts=U=>{const D=new DOMParser().parseFromString(U,"text/html");return{html:D.body.firstElementChild,scripts:D.querySelectorAll('script:not([type="module"])'),modules:D.querySelectorAll('script[type="module"]')}},handleTemplateProm=U=>Promise.resolve(splitScripts(U)),enableClass=(U,w,D)=>{D?U.classList.add(w):U.classList.remove(w)},toggleClass=(U,w)=>{const D=!Array.from(U.classList).includes(w);return enableClass(U,w,D),D},getElDataMap=U=>U?Object.assign({},U.dataset||{}):{},dtFormatter={year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"},dFormatter={year:"numeric",month:"short",day:"numeric"},dtf=new Intl.DateTimeFormat("en",{day:"2-digit",month:"short",year:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}),dateToZooyStdTimeString=U=>{const[{value:w},,{value:D},,{value:O},,{value:F},,{value:q},,{value:W},,]=dtf.formatToParts(U);return`${D} ${w} ${O} ${F}:${q}:${W}`},parseMomentAgo=(U,w="both",D=void 0)=>{let O=U;isNumber(O)&&O<9466848e5?O=O*1e3:D&&(O=O+D);const F=new Date(O),q=format(F),W=dateToZooyStdTimeString(F);switch(w){case"time|ago":return`${W}|${q}`;case"ago":return`${q}`;case"datetime":case"time":return`${W}`;case"both":case"ago (time)":default:return`${q} (${W})`}},parseObfuscated=U=>{const D=(F=>q=>q<F.length-4)(U);return(F=>F.split("").map((q,W)=>D(W)?"*":q).join(""))(U)},parseMap=new Map().set(void 0,(U,w,D)=>identity(U)).set("",(U,w,D)=>identity(U)).set("class_update_only",(U,w,D)=>identity(U)).set("frac_100",(U,w,D)=>Math.round(U*100*100)/100).set("date_and_time",(U,w,D)=>new Date(U).toLocaleString(void 0,dtFormatter)).set("date",(U,w,D)=>new Date(U).toLocaleString(void 0,dFormatter)).set("moment_ago",(U,w,D)=>parseMomentAgo(U,"both",D.zdd_date_tz||void 0)).set("moment_ago_only",(U,w,D)=>parseMomentAgo(U,"ago",D.zdd_date_tz||void 0)).set("moment_ago_datetime",(U,w,D)=>parseMomentAgo(U,"datetime",D.zdd_date_tz||void 0)).set("pretty-json",(U,w,D)=>JSON.stringify(U,null,4)).set("obfuscated",(U,w,D)=>parseObfuscated(U)).set("linear-progress",(U,w,D)=>{const O=toNumber(D.zpmax),F=w.linProg;return O&&F&&(F.progress=U/O,U=void 0),U}),parseDataPropKvDef=U=>U.trim().split(",").map(O=>O.trim()).map(O=>{const[F,q]=O.split(":").map(W=>W.trim());return[F,q]}).filter(([O,F])=>O!==""&&F!==""),parseDataProps=(U,w)=>{const D=getElDataMap(U);delete U.dataset.zoodatapropkv;const O=D.zoodatapropkv||"";return parseDataPropKvDef(O).forEach(([q,W])=>{U.dataset[q]=pathOr(void 0,W.split("."))(w)}),U},mapDataToEls=(U,w,D=new Map,O=void 0)=>{if(!w)return;const F=new Map([...parseMap,...D]);[...U.querySelectorAll("[data-zdd],[data-zdd_class_update],[data-zdd_template_loop_index]")].forEach(q=>{const W=getElDataMap(q),Y=W.zdd||"",G=W.zdd_parse_as,K=W.zdd_render_effect||"",Q=W.zdd_class_update,tt=W.zdd_template_loop_index,J=W.zdd_units||"";let X=pathOr(void 0,Y.split("."))(w);if(isDefAndNotNull(X)&&(X=F.has(G)?F.get(G)(X,q,W):X),tt&&isNumber(O)&&(console.log("loopIndex: ",tt," opt_loopIndex: ",O),tt==="zero_indexed"?q.innerHTML=O:tt==="one_indexed"?q.innerHTML=O+1:q.innerHTML=O),Q){const[Z,et,st]=Q.split(":"),rt=pathOr(void 0,Z.split("."))(w);if(isDefAndNotNull(rt))switch(et){case"swap":{const nt=/\{}/gi,ot=st.replace(nt,""),ct=st.replace(nt,rt);q.classList.remove(...[...q.classList].filter(ht=>ht.includes(ot))),q.classList.add(ct);break}case"remove_on_data":q.classList.remove(st);break;case"choice_map":st.split("|").filter(nt=>nt!=="").forEach(nt=>{const[ot,ct]=nt.split(">");ot===rt+""?q.classList.add.apply(q.classList,ct.split(".")):q.classList.remove.apply(q.classList,ct.split("."))});break}}if(G==="templated-array"&&isArray(X))if(X.length===0)q.classList.add("display__none");else{q.classList.remove("display__none"),X=X||[];const Z=q.firstElementChild;Z.classList.remove("display__none"),q.replaceChildren(...X.map((et,st)=>{const rt=Z.cloneNode(!0),nt=parseDataProps(rt,et);return mapDataToEls(nt,et,void 0,st),nt}))}else if(isDefAndNotNull(X))if(K==="typewriter"){let Z=0;const et=X+J,st=5,rt=()=>{Z<et.length&&(q.innerHTML+=et.charAt(Z),Z++,setTimeout(rt,st))};q.innerHTML="",rt()}else q.innerHTML=X+J})},domUtils=Object.freeze(Object.defineProperty({__proto__:null,dateToZooyStdTimeString,dtf,enableClass,evalModules,evalScripts,formToJSON,getElDataMap,getPos,getValue,handleTemplateProm,insertSiblingAfter,isInPage,mapDataToEls,parseDataPropKvDef,parseMap,parseMomentAgo,randomColour,removeNode,replaceNode,splitScripts,toggleClass,totalHeight,totalWidth},Symbol.toStringTag,{value:"Module"}));class ComponentLibraryRegistry{static#t=new Map;static register(w,D){if(!D.render)throw new Error(`Component library '${w}' must provide a render function`);this.#t.set(w,{...D,dispose:D.dispose||null,cache:new Map,config:D.config||{}}),console.debug(`[ComponentLibraryRegistry] Registered: ${w}`)}static get(w){if(!this.#t.has(w)){const D=Array.from(this.#t.keys()).join(", ");throw new Error(`Component library '${w}' is not registered. Available: ${D||"none"}`)}return this.#t.get(w)}static has(w){return this.#t.has(w)}static getRegisteredLibraries(){return Array.from(this.#t.keys())}static getCacheStats(){const w={};for(const[D,O]of this.#t.entries())w[D]={cacheSize:O.cache.size,config:O.config};return w}static clearAllCaches(){for(const[w,D]of this.#t.entries())D.cache.clear(),console.debug(`[ComponentLibraryRegistry] Cleared cache for: ${w}`)}static clearCache(w){this.get(w).cache.clear(),console.debug(`[ComponentLibraryRegistry] Cleared cache for: ${w}`)}static unregister(w){return this.#t.delete(w)}static unregisterAll(){this.#t.clear()}}const ComponentError={NOT_SUPPORTED:"Method not supported",DECORATE_INVALID:"Invalid element to decorate",ALREADY_RENDERED:"Component already rendered",ALREADY_DISPOSED:"Component already disposed",PARENT_UNABLE_TO_BE_SET:"Unable to set parent component",CHILD_INDEX_OUT_OF_BOUNDS:"Child component index out of bounds",NOT_OUR_CHILD:"Child is not in parent component",NOT_IN_DOCUMENT:"Operation not supported while component is not in document",STATE_INVALID:"Invalid component state"};class Component extends Evt{static compEventCode(){return UiEventType.COMP}static compReadyCode(){return UiEventType.READY}static compErrors(){return ComponentError}#t;#e;#s;#r;#n;#i;#o;#a;constructor(){super(),this.#t=()=>document.createElement("div"),this.#e=!1,this.#s=void 0,this.#r=void 0,this.#n=void 0,this.#i=void 0,this.#o=new Map,this.outOfTreeElements=[],this.placeholderDom=void 0,this.#a=()=>{}}set target(w){this.#n=w}get target(){return this.#n}set model(w){this.#r=w}get model(){return this.#r}set isInDocument(w){this.#e=w}get isInDocument(){return this.#e}set domFunc(w){this.#t=w}set readyFunc(w){this.#a=w}setElementInternal_(w){this.#s=w}getElement(){return this.#s}createDom(){this.#s=this.#t()}assertCanRenderAsync(){if(this.disposed)throw new Error(ComponentError.ALREADY_DISPOSED)}render(w){this.render_(w)}render_(w){if(this.disposed)throw new Error(ComponentError.ALREADY_DISPOSED);if(this.isInDocument)throw new Error(ComponentError.ALREADY_RENDERED);this.#s||this.createDom();const D=this.#s;w&&(this.#n=w),this.placeholderDom&&removeNode(this.placeholderDom),this.#n?isInPage(D)||this.#n.insertBefore(D,null):isInPage(D)||document.body.appendChild(D),(!this.#i||this.#i.isInDocument)&&this.enterDocument()}hoist(w,D=void 0){D||(D=document.querySelector("body")),D.appendChild(w),this.outOfTreeElements.push(w)}executeBeforeReady(){this.#a()}enterDocument(){this.disposed?removeNode(this.getElement()):(this.isInDocument=!0,[...this.#o.values()].forEach(w=>{!w.isInDocument&&w.getElement()&&w.enterDocument()}),this.executeBeforeReady(),this.dispatchCompEvent(UiEventType.READY))}exitDocument(){[...this.#o.values()].forEach(w=>{w.isInDocument&&w.exitDocument()}),this.stopBeingListenedTo(),this.removeAllListener(),this.isInDocument=!1,removeNode(this.getElement()),this.placeholderDom&&removeNode(this.placeholderDom)}disposeInternal(){this.isInDocument&&this.exitDocument(),this.#o&&[...this.#o.values()].forEach(w=>w.disposeInternal()),this.outOfTreeElements.forEach(removeNode),this.#s&&removeNode(this.#s),this.placeholderDom&&removeNode(this.placeholderDom),this.#o=null,this.#s=void 0,this.#r=null,this.#i=null,super.disposeInternal()}dispose(){this.abortController&&this.abortController.abort();const w=this.getElement();if(w)for(const D of ComponentLibraryRegistry.getRegisteredLibraries())try{const O=ComponentLibraryRegistry.get(D);O.dispose&&O.dispose(w)}catch(O){console.debug(`[${D}] Cleanup error during component disposal (non-critical):`,O)}super.dispose()}dispatchCompEvent(w,D){const O=new ZooyEventData(w,D),F=Evt.makeEvent(UiEventType.COMP,O);return this.dispatchEvent(F)}}const EV={CLICK:"click",DBLCLICK:"dblclick",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",MOUSEMOVE:"mousemove",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",SUBMIT:"submit",CHANGE:"change",INPUT:"input",INVALID:"invalid",DRAGSTART:"dragstart",DRAGEND:"dragend",DRAGOVER:"dragover",DRAGENTER:"dragenter",DRAGEXIT:"dragexit",DRAGLEAVE:"dragleave",DROP:"drop",TRANSITIONEND:"transitionend"},touchEvents=[EV.TOUCHMOVE,EV.TOUCHSTART,EV.TOUCHEND],isTouchEvent=U=>touchEvents.includes(U.type),normalizeEvent=U=>(isTouchEvent(U)&&(U.clientX=U.targetTouches[0].clientX,U.clientY=U.targetTouches[0].clientY),U),dragStartListener=(U,w,D,O)=>F=>{F.preventDefault();const q=normalizeEvent(F),W=q.currentTarget,[Y,G]=getPos(W),K=q.clientX-Y,Q=q.clientY-G,tt=U(Y,G,K,Q,W),J=D(Y,G,K,Q,W),X=w(Y,G,K,Q,W);let Z=freeMoveListener(X,W,K,Q);["x","ew"].includes(O)?Z=xMoveOnlyListener(X,W,K):["y","ns"].includes(O)&&(Z=yMoveOnlyListener(X,W,K,Q));let et=!1;const st=nt=>{et=!0,Z(nt)},rt=nt=>{document.removeEventListener(EV.MOUSEMOVE,st,!0),document.removeEventListener(EV.TOUCHMOVE,st,!0),document.removeEventListener(EV.MOUSEUP,rt,!0),document.removeEventListener(EV.TOUCHEND,rt,!0),et&&J(nt)};return document.addEventListener(EV.MOUSEUP,rt,!0),document.addEventListener(EV.TOUCHEND,rt,!0),document.addEventListener(EV.MOUSEMOVE,st,!0),document.addEventListener(EV.TOUCHMOVE,st,!0),tt(F),rt},freeMoveListener=(U,w,D,O)=>F=>{F.preventDefault();const q=normalizeEvent(F);w.style.left=`${q.clientX-D}px`,w.style.top=`${q.clientY-O}px`,U(q)},xMoveOnlyListener=(U,w,D,O)=>F=>{F.preventDefault();const q=normalizeEvent(F);w.style.left=`${q.clientX-D}px`,U(q)},yMoveOnlyListener=(U,w,D,O)=>F=>{F.preventDefault();const q=normalizeEvent(F);w.style.top=`${q.clientY-O}px`,U(q)},makeEmitter=(U,w)=>(D,O,F,q,W)=>Y=>{U.dispatchCompEvent(w,{component:U,browserEvent:Y,left:D,top:O,clientX:Y.clientX,clientY:Y.clientY,xOrg:F,yOrg:q,deltaX:Y.clientX-F-D,deltaY:Y.clientY-q-O,target:W})};class Dragger extends Component{#t;#e;#s;#r;constructor(w="xy"){super(),this.#t=["x","y","xy","ew","ns"].includes(w.toLowerCase())?w.toLowerCase():"xy",this.#e=void 0,this.#s=!0,this.#r=D=>null}cancelDrag(w){this.#r(w)}set moveFreedom(w){this.#t=w,this.#s||(this.lock(),this.unlock())}get moveFreedom(){return this.#t}executeBeforeReady(){this.unlock(),super.executeBeforeReady()}unlock(){const w=D=>O=>{this.#r=D(O)};if(this.isInDocument&&this.#s){const D=makeEmitter(this,UiEventType.COMP_DRAG_MOVE),O=makeEmitter(this,UiEventType.COMP_DRAG_START),F=makeEmitter(this,UiEventType.COMP_DRAG_END),q=dragStartListener(O,D,F,this.#t);this.#s=!1,this.#e=this.#e||this.getElement(),this.listen(this.#e,EV.MOUSEDOWN,w(q)),this.listen(this.#e,EV.TOUCHSTART,q),this.#e.classList.remove("locked")}}lock(){this.stopListeningTo(this.#e,EV.MOUSEDOWN),this.stopListeningTo(this.#e,EV.TOUCHSTART),this.#s=!0,this.#e.classList.add("locked")}}const splitRe_=new RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$"),ComponentIndex={PATH:5,QUERY_DATA:6},split=U=>U.match(splitRe_),decodeOrEmpty_=(U,w)=>U?decodeURI(U.replace(/%25/g,"%2525")):"",getPath=U=>decodeOrEmpty_(split(U)[ComponentIndex.PATH]),getQueryData=U=>decodeOrEmpty_(split(U)[ComponentIndex.QUERY_DATA]),objectToUrlParms=U=>[...Object.entries(U)].map(w=>`${w[0]}=${w[1]}`).join("&"),isValidValue=U=>U!=null&&U!=="",queryDataToMap=U=>U.split("&").reduce((w,D)=>{const[O,F]=D.split("=");return isValidValue(O)&&isValidValue(F)&&w.set(O,F),w},new Map),uriUtils=Object.freeze(Object.defineProperty({__proto__:null,getPath,getQueryData,objectToUrlParms,queryDataToMap},Symbol.toStringTag,{value:"Module"})),stripLeadingSpace=stripLeadingChar(" "),stripLeadingSlash=stripLeadingChar("/"),getCookieByName=U=>document.cookie.split(";").map(w=>w.split("=")).reduce((w,D)=>w.set(stripLeadingSpace(D[0]),D[1]),new Map).get(U),spinner=U=>{let w=0,D;const O=F=>{const q=F>0;return q?w+=1:w-=1,q?w===1:w===0};return F=>{D=D||document.getElementById(U),D&&O(F)&&D.classList.toggle("viz",w>0)}},spin=spinner("the_loader"),startSpin=()=>Promise.resolve(spin(1)),stopSpin=U=>(spin(0),Promise.resolve(U)),checkStatus=U=>U.ok?Promise.resolve(U):Promise.reject(new Error(`${U.url} ${U.status} (${U.statusText})`)),checkStatusTwo=U=>w=>{if(w.type==="opaqueredirect"||w.redirected){const D=stripLeadingSlash(getPath(w.url));U.setIsRedirected(!0,D),console.log("Redirect detected",D)}return checkStatus(w)},getJson=U=>U.json(),getText=U=>U.text().then(w=>Promise.resolve(w),w=>Promise.reject(new Error(`Could not get text from response: ${w}`))),getTextOrJson=U=>U.headers.get("Content-Type")==="application/json"?getJson(U):getText(U),jsonInit=(U,w,D="POST",O=void 0)=>{const F=new Headers;F.append("Content-type","application/json"),F.append("X-Requested-With","XMLHttpRequest"),U&&U!==""&&F.append("Authorization",`Bearer ${U}`);const q={cache:"no-cache",method:D,headers:F,credentials:"include",body:JSON.stringify(w)};return O&&(q.signal=O),q},basicPutPostPatchInit=(U,w,D=!1,O=void 0)=>{const F=new Headers;if(w&&w!==""&&F.append("Authorization",`Bearer ${w}`),F.append("X-Requested-With","XMLHttpRequest"),D){const W=getCookieByName("csrftoken");W&&D&&F.append("X-CSRFToken",W)}const q={cache:"no-cache",method:U,headers:F,redirect:"follow",credentials:"include"};return O&&(q.signal=O),q},formPostInit=(U,w,D=void 0)=>{const F=basicPutPostPatchInit("POST",U,!1,D);return F.body=new FormData(w.formEl),F},basicGetInit=(U,w=void 0)=>{const D=new Headers;D.append("Authorization",`Bearer ${U}`),D.append("X-Requested-With","XMLHttpRequest");const O={cache:"no-cache",headers:D,credentials:"include"};return w&&(O.signal=w),O},putPostPatchNobody=(U,w)=>{const D=new Request(U);return fetch(D,w).then(checkStatus).then(getText)},genCatchClause=(U,w=void 0)=>D=>(stopSpin("").then(identity),D.name==="AbortError"?console.info(U,"ABORTED!"):console.error(U,D),w);class UserManager{constructor(w){this.user_={},this.jwt="",w&&this.updateProfileFromJwt(w).then(()=>{})}updateProfileFromJwt(w,D=!1){return D&&this.jwt!==""?Promise.resolve("User Profile Already exists"):w.non_field_errors?Promise.reject(new Error(`JWT ${w.non_field_errors}`)):(this.updateToken(w.token),this.updateProfile(w.user),Promise.resolve("User Profile Updated"))}updateProfile(w){this.user_=w}updateToken(w){this.jwt=w}get id(){return this.user_.id}get name(){return this.user_.name}get surname(){return this.user_.surname}get salutation(){let w=this.name;const D=this.surname;return D&&(w=w+" "+D),w}formSubmit(w){const D=new Request(w.uri.toString()),O=w.processSubmitReply.bind(w),F=genCatchClause("Form submit error");return startSpin().then(()=>fetch(D,formPostInit(this.jwt,w,w.abortController.signal))).then(checkStatusTwo(w)).then(stopSpin).then(getTextOrJson).then(O).catch(F)}putNoBody(w,D=void 0,O=!1){const F=genCatchClause("putNobody error"),q=basicPutPostPatchInit("PUT",this.jwt,O,D);return putPostPatchNobody(w,q).catch(F)}fetch(w,D=void 0){const O=new Request(w.toString()),F=genCatchClause(`UMan Text GET Fetch: ${w}`);return startSpin().then(()=>fetch(O,basicGetInit(this.jwt,D))).then(checkStatus).then(stopSpin).then(getText).catch(F)}fetchAndSplit(w,D=void 0){const O=genCatchClause(`fetchAndSplit: ${w}`);return this.fetch(w,D).then(handleTemplateProm).catch(O)}async fetchJson(w,D=void 0,O=void 0){const F=new Request(w.toString()),q=genCatchClause(`fetchJson: ${w}`,O),W=basicGetInit(this.jwt,D);await startSpin();let Y={};try{Y=await(await fetch(F,W)).json()}catch(G){return q(G)}return await stopSpin(),Y}patchJson(w,D,O=void 0){const F=new Request(w.toString()),q=genCatchClause(`patchJson: ${w}`),W=jsonInit(this.jwt,D,"PATCH",O);return fetch(F,W).then(checkStatus).then(getJson).catch(q)}postJson(w,D,O=void 0){const F=new Request(w.toString()),q=genCatchClause(`postJson: ${w}`),W=jsonInit(this.jwt,D,"POST",O);return fetch(F,W).then(checkStatus).then(getJson).catch(q)}putJson(w,D,O=void 0){const F=new Request(w.toString()),q=genCatchClause(`putJson: ${w}`),W=jsonInit(this.jwt,D,"PUT",O);return fetch(F,W).then(checkStatus).then(getJson).catch(q)}delJson(w,D,O=void 0){const F=new Request(w.toString()),q=genCatchClause(`delJson: ${w}`),W=jsonInit(this.jwt,D,"DELETE",O);return fetch(F,W).then(checkStatus).then(getJson).catch(q)}}class Panel extends Component{static panelEventCode(){return UiEventType.PANEL}static compReadyCode(){return UiEventType.READY}constructor(w){super(),this.qParamMap_=new Map,this.uri_="",w&&this.parseUri(w),this.evalScripts=evalScripts(this),this.evalModules=evalModules(this),this.redirected=!1,this.responseObject={html:null,scripts:null},this.user_=void 0,"AbortController"in window?this.abortController=new AbortController:this.abortController={signal:void 0,abort:()=>{}},this.listMap=new Map}get uri(){const w=this.qParamMap_.size>0?"?"+objectToUrlParms(Object.fromEntries(this.qParamMap_)):"";return this.uri_+w}set user(w){this.user_=w}get user(){return this.user_||(this.user_=new UserManager),this.user_}parseUri(w){this.uri_=getPath(w),this.qParamMap_=queryDataToMap(getQueryData(w))}addToQParams(w,D){this.qParamMap_.set(w,D)}removeFromQParams(w){this.qParamMap_.delete(w)}clearQParams(){this.qParamMap_.clear()}getCarbonComponents(w){return this.carbonComponents?.get(w)||[]}getCarbonComponentById(w){if(this.carbonComponents)for(const D of this.carbonComponents.values()){const O=D.find(F=>F.id===w);if(O)return O}}renderPlaceHolder(w){this.target&&(this.placeholderDom=w,this.target.insertBefore(this.placeholderDom,null))}renderWithTemplate(w){const D=this.user;return D?D.fetch(this.uri,this.abortController.signal).then(O=>(this.assertCanRenderAsync(),w&&w(this),this.onRenderWithTemplateReply(O).catch(F=>{F.message!==Component.compErrors().ALREADY_DISPOSED&&console.error("RenderWithTemplate Err:",F)}),this)).catch(O=>{throw console.error("Panel.renderWithTemplate fetch failed:",O),O}):Promise.reject(new Error("No UserManager instance available for Panel.renderWithTemplate()"))}onRenderWithTemplateReply(w){return this.responseObject=splitScripts(w),this.domFunc=()=>this.responseObject.html,this.render(),Promise.resolve(this)}onReplacePartialDom(w,D){const O=this.getElement();if(isUndefined(O))return;const F=w.html;if(D.startsWith("."))[...O.querySelectorAll(D)].filter(q=>isDefAndNotNull(q.id)).map(q=>[q,F.querySelector(`#${q.id}`)]).filter(([q,W])=>isDefAndNotNull(W)).forEach(([q,W])=>{q.parentNode.replaceChild(W,q),this.parseContent(W)});else if(D.startsWith("#")){const q=F.querySelector(D),W=O.querySelector(D);W.parentNode.replaceChild(q,W),this.parseContent(q)}this.evalScripts(w.scripts),this.evalModules(w.modules)}renderWithJSON(w){return this.user?this.user.fetchJson(this.uri_,this.abortController.signal).then(O=>{this.assertCanRenderAsync(),w&&w(O,this),this.onRenderWithJSON(O).then(identity)}).catch(O=>{throw console.error("Panel.renderWithJSON fetch failed:",O),O}):Promise.reject(new Error("No UserManager instance available for Panel.renderWithJSON()"))}onRenderWithJSON(w){return Promise.resolve(this)}onAsyncJsonReply(w,D,O){}onAsyncHtmlReply(w,D){}onViewDataBroadcast(w){}parseContent(w){if(this.debugMe("Enable interactions. Panel:",w),typeof window.customElements<"u"&&ComponentLibraryRegistry.has("carbon")){const J=ComponentLibraryRegistry.get("carbon");J.render.call(this,w,J.cache).catch(X=>console.error("[Zooy] Carbon initialization failed:",X))}if(ComponentLibraryRegistry.has("mdc")){const J=ComponentLibraryRegistry.get("mdc");J.render.call(this,w,J.cache)}w.classList.contains("zoo__modal-base")&&w.classList.contains("close_on_click")&&this.listen(w,EV.CLICK,J=>{J.target===w&&this.dispatchPanelEvent("destroy_me")}),[...w.querySelectorAll(".zoo__button:not(.external):not(.mdc-data-table__row)")].forEach(J=>{this.listen(J,EV.CLICK,X=>{X.stopPropagation();const Z=X.currentTarget,et=getElDataMap(Z);this.dispatchPanelEvent(et.zv,Object.assign({orgEvt:X,trigger:Z,href:Z.href||et.href},et))})}),[...w.querySelectorAll("[href]:not(.external)")].forEach(J=>{this.listen(J,EV.CLICK,X=>{const Z=X.currentTarget;X.preventDefault(),X.stopPropagation();const et=getElDataMap(Z),st=et.zv||"href";this.dispatchPanelEvent(st,Object.assign({orgEvt:X,trigger:X.target,href:Z.href||et.href},et))})}),[...w.querySelectorAll("form.intercept_submit")].forEach(J=>{J.noValidate=!0,this.listen(J,EV.SUBMIT,X=>{X.preventDefault(),X.stopPropagation();const Z=getElDataMap(J),et=formToJSON(J.elements);this.dispatchPanelEvent(Z.zv,Object.assign({orgEvt:X,trigger:X.target,formData:et,href:Z.href},Z))})}),[...w.querySelectorAll(".zoo__toggle_class_driver")].forEach(J=>{const X=getElDataMap(J),Z=X.toggle_class_target_id,et=X.toggle_class,st=w.querySelector(`#${Z}`);st&&et&&J.addEventListener(EV.CLICK,rt=>{rt.stopPropagation(),st.classList.toggle(et)})});const D=Array.from(w.querySelectorAll(".folder_drop_zone")),O=Array.from(w.querySelectorAll("[draggable]")),F=J=>{J.preventDefault(),J.target.classList.add("drag_over")},q=J=>{J.preventDefault()},W=J=>{J.preventDefault(),J.target.classList.remove("drag_over")},Y=J=>{J.preventDefault(),J.target.classList.remove("drag_over")},G=J=>{J.preventDefault(),J.target.classList.remove("drag_over")},K=J=>{J.dataTransfer.dropEffect="move";const X=getElDataMap(J.target);J.dataTransfer.setData("text/plain",JSON.stringify(X)),J.target.classList.add("drag_in_progress")},Q=J=>{J.target.classList.remove("drag_in_progress")},tt=J=>{G(J),J.stopPropagation();const X=JSON.parse(J.dataTransfer.getData("text/plain")),Z=getElDataMap(J.target);return this.dispatchPanelEvent("drop_on",{custom:{on:Z,from:X}}),!1};D.forEach(J=>{this.listen(J,EV.DRAGOVER,q),this.listen(J,EV.DRAGENTER,F),this.listen(J,EV.DRAGEXIT,Y),this.listen(J,EV.DRAGLEAVE,W),this.listen(J,EV.DROP,tt)}),O.forEach(J=>{this.listen(J,EV.DRAGSTART,K),this.listen(J,EV.DRAGEND,Q)}),[...w.querySelectorAll(".zoo_async_json")].forEach(J=>{const X=getElDataMap(J),Z=X.href,et=this.onAsyncJsonReply.bind(this,J,X);this.user.fetchJson(Z,this.abortController.signal).then(et);const st=X.z_json_reusable;st&&(this.jsonCallFuncs=this.jsonCallFuncs||{},this.jsonCallFuncs[st]=()=>{this.user.fetchJson(Z,this.abortController.signal).then(et)});const rt=toNumber(X.z_interval);isNumber(rt)&&this.doOnBeat(()=>{this.user.fetchJson(Z,this.abortController.signal).then(et)},rt*60*1e3)}),[...w.querySelectorAll(".zoo_async_html")].forEach(J=>{const X=getElDataMap(J),Z=X.href;this.user.fetchAndSplit(Z,this.abortController.signal).then(st=>{J.appendChild(st.html),this.parseContent(J),this.evalScripts(st.scripts),this.evalModules(st.modules),this.onAsyncHtmlReply(J,X)});const et=toNumber(X.z_interval);isNumber(et)&&this.doOnBeat(()=>{this.user.fetchAndSplit(Z,this.abortController.signal).then(st=>{J.replaceChildren(st.html),this.parseContent(J),this.evalScripts(st.scripts),this.evalModules(st.modules)})},et*60*1e3)})}enterDocument(){const w=this.getElement();this.parseContent(w),this.evalScripts(this.responseObject.scripts),this.evalModules(this.responseObject.modules),super.enterDocument()}exitDocument(){this.abortController.abort(),super.exitDocument()}setIsRedirected(w,D){this.redirected=w,this.redirected&&D&&(this.uri_=D)}dispatchPanelEvent(w,D){const O=new ZooyEventData(w,D),F=Evt.makeEvent(UiEventType.PANEL,O);return this.debugMe(`PANEL EVENT FIRED:
2
- value:${w}
3
- data:${D}`),this.dispatchEvent(F)}}class FormPanel extends Panel{#t=null;#e=new Map;#s=!0;constructor(w,D=!0){super(w),this.#s=D,this.onSubmitSucFunc=(O,F)=>null}get formEl(){return this.#t}enterDocument(){super.enterDocument(),this.formIdElementToForm_()}formIdElementToForm_(){this.#t=this.getFormFromId(),this.#t&&(this.#a(this.#t),this.#r())}getFormFromId(w){let D=null,O=this.getElement().querySelector("form");return w&&(O=document.getElementById(w)||O),O&&O.tagName.toLowerCase()==="form"&&(D=O),D}#r(){this.#t&&(this.listen(this.#t,EV.CHANGE,w=>{this.#o(w)},{passive:!0}),this.listen(this.#t,EV.INPUT,w=>{this.clearAllValidationErrors(),this.#o(w)}),this.listen(this.#t,EV.INVALID,w=>{w.preventDefault();const D=w.target;this.#i(D),this.displayFieldError(D)},{passive:!0}))}checkAllFields(){const w=[...this.#t.elements].map(D=>[this.#n(D),D]).filter(D=>!D[0]);return w.forEach(D=>this.displayFieldError(D[1])),w.length===0}clearAllValidationErrors(){[...this.#t?this.#t.elements:[]].forEach(O=>this.#i(O)),[...this.#t.querySelectorAll(".non-field-errors")].forEach(O=>O.classList.remove("alert-error"))}displayAlert_(w,D,O){const F=document.getElementById(`${w.id}-helper-text`)||document.createElement("p");F.textContent=D,this.#e.set(w,F)}#n(w){this.#i(w);let D=!w.willValidate;return w.willValidate&&(D=w.checkValidity()),D}#i(w){w.classList.remove("error"),this.#e.has(w)&&(this.#e.get(w).textContent=""),this.#e.delete(w)}displayFieldError(w,D){const O=D||w.validationMessage;w.classList.add("error"),this.displayAlert_(w,O,"alert-error")}displayFieldSuccess(w,D){this.displayAlert_(w,D,"alert-success")}displayFieldInfo(w,D){this.displayAlert_(w,D,"alert-info")}#o(w){this.#n(w.target)}#a(w){if(w&&this.#s){w.noValidate=!0;const D=this.user;this.listen(w,EV.SUBMIT,O=>{O.preventDefault(),this.debugMe("Intercepted from SUBMIT"),this.checkAllFields()&&D&&D.formSubmit(this)})}return w}onSubmitSuccess(w){this.onSubmitSucFunc=w}replaceForm(w){if(this.responseObject=splitScripts(w),this.responseObject.html){if(this.redirected){this.removeAllListener();const D=this.getElement(),O=D.parentNode;this.setElementInternal_(this.responseObject.html),O.replaceChild(this.getElement(),D)}else{const D=this.responseObject.html.querySelector("form");D&&replaceNode(D,this.#t);const O=this.responseObject.html.querySelector('button[type="submit"]'),F=this.getElement().querySelector('button[type="submit"]');O&&F&&replaceNode(O,F)}this.enterDocument()}}refreshFromFromServer(){const w=this.user,D=this.uri;return w?w.fetch(D,this.abortController.signal).then(O=>this.replaceForm(O)):Promise.reject(new Error("No UserManager instance available for FormPanel.refreshFromFromServer()"))}processSubmitReply(w){this.clearAllValidationErrors();let D=!1;if(whatType(w)==="object"&&w.success)return Promise.resolve(this).then(()=>{this.onSubmitSucFunc(this,w),this.dispatchCompEvent(UiEventType.FORM_SUBMIT_SUCCESS)});if(w==="success"?(this.debugMe(`
4
- 1.REDIRECTED: ${this.redirected}
5
- REPLY: ${w}`),D=!0):w===`redirected_success
6
- `?(this.debugMe(`
7
- 2.REDIRECTED: ${this.redirected}
8
- REPLY: ${w}`),D=!0,this.redirected=!1):(this.debugMe(`
9
- 3.REDIRECTED: ${this.redirected}
10
- REPLY: Some form HTML`),this.replaceForm(w)),D&&this.redirected)return this.debugMe(`
11
- 4.REDIRECTED: ${this.redirected}
12
- SUCCESS: ${D}`),this.redirected=!1,Promise.resolve(this);if(D)return this.debugMe(`
13
- 5.REDIRECTED: ${this.redirected}
14
- SUCCESS: ${D}`),Promise.resolve(this).then(()=>{this.onSubmitSucFunc(this),this.dispatchCompEvent(UiEventType.FORM_SUBMIT_SUCCESS)});this.debugMe(`
15
- 6.REDIRECTED: ${this.redirected}
16
- SUCCESS: ${D}`)}}class Split extends Component{static splitEventCode(){return UiEventType.SPLIT}constructor(){super(),this.dragImage_=document.createElement("canvas"),this.nestMap_=new Map,this.nestCallbackMap_=new Map,this.splitNests_=new Set}get nests(){return[...this.nestMap_.entries()].filter(([w,{nestEl:D}])=>D)}getNest(w){return this.nestMap_.get(w)?.nestEl}get nestNames(){return[...this.nestMap_.entries()].filter(([w,D])=>!this.splitNests_.has(D)).map(([w])=>w)}closeAndLockAll(w=identity,D=!1){this.nestNames.forEach(O=>this.closeAndLock(O,w,D))}openAndUnlockAll(w=identity,D=!1){this.nestNames.forEach(O=>this.openAndUnlock(O,w,D))}lock(w){const{dragEl:D}=this.nestMap_.get(w);D.classList.add("locked")}unlock(w){const{dragEl:D}=this.nestMap_.get(w);D.classList.remove("locked")}resize(w,D,O=identity,F=!1){const{sizeNow:q,nestEl:W,canResize:Y}=this.nestMap_.get(w);Y&&(F||q===D?(W.classList.remove("animated"),W.style.flexBasis=`${D}px`,this.nestMap_.get(w).sizeNow=D,O()):(W.classList.add("animated"),this.nestCallbackMap_.set(w,()=>{W.classList.remove("animated"),this.nestMap_.get(w).sizeNow=D,O()}),W.style.flexBasis=`${D}px`))}closeAndLock(w,D=identity,O=!1){const{nestEl:F,dragEl:q,canResize:W}=this.nestMap_.get(w);if(!W)return;const Y=()=>{q.classList.add("locked","closed"),F.classList.add("closed"),D()};this.resize(w,0,Y,O)}closeAndUnlock(w,D=identity,O=!1){const{nestEl:F,dragEl:q,canResize:W}=this.nestMap_.get(w);if(!W)return;const Y=()=>{F.classList.remove("closed"),q.classList.remove("closed","locked"),q.classList.add("collapsed"),D()};this.resize(w,0,Y,O)}openAndUnlock(w,D,O,F=!1){const{nestEl:q,dragEl:W,defSize:Y,lastSize:G,canResize:K}=this.nestMap_.get(w);if(!K)return;const Q=D||G||Y;q.classList.remove("closed"),W.classList.remove("closed","locked","collapsed"),setTimeout(()=>{this.resize(w,Q,O,F)},50)}openAndLock(w,D,O,F=!1){const{nestEl:q,dragEl:W,defSize:Y,lastSize:G,canResize:K}=this.nestMap_.get(w);if(!K)return;const Q=D||G||Y;q.classList.remove("closed"),W.classList.remove("closed","collapsed"),setTimeout(()=>{this.resize(w,Q,O,F)},50)}close(w,D=identity,O=!1){const{dragEl:F,canResize:q,nestEl:W}=this.nestMap_.get(w);if(!q)return;this.dispatchSplitEvent(UiEventType.SPLIT_WILL_CLOSE,{nestName:w,nestEl:W});const Y=()=>{F.classList.add("collapsed"),this.dispatchSplitEvent(UiEventType.SPLIT_DID_CLOSE,{nestName:w,nestEl:W}),D()};this.resize(w,0,Y,O)}open(w,D=identity,O=!1){const{defSize:F,lastSize:q,dragEl:W,canResize:Y,nestEl:G}=this.nestMap_.get(w);if(!Y)return;this.dispatchSplitEvent(UiEventType.SPLIT_WILL_OPEN,{nestName:w,nestEl:G}),W.classList.remove("collapsed","closed");const K=q||F,Q=()=>{this.dispatchSplitEvent(UiEventType.SPLIT_DID_OPEN,{nestName:w,nestEl:G}),D()};this.resize(w,K,Q,O)}toggle(w,D,O=!1){this.nestMap_.get(w).sizeNow===0?this.open(w,D,O):this.close(w,D,O)}addSplit(w=void 0,D="EW",O=100,F=100,q=[],W=[],Y=[],G=[],K=[]){const Q=w||this.getElement();if(this.splitNests_.has(Q))return["Already used!",Q];convertElToSplit(Q,D),this.splitNests_.add(Q);let tt="";if(w){const it=[...this.nestMap_.entries()].find(([at,{nestEl:lt}])=>lt===w);if(it)tt=it[0];else return["Element not managed by this component",w]}const J=`${tt}A`,X=makeOuterNest(O,["zoo_nest__A",J,...q]),Z=new Dragger(D);Z.domFunc=makeDraggerEl([`zoo_drag_${J}`,...G],K),Z.render(Q),this.nestMap_.set(J,{side:"A",nestEl:X,dragger:Z,dragEl:Z.getElement(),defSize:O,sizeNow:-1,canResize:!0});const et=`${tt}B`,st=makeInnerNest(["zoo_nest__B",et,...W]);this.nestMap_.set(et,{nestEl:st,canResize:!1});const rt=`${tt}C`,nt=new Dragger(D);nt.domFunc=makeDraggerEl([`zoo_drag_${rt}`,...G],K),nt.render(Q);const ot=makeOuterNest(F,["zoo_nest__C",rt,...Y]);this.nestMap_.set(rt,{side:"C",nestEl:ot,dragger:nt,dragEl:nt.getElement(),defSize:F,sizeNow:-1,canResize:!0}),[X,Z.getElement(),st,nt.getElement(),ot].forEach(it=>Q.appendChild(it));let ct=0;const ht=(it,at,lt,ft)=>{let ut;const dt=it==="NS"?"height":"width",gt=it==="NS"?"deltaY":"deltaX";return pt=>{switch(pt.detail.value_){case UiEventType.COMP_DRAG_START:ut=at.getBoundingClientRect()[dt],ct=st.getBoundingClientRect()[dt]+ut,this.nestMap_.get(lt).dragEl.classList.remove("collapsed");break;case UiEventType.COMP_DRAG_MOVE:{const mt=Math.min(ct,ut+ft*pt.detail.data_[gt]);this.nestMap_.get(lt).lastSize=mt,at.style.flexBasis=mt+"px";break}case UiEventType.COMP_DRAG_END:this.dispatchSplitEvent(UiEventType.COMP_DRAG_END,this.nestMap_.get(lt));break}}};this.listen(Z,Component.compEventCode(),ht(D,X,J,1)),this.listen(nt,Component.compEventCode(),ht(D,ot,rt,-1)),this.listen(Z.getElement(),EV.DBLCLICK,()=>this.toggle(J)),this.listen(nt.getElement(),EV.DBLCLICK,()=>this.toggle(rt)),this.listen(Z.getElement().querySelector(".zoo_grabber"),EV.CLICK,()=>this.toggle(J)),this.listen(nt.getElement().querySelector(".zoo_grabber"),EV.CLICK,()=>this.toggle(rt)),this.listen(X,EV.TRANSITIONEND,it=>{if(it.propertyName==="flex-basis"&&it.target===X){const at=this.nestCallbackMap_.get(J);this.nestCallbackMap_.delete(J),at&&at(),this.dispatchSplitEvent(UiEventType.SPLIT_TRANSITION_END,this.nestMap_.get(J))}}),this.listen(ot,EV.TRANSITIONEND,it=>{if(it.propertyName==="flex-basis"&&it.target===ot){const at=this.nestCallbackMap_.get(rt);this.nestCallbackMap_.delete(rt),at&&at(),this.dispatchSplitEvent(UiEventType.SPLIT_TRANSITION_END,this.nestMap_.get(rt))}})}dispatchSplitEvent(w,D){const O=new ZooyEventData(w,D),F=Evt.makeEvent(UiEventType.SPLIT,O);return this.dispatchEvent(F)}}const convertElToSplit=(U,w)=>(U.classList.add("zoo_split",`zoo_split__${w.toLowerCase()}`),U),makeOuterNest=(U,w=[])=>{const D=document.createElement("div");return D.setAttribute("id",randomId(7)),D.classList.add("zoo_nest","zoo_nest__outer",...w),D.style.flexBasis=U+"px",D},makeInnerNest=(U=[])=>{const w=document.createElement("div");return w.setAttribute("id",randomId(7)),w.classList.add("zoo_nest","zoo_nest__inner",...U),w},makeDraggerEl=(U=[],w=[])=>()=>{const D=document.createElement("div");D.setAttribute("id",randomId(7)),D.classList.add("zoo_dragger",...U);const O=document.createElement("div");return O.classList.add("zoo_grabber",...w),D.appendChild(O),D},needsToScroll=U=>{const D=U.getBoundingClientRect().bottom;return O=>O.getBoundingClientRect().bottom>D},treeNodeSelect=U=>w=>{const D=U.getElement().querySelector(".zv_tree_container"),O=needsToScroll(D),F=U.getElement().querySelectorAll(".tree-node");let q;[...F].forEach(W=>{enableClass(W,"mdc-deprecated-list-item--activated",W.id===`tree-node_${w}`),W.id===`tree-node_${w}`&&(q=W)}),q&&O(q)&&q.scrollIntoView(!1)},toggleTree=(U,w)=>{const D=w.getElement().querySelector(".children"),O=U.isOn,F=w.getElement().querySelectorAll(".children"),q=w.getElement().querySelectorAll(".zoo__reveal_icon");[...F].forEach(W=>enableClass(W,"zoo__tree-children__hidden",W!==D&&!O)),[...q].forEach(W=>enableClass(W,"zoo__icon_rotated",W!==D&&!O))},toggleTreeChildren=(U,w)=>{const D=w.trigger,O=D.getAttribute("data-child-id"),F=U.getElement().querySelector(`#${O}`);toggleClass(F,"zoo__tree-children__hidden"),toggleClass(D,"zoo__icon_rotated")},_openTreeFromNodeUp=(U,w)=>{const D=w.parentElement;D.classList.contains("children")&&(enableClass(D,"zoo__tree-children__hidden",!1),_openTreeFromNodeUp(U,D))},treeUtils=Object.freeze(Object.defineProperty({__proto__:null,_openTreeFromNodeUp,toggleTree,toggleTreeChildren,treeNodeSelect},Symbol.toStringTag,{value:"Module"})),MdcTreeHandlers={toggle_tree:function(U,w){toggleTree(U,w)},"tree_toggle-children":function(U,w){toggleTreeChildren(w,U)}},SearchHandlers={search:function(U,w){let D=`${U.href}`;const O=U.formData.q,F=U.targetval;if(O!==""&&(D=`${D}?q=${O}`),F!==""){let q=F;F.includes("page=")&&(q=F.split("&").filter(W=>!W.includes("page=")).join("&")),D=O!==""?`${D}&${q}`:`${D}?${q}`}this.user.fetchAndSplit(D,w.abortController.signal).then(q=>w.onReplacePartialDom(q,U.zvptarget))},reset_search:function(U,w){const D=U.trigger.closest("form");w.removeFromQParams("q"),D.elements.q.value="",D.dispatchEvent(new Event("submit"))}},QueryParamHandlers={paginate:function(U,w){const D=`${U.href}?${U.targetval}`;this.user.fetchAndSplit(D,w.abortController.signal).then(O=>w.onReplacePartialDom(O,U.zvptarget))},list_filter:function(U,w){const D=`${U.href}?${U.targetval}`;this.user.fetchAndSplit(D,w.abortController.signal).then(O=>w.onReplacePartialDom(O,U.zvptarget))}},handlers=Object.freeze(Object.defineProperty({__proto__:null,MdcTreeHandlers,QueryParamHandlers,SearchHandlers},Symbol.toStringTag,{value:"Module"}));class View extends Evt{#t=void 0;#e=void 0;#s={};static viewEventCode(){return UiEventType.VIEW}constructor(){super(),this.panelMap=new Map,this.user_=void 0,this.split_=void 0,this.panelEventMap_=this.initPanelEventsInternal_(),this.switchViewMap_=new Map,this.metaData_=new Map}set recordHistory(w){this.#e=w}get recordHistory(){return this.#e}set registerViewConstructor(w){this.#t=w}get registerViewConstructor(){return this.#t}set utils(w){this.#s=w}get utils(){return this.#s}set split(w){this.split_=w,this.listen(this.split_,UiEventType.SPLIT,D=>{const O=D.detail.getValue(),F=D.detail.getData();switch(O){case UiEventType.SPLIT_WILL_OPEN:this.onSplitWillOpen(F);break;case UiEventType.SPLIT_WILL_CLOSE:this.onSplitWillClose(F);break;case UiEventType.SPLIT_DID_CLOSE:this.onSplitDidClose(F);break;case UiEventType.SPLIT_DID_OPEN:this.onSplitDidOpen(F);break;case UiEventType.SPLIT_TRANSITION_END:break}})}get split(){if(!this.split_)throw new Error("No SPLIT component available");return this.split_}set user(w){this.user_=w,this.panelMap.forEach(D=>D.user=w)}get user(){return this.user_||(this.user_=new UserManager),this.user_}render(){this.initPanelEvents(),this.preRender(),this.configurePanels(),this.displayPanels(),this.postRender()}initPanelEvents(){}preRender(){}configurePanels(){}displayPanels(){}postRender(){}dispose(){[...this.panelMap.values()].forEach(w=>w.dispose()),super.dispose()}addPanelToView(w,D){D.user=this.user,this.removePanelByName(w),this.panelMap.set(w,D),this.listen(D,Panel.panelEventCode(),this.onPanelEvent.bind(this))}removePanelByName(w){this.panelMap.has(w)&&this.panelMap.get(w).dispose()}removePanel(w){const[D,O]=[...this.panelMap.entries()].find(([F,q])=>q===w);D&&O&&(O.dispose(),this.panelMap.delete(D))}getPanelByName(w){return this.panelMap.get(w)}broadcastToPanels(w){[...this.panelMap.values()].forEach(D=>D.onViewDataBroadcast(w))}initPanelEventsInternal_(){const w=new Map;return w.set("destroy_me",(D,O)=>{this.removePanel(O)}),w.set("switch_view",(D,O)=>{this.debugMe("switch_view received: eventData",D);const F=D.view;this.switchViewMap_.has(F)?this.switchViewMap_.get(F)(D,O):this.debugMe("NO VIEW FOUND FOR:",F,this.switchViewMap_)}),Object.entries({...SearchHandlers,...QueryParamHandlers}).forEach(([D,O])=>{w.set(D,O.bind(this))}),w}mapPanEv(w,D){this.panelEventMap_.set(w,D)}mapSwitchView(w,D){this.switchViewMap_.set(w,D)}onPanelEvent(w){let D=w.detail.getValue();if(this.debugMe(`PanelEvent Value: ${D}`),!isDefAndNotNull(D)){this.debugMe(`The panel received an event without a value.
17
- There is nothing we can do with that.`);return}const O=w.detail.getData();D?.startsWith("switch_view:")&&(O.view=D.split(":")[1],D="switch_view");const F=w.target;this.panelEventMap_.has(D)?this.panelEventMap_.get(D)(O,F):this.debugMe(`NO EVENT MATCH - This usually you are missing
18
- a "mapPanEv(${D} ..." statement in your panel JS
19
- or you have a "event='${D}'" attribute in your panel HTML`,{event:w,eventValue:D,eventData:O,panel:F.constructor.name})}onSplitWillOpen(w){}onSplitWillClose(w){}onSplitDidClose(w){}onSplitDidOpen(w){}dispatchViewEvent(w,D){const O=new ZooyEventData(w,D),F=Evt.makeEvent(UiEventType.VIEW,O);return this.dispatchEvent(F)}get metaData(){return this.metaData_}setMetaData(w,D){return this.metaData_.set(w,D),this.metaData}getMetaData(w){return this.metaData_.get(w)}hasMetaData(w){return this.metaData_.has(w)}}function _isPlaceholder(U){return U!=null&&typeof U=="object"&&U["@@functional/placeholder"]===!0}function _curry1(U){return function w(D){return arguments.length===0||_isPlaceholder(D)?w:U.apply(this,arguments)}}function _curry2(U){return function w(D,O){switch(arguments.length){case 0:return w;case 1:return _isPlaceholder(D)?w:_curry1(function(F){return U(D,F)});default:return _isPlaceholder(D)&&_isPlaceholder(O)?w:_isPlaceholder(D)?_curry1(function(F){return U(F,O)}):_isPlaceholder(O)?_curry1(function(F){return U(D,F)}):U(D,O)}}}function _concat(U,w){U=U||[],w=w||[];var D,O=U.length,F=w.length,q=[];for(D=0;D<O;)q[q.length]=U[D],D+=1;for(D=0;D<F;)q[q.length]=w[D],D+=1;return q}function _arity(U,w){switch(U){case 0:return function(){return w.apply(this,arguments)};case 1:return function(D){return w.apply(this,arguments)};case 2:return function(D,O){return w.apply(this,arguments)};case 3:return function(D,O,F){return w.apply(this,arguments)};case 4:return function(D,O,F,q){return w.apply(this,arguments)};case 5:return function(D,O,F,q,W){return w.apply(this,arguments)};case 6:return function(D,O,F,q,W,Y){return w.apply(this,arguments)};case 7:return function(D,O,F,q,W,Y,G){return w.apply(this,arguments)};case 8:return function(D,O,F,q,W,Y,G,K){return w.apply(this,arguments)};case 9:return function(D,O,F,q,W,Y,G,K,Q){return w.apply(this,arguments)};case 10:return function(D,O,F,q,W,Y,G,K,Q,tt){return w.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function _curryN(U,w,D){return function(){for(var O=[],F=0,q=U,W=0,Y=!1;W<w.length||F<arguments.length;){var G;W<w.length&&(!_isPlaceholder(w[W])||F>=arguments.length)?G=w[W]:(G=arguments[F],F+=1),O[W]=G,_isPlaceholder(G)?Y=!0:q-=1,W+=1}return!Y&&q<=0?D.apply(this,O):_arity(Math.max(0,q),_curryN(U,O,D))}}var curryN=_curry2(function U(w,D){return w===1?_curry1(D):_arity(w,_curryN(w,[],D))});function _curry3(U){return function w(D,O,F){switch(arguments.length){case 0:return w;case 1:return _isPlaceholder(D)?w:_curry2(function(q,W){return U(D,q,W)});case 2:return _isPlaceholder(D)&&_isPlaceholder(O)?w:_isPlaceholder(D)?_curry2(function(q,W){return U(q,O,W)}):_isPlaceholder(O)?_curry2(function(q,W){return U(D,q,W)}):_curry1(function(q){return U(D,O,q)});default:return _isPlaceholder(D)&&_isPlaceholder(O)&&_isPlaceholder(F)?w:_isPlaceholder(D)&&_isPlaceholder(O)?_curry2(function(q,W){return U(q,W,F)}):_isPlaceholder(D)&&_isPlaceholder(F)?_curry2(function(q,W){return U(q,O,W)}):_isPlaceholder(O)&&_isPlaceholder(F)?_curry2(function(q,W){return U(D,q,W)}):_isPlaceholder(D)?_curry1(function(q){return U(q,O,F)}):_isPlaceholder(O)?_curry1(function(q){return U(D,q,F)}):_isPlaceholder(F)?_curry1(function(q){return U(D,O,q)}):U(D,O,F)}}}const _isArray=Array.isArray||function U(w){return w!=null&&w.length>=0&&Object.prototype.toString.call(w)==="[object Array]"};function _isTransformer(U){return U!=null&&typeof U["@@transducer/step"]=="function"}function _dispatchable(U,w,D){return function(){if(arguments.length===0)return D();var O=arguments[arguments.length-1];if(!_isArray(O)){for(var F=0;F<U.length;){if(typeof O[U[F]]=="function")return O[U[F]].apply(O,Array.prototype.slice.call(arguments,0,-1));F+=1}if(_isTransformer(O)){var q=w.apply(null,Array.prototype.slice.call(arguments,0,-1));return q(O)}}return D.apply(this,arguments)}}const _xfBase={init:function(){return this.xf["@@transducer/init"]()},result:function(U){return this.xf["@@transducer/result"](U)}};function _has(U,w){return Object.prototype.hasOwnProperty.call(w,U)}var toString=Object.prototype.toString,_isArguments=(function(){return toString.call(arguments)==="[object Arguments]"?function(w){return toString.call(w)==="[object Arguments]"}:function(w){return _has("callee",w)}})(),hasEnumBug=!{toString:null}.propertyIsEnumerable("toString"),nonEnumerableProps=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],hasArgsEnumBug=(function(){return arguments.propertyIsEnumerable("length")})(),contains=function U(w,D){for(var O=0;O<w.length;){if(w[O]===D)return!0;O+=1}return!1},keys=_curry1(typeof Object.keys=="function"&&!hasArgsEnumBug?function U(w){return Object(w)!==w?[]:Object.keys(w)}:function U(w){if(Object(w)!==w)return[];var D,O,F=[],q=hasArgsEnumBug&&_isArguments(w);for(D in w)_has(D,w)&&(!q||D!=="length")&&(F[F.length]=D);if(hasEnumBug)for(O=nonEnumerableProps.length-1;O>=0;)D=nonEnumerableProps[O],_has(D,w)&&!contains(F,D)&&(F[F.length]=D),O-=1;return F});function _map(U,w){for(var D=0,O=w.length,F=Array(O);D<O;)F[D]=U(w[D]),D+=1;return F}function _arrayReduce(U,w,D){for(var O=0,F=D.length;O<F;)w=U(w,D[O]),O+=1;return w}var XMap=(function(){function U(w,D){this.xf=D,this.f=w}return U.prototype["@@transducer/init"]=_xfBase.init,U.prototype["@@transducer/result"]=_xfBase.result,U.prototype["@@transducer/step"]=function(w,D){return this.xf["@@transducer/step"](w,this.f(D))},U})(),_xmap=function U(w){return function(D){return new XMap(w,D)}},map=_curry2(_dispatchable(["fantasy-land/map","map"],_xmap,function U(w,D){switch(Object.prototype.toString.call(D)){case"[object Function]":return curryN(D.length,function(){return w.call(this,D.apply(this,arguments))});case"[object Object]":return _arrayReduce(function(O,F){return O[F]=w(D[F]),O},{},keys(D));default:return _map(w,D)}}));const _isInteger=Number.isInteger||function U(w){return w<<0===w};function _nth(U,w){var D=U<0?w.length+U:U;return w[D]}function _prop(U,w){if(w!=null)return _isInteger(U)?_nth(U,w):w[U]}function _isString(U){return Object.prototype.toString.call(U)==="[object String]"}var _isArrayLike=_curry1(function U(w){return _isArray(w)?!0:!w||typeof w!="object"||_isString(w)?!1:w.length===0?!0:w.length>0?w.hasOwnProperty(0)&&w.hasOwnProperty(w.length-1):!1}),symIterator=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function _createReduce(U,w,D){return function(F,q,W){if(_isArrayLike(W))return U(F,q,W);if(W==null)return q;if(typeof W["fantasy-land/reduce"]=="function")return w(F,q,W,"fantasy-land/reduce");if(W[symIterator]!=null)return D(F,q,W[symIterator]());if(typeof W.next=="function")return D(F,q,W);if(typeof W.reduce=="function")return w(F,q,W,"reduce");throw new TypeError("reduce: list must be array or iterable")}}var and=_curry2(function U(w,D){return w&&D});function _iterableReduce(U,w,D){for(var O=D.next();!O.done;)w=U(w,O.value),O=D.next();return w}function _methodReduce(U,w,D,O){return D[O](U,w)}var _reduce=_createReduce(_arrayReduce,_methodReduce,_iterableReduce),ap=_curry2(function U(w,D){return typeof D["fantasy-land/ap"]=="function"?D["fantasy-land/ap"](w):typeof w.ap=="function"?w.ap(D):typeof w=="function"?function(O){return w(O)(D(O))}:_reduce(function(O,F){return _concat(O,map(F,D))},[],w)});function _assoc(U,w,D){if(_isInteger(U)&&_isArray(D)){var O=U<0?D.length+U:U,F=[].concat(D);return F[O]=w,F}var q={};for(var W in D)q[W]=D[W];return q[U]=w,q}var isNil=_curry1(function U(w){return w==null}),assocPath=_curry3(function U(w,D,O){if(w.length===0)return D;var F=w[0];if(w.length>1){var q=_prop(F,O);(isNil(q)||typeof q!="object")&&(q=_isInteger(w[1])?[]:{}),D=U(Array.prototype.slice.call(w,1),D,q)}return _assoc(F,D,O)});function _isFunction(U){var w=Object.prototype.toString.call(U);return w==="[object Function]"||w==="[object AsyncFunction]"||w==="[object GeneratorFunction]"||w==="[object AsyncGeneratorFunction]"}var liftN=_curry2(function U(w,D){var O=curryN(w,D);return curryN(w,function(){return _arrayReduce(ap,map(O,arguments[0]),Array.prototype.slice.call(arguments,1))})}),lift=_curry1(function U(w){return liftN(w.length,w)}),both=_curry2(function U(w,D){return _isFunction(w)?function(){return w.apply(this,arguments)&&D.apply(this,arguments)}:lift(and)(w,D)}),hasPath=_curry2(function U(w,D){if(w.length===0||isNil(D))return!1;for(var O=D,F=0;F<w.length;)if(!isNil(O)&&_has(w[F],O))O=O[w[F]],F+=1;else return!1;return!0}),has=_curry2(function U(w,D){return hasPath([w],D)});function _objectAssign(U){if(U==null)throw new TypeError("Cannot convert undefined or null to object");for(var w=Object(U),D=1,O=arguments.length;D<O;){var F=arguments[D];if(F!=null)for(var q in F)_has(q,F)&&(w[q]=F[q]);D+=1}return w}const _objectAssign$1=typeof Object.assign=="function"?Object.assign:_objectAssign;function _path(U,w){for(var D=w,O=0;O<U.length;O+=1){if(D==null)return;var F=U[O];_isInteger(F)?D=_nth(F,D):D=D[F]}return D}var mergeRight=_curry2(function U(w,D){return _objectAssign$1({},w,D)}),path=_curry2(_path);class Conductor extends Evt{#t=new Map;#e=null;#s=void 0;#r=void 0;#n=new Map;#i={};constructor(){super(),this.#n=this.#o(),window.addEventListener("popstate",w=>{w.state!==null&&this.navTo(w.state)}),this.doOnBeat(()=>{document.dispatchEvent(new CustomEvent("zoo-tick-60",{detail:{timestamp:Date.now()}}))},6e4)}set split(w){this.#r=w}get split(){if(!this.#r)throw new Error("No SPLIT component available");return this.#r}set user(w){this.#s=w,this.#e&&(this.#e.user=this.user)}get user(){return this.#s||(this.#s=new UserManager),this.#s}get utils(){return this.#i}registerUtil(w){this.#i=mergeRight(this.#i,w)}#o(){return new Map().set("switch_view",(w,D)=>{if(this.#t.has(w.view)){const O=this.#t.get(w.view)(w.pk||w.recordId,w);this.switchView(O)}})}mapViewEv(w,D){this.#n.set(w,D)}registerViewConstructor(w,D){this.#t.set(w,D)}onViewEvent(w){const D=w.detail.getValue(),O=w.detail.getData(),F=w.target;this.#n.has(D)?this.#n.get(D)(O,F):console.warn("Unhandled VIEW Event:",w,D,O,F)}setActiveView(w){this.#e&&(this.stopListeningTo(this.#e),this.#e.dispose(),this.#e=null),this.#e=w,this.#e.render()}initView(w){return w.user=this.user,w.split=this.split,w.utils=this.utils,w.recordHistory=this.recordHistory.bind(this),w.registerViewConstructor=this.registerViewConstructor.bind(this),this.listen(w,View.viewEventCode(),this.onViewEvent.bind(this)),w}switchView(w){this.setActiveView(this.initView(w))}recordHistory(w){this.debugMe("HISTORY",w),w.init?history.replaceState(w,"",document.location.href):w.history||history.pushState(w,"",null)}navTo=w=>{w.history=!0;const D=w.view,O=this.#e;if(O.switchViewMap_.has(D))this.debugMe("NAV:VIEW:MAP",w),O.switchViewMap_.get(D)(w);else if(this.#t.has(D)){const F=this.#t.get(D)(w.pk,w);this.debugMe("NAV:NEW:VIEW",w),this.switchView(F)}}}const DEFAULT_FORMATTERS={json:U=>JSON.stringify(U,null,2),tpl:(U,w,D)=>{const O=D?.getAttribute("zoo-bind-attr-tpl")||D?.getAttribute("zoo-bind-tpl");if(!O)return U;try{return new Function("value","data",`return \`${O}\`;`)(U,w)}catch(F){return console.warn("[Binder] Invalid template:",O,F),U}}};class Binder{#t;#e;#s;#r=null;#n;constructor(w,D,O,F={}){if(!D)throw new Error("Binder requires a URL");if(!O||!(O instanceof Element))throw new Error("Binder requires a valid rootEl Element");this.#t=w,this.#e=new URL(D,window.location.origin),this.#s=O,this.#n={...DEFAULT_FORMATTERS,...F.formatters},F.urlParams?this.#i(F.urlParams):this.#o()}get url(){return this.#e}get data(){return this.#r}get limit(){return parseInt(this.#e.searchParams.get("limit")||"0",10)}get offset(){return parseInt(this.#e.searchParams.get("offset")||"0",10)}get isPaginated(){return both(has("count"),has("results"))(this.#r)}#i(w){return Object.entries(w).forEach(([D,O])=>{if(!isDefAndNotNull(O)||O===""||Array.isArray(O)&&O.length<1){this.#e.searchParams.delete(D);return}if(Array.isArray(O)){this.#e.searchParams.set(D,O.join(","));return}this.#e.searchParams.set(D,O)}),this.#o(),this.#e}#o(){const w=this.#e.href.split(this.url.origin)[1].slice(1);this.#s.querySelectorAll("[zoo-bind-binderurl]").forEach(D=>{D.setAttribute("zoo-bind-binderurl",w)})}async fetchData(w={}){const D=await this.#t.user.fetchJson(this.#i(w).toString(),this.#t.abortController.signal);this.setData(D)}setData(w){this.#r=w,this.render()}render(){if(!isDefAndNotNull(this.#r)){console.warn("[Binder] No data to render");return}this.#o(),this.#a(this.#s,this.#r,0),this.#l()}#a(w,D,O=0,F={}){const q=F.removeAttributes??!1;w.querySelectorAll("[zoo-bind-attr]").forEach(W=>{if(W.closest("[zoo-template]"))return;W.getAttribute("zoo-bind-attr").split(",").forEach(G=>{const[K,Q]=G.split(":").map(Z=>Z.trim()),[tt,J]=Q.split("|").map(Z=>Z.trim());let X=this.#c(D,tt,O);J&&this.#n[J]&&(X=this.#n[J](X,D,W)),isDefAndNotNull(X)&&W.setAttribute(K,X)}),q&&(W.removeAttribute("zoo-bind-attr"),W.removeAttribute("zoo-bind-attr-tpl"))}),w.querySelectorAll("[zoo-bind]").forEach(W=>{if(W.closest("[zoo-template]"))return;const Y=W.getAttribute("zoo-bind"),[G,K]=Y.split("|").map(tt=>tt.trim());let Q=this.#c(D,G,O);K&&this.#n[K]&&(Q=this.#n[K](Q,D,W)),W.textContent=Q??"",q&&(W.removeAttribute("zoo-bind"),W.removeAttribute("zoo-bind-tpl"))})}#l(){this.#s.querySelectorAll("[zoo-template]").forEach(D=>{const O=D.getAttribute("zoo-template"),F=D.getAttribute("zoo-template-bind");if(!O){console.warn("[Binder] Consumer missing template ID",D);return}const q=this.#s.querySelector(`#${O}`);if(!q||q.tagName!=="TEMPLATE"){console.error(`[DataBinder] Template not found or invalid: ${O}`);return}const W=F?path(F.split("."),this.#r):this.#r;if(!W){console.warn(`[DataBinder] Data slice is undefined. Path: ${F}. Skipping render for this consumer.`);return}if(!Array.isArray(W)){console.error(`[DataBinder] Data slice is not an array. Path: ${F}`,W);return}D.innerHTML="",W.forEach((Y,G)=>{const K=this.#h(q,Y,G);D.appendChild(K)})})}#h(w,D,O){const F=w.content.cloneNode(!0);return this.#a(F,D,O,{removeAttributes:!0}),F}#c(w,D,O){const F={$index:()=>O,$index__paged:()=>this.offset+O,$index1:()=>O+1,$index1__paged:()=>this.offset+O+1};return F[D]?F[D]():path(D.split("."),w)}}const SEMANTIC_ATTRS=new Map(Object.entries({event:"event",endpoint:"endpoint",href:"href",url:"url",target:"target","record-id":"recordId","zoo-sort-field":"sortField","zoo-view":"view","zoo-event":"event","zoo-href":"href"})),getSemanticAttributes=U=>{let w={};return Array.from(U.attributes).forEach(D=>{const O=D.name,F=D.value;SEMANTIC_ATTRS.has(O)?w[SEMANTIC_ATTRS.get(O)]=F:(O.startsWith("data-")||O.startsWith("zoo-"))&&(w=assocPath(O.split("-"),F,w))}),w},getEventAttribute=(U,w,D="event")=>U.getAttribute(w)||U.getAttribute(D);/**
20
- * @license
21
- * Copyright 2019 Google LLC
22
- * SPDX-License-Identifier: BSD-3-Clause
23
- */const t$1=globalThis,e$2=t$1.ShadowRoot&&(t$1.ShadyCSS===void 0||t$1.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$2=Symbol(),o$3=new WeakMap;let n$2=class{constructor(w,D,O){if(this._$cssResult$=!0,O!==s$2)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=w,this.t=D}get styleSheet(){let w=this.o;const D=this.t;if(e$2&&w===void 0){const O=D!==void 0&&D.length===1;O&&(w=o$3.get(D)),w===void 0&&((this.o=w=new CSSStyleSheet).replaceSync(this.cssText),O&&o$3.set(D,w))}return w}toString(){return this.cssText}};const r$2=U=>new n$2(typeof U=="string"?U:U+"",void 0,s$2),i$3=(U,...w)=>{const D=U.length===1?U[0]:w.reduce(((O,F,q)=>O+(W=>{if(W._$cssResult$===!0)return W.cssText;if(typeof W=="number")return W;throw Error("Value passed to 'css' function must be a 'css' function result: "+W+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(F)+U[q+1]),U[0]);return new n$2(D,U,s$2)},S$1=(U,w)=>{if(e$2)U.adoptedStyleSheets=w.map((D=>D instanceof CSSStyleSheet?D:D.styleSheet));else for(const D of w){const O=document.createElement("style"),F=t$1.litNonce;F!==void 0&&O.setAttribute("nonce",F),O.textContent=D.cssText,U.appendChild(O)}},c$2=e$2?U=>U:U=>U instanceof CSSStyleSheet?(w=>{let D="";for(const O of w.cssRules)D+=O.cssText;return r$2(D)})(U):U;/**
24
- * @license
25
- * Copyright 2017 Google LLC
26
- * SPDX-License-Identifier: BSD-3-Clause
27
- */const{is:i$2,defineProperty:e$1,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$2,getPrototypeOf:n$1}=Object,a$1=globalThis,c$1=a$1.trustedTypes,l$1=c$1?c$1.emptyScript:"",p$1=a$1.reactiveElementPolyfillSupport,d$1=(U,w)=>U,u$1={toAttribute(U,w){switch(w){case Boolean:U=U?l$1:null;break;case Object:case Array:U=U==null?U:JSON.stringify(U)}return U},fromAttribute(U,w){let D=U;switch(w){case Boolean:D=U!==null;break;case Number:D=U===null?null:Number(U);break;case Object:case Array:try{D=JSON.parse(U)}catch{D=null}}return D}},f$1=(U,w)=>!i$2(U,w),b$1={attribute:!0,type:String,converter:u$1,reflect:!1,useDefault:!1,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$1.litPropertyMetadata??=new WeakMap;let y$1=class extends HTMLElement{static addInitializer(w){this._$Ei(),(this.l??=[]).push(w)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(w,D=b$1){if(D.state&&(D.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(w)&&((D=Object.create(D)).wrapped=!0),this.elementProperties.set(w,D),!D.noAccessor){const O=Symbol(),F=this.getPropertyDescriptor(w,O,D);F!==void 0&&e$1(this.prototype,w,F)}}static getPropertyDescriptor(w,D,O){const{get:F,set:q}=h$1(this.prototype,w)??{get(){return this[D]},set(W){this[D]=W}};return{get:F,set(W){const Y=F?.call(this);q?.call(this,W),this.requestUpdate(w,Y,O)},configurable:!0,enumerable:!0}}static getPropertyOptions(w){return this.elementProperties.get(w)??b$1}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const w=n$1(this);w.finalize(),w.l!==void 0&&(this.l=[...w.l]),this.elementProperties=new Map(w.elementProperties)}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const D=this.properties,O=[...r$1(D),...o$2(D)];for(const F of O)this.createProperty(F,D[F])}const w=this[Symbol.metadata];if(w!==null){const D=litPropertyMetadata.get(w);if(D!==void 0)for(const[O,F]of D)this.elementProperties.set(O,F)}this._$Eh=new Map;for(const[D,O]of this.elementProperties){const F=this._$Eu(D,O);F!==void 0&&this._$Eh.set(F,D)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(w){const D=[];if(Array.isArray(w)){const O=new Set(w.flat(1/0).reverse());for(const F of O)D.unshift(c$2(F))}else w!==void 0&&D.push(c$2(w));return D}static _$Eu(w,D){const O=D.attribute;return O===!1?void 0:typeof O=="string"?O:typeof w=="string"?w.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((w=>this.enableUpdating=w)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((w=>w(this)))}addController(w){(this._$EO??=new Set).add(w),this.renderRoot!==void 0&&this.isConnected&&w.hostConnected?.()}removeController(w){this._$EO?.delete(w)}_$E_(){const w=new Map,D=this.constructor.elementProperties;for(const O of D.keys())this.hasOwnProperty(O)&&(w.set(O,this[O]),delete this[O]);w.size>0&&(this._$Ep=w)}createRenderRoot(){const w=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(w,this.constructor.elementStyles),w}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((w=>w.hostConnected?.()))}enableUpdating(w){}disconnectedCallback(){this._$EO?.forEach((w=>w.hostDisconnected?.()))}attributeChangedCallback(w,D,O){this._$AK(w,O)}_$ET(w,D){const O=this.constructor.elementProperties.get(w),F=this.constructor._$Eu(w,O);if(F!==void 0&&O.reflect===!0){const q=(O.converter?.toAttribute!==void 0?O.converter:u$1).toAttribute(D,O.type);this._$Em=w,q==null?this.removeAttribute(F):this.setAttribute(F,q),this._$Em=null}}_$AK(w,D){const O=this.constructor,F=O._$Eh.get(w);if(F!==void 0&&this._$Em!==F){const q=O.getPropertyOptions(F),W=typeof q.converter=="function"?{fromAttribute:q.converter}:q.converter?.fromAttribute!==void 0?q.converter:u$1;this._$Em=F;const Y=W.fromAttribute(D,q.type);this[F]=Y??this._$Ej?.get(F)??Y,this._$Em=null}}requestUpdate(w,D,O){if(w!==void 0){const F=this.constructor,q=this[w];if(O??=F.getPropertyOptions(w),!((O.hasChanged??f$1)(q,D)||O.useDefault&&O.reflect&&q===this._$Ej?.get(w)&&!this.hasAttribute(F._$Eu(w,O))))return;this.C(w,D,O)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(w,D,{useDefault:O,reflect:F,wrapped:q},W){O&&!(this._$Ej??=new Map).has(w)&&(this._$Ej.set(w,W??D??this[w]),q!==!0||W!==void 0)||(this._$AL.has(w)||(this.hasUpdated||O||(D=void 0),this._$AL.set(w,D)),F===!0&&this._$Em!==w&&(this._$Eq??=new Set).add(w))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(D){Promise.reject(D)}const w=this.scheduleUpdate();return w!=null&&await w,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[F,q]of this._$Ep)this[F]=q;this._$Ep=void 0}const O=this.constructor.elementProperties;if(O.size>0)for(const[F,q]of O){const{wrapped:W}=q,Y=this[F];W!==!0||this._$AL.has(F)||Y===void 0||this.C(F,void 0,q,Y)}}let w=!1;const D=this._$AL;try{w=this.shouldUpdate(D),w?(this.willUpdate(D),this._$EO?.forEach((O=>O.hostUpdate?.())),this.update(D)):this._$EM()}catch(O){throw w=!1,this._$EM(),O}w&&this._$AE(D)}willUpdate(w){}_$AE(w){this._$EO?.forEach((D=>D.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(w)),this.updated(w)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(w){return!0}update(w){this._$Eq&&=this._$Eq.forEach((D=>this._$ET(D,this[D]))),this._$EM()}updated(w){}firstUpdated(w){}};y$1.elementStyles=[],y$1.shadowRootOptions={mode:"open"},y$1[d$1("elementProperties")]=new Map,y$1[d$1("finalized")]=new Map,p$1?.({ReactiveElement:y$1}),(a$1.reactiveElementVersions??=[]).push("2.1.1");/**
28
- * @license
29
- * Copyright 2017 Google LLC
30
- * SPDX-License-Identifier: BSD-3-Clause
31
- */const t=globalThis,i$1=t.trustedTypes,s$1=i$1?i$1.createPolicy("lit-html",{createHTML:U=>U}):void 0,e="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$1="?"+h,n=`<${o$1}>`,r=document,l=()=>r.createComment(""),c=U=>U===null||typeof U!="object"&&typeof U!="function",a=Array.isArray,u=U=>a(U)||typeof U?.[Symbol.iterator]=="function",d=`[
32
- \f\r]`,f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^
33
- \f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y=U=>(w,...D)=>({_$litType$:U,strings:w,values:D}),x=y(1),b=y(2),T=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),A=new WeakMap,C=r.createTreeWalker(r,129);function P(U,w){if(!a(U)||!U.hasOwnProperty("raw"))throw Error("invalid template strings array");return s$1!==void 0?s$1.createHTML(w):w}const V=(U,w)=>{const D=U.length-1,O=[];let F,q=w===2?"<svg>":w===3?"<math>":"",W=f;for(let Y=0;Y<D;Y++){const G=U[Y];let K,Q,tt=-1,J=0;for(;J<G.length&&(W.lastIndex=J,Q=W.exec(G),Q!==null);)J=W.lastIndex,W===f?Q[1]==="!--"?W=v:Q[1]!==void 0?W=_:Q[2]!==void 0?($.test(Q[2])&&(F=RegExp("</"+Q[2],"g")),W=m):Q[3]!==void 0&&(W=m):W===m?Q[0]===">"?(W=F??f,tt=-1):Q[1]===void 0?tt=-2:(tt=W.lastIndex-Q[2].length,K=Q[1],W=Q[3]===void 0?m:Q[3]==='"'?g:p):W===g||W===p?W=m:W===v||W===_?W=f:(W=m,F=void 0);const X=W===m&&U[Y+1].startsWith("/>")?" ":"";q+=W===f?G+n:tt>=0?(O.push(K),G.slice(0,tt)+e+G.slice(tt)+h+X):G+h+(tt===-2?Y:X)}return[P(U,q+(U[D]||"<?>")+(w===2?"</svg>":w===3?"</math>":"")),O]};class N{constructor({strings:w,_$litType$:D},O){let F;this.parts=[];let q=0,W=0;const Y=w.length-1,G=this.parts,[K,Q]=V(w,D);if(this.el=N.createElement(K,O),C.currentNode=this.el.content,D===2||D===3){const tt=this.el.content.firstChild;tt.replaceWith(...tt.childNodes)}for(;(F=C.nextNode())!==null&&G.length<Y;){if(F.nodeType===1){if(F.hasAttributes())for(const tt of F.getAttributeNames())if(tt.endsWith(e)){const J=Q[W++],X=F.getAttribute(tt).split(h),Z=/([.?@])?(.*)/.exec(J);G.push({type:1,index:q,name:Z[2],strings:X,ctor:Z[1]==="."?H:Z[1]==="?"?I:Z[1]==="@"?L:k}),F.removeAttribute(tt)}else tt.startsWith(h)&&(G.push({type:6,index:q}),F.removeAttribute(tt));if($.test(F.tagName)){const tt=F.textContent.split(h),J=tt.length-1;if(J>0){F.textContent=i$1?i$1.emptyScript:"";for(let X=0;X<J;X++)F.append(tt[X],l()),C.nextNode(),G.push({type:2,index:++q});F.append(tt[J],l())}}}else if(F.nodeType===8)if(F.data===o$1)G.push({type:2,index:q});else{let tt=-1;for(;(tt=F.data.indexOf(h,tt+1))!==-1;)G.push({type:7,index:q}),tt+=h.length-1}q++}}static createElement(w,D){const O=r.createElement("template");return O.innerHTML=w,O}}function S(U,w,D=U,O){if(w===T)return w;let F=O!==void 0?D._$Co?.[O]:D._$Cl;const q=c(w)?void 0:w._$litDirective$;return F?.constructor!==q&&(F?._$AO?.(!1),q===void 0?F=void 0:(F=new q(U),F._$AT(U,D,O)),O!==void 0?(D._$Co??=[])[O]=F:D._$Cl=F),F!==void 0&&(w=S(U,F._$AS(U,w.values),F,O)),w}class M{constructor(w,D){this._$AV=[],this._$AN=void 0,this._$AD=w,this._$AM=D}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(w){const{el:{content:D},parts:O}=this._$AD,F=(w?.creationScope??r).importNode(D,!0);C.currentNode=F;let q=C.nextNode(),W=0,Y=0,G=O[0];for(;G!==void 0;){if(W===G.index){let K;G.type===2?K=new R(q,q.nextSibling,this,w):G.type===1?K=new G.ctor(q,G.name,G.strings,this,w):G.type===6&&(K=new z(q,this,w)),this._$AV.push(K),G=O[++Y]}W!==G?.index&&(q=C.nextNode(),W++)}return C.currentNode=r,F}p(w){let D=0;for(const O of this._$AV)O!==void 0&&(O.strings!==void 0?(O._$AI(w,O,D),D+=O.strings.length-2):O._$AI(w[D])),D++}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(w,D,O,F){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=w,this._$AB=D,this._$AM=O,this.options=F,this._$Cv=F?.isConnected??!0}get parentNode(){let w=this._$AA.parentNode;const D=this._$AM;return D!==void 0&&w?.nodeType===11&&(w=D.parentNode),w}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(w,D=this){w=S(this,w,D),c(w)?w===E||w==null||w===""?(this._$AH!==E&&this._$AR(),this._$AH=E):w!==this._$AH&&w!==T&&this._(w):w._$litType$!==void 0?this.$(w):w.nodeType!==void 0?this.T(w):u(w)?this.k(w):this._(w)}O(w){return this._$AA.parentNode.insertBefore(w,this._$AB)}T(w){this._$AH!==w&&(this._$AR(),this._$AH=this.O(w))}_(w){this._$AH!==E&&c(this._$AH)?this._$AA.nextSibling.data=w:this.T(r.createTextNode(w)),this._$AH=w}$(w){const{values:D,_$litType$:O}=w,F=typeof O=="number"?this._$AC(w):(O.el===void 0&&(O.el=N.createElement(P(O.h,O.h[0]),this.options)),O);if(this._$AH?._$AD===F)this._$AH.p(D);else{const q=new M(F,this),W=q.u(this.options);q.p(D),this.T(W),this._$AH=q}}_$AC(w){let D=A.get(w.strings);return D===void 0&&A.set(w.strings,D=new N(w)),D}k(w){a(this._$AH)||(this._$AH=[],this._$AR());const D=this._$AH;let O,F=0;for(const q of w)F===D.length?D.push(O=new R(this.O(l()),this.O(l()),this,this.options)):O=D[F],O._$AI(q),F++;F<D.length&&(this._$AR(O&&O._$AB.nextSibling,F),D.length=F)}_$AR(w=this._$AA.nextSibling,D){for(this._$AP?.(!1,!0,D);w!==this._$AB;){const O=w.nextSibling;w.remove(),w=O}}setConnected(w){this._$AM===void 0&&(this._$Cv=w,this._$AP?.(w))}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(w,D,O,F,q){this.type=1,this._$AH=E,this._$AN=void 0,this.element=w,this.name=D,this._$AM=F,this.options=q,O.length>2||O[0]!==""||O[1]!==""?(this._$AH=Array(O.length-1).fill(new String),this.strings=O):this._$AH=E}_$AI(w,D=this,O,F){const q=this.strings;let W=!1;if(q===void 0)w=S(this,w,D,0),W=!c(w)||w!==this._$AH&&w!==T,W&&(this._$AH=w);else{const Y=w;let G,K;for(w=q[0],G=0;G<q.length-1;G++)K=S(this,Y[O+G],D,G),K===T&&(K=this._$AH[G]),W||=!c(K)||K!==this._$AH[G],K===E?w=E:w!==E&&(w+=(K??"")+q[G+1]),this._$AH[G]=K}W&&!F&&this.j(w)}j(w){w===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,w??"")}}class H extends k{constructor(){super(...arguments),this.type=3}j(w){this.element[this.name]=w===E?void 0:w}}class I extends k{constructor(){super(...arguments),this.type=4}j(w){this.element.toggleAttribute(this.name,!!w&&w!==E)}}class L extends k{constructor(w,D,O,F,q){super(w,D,O,F,q),this.type=5}_$AI(w,D=this){if((w=S(this,w,D,0)??E)===T)return;const O=this._$AH,F=w===E&&O!==E||w.capture!==O.capture||w.once!==O.once||w.passive!==O.passive,q=w!==E&&(O===E||F);F&&this.element.removeEventListener(this.name,this,O),q&&this.element.addEventListener(this.name,this,w),this._$AH=w}handleEvent(w){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,w):this._$AH.handleEvent(w)}}class z{constructor(w,D,O){this.element=w,this.type=6,this._$AN=void 0,this._$AM=D,this.options=O}get _$AU(){return this._$AM._$AU}_$AI(w){S(this,w)}}const j=t.litHtmlPolyfillSupport;j?.(N,R),(t.litHtmlVersions??=[]).push("3.3.1");const B=(U,w,D)=>{const O=D?.renderBefore??w;let F=O._$litPart$;if(F===void 0){const q=D?.renderBefore??null;O._$litPart$=F=new R(w.insertBefore(l(),q),q,void 0,D??{})}return F._$AI(U),F};/**
34
- * @license
35
- * Copyright 2017 Google LLC
36
- * SPDX-License-Identifier: BSD-3-Clause
37
- */const s=globalThis;class i extends y$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const w=super.createRenderRoot();return this.renderOptions.renderBefore??=w.firstChild,w}update(w){const D=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(w),this._$Do=B(D,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return T}}i._$litElement$=!0,i.finalized=!0,s.litElementHydrateSupport?.({LitElement:i});const o=s.litElementPolyfillSupport;o?.({LitElement:i});(s.litElementVersions??=[]).push("4.2.1");class ZooTag extends i{static properties={token:{type:String},prefix:{type:String},postfix:{type:String}};static styles=i$3`
38
- :host {
39
- display: inline-block;
40
- }
41
-
42
- .tag {
43
- text-align: center;
44
- display: inline-flex;
45
- align-items: center;
46
- justify-content: center;
47
- line-height: initial;
48
- width: max-content;
49
- padding: .2em 1em;
50
- border-radius: 1em;
51
- font-size: var(--zoo-theme-chips-font-size, 0.75rem);
52
- white-space: nowrap;
53
- word-break: break-word;
54
- box-sizing: border-box;
55
- }
56
- `;render(){const w=this.prefix??"",D=this.token??"default",O=this.postfix??"",F=`${w}${D}${O}`;return x`
57
- <span
58
- class="tag"
59
- style="
60
- background-color: var(--zoo-tag-${F}-bg, var(--zoo-tag-default-bg, #9e9e9e));
61
- color: var(--zoo-tag-${F}-fg, var(--zoo-tag-default-fg, #ffffff));
62
- "
63
- >
64
- <slot></slot>
65
- </span>
66
- `}}customElements.get("zoo-tag")||customElements.define("zoo-tag",ZooTag);const formatRelativeTime=U=>{const D=Math.floor((new Date-U)/1e3),O=[{name:"year",seconds:31536e3},{name:"month",seconds:2592e3},{name:"week",seconds:604800},{name:"day",seconds:86400},{name:"hour",seconds:3600},{name:"minute",seconds:60},{name:"second",seconds:1}];if(D<0){const F=Math.abs(D);for(const q of O){const W=Math.floor(F/q.seconds);if(W>=1)return new Intl.RelativeTimeFormat("en",{numeric:"auto"}).format(W,q.name)}return"just now"}for(const F of O){const q=Math.floor(D/F.seconds);if(q>=1)return new Intl.RelativeTimeFormat("en",{numeric:"auto"}).format(-q,F.name)}return"just now"},formatDatetime=U=>{const w=new Intl.DateTimeFormat("en",{day:"2-digit",month:"short",year:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}),[{value:D},,{value:O},,{value:F},,{value:q},,{value:W},,{value:Y}]=w.formatToParts(U);return`${O} ${D} ${F} ${q}:${W}:${Y}`},formatDate=U=>{const w=new Intl.DateTimeFormat("en",{day:"2-digit",month:"short",year:"2-digit"}),[{value:D},,{value:O},,{value:F}]=w.formatToParts(U);return`${O} ${D} ${F}`};class ZooTimestamp extends i{static properties={timestamp:{type:Number},kind:{type:String},concat:{type:String}};static styles=i$3`
67
- :host {
68
- display: inline;
69
- }
70
-
71
- .relative {
72
- color: var(--zoo-timestamp-relative-color, inherit);
73
- font-weight: var(--zoo-timestamp-relative-weight, inherit);
74
- font-size: var(--zoo-timestamp-relative-size, inherit);
75
- }
76
-
77
- .static {
78
- color: var(--zoo-timestamp-static-color, inherit);
79
- font-weight: var(--zoo-timestamp-static-weight, inherit);
80
- font-size: var(--zoo-timestamp-static-size, inherit);
81
- }
82
-
83
- .separator {
84
- color: var(--zoo-timestamp-separator-color, inherit);
85
- }
86
- `;constructor(){super(),this.timestamp=Date.now(),this.kind="both",this.concat="r (s)",this._boundTickHandler=this._onTimeTick.bind(this),this._isListening=!1}_shouldListenToTicks(){return this.kind==="relative"||this.kind==="both"}connectedCallback(){super.connectedCallback(),this._updateTickListener()}disconnectedCallback(){this._removeTickListener(),super.disconnectedCallback()}updated(w){super.updated(w),w.has("kind")&&this._updateTickListener()}_updateTickListener(){const w=this._shouldListenToTicks();w&&!this._isListening?(document.addEventListener("zoo-tick-60",this._boundTickHandler),this._isListening=!0):!w&&this._isListening&&this._removeTickListener()}_removeTickListener(){this._isListening&&(document.removeEventListener("zoo-tick-60",this._boundTickHandler),this._isListening=!1)}_onTimeTick(){this.requestUpdate()}_parseTemplate(w){const D=[];let O=w;for(;O.length>0;){const F=O.indexOf("r"),q=O.indexOf("s"),W=[F,q].filter(Y=>Y!==-1).sort((Y,G)=>Y-G)[0];if(W===void 0){O.length>0&&D.push({type:"text",value:O});break}W>0&&D.push({type:"text",value:O.substring(0,W)}),W===F?D.push({type:"relative",value:""}):D.push({type:"static",value:""}),O=O.substring(W+1)}return D}_getFormattedParts(){let w=this.timestamp;w<9466848e5&&(w=w*1e3);const D=new Date(w),O=formatRelativeTime(D),F=formatDatetime(D),q=formatDate(D);switch(this.kind){case"relative":return[{type:"relative",value:O}];case"datetime":return[{type:"static",value:F}];case"date":return[{type:"static",value:q}];case"both":return this._parseTemplate(this.concat).map(G=>G.type==="relative"?{type:"relative",value:O}:G.type==="static"?{type:"static",value:F}:G);default:return this._parseTemplate(this.concat).map(G=>G.type==="relative"?{type:"relative",value:O}:G.type==="static"?{type:"static",value:F}:G)}}render(){let w=this.timestamp;w<9466848e5&&(w=w*1e3);const D=new Date(w),O=this._getFormattedParts();return x`<time datetime="${D.toISOString()}">
87
- ${O.map(F=>F.type==="relative"?x`<span class="relative">${F.value}</span>`:F.type==="static"?x`<span class="static">${F.value}</span>`:x`<span class="separator">${F.value}</span>`)}
88
- </time>`}}customElements.get("zoo-timestamp")||customElements.define("zoo-timestamp",ZooTimestamp);const zoo=Object.freeze(Object.defineProperty({__proto__:null,ZooTag,ZooTimestamp,getEventAttribute,getSemanticAttributes},Symbol.toStringTag,{value:"Module"}));async function registerCarbonLibrary(U={}){const{registerCarbonLibrary:w}=await Promise.resolve().then(()=>require("./register-CFDNay1l.js"));return w(U)}async function registerMdcLibrary(){const{registerMdcLibrary:U}=await Promise.resolve().then(()=>require("./register-DyYwnhHb.js"));return U()}const zooy={Evt,Component,Dragger,Panel,FormPanel,Split,UserManager,View,Conductor,DataBinder:Binder,UiEventType,domUtils,uriUtils,registerCarbonLibrary,registerMdcLibrary,ComponentLibraryRegistry,handlers,zoo};exports.B=B;exports.Binder=Binder;exports.Component=Component;exports.ComponentLibraryRegistry=ComponentLibraryRegistry;exports.Conductor=Conductor;exports.Dragger=Dragger;exports.E=E;exports.Evt=Evt;exports.FormPanel=FormPanel;exports.Panel=Panel;exports.Split=Split;exports.T=T;exports.UiEventType=UiEventType;exports.UserManager=UserManager;exports.View=View;exports._curry2=_curry2;exports._curry3=_curry3;exports._path=_path;exports.b=b;exports.domUtils=domUtils;exports.f=f$1;exports.getElDataMap=getElDataMap;exports.getEventAttribute=getEventAttribute;exports.getSemanticAttributes=getSemanticAttributes;exports.handlers=handlers;exports.hasPath=hasPath;exports.i=i;exports.i$1=i$3;exports.isDefAndNotNull=isDefAndNotNull;exports.objToPaths=objToPaths;exports.path=path;exports.registerCarbonLibrary=registerCarbonLibrary;exports.registerMdcLibrary=registerMdcLibrary;exports.toLowerCase=toLowerCase;exports.treeUtils=treeUtils;exports.u=u$1;exports.uriUtils=uriUtils;exports.x=x;exports.zoo=zoo;exports.zooy=zooy;
@@ -1,10 +0,0 @@
1
- function r(e, ...n) {
2
- return e.addEventListener(...n), {
3
- release() {
4
- return e.removeEventListener(...n), null;
5
- }
6
- };
7
- }
8
- export {
9
- r as o
10
- };
@@ -1 +0,0 @@
1
- "use strict";function r(e,...n){return e.addEventListener(...n),{release(){return e.removeEventListener(...n),null}}}exports.on=r;
@@ -1,5 +0,0 @@
1
- "use strict";const u=require("./main-CZIPBRMI.js");/**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */const l={attribute:!0,type:String,converter:u.u,reflect:!1,hasChanged:u.f},p=(t=l,o,e)=>{const{kind:a,metadata:i}=e;let r=globalThis.litPropertyMetadata.get(i);if(r===void 0&&globalThis.litPropertyMetadata.set(i,r=new Map),a==="setter"&&((t=Object.create(t)).wrapped=!0),r.set(e.name,t),a==="accessor"){const{name:n}=e;return{set(s){const c=o.get.call(this);o.set.call(this,s),this.requestUpdate(n,c,t)},init(s){return s!==void 0&&this.C(n,void 0,t,s),s}}}if(a==="setter"){const{name:n}=e;return function(s){const c=this[n];o.call(this,s),this.requestUpdate(n,c,t)}}throw Error("Unsupported decorator location: "+a)};function d(t){return(o,e)=>typeof e=="object"?p(t,o,e):((a,i,r)=>{const n=i.hasOwnProperty(r);return i.constructor.createProperty(r,a),n?Object.getOwnPropertyDescriptor(i,r):void 0})(t,o,e)}exports.n=d;
@@ -1,36 +0,0 @@
1
- import { f as p, u as l } from "./main-CXPn-jnk.js";
2
- /**
3
- * @license
4
- * Copyright 2017 Google LLC
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- */
7
- const u = { attribute: !0, type: String, converter: l, reflect: !1, hasChanged: p }, d = (t = u, s, e) => {
8
- const { kind: a, metadata: i } = e;
9
- let r = globalThis.litPropertyMetadata.get(i);
10
- if (r === void 0 && globalThis.litPropertyMetadata.set(i, r = /* @__PURE__ */ new Map()), a === "setter" && ((t = Object.create(t)).wrapped = !0), r.set(e.name, t), a === "accessor") {
11
- const { name: o } = e;
12
- return { set(n) {
13
- const c = s.get.call(this);
14
- s.set.call(this, n), this.requestUpdate(o, c, t);
15
- }, init(n) {
16
- return n !== void 0 && this.C(o, void 0, t, n), n;
17
- } };
18
- }
19
- if (a === "setter") {
20
- const { name: o } = e;
21
- return function(n) {
22
- const c = this[o];
23
- s.call(this, n), this.requestUpdate(o, c, t);
24
- };
25
- }
26
- throw Error("Unsupported decorator location: " + a);
27
- };
28
- function f(t) {
29
- return (s, e) => typeof e == "object" ? d(t, s, e) : ((a, i, r) => {
30
- const o = i.hasOwnProperty(r);
31
- return i.constructor.createProperty(r, a), o ? Object.getOwnPropertyDescriptor(i, r) : void 0;
32
- })(t, s, e);
33
- }
34
- export {
35
- f as n
36
- };
@@ -1,23 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
- const c = (r, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(r, t, e), e);
7
- /**
8
- * @license
9
- * Copyright 2017 Google LLC
10
- * SPDX-License-Identifier: BSD-3-Clause
11
- */
12
- function a(r, t) {
13
- return (e, o, l) => {
14
- const n = (u) => u.renderRoot?.querySelector(r) ?? null;
15
- return c(e, o, { get() {
16
- return n(this);
17
- } });
18
- };
19
- }
20
- export {
21
- c as a,
22
- a as e
23
- };
@@ -1,9 +0,0 @@
1
- "use strict";/**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */const n=(r,t,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(r,t,e),e);/**
6
- * @license
7
- * Copyright 2017 Google LLC
8
- * SPDX-License-Identifier: BSD-3-Clause
9
- */function i(r,t){return(e,o,l)=>{const u=c=>c.renderRoot?.querySelector(r)??null;return n(e,o,{get(){return u(this)}})}}exports.e=i;exports.e$1=n;
@@ -1 +0,0 @@
1
- "use strict";exports.NAVIGATION_DIRECTION=void 0;(function(o){o[o.BACKWARD=-1]="BACKWARD",o[o.FORWARD=1]="FORWARD"})(exports.NAVIGATION_DIRECTION||(exports.NAVIGATION_DIRECTION={}));class c{constructor(e){this._groups={},this.constructor._instances.set(e,this)}shouldBeFocusable(e){if(e.checked)return!0;const{name:s}=e,t=this._groups[s];return t&&Array.from(t).some(u=>u.checked)?!1:!t||t.size===1||this.getSortedGroup(e)[0]===e}getSortedGroup(e){const s=this._groups[e.name];return s&&Array.from(s).sort((t,n)=>{const r=t.compareDocumentPosition(n);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0})}add(e){const{name:s}=e;if(s){const t=this._groups;t[s]||(t[s]=new Set),t[s].add(e)}return this}delete(e,s=e.name){const t=this._groups[s];return t?t.delete(e):!1}select(e,s){const t=this._groups[e.name];if(t){if(e.disabled)return;e.checked=!s||!0,e.tabIndex=0,e.focus(),t.forEach(n=>{e!==n&&(n.checked=s||!1,n.tabIndex=-1)})}}navigate(e,s){const t=this.getSortedGroup(e),n=t.length;let r=t.indexOf(e);for(let u=0;u<n;u++){r=(r+s+n)%n;const i=t[r];if(!i.disabled)return i}return e}static get(e){return this._instances.get(e)||new c(e)}}c._instances=new WeakMap;exports.RadioGroupManager=c;
@@ -1,102 +0,0 @@
1
- var a;
2
- (function(o) {
3
- o[o.BACKWARD = -1] = "BACKWARD", o[o.FORWARD = 1] = "FORWARD";
4
- })(a || (a = {}));
5
- class c {
6
- constructor(e) {
7
- this._groups = {}, this.constructor._instances.set(e, this);
8
- }
9
- /**
10
- * @param radio A radio button.
11
- * @returns
12
- * `true` if the given radio button should be focusable, which is either:
13
- * - The radio button is selected
14
- * - No radio button is selected and the radio button is first one in the radio group
15
- */
16
- shouldBeFocusable(e) {
17
- if (e.checked)
18
- return !0;
19
- const { name: s } = e, t = this._groups[s];
20
- return t && Array.from(t).some((u) => u.checked) ? !1 : !t || t.size === 1 || this.getSortedGroup(e)[0] === e;
21
- }
22
- /**
23
- * @param radio A radio button.
24
- * @returns The sorted radio group the given radio button is in.
25
- */
26
- getSortedGroup(e) {
27
- const s = this._groups[e.name];
28
- return s && Array.from(s).sort((t, n) => {
29
- const r = t.compareDocumentPosition(n);
30
- return r & Node.DOCUMENT_POSITION_FOLLOWING || r & Node.DOCUMENT_POSITION_CONTAINED_BY ? -1 : r & Node.DOCUMENT_POSITION_PRECEDING || r & Node.DOCUMENT_POSITION_CONTAINS ? 1 : 0;
31
- });
32
- }
33
- /**
34
- * Manages a radio button.
35
- *
36
- * @param radio The radio button to manage.
37
- * @returns This object.
38
- */
39
- add(e) {
40
- const { name: s } = e;
41
- if (s) {
42
- const t = this._groups;
43
- t[s] || (t[s] = /* @__PURE__ */ new Set()), t[s].add(e);
44
- }
45
- return this;
46
- }
47
- /**
48
- * Unmanages a radio button.
49
- *
50
- * @param radio The radio button to unmanage.
51
- * @param name The old name of the radio button to unmanage.
52
- * @returns `true` if `element` was actually managed.
53
- */
54
- delete(e, s = e.name) {
55
- const t = this._groups[s];
56
- return t ? t.delete(e) : !1;
57
- }
58
- /**
59
- * Selects or focuses on a radio button.
60
- *
61
- * @param radio The radio button to select.
62
- * @param readOnly optional if radio button has readOnly.
63
- */
64
- select(e, s) {
65
- const t = this._groups[e.name];
66
- if (t) {
67
- if (e.disabled)
68
- return;
69
- e.checked = !s || !0, e.tabIndex = 0, e.focus(), t.forEach((n) => {
70
- e !== n && (n.checked = s || !1, n.tabIndex = -1);
71
- });
72
- }
73
- }
74
- /**
75
- * @param radio The currently selected radio button.
76
- * @param direction The direction to navigate to.
77
- * @returns The radio button that should be selected next.
78
- */
79
- navigate(e, s) {
80
- const t = this.getSortedGroup(e), n = t.length;
81
- let r = t.indexOf(e);
82
- for (let u = 0; u < n; u++) {
83
- r = (r + s + n) % n;
84
- const i = t[r];
85
- if (!i.disabled)
86
- return i;
87
- }
88
- return e;
89
- }
90
- /**
91
- * @param document A document element.
92
- * @returns The `RadioGroupManager` instance associated with the given document.
93
- */
94
- static get(e) {
95
- return this._instances.get(e) || new c(e);
96
- }
97
- }
98
- c._instances = /* @__PURE__ */ new WeakMap();
99
- export {
100
- a as N,
101
- c as R
102
- };