homebridge-config-ui-x 5.0.0-beta.99 → 5.0.0

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 (205) hide show
  1. package/CHANGELOG.md +122 -5
  2. package/config.schema.json +1 -1
  3. package/dist/core/auth/auth.controller.d.ts +4 -0
  4. package/dist/core/config/config.service.d.ts +8 -0
  5. package/dist/core/config/config.service.js +2 -0
  6. package/dist/core/config/config.service.js.map +1 -1
  7. package/dist/main.js +1 -0
  8. package/dist/main.js.map +1 -1
  9. package/dist/modules/backup/backup.controller.d.ts +1 -0
  10. package/dist/modules/backup/backup.controller.js +11 -0
  11. package/dist/modules/backup/backup.controller.js.map +1 -1
  12. package/dist/modules/backup/backup.service.d.ts +1 -0
  13. package/dist/modules/backup/backup.service.js +19 -5
  14. package/dist/modules/backup/backup.service.js.map +1 -1
  15. package/dist/modules/config-editor/config-editor.service.js +2 -1
  16. package/dist/modules/config-editor/config-editor.service.js.map +1 -1
  17. package/dist/modules/platform-tools/docker/docker.service.js +8 -2
  18. package/dist/modules/platform-tools/docker/docker.service.js.map +1 -1
  19. package/dist/modules/plugins/plugins.controller.d.ts +2 -0
  20. package/dist/modules/plugins/plugins.controller.js +1 -1
  21. package/dist/modules/plugins/plugins.controller.js.map +1 -1
  22. package/dist/modules/plugins/plugins.service.d.ts +3 -0
  23. package/dist/modules/plugins/plugins.service.js +81 -47
  24. package/dist/modules/plugins/plugins.service.js.map +1 -1
  25. package/dist/modules/server/server.controller.d.ts +5 -0
  26. package/dist/modules/server/server.controller.js +25 -0
  27. package/dist/modules/server/server.controller.js.map +1 -1
  28. package/dist/modules/server/server.service.d.ts +9 -1
  29. package/dist/modules/server/server.service.js +97 -21
  30. package/dist/modules/server/server.service.js.map +1 -1
  31. package/dist/modules/status/status.gateway.d.ts +6 -0
  32. package/dist/modules/status/status.gateway.js +14 -0
  33. package/dist/modules/status/status.gateway.js.map +1 -1
  34. package/dist/modules/status/status.service.d.ts +26 -0
  35. package/dist/modules/status/status.service.js +112 -0
  36. package/dist/modules/status/status.service.js.map +1 -1
  37. package/package.json +11 -11
  38. package/public/3rdpartylicenses.txt +214 -187
  39. package/public/assets/hap-icons/{airpurifier.svg → air-purifier.svg} +11 -11
  40. package/public/assets/hap-icons/doorbell.svg +17 -0
  41. package/public/assets/hap-icons/filter-maintenance.svg +26 -0
  42. package/public/assets/hap-icons/microphone.svg +22 -0
  43. package/public/assets/hap-icons/security-system-active.svg +103 -0
  44. package/public/assets/hap-icons/{smokesensor.svg → smoke-sensor.svg} +15 -2
  45. package/public/assets/hap-icons/speaker.svg +27 -12
  46. package/public/assets/hap-icons/vacuum-off.svg +34 -0
  47. package/public/assets/hap-icons/vacuum-on.svg +73 -0
  48. package/public/chunk-2RH7XRJB.js +1 -0
  49. package/public/chunk-2V6GVJIK.js +1 -0
  50. package/public/chunk-3UCLNJIE.js +1 -0
  51. package/public/chunk-4J2HTHMW.js +1 -0
  52. package/public/chunk-4NQG4OIB.js +1 -0
  53. package/public/chunk-52HWZQJT.js +1 -0
  54. package/public/chunk-56R3JRVX.js +1 -0
  55. package/public/chunk-65A2CLMB.js +1 -0
  56. package/public/chunk-6LPAR6QB.js +1 -0
  57. package/public/chunk-6VMMFEEB.js +1 -0
  58. package/public/chunk-7RQP64IZ.js +12 -0
  59. package/public/{chunk-GMY5QOXR.js → chunk-BG5MCCBU.js} +6 -6
  60. package/public/chunk-C3HWKB2Q.js +5 -0
  61. package/public/{chunk-YJXHSHNO.js → chunk-CEVLFYVV.js} +1 -1
  62. package/public/chunk-CHYWVK3W.js +1 -0
  63. package/public/chunk-CR7NFTHI.js +4 -0
  64. package/public/{chunk-BRW7C4BZ.js → chunk-CXP6VKNZ.js} +1 -1
  65. package/public/chunk-CY3O5ACI.js +1 -0
  66. package/public/chunk-D5MSFLIQ.js +1 -0
  67. package/public/chunk-DVQU3KHF.js +1 -0
  68. package/public/chunk-EGPBTPS6.js +1 -0
  69. package/public/chunk-EI76KND2.js +2 -0
  70. package/public/chunk-EP7NNPU2.js +1 -0
  71. package/public/chunk-ESCMWFTR.js +1 -0
  72. package/public/chunk-FDBWBMB3.js +1 -0
  73. package/public/chunk-FO44GZVZ.js +5 -0
  74. package/public/chunk-FWNSHSUQ.js +1 -0
  75. package/public/chunk-G4DWZG7U.js +1 -0
  76. package/public/{chunk-2G7GNBIF.js → chunk-GEIS2BWE.js} +1 -1
  77. package/public/chunk-GPZM245P.js +1 -0
  78. package/public/chunk-H2VHR6F4.js +1 -0
  79. package/public/chunk-H5PKL3FP.js +2 -0
  80. package/public/chunk-HFVA7EOG.js +23 -0
  81. package/public/chunk-HU7QTSUZ.js +1 -0
  82. package/public/{chunk-IOWBVW62.js → chunk-HUAADM2I.js} +1 -1
  83. package/public/{chunk-WAA5KWIN.js → chunk-J7Q5BUJW.js} +1 -1
  84. package/public/chunk-KDVPFRHN.js +1 -0
  85. package/public/chunk-KOHQYRVP.js +20 -0
  86. package/public/chunk-MWGI7ZLY.js +28 -0
  87. package/public/chunk-NEZ6TZYE.js +1 -0
  88. package/public/chunk-OLDRUBZS.js +1 -0
  89. package/public/chunk-OYH4UIAH.js +1 -0
  90. package/public/chunk-Q4CZ7LVK.js +2 -0
  91. package/public/{chunk-RNHMRKPJ.js → chunk-QIOCGI3G.js} +5 -5
  92. package/public/chunk-QTTC6A7P.js +1 -0
  93. package/public/chunk-QUD3RGWL.js +1 -0
  94. package/public/{chunk-QMB5XE4Y.js → chunk-R3563DDE.js} +1 -1
  95. package/public/{chunk-B3LZRDAG.js → chunk-S42WFQ2L.js} +1 -1
  96. package/public/{chunk-UVOJ3BF7.js → chunk-THGDS273.js} +1 -1
  97. package/public/chunk-TSAWRS7P.js +8 -0
  98. package/public/chunk-U4GBERFR.js +1 -0
  99. package/public/chunk-UB4DU2JC.js +1 -0
  100. package/public/chunk-UJNEXGXC.js +1 -0
  101. package/public/chunk-ULJPS3WS.js +7 -0
  102. package/public/{chunk-XHI7IAUN.js → chunk-W4PQWIYG.js} +1 -1
  103. package/public/chunk-W542IB6H.js +1 -0
  104. package/public/{chunk-UTAVUGTT.js → chunk-WDFAWIMZ.js} +7 -7
  105. package/public/chunk-WF776GWR.js +1 -0
  106. package/public/chunk-WFYBML4S.js +1 -0
  107. package/public/chunk-XFFCMC6L.js +4 -0
  108. package/public/chunk-XIYHNDRN.js +1 -0
  109. package/public/chunk-YJ2Q2RAD.js +1 -0
  110. package/public/chunk-YYDFCQK6.js +3 -0
  111. package/public/chunk-YZN5MPV3.js +1 -0
  112. package/public/chunk-ZR6LFO7Q.js +1 -0
  113. package/public/index.html +2 -2
  114. package/public/main-I6NBG3JJ.js +1 -0
  115. package/public/{styles-PKR3EGHP.css → styles-ZKWHTEN5.css} +1 -1
  116. package/scripts/upgrade-install-plugin.sh +6 -1
  117. package/public/chunk-2CDSAOHD.js +0 -1
  118. package/public/chunk-2OUR67N4.js +0 -1
  119. package/public/chunk-3CYHPVRJ.js +0 -1
  120. package/public/chunk-3DF7CHZW.js +0 -1
  121. package/public/chunk-5F327T7H.js +0 -1
  122. package/public/chunk-6CNQKPV4.js +0 -1
  123. package/public/chunk-AF2VUIEE.js +0 -1
  124. package/public/chunk-ALG7CIS3.js +0 -5
  125. package/public/chunk-BGDBPFZN.js +0 -1
  126. package/public/chunk-BIRWL4X3.js +0 -1
  127. package/public/chunk-BMCQHGMB.js +0 -1
  128. package/public/chunk-BSGFKU4J.js +0 -4
  129. package/public/chunk-C6A3CFIK.js +0 -1
  130. package/public/chunk-C6LXQBT3.js +0 -1
  131. package/public/chunk-CG7LPZUJ.js +0 -1
  132. package/public/chunk-CLQDCNVA.js +0 -2
  133. package/public/chunk-CMO7ESK6.js +0 -8
  134. package/public/chunk-DDFZVHUO.js +0 -1
  135. package/public/chunk-DGIKPYZP.js +0 -8
  136. package/public/chunk-DNW5N3YO.js +0 -1
  137. package/public/chunk-EGELGD5H.js +0 -1
  138. package/public/chunk-EJBJOBK4.js +0 -1
  139. package/public/chunk-F4KGCHEZ.js +0 -1
  140. package/public/chunk-FATD52DV.js +0 -1
  141. package/public/chunk-FXS45ML3.js +0 -1
  142. package/public/chunk-G6KG4MKA.js +0 -1
  143. package/public/chunk-GTAHH5HN.js +0 -1
  144. package/public/chunk-HLTIIGIP.js +0 -1
  145. package/public/chunk-HLTWQSH5.js +0 -1
  146. package/public/chunk-IORHLUIJ.js +0 -1
  147. package/public/chunk-JADR4A63.js +0 -1
  148. package/public/chunk-KAUSPTCQ.js +0 -23
  149. package/public/chunk-KCQQTZKO.js +0 -5
  150. package/public/chunk-L3HD45SY.js +0 -6
  151. package/public/chunk-LDLWF7GI.js +0 -1
  152. package/public/chunk-LHL5TI6S.js +0 -1
  153. package/public/chunk-LX47K6J2.js +0 -1
  154. package/public/chunk-M2H64FFG.js +0 -1
  155. package/public/chunk-OAQSXFHE.js +0 -1
  156. package/public/chunk-ODU3K7H7.js +0 -1
  157. package/public/chunk-P3KVHPZJ.js +0 -1
  158. package/public/chunk-P64V4GHS.js +0 -29
  159. package/public/chunk-PI76B7WZ.js +0 -1
  160. package/public/chunk-PNSPASX3.js +0 -1
  161. package/public/chunk-PODF4FUD.js +0 -1
  162. package/public/chunk-PUIKXI6O.js +0 -1
  163. package/public/chunk-QIH36FRX.js +0 -1
  164. package/public/chunk-QMAGO5VD.js +0 -20
  165. package/public/chunk-R3VPSO5X.js +0 -7
  166. package/public/chunk-RFFIRBUY.js +0 -1
  167. package/public/chunk-RLGSRK2P.js +0 -1
  168. package/public/chunk-RN4NDBWE.js +0 -1
  169. package/public/chunk-U2HZ2JFO.js +0 -1
  170. package/public/chunk-VA5XNGEK.js +0 -1
  171. package/public/chunk-VHTQTL2S.js +0 -1
  172. package/public/chunk-VJEUBTTK.js +0 -1
  173. package/public/chunk-VLX322GM.js +0 -1
  174. package/public/chunk-VUYAK52W.js +0 -2
  175. package/public/chunk-X6PEPNG4.js +0 -1
  176. package/public/chunk-XP6B4WXR.js +0 -1
  177. package/public/chunk-XUH357B7.js +0 -1
  178. package/public/chunk-Y4QFUO3K.js +0 -1
  179. package/public/chunk-YZCEDH6X.js +0 -1
  180. package/public/chunk-YZWIZGAQ.js +0 -1
  181. package/public/chunk-ZF22CBM2.js +0 -1
  182. package/public/chunk-ZIBK7SYP.js +0 -1
  183. package/public/chunk-ZLCELPBH.js +0 -1
  184. package/public/chunk-ZMYR3JWC.js +0 -1
  185. package/public/main-AS7ULDAC.js +0 -1
  186. /package/public/assets/hap-icons/{airquality.svg → air-quality-sensor.svg} +0 -0
  187. /package/public/assets/hap-icons/{co2-sensor.svg → carbon-dioxide-sensor.svg} +0 -0
  188. /package/public/assets/hap-icons/{co-sensor.svg → carbon-monoxide-sensor.svg} +0 -0
  189. /package/public/assets/hap-icons/{contactsensor-closed.svg → contact-sensor-closed.svg} +0 -0
  190. /package/public/assets/hap-icons/{contactsensor-open.svg → contact-sensor-open.svg} +0 -0
  191. /package/public/assets/hap-icons/{garagedoor.svg → garage-door.svg} +0 -0
  192. /package/public/assets/hap-icons/{humidity.svg → humidity-sensor.svg} +0 -0
  193. /package/public/assets/hap-icons/{leaksensor.svg → leak-sensor.svg} +0 -0
  194. /package/public/assets/hap-icons/{lightbulb.svg → light-bulb.svg} +0 -0
  195. /package/public/assets/hap-icons/{light.svg → light-sensor.svg} +0 -0
  196. /package/public/assets/hap-icons/{motionsensor.svg → motion-sensor.svg} +0 -0
  197. /package/public/assets/hap-icons/{occupancysensor.svg → occupancy-sensor.svg} +0 -0
  198. /package/public/assets/hap-icons/{securitysystem-off.svg → security-system-off.svg} +0 -0
  199. /package/public/assets/hap-icons/{securitysystem-active.svg → security-system-triggered.svg} +0 -0
  200. /package/public/assets/hap-icons/{statelessprogrammableswitch.svg → stateless-programmable-switch.svg} +0 -0
  201. /package/public/assets/hap-icons/{valve-waterfaucet.svg → valve-faucet.svg} +0 -0
  202. /package/public/assets/hap-icons/{valve-showerhead.svg → valve-shower-head.svg} +0 -0
  203. /package/public/assets/hap-icons/{windowcovering-closed.svg → window-covering-closed.svg} +0 -0
  204. /package/public/assets/hap-icons/{windowcovering-open.svg → window-covering-open.svg} +0 -0
  205. /package/public/{polyfills-GCAZ7JAV.js → polyfills-WE4HA5DL.js} +0 -0
@@ -0,0 +1,5 @@
1
+ import{a as On}from"./chunk-WFYBML4S.js";import{$ as oi,$b as ee,Bc as vi,Ca as je,Da as ai,Dc as yn,E as X,Ea as li,F as nn,Fa as W,Fc as bn,Gb as ui,H as Fe,Hb as he,I as ni,Ib as kt,J as It,Jb as Bt,Kb as hi,Kc as wn,Lb as un,Mb as Pt,Nb as At,O as tt,Ob as We,P as on,Pb as pi,Q as sn,Qb as fi,R as rn,Rb as hn,Sb as rt,Tb as at,Ub as pn,Uc as _e,Xb as fn,Yb as _n,Yc as Ht,Z as an,Zb as mn,_ as ln,_b as _i,a as Mt,aa as B,ab as ke,b as ii,ba as it,bc as pe,ca as Rt,cb as ot,cc as gn,dc as ce,ec as lt,fa as si,fc as ct,ga as K,gc as fe,ha as I,hc as Gt,ib as ci,ic as q,ja as cn,jc as Y,k as Ct,la as d,mb as me,mc as vn,md as yi,n as j,nb as R,o as en,ob as T,oc as P,p as Tt,pa as ri,pc as Oe,qb as di,qc as mi,r as et,ra as St,rb as dn,rc as gi,sa as Nt,sb as xt,ua as re,ub as O,va as ae,vb as le,wa as nt,wb as Ft,x as xe,xb as st,z as tn}from"./chunk-ULJPS3WS.js";function dt(t){t||(t=d(nt));let e=new Ct(s=>{if(t.destroyed){s.next();return}return t.onDestroy(s.next.bind(s))});return s=>s.pipe(B(e))}var S="top",L="bottom",A="right",x="left",Ut="auto",De=[S,L,A,x],ge="start",Be="end",Dn="clippingParents",Lt="viewport",ze="popper",En="reference",bi=De.reduce(function(t,e){return t.concat([e+"-"+ge,e+"-"+Be])},[]),Vt=[].concat(De,[Ut]).reduce(function(t,e){return t.concat([e,e+"-"+ge,e+"-"+Be])},[]),To="beforeRead",Io="read",Ro="afterRead",So="beforeMain",No="main",xo="afterMain",Fo="beforeWrite",ko="write",Bo="afterWrite",Mn=[To,Io,Ro,So,No,xo,Fo,ko,Bo];function G(t){return t?(t.nodeName||"").toLowerCase():null}function D(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function te(t){var e=D(t).Element;return t instanceof e||t instanceof Element}function F(t){var e=D(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Xe(t){if(typeof ShadowRoot>"u")return!1;var e=D(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Po(t){var e=t.state;Object.keys(e.elements).forEach(function(s){var i=e.styles[s]||{},n=e.attributes[s]||{},o=e.elements[s];!F(o)||!G(o)||(Object.assign(o.style,i),Object.keys(n).forEach(function(r){var a=n[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})}function Ao(t){var e=t.state,s={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,s.popper),e.styles=s,e.elements.arrow&&Object.assign(e.elements.arrow.style,s.arrow),function(){Object.keys(e.elements).forEach(function(i){var n=e.elements[i],o=e.attributes[i]||{},r=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:s[i]),a=r.reduce(function(l,u){return l[u]="",l},{});!F(n)||!G(n)||(Object.assign(n.style,a),Object.keys(o).forEach(function(l){n.removeAttribute(l)}))})}}var Cn={name:"applyStyles",enabled:!0,phase:"write",fn:Po,effect:Ao,requires:["computeStyles"]};function H(t){return t.split("-")[0]}var de=Math.max,Pe=Math.min,ve=Math.round;function Ke(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function ut(){return!/^((?!chrome|android).)*safari/i.test(Ke())}function ie(t,e,s){e===void 0&&(e=!1),s===void 0&&(s=!1);var i=t.getBoundingClientRect(),n=1,o=1;e&&F(t)&&(n=t.offsetWidth>0&&ve(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&ve(i.height)/t.offsetHeight||1);var r=te(t)?D(t):window,a=r.visualViewport,l=!ut()&&s,u=(i.left+(l&&a?a.offsetLeft:0))/n,c=(i.top+(l&&a?a.offsetTop:0))/o,_=i.width/n,p=i.height/o;return{width:_,height:p,top:c,right:u+_,bottom:c+p,left:u,x:u,y:c}}function Ae(t){var e=ie(t),s=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-s)<=1&&(s=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:s,height:i}}function ht(t,e){var s=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(s&&Xe(s)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Q(t){return D(t).getComputedStyle(t)}function wi(t){return["table","td","th"].indexOf(G(t))>=0}function V(t){return((te(t)?t.ownerDocument:t.document)||window.document).documentElement}function ye(t){return G(t)==="html"?t:t.assignedSlot||t.parentNode||(Xe(t)?t.host:null)||V(t)}function Tn(t){return!F(t)||Q(t).position==="fixed"?null:t.offsetParent}function Go(t){var e=/firefox/i.test(Ke()),s=/Trident/i.test(Ke());if(s&&F(t)){var i=Q(t);if(i.position==="fixed")return null}var n=ye(t);for(Xe(n)&&(n=n.host);F(n)&&["html","body"].indexOf(G(n))<0;){var o=Q(n);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return n;n=n.parentNode}return null}function ue(t){for(var e=D(t),s=Tn(t);s&&wi(s)&&Q(s).position==="static";)s=Tn(s);return s&&(G(s)==="html"||G(s)==="body"&&Q(s).position==="static")?e:s||Go(t)||e}function Ge(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function He(t,e,s){return de(t,Pe(e,s))}function In(t,e,s){var i=He(t,e,s);return i>s?s:i}function pt(){return{top:0,right:0,bottom:0,left:0}}function ft(t){return Object.assign({},pt(),t)}function _t(t,e){return e.reduce(function(s,i){return s[i]=t,s},{})}var Ho=function(e,s){return e=typeof e=="function"?e(Object.assign({},s.rects,{placement:s.placement})):e,ft(typeof e!="number"?e:_t(e,De))};function Uo(t){var e,s=t.state,i=t.name,n=t.options,o=s.elements.arrow,r=s.modifiersData.popperOffsets,a=H(s.placement),l=Ge(a),u=[x,A].indexOf(a)>=0,c=u?"height":"width";if(!(!o||!r)){var _=Ho(n.padding,s),p=Ae(o),h=l==="y"?S:x,v=l==="y"?L:A,f=s.rects.reference[c]+s.rects.reference[l]-r[l]-s.rects.popper[c],m=r[l]-s.rects.reference[l],w=ue(o),E=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,C=f/2-m/2,g=_[h],y=E-p[c]-_[v],b=E/2-p[c]/2+C,M=He(g,b,y),U=l;s.modifiersData[i]=(e={},e[U]=M,e.centerOffset=M-b,e)}}function Lo(t){var e=t.state,s=t.options,i=s.element,n=i===void 0?"[data-popper-arrow]":i;n!=null&&(typeof n=="string"&&(n=e.elements.popper.querySelector(n),!n)||ht(e.elements.popper,n)&&(e.elements.arrow=n))}var Oi={name:"arrow",enabled:!0,phase:"main",fn:Uo,effect:Lo,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ne(t){return t.split("-")[1]}var Vo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $o(t,e){var s=t.x,i=t.y,n=e.devicePixelRatio||1;return{x:ve(s*n)/n||0,y:ve(i*n)/n||0}}function Rn(t){var e,s=t.popper,i=t.popperRect,n=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,_=t.isFixed,p=r.x,h=p===void 0?0:p,v=r.y,f=v===void 0?0:v,m=typeof c=="function"?c({x:h,y:f}):{x:h,y:f};h=m.x,f=m.y;var w=r.hasOwnProperty("x"),E=r.hasOwnProperty("y"),C=x,g=S,y=window;if(u){var b=ue(s),M="clientHeight",U="clientWidth";if(b===D(s)&&(b=V(s),Q(b).position!=="static"&&a==="absolute"&&(M="scrollHeight",U="scrollWidth")),b=b,n===S||(n===x||n===A)&&o===Be){g=L;var k=_&&b===y&&y.visualViewport?y.visualViewport.height:b[M];f-=k-i.height,f*=l?1:-1}if(n===x||(n===S||n===L)&&o===Be){C=A;var N=_&&b===y&&y.visualViewport?y.visualViewport.width:b[U];h-=N-i.width,h*=l?1:-1}}var $=Object.assign({position:a},u&&Vo),oe=c===!0?$o({x:h,y:f},D(s)):{x:h,y:f};if(h=oe.x,f=oe.y,l){var z;return Object.assign({},$,(z={},z[g]=E?"0":"",z[C]=w?"0":"",z.transform=(y.devicePixelRatio||1)<=1?"translate("+h+"px, "+f+"px)":"translate3d("+h+"px, "+f+"px, 0)",z))}return Object.assign({},$,(e={},e[g]=E?f+"px":"",e[C]=w?h+"px":"",e.transform="",e))}function jo(t){var e=t.state,s=t.options,i=s.gpuAcceleration,n=i===void 0?!0:i,o=s.adaptive,r=o===void 0?!0:o,a=s.roundOffsets,l=a===void 0?!0:a,u={placement:H(e.placement),variation:ne(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Rn(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Rn(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var Sn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:jo,data:{}};var $t={passive:!0};function Wo(t){var e=t.state,s=t.instance,i=t.options,n=i.scroll,o=n===void 0?!0:n,r=i.resize,a=r===void 0?!0:r,l=D(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",s.update,$t)}),a&&l.addEventListener("resize",s.update,$t),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",s.update,$t)}),a&&l.removeEventListener("resize",s.update,$t)}}var Nn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Wo,data:{}};var zo={left:"right",right:"left",bottom:"top",top:"bottom"};function Qe(t){return t.replace(/left|right|bottom|top/g,function(e){return zo[e]})}var Xo={start:"end",end:"start"};function jt(t){return t.replace(/start|end/g,function(e){return Xo[e]})}function Ue(t){var e=D(t),s=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:s,scrollTop:i}}function Le(t){return ie(V(t)).left+Ue(t).scrollLeft}function Di(t,e){var s=D(t),i=V(t),n=s.visualViewport,o=i.clientWidth,r=i.clientHeight,a=0,l=0;if(n){o=n.width,r=n.height;var u=ut();(u||!u&&e==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:o,height:r,x:a+Le(t),y:l}}function Ei(t){var e,s=V(t),i=Ue(t),n=(e=t.ownerDocument)==null?void 0:e.body,o=de(s.scrollWidth,s.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),r=de(s.scrollHeight,s.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),a=-i.scrollLeft+Le(t),l=-i.scrollTop;return Q(n||s).direction==="rtl"&&(a+=de(s.clientWidth,n?n.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function Ve(t){var e=Q(t),s=e.overflow,i=e.overflowX,n=e.overflowY;return/auto|scroll|overlay|hidden/.test(s+n+i)}function Wt(t){return["html","body","#document"].indexOf(G(t))>=0?t.ownerDocument.body:F(t)&&Ve(t)?t:Wt(ye(t))}function Ee(t,e){var s;e===void 0&&(e=[]);var i=Wt(t),n=i===((s=t.ownerDocument)==null?void 0:s.body),o=D(i),r=n?[o].concat(o.visualViewport||[],Ve(i)?i:[]):i,a=e.concat(r);return n?a:a.concat(Ee(ye(r)))}function Je(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Ko(t,e){var s=ie(t,!1,e==="fixed");return s.top=s.top+t.clientTop,s.left=s.left+t.clientLeft,s.bottom=s.top+t.clientHeight,s.right=s.left+t.clientWidth,s.width=t.clientWidth,s.height=t.clientHeight,s.x=s.left,s.y=s.top,s}function xn(t,e,s){return e===Lt?Je(Di(t,s)):te(e)?Ko(e,s):Je(Ei(V(t)))}function Qo(t){var e=Ee(ye(t)),s=["absolute","fixed"].indexOf(Q(t).position)>=0,i=s&&F(t)?ue(t):t;return te(i)?e.filter(function(n){return te(n)&&ht(n,i)&&G(n)!=="body"}):[]}function Mi(t,e,s,i){var n=e==="clippingParents"?Qo(t):[].concat(e),o=[].concat(n,[s]),r=o[0],a=o.reduce(function(l,u){var c=xn(t,u,i);return l.top=de(c.top,l.top),l.right=Pe(c.right,l.right),l.bottom=Pe(c.bottom,l.bottom),l.left=de(c.left,l.left),l},xn(t,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function mt(t){var e=t.reference,s=t.element,i=t.placement,n=i?H(i):null,o=i?ne(i):null,r=e.x+e.width/2-s.width/2,a=e.y+e.height/2-s.height/2,l;switch(n){case S:l={x:r,y:e.y-s.height};break;case L:l={x:r,y:e.y+e.height};break;case A:l={x:e.x+e.width,y:a};break;case x:l={x:e.x-s.width,y:a};break;default:l={x:e.x,y:e.y}}var u=n?Ge(n):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case ge:l[u]=l[u]-(e[c]/2-s[c]/2);break;case Be:l[u]=l[u]+(e[c]/2-s[c]/2);break;default:}}return l}function Me(t,e){e===void 0&&(e={});var s=e,i=s.placement,n=i===void 0?t.placement:i,o=s.strategy,r=o===void 0?t.strategy:o,a=s.boundary,l=a===void 0?Dn:a,u=s.rootBoundary,c=u===void 0?Lt:u,_=s.elementContext,p=_===void 0?ze:_,h=s.altBoundary,v=h===void 0?!1:h,f=s.padding,m=f===void 0?0:f,w=ft(typeof m!="number"?m:_t(m,De)),E=p===ze?En:ze,C=t.rects.popper,g=t.elements[v?E:p],y=Mi(te(g)?g:g.contextElement||V(t.elements.popper),l,c,r),b=ie(t.elements.reference),M=mt({reference:b,element:C,strategy:"absolute",placement:n}),U=Je(Object.assign({},C,M)),k=p===ze?U:b,N={top:y.top-k.top+w.top,bottom:k.bottom-y.bottom+w.bottom,left:y.left-k.left+w.left,right:k.right-y.right+w.right},$=t.modifiersData.offset;if(p===ze&&$){var oe=$[n];Object.keys(N).forEach(function(z){var Te=[A,L].indexOf(z)>=0?1:-1,Ie=[S,L].indexOf(z)>=0?"y":"x";N[z]+=oe[Ie]*Te})}return N}function Ci(t,e){e===void 0&&(e={});var s=e,i=s.placement,n=s.boundary,o=s.rootBoundary,r=s.padding,a=s.flipVariations,l=s.allowedAutoPlacements,u=l===void 0?Vt:l,c=ne(i),_=c?a?bi:bi.filter(function(v){return ne(v)===c}):De,p=_.filter(function(v){return u.indexOf(v)>=0});p.length===0&&(p=_);var h=p.reduce(function(v,f){return v[f]=Me(t,{placement:f,boundary:n,rootBoundary:o,padding:r})[H(f)],v},{});return Object.keys(h).sort(function(v,f){return h[v]-h[f]})}function Jo(t){if(H(t)===Ut)return[];var e=Qe(t);return[jt(t),e,jt(e)]}function qo(t){var e=t.state,s=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var n=s.mainAxis,o=n===void 0?!0:n,r=s.altAxis,a=r===void 0?!0:r,l=s.fallbackPlacements,u=s.padding,c=s.boundary,_=s.rootBoundary,p=s.altBoundary,h=s.flipVariations,v=h===void 0?!0:h,f=s.allowedAutoPlacements,m=e.options.placement,w=H(m),E=w===m,C=l||(E||!v?[Qe(m)]:Jo(m)),g=[m].concat(C).reduce(function($e,we){return $e.concat(H(we)===Ut?Ci(e,{placement:we,boundary:c,rootBoundary:_,padding:u,flipVariations:v,allowedAutoPlacements:f}):we)},[]),y=e.rects.reference,b=e.rects.popper,M=new Map,U=!0,k=g[0],N=0;N<g.length;N++){var $=g[N],oe=H($),z=ne($)===ge,Te=[S,L].indexOf(oe)>=0,Ie=Te?"width":"height",J=Me(e,{placement:$,boundary:c,rootBoundary:_,altBoundary:p,padding:u}),se=Te?z?A:x:z?L:S;y[Ie]>b[Ie]&&(se=Qe(se));var bt=Qe(se),Re=[];if(o&&Re.push(J[oe]<=0),a&&Re.push(J[se]<=0,J[bt]<=0),Re.every(function($e){return $e})){k=$,U=!1;break}M.set($,Re)}if(U)for(var wt=v?3:1,Yt=function(we){var Ze=g.find(function(Dt){var Se=M.get(Dt);if(Se)return Se.slice(0,we).every(function(Zt){return Zt})});if(Ze)return k=Ze,"break"},Ye=wt;Ye>0;Ye--){var Ot=Yt(Ye);if(Ot==="break")break}e.placement!==k&&(e.modifiersData[i]._skip=!0,e.placement=k,e.reset=!0)}}var Ti={name:"flip",enabled:!0,phase:"main",fn:qo,requiresIfExists:["offset"],data:{_skip:!1}};function Yo(t,e,s){var i=H(t),n=[x,S].indexOf(i)>=0?-1:1,o=typeof s=="function"?s(Object.assign({},e,{placement:t})):s,r=o[0],a=o[1];return r=r||0,a=(a||0)*n,[x,A].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function Zo(t){var e=t.state,s=t.options,i=t.name,n=s.offset,o=n===void 0?[0,0]:n,r=Vt.reduce(function(c,_){return c[_]=Yo(_,e.rects,o),c},{}),a=r[e.placement],l=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[i]=r}var Ii={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Zo};function es(t){var e=t.state,s=t.name;e.modifiersData[s]=mt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var Fn={name:"popperOffsets",enabled:!0,phase:"read",fn:es,data:{}};function Ri(t){return t==="x"?"y":"x"}function ts(t){var e=t.state,s=t.options,i=t.name,n=s.mainAxis,o=n===void 0?!0:n,r=s.altAxis,a=r===void 0?!1:r,l=s.boundary,u=s.rootBoundary,c=s.altBoundary,_=s.padding,p=s.tether,h=p===void 0?!0:p,v=s.tetherOffset,f=v===void 0?0:v,m=Me(e,{boundary:l,rootBoundary:u,padding:_,altBoundary:c}),w=H(e.placement),E=ne(e.placement),C=!E,g=Ge(w),y=Ri(g),b=e.modifiersData.popperOffsets,M=e.rects.reference,U=e.rects.popper,k=typeof f=="function"?f(Object.assign({},e.rects,{placement:e.placement})):f,N=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),$=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,oe={x:0,y:0};if(b){if(o){var z,Te=g==="y"?S:x,Ie=g==="y"?L:A,J=g==="y"?"height":"width",se=b[g],bt=se+m[Te],Re=se-m[Ie],wt=h?-U[J]/2:0,Yt=E===ge?M[J]:U[J],Ye=E===ge?-U[J]:-M[J],Ot=e.elements.arrow,$e=h&&Ot?Ae(Ot):{width:0,height:0},we=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:pt(),Ze=we[Te],Dt=we[Ie],Se=He(0,M[J],$e[J]),Zt=C?M[J]/2-wt-Se-Ze-N.mainAxis:Yt-Se-Ze-N.mainAxis,wo=C?-M[J]/2+wt+Se+Dt+N.mainAxis:Ye+Se+Dt+N.mainAxis,ei=e.elements.arrow&&ue(e.elements.arrow),Oo=ei?g==="y"?ei.clientTop||0:ei.clientLeft||0:0,Wi=(z=$?.[g])!=null?z:0,Do=se+Zt-Wi-Oo,Eo=se+wo-Wi,zi=He(h?Pe(bt,Do):bt,se,h?de(Re,Eo):Re);b[g]=zi,oe[g]=zi-se}if(a){var Xi,Mo=g==="x"?S:x,Co=g==="x"?L:A,Ne=b[y],Et=y==="y"?"height":"width",Ki=Ne+m[Mo],Qi=Ne-m[Co],ti=[S,x].indexOf(w)!==-1,Ji=(Xi=$?.[y])!=null?Xi:0,qi=ti?Ki:Ne-M[Et]-U[Et]-Ji+N.altAxis,Yi=ti?Ne+M[Et]+U[Et]-Ji-N.altAxis:Qi,Zi=h&&ti?In(qi,Ne,Yi):He(h?qi:Ki,Ne,h?Yi:Qi);b[y]=Zi,oe[y]=Zi-Ne}e.modifiersData[i]=oe}}var Si={name:"preventOverflow",enabled:!0,phase:"main",fn:ts,requiresIfExists:["offset"]};function Ni(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function xi(t){return t===D(t)||!F(t)?Ue(t):Ni(t)}function is(t){var e=t.getBoundingClientRect(),s=ve(e.width)/t.offsetWidth||1,i=ve(e.height)/t.offsetHeight||1;return s!==1||i!==1}function Fi(t,e,s){s===void 0&&(s=!1);var i=F(e),n=F(e)&&is(e),o=V(e),r=ie(t,n,s),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!s)&&((G(e)!=="body"||Ve(o))&&(a=xi(e)),F(e)?(l=ie(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=Le(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function ns(t){var e=new Map,s=new Set,i=[];t.forEach(function(o){e.set(o.name,o)});function n(o){s.add(o.name);var r=[].concat(o.requires||[],o.requiresIfExists||[]);r.forEach(function(a){if(!s.has(a)){var l=e.get(a);l&&n(l)}}),i.push(o)}return t.forEach(function(o){s.has(o.name)||n(o)}),i}function ki(t){var e=ns(t);return Mn.reduce(function(s,i){return s.concat(e.filter(function(n){return n.phase===i}))},[])}function Bi(t){var e;return function(){return e||(e=new Promise(function(s){Promise.resolve().then(function(){e=void 0,s(t())})})),e}}function Pi(t){var e=t.reduce(function(s,i){var n=s[i.name];return s[i.name]=n?Object.assign({},n,i,{options:Object.assign({},n.options,i.options),data:Object.assign({},n.data,i.data)}):i,s},{});return Object.keys(e).map(function(s){return e[s]})}var kn={placement:"bottom",modifiers:[],strategy:"absolute"};function Bn(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];return!e.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function Pn(t){t===void 0&&(t={});var e=t,s=e.defaultModifiers,i=s===void 0?[]:s,n=e.defaultOptions,o=n===void 0?kn:n;return function(a,l,u){u===void 0&&(u=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},kn,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},_=[],p=!1,h={state:c,setOptions:function(w){var E=typeof w=="function"?w(c.options):w;f(),c.options=Object.assign({},o,c.options,E),c.scrollParents={reference:te(a)?Ee(a):a.contextElement?Ee(a.contextElement):[],popper:Ee(l)};var C=ki(Pi([].concat(i,c.options.modifiers)));return c.orderedModifiers=C.filter(function(g){return g.enabled}),v(),h.update()},forceUpdate:function(){if(!p){var w=c.elements,E=w.reference,C=w.popper;if(Bn(E,C)){c.rects={reference:Fi(E,ue(C),c.options.strategy==="fixed"),popper:Ae(C)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(N){return c.modifiersData[N.name]=Object.assign({},N.data)});for(var g=0;g<c.orderedModifiers.length;g++){if(c.reset===!0){c.reset=!1,g=-1;continue}var y=c.orderedModifiers[g],b=y.fn,M=y.options,U=M===void 0?{}:M,k=y.name;typeof b=="function"&&(c=b({state:c,options:U,name:k,instance:h})||c)}}}},update:Bi(function(){return new Promise(function(m){h.forceUpdate(),m(c)})}),destroy:function(){f(),p=!0}};if(!Bn(a,l))return h;h.setOptions(u).then(function(m){!p&&u.onFirstUpdate&&u.onFirstUpdate(m)});function v(){c.orderedModifiers.forEach(function(m){var w=m.name,E=m.options,C=E===void 0?{}:E,g=m.effect;if(typeof g=="function"){var y=g({state:c,name:w,instance:h,options:C}),b=function(){};_.push(y||b)}})}function f(){_.forEach(function(m){return m()}),_=[]}return h}}var os=[Nn,Fn,Sn,Cn],Ai=Pn({defaultModifiers:os});var ss=["container"],rs=["ngbAccordionBody",""],Qt=["*"];function as(t,e){if(t&1){let s=_i();rt(0,"button",1),gn("click",function(){St(s);let n=ce();return Nt(n.close())}),at()}}var ls=t=>({$implicit:t});var cs=["dialog"],ds=["ngbNavOutlet",""];function us(t,e){}function hs(t,e){if(t&1&&(pi(0,"div",0),xt(1,us,0,0,"ng-template",1),fi()),t&2){let s=ce().$implicit,i=ce();We("item",s)("nav",i.nav)("role",i.paneRole),ke(),We("ngTemplateOutlet",(s.contentTpl==null?null:s.contentTpl.templateRef)||null)("ngTemplateOutletContext",yn(5,ls,s.active||i.isPanelTransitioning(s)))}}function ps(t,e){if(t&1&&kt(0,hs,2,7,"div",0),t&2){let s=e.$implicit,i=ce();Bt(s.isPanelInDom()||i.isPanelTransitioning(s)?0:-1)}}function fs(t,e){if(t&1&&(rt(0,"span"),mi(1),at()),t&2){let s=ce().$implicit,i=ce();Oe(i.highlightClass),ke(),gi(s)}}function _s(t,e){if(t&1&&(fn(0),mi(1),_n()),t&2){let s=ce().$implicit;ke(),gi(s)}}function ms(t,e){if(t&1&&kt(0,fs,2,3,"span",0)(1,_s,2,1,"ng-container"),t&2){let s=e.$index;Bt(s%2!==0?0:1)}}var gs=(t,e,s)=>({result:t,term:e,formatter:s});function vs(t,e){if(t&1&&hn(0,"ngb-highlight",2),t&2){let s=e.result,i=e.term,n=e.formatter;We("result",n(s))("term",i)}}function ys(t,e){}function bs(t,e){if(t&1){let s=_i();pi(0,"button",3),pe("mouseenter",function(){let n=St(s).$index,o=ce();return Nt(o.markActive(n))})("click",function(){let n=St(s).$implicit,o=ce();return Nt(o.select(n))}),xt(1,ys,0,0,"ng-template",4),fi()}if(t&2){let s=e.$implicit,i=e.$index,n=ce(),o=vn(1);P("active",i===n.activeIdx),We("id",n.id+"-"+i),ke(),We("ngTemplateOutlet",n.resultTemplate||o)("ngTemplateOutletContext",bn(5,gs,s,n.term,n.formatter))}}var Wn={animation:!0,transitionTimerDelayMs:5},qe=(()=>{let e=class e{constructor(){this.animation=Wn.animation}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),ws=(()=>{let e=class e{constructor(){this._ngbConfig=d(qe),this.closeOthers=!1,this.destroyOnHide=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function Os(t){let{transitionDelay:e,transitionDuration:s}=window.getComputedStyle(t),i=parseFloat(e),n=parseFloat(s);return(i+n)*1e3}function vt(t){return t!=null?`${t}`:""}function Jt(t){return typeof t=="string"}function Ce(t){return t!=null}function Ds(t){return t&&t.then}function Es(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Ms(t,e){return!e||typeof t.closest>"u"?null:t.closest(e)}function qt(t){return(t||document.body).getBoundingClientRect()}function Cs(t){return e=>new Ct(s=>{let i=r=>t.run(()=>s.next(r)),n=r=>t.run(()=>s.error(r)),o=()=>t.run(()=>s.complete());return e.subscribe({next:i,error:n,complete:o})})}function An(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function zn(t=document){let e=t?.activeElement;return e?e.shadowRoot?zn(e.shadowRoot):e:null}var Ts=()=>{},{transitionTimerDelayMs:Is}=Wn,gt=new Map,Z=(t,e,s,i)=>{let n=i.context||{},o=gt.get(e);if(o)switch(i.runningTransition){case"continue":return Tt;case"stop":t.run(()=>o.transition$.complete()),n=Object.assign(o.context,n),gt.delete(e)}let r=s(e,i.animation,n)||Ts;if(!i.animation||window.getComputedStyle(e).transitionProperty==="none")return t.run(()=>r()),et(void 0).pipe(Cs(t));let a=new j,l=new j,u=a.pipe(rn(!0));gt.set(e,{transition$:a,complete:()=>{l.next(),l.complete()},context:n});let c=Os(e);return t.runOutsideAngular(()=>{let _=X(e,"transitionend").pipe(B(u),Fe(({target:h})=>h===e)),p=nn(c+Is).pipe(B(u));ni(p,_,l).pipe(B(u)).subscribe(()=>{gt.delete(e),t.run(()=>{r(),a.next(),a.complete()})})}),a.asObservable()},Gn=t=>{gt.get(t)?.complete()};function Rs(t,e){if(typeof navigator>"u")return"0px";let{classList:s}=t,i=s.contains("show");i||s.add("show"),t.style[e]="";let n=t.getBoundingClientRect()[e]+"px";return i||s.remove("show"),n}var Ss=(t,e,s)=>{let{direction:i,maxSize:n,dimension:o}=s,{classList:r}=t;function a(){r.add("collapse"),i==="show"?r.add("show"):r.remove("show")}if(!e){a();return}return n||(n=Rs(t,o),s.maxSize=n,t.style[o]=i!=="show"?n:"0px",r.remove("collapse","collapsing","show"),qt(t),r.add("collapsing")),t.style[o]=i==="show"?n:"0px",()=>{a(),r.remove("collapsing"),t.style[o]=""}},Ns=(()=>{let e=class e{constructor(){this._ngbConfig=d(qe),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Hn=(()=>{let e=class e{constructor(){this._config=d(Ns),this._element=d(W),this._zone=d(le),this.animation=this._config.animation,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new O,this.horizontal=this._config.horizontal,this.shown=new O,this.hidden=new O}set collapsed(i){this._isCollapsed!==i&&(this._isCollapsed=i,this._afterInit&&this._runTransitionWithEvents(i,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(i=this._isCollapsed){this.collapsed=!i,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(i,n){return Z(this._zone,this._element.nativeElement,Ss,{animation:n,runningTransition:"stop",context:{direction:i?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(i,n){this._runTransition(i,n).subscribe(()=>{i?this.hidden.emit():this.shown.emit()})}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(n,o){n&2&&P("collapse-horizontal",o.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"]});let t=e;return t})(),xs=0,hu=(()=>{let e=class e{constructor(){this._item=d(yt),this._viewRef=null,this.elementRef=d(W)}ngAfterContentChecked(){this._bodyTpl&&(this._item._shouldBeInDOM?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef?.destroy(),this._viewRef=null}_createViewIfNotExists(){this._viewRef||(this._viewRef=this._vcr.createEmbeddedView(this._bodyTpl),this._viewRef.detectChanges())}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["","ngbAccordionBody",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,ot,7),n&2){let a;q(a=Y())&&(o._bodyTpl=a.first)}},viewQuery:function(n,o){if(n&1&&Gt(ss,7,ci),n&2){let r;q(r=Y())&&(o._vcr=r.first)}},hostAttrs:[1,"accordion-body"],attrs:rs,ngContentSelectors:Qt,decls:3,vars:0,consts:[["container",""]],template:function(n,o){n&1&&(lt(),mn(0,null,0),ct(2))},encapsulation:2});let t=e;return t})(),Fs=(()=>{let e=class e{constructor(){this.item=d(yt),this.ngbCollapse=d(Hn)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionCollapse",""]],hostAttrs:["role","region",1,"accordion-collapse"],hostVars:2,hostBindings:function(n,o){n&2&&(ee("id",o.item.collapseId),he("aria-labelledby",o.item.toggleId))},exportAs:["ngbAccordionCollapse"],features:[dn([Hn])]});let t=e;return t})(),pu=(()=>{let e=class e{constructor(){this.item=d(yt),this.accordion=d(Xn)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionToggle",""]],hostVars:5,hostBindings:function(n,o){n&1&&pe("click",function(){return!o.item.disabled&&o.accordion.toggle(o.item.id)}),n&2&&(ee("id",o.item.toggleId),he("aria-controls",o.item.collapseId)("aria-expanded",!o.item.collapsed),P("collapsed",o.item.collapsed))}});let t=e;return t})();var fu=(()=>{let e=class e{constructor(){this.item=d(yt)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionHeader",""]],hostAttrs:["role","heading",1,"accordion-header"],hostVars:2,hostBindings:function(n,o){n&2&&P("collapsed",o.item.collapsed)}});let t=e;return t})(),yt=(()=>{let e=class e{constructor(){this._accordion=d(Xn),this._cd=d(_e),this._destroyRef=d(nt),this._collapsed=!0,this._id=`ngb-accordion-item-${xs++}`,this._collapseAnimationRunning=!1,this.disabled=!1,this.show=new O,this.shown=new O,this.hide=new O,this.hidden=new O}set id(i){Jt(i)&&i!==""&&(this._id=i)}set destroyOnHide(i){this._destroyOnHide=i}get destroyOnHide(){return this._destroyOnHide===void 0?this._accordion.destroyOnHide:this._destroyOnHide}set collapsed(i){i?this.collapse():this.expand()}get collapsed(){return this._collapsed}get id(){return`${this._id}`}get toggleId(){return`${this.id}-toggle`}get collapseId(){return`${this.id}-collapse`}get _shouldBeInDOM(){return!this.collapsed||this._collapseAnimationRunning||!this.destroyOnHide}ngAfterContentInit(){let{ngbCollapse:i}=this._collapse;i.animation=!1,i.collapsed=this.collapsed,i.animation=this._accordion.animation,i.hidden.pipe(dt(this._destroyRef)).subscribe(()=>{this._collapseAnimationRunning=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id),this._cd.markForCheck()}),i.shown.pipe(dt(this._destroyRef)).subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id),this._cd.markForCheck()})}toggle(){this.collapsed=!this.collapsed}expand(){if(this.collapsed){if(!this._accordion._ensureCanExpand(this))return;this._collapsed=!1,this._cd.markForCheck(),this._cd.detectChanges(),this.show.emit(),this._accordion.show.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!1}}collapse(){this.collapsed||(this._collapsed=!0,this._collapseAnimationRunning=!0,this._cd.markForCheck(),this.hide.emit(),this._accordion.hide.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!0)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionItem",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,Fs,7),n&2){let a;q(a=Y())&&(o._collapse=a.first)}},hostAttrs:[1,"accordion-item"],hostVars:1,hostBindings:function(n,o){n&2&&ee("id",o.id)},inputs:{id:[0,"ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordionItem"]});let t=e;return t})(),Xn=(()=>{let e=class e{constructor(){this._config=d(ws),this._anItemWasAlreadyExpandedDuringInitialisation=!1,this.animation=this._config.animation,this.closeOthers=this._config.closeOthers,this.destroyOnHide=this._config.destroyOnHide,this.show=new O,this.shown=new O,this.hide=new O,this.hidden=new O}toggle(i){this._getItem(i)?.toggle()}expand(i){this._getItem(i)?.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(i=>!i.collapsed)||this._items.first.expand():this._items.forEach(i=>i.expand()))}collapse(i){this._getItem(i)?.collapse()}collapseAll(){this._items?.forEach(i=>i.collapse())}isExpanded(i){let n=this._getItem(i);return n?!n.collapsed:!1}_ensureCanExpand(i){return this.closeOthers?this._items?(this._items.find(n=>!n.collapsed&&i!==n)?.collapse(),!0):this._anItemWasAlreadyExpandedDuringInitialisation?!1:(this._anItemWasAlreadyExpandedDuringInitialisation=!0,!0):!0}_getItem(i){return this._items?.find(n=>n.id===i)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordion",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,yt,4),n&2){let a;q(a=Y())&&(o._items=a)}},hostAttrs:[1,"accordion"],inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordion"]});let t=e;return t})();var Kn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),ks=(()=>{let e=class e{constructor(){this._ngbConfig=d(qe),this.dismissible=!0,this.type="warning"}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Bs=({classList:t})=>{t.remove("show")},_u=(()=>{let e=class e{constructor(){this._config=d(ks),this._elementRef=d(W),this._zone=d(le),this.animation=this._config.animation,this.dismissible=this._config.dismissible,this.type=this._config.type,this.closed=new O}close(){let i=Z(this._zone,this._elementRef.nativeElement,Bs,{animation:this.animation,runningTransition:"continue"});return i.subscribe(()=>this.closed.emit()),i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["ngb-alert"]],hostAttrs:["role","alert"],hostVars:6,hostBindings:function(n,o){n&2&&(Oe("alert show"+(o.type?" alert-"+o.type:"")),P("fade",o.animation)("alert-dismissible",o.dismissible))},inputs:{animation:"animation",dismissible:"dismissible",type:"type"},outputs:{closed:"closed"},exportAs:["ngbAlert"],ngContentSelectors:Qt,decls:2,vars:1,consts:()=>{let i;return i=$localize`:@@ngb.alert.close:Close`,[["type","button","aria-label",i,1,"btn-close"],["type","button","aria-label",i,1,"btn-close",3,"click"]]},template:function(n,o){n&1&&(lt(),ct(0),kt(1,as,1,0,"button",0)),n&2&&(ke(),Bt(o.dismissible?1:-1))},styles:[`ngb-alert{display:block}
2
+ `],encapsulation:2,changeDetection:0});let t=e;return t})(),Qn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var Jn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),qn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var zt=(t,e)=>e?e.some(s=>s.contains(t)):!1,Un=(t,e)=>!e||Ms(t,e)!=null,Ps=(()=>{let t=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2,e=()=>/Android/.test(navigator.userAgent);return typeof navigator<"u"?!!navigator.userAgent&&(t()||e()):!1})(),As=t=>Ps?()=>setTimeout(()=>t(),100):t;function Li(t,e,s,i,n,o,r,a){s&&t.runOutsideAngular(As(()=>{let l=p=>{let h=p.target;return p.button===2||zt(h,r)?!1:s==="inside"?zt(h,o)&&Un(h,a):s==="outside"?!zt(h,o):Un(h,a)||!zt(h,o)},u=X(e,"keydown").pipe(B(n),Fe(p=>p.key==="Escape"),it(p=>p.preventDefault())),c=X(e,"mousedown").pipe(xe(l),B(n)),_=X(e,"mouseup").pipe(Rt(c),Fe(([p,h])=>h),on(0),B(n));ni([u.pipe(xe(p=>0)),_.pipe(xe(p=>1))]).subscribe(p=>t.run(()=>i(p)))}))}var Yn=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function Zn(t){let e=Array.from(t.querySelectorAll(Yn)).filter(s=>s.tabIndex!==-1);return[e[0],e[e.length-1]]}var Gs=(t,e,s,i=!1)=>{t.runOutsideAngular(()=>{let n=X(e,"focusin").pipe(B(s),xe(o=>o.target));X(e,"keydown").pipe(B(s),Fe(o=>o.key==="Tab"),Rt(n)).subscribe(([o,r])=>{let[a,l]=Zn(e);(r===a||r===e)&&o.shiftKey&&(l.focus(),o.preventDefault()),r===l&&!o.shiftKey&&(a.focus(),o.preventDefault())}),i&&X(e,"click").pipe(B(s),Rt(n),xe(o=>o[1])).subscribe(o=>o.focus())})},Hs=(()=>{let e=class e{constructor(){this._element=d(ae).documentElement}isRTL(){return(this._element.getAttribute("dir")||"").toLowerCase()==="rtl"}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Us=/\s+/,Ls=/ +/gi,Vs={top:["top"],bottom:["bottom"],start:["left","right"],left:["left"],end:["right","left"],right:["right"],"top-start":["top-start","top-end"],"top-left":["top-start"],"top-end":["top-end","top-start"],"top-right":["top-end"],"bottom-start":["bottom-start","bottom-end"],"bottom-left":["bottom-start"],"bottom-end":["bottom-end","bottom-start"],"bottom-right":["bottom-end"],"start-top":["left-start","right-start"],"left-top":["left-start"],"start-bottom":["left-end","right-end"],"left-bottom":["left-end"],"end-top":["right-start","left-start"],"right-top":["right-start"],"end-bottom":["right-end","left-end"],"right-bottom":["right-end"]};function $s(t,e){let[s,i]=Vs[t];return e&&i||s}var js=/^left/,Ws=/^right/,zs=/^start/,Xs=/^end/;function Ks(t,e){let[s,i]=e.split("-"),n=s.replace(js,"start").replace(Ws,"end"),o=[n];if(i){let r=i;(s==="left"||s==="right")&&(r=r.replace(zs,"top").replace(Xs,"bottom")),o.push(`${n}-${r}`)}return t&&(o=o.map(r=>`${t}-${r}`)),o.join(" ")}function Ln({placement:t,baseClass:e},s){let i=Array.isArray(t)?t:t.split(Us),n=["top","bottom","start","end","top-start","top-end","bottom-start","bottom-end","start-top","start-bottom","end-top","end-bottom"],o=i.findIndex(u=>u==="auto");o>=0&&n.forEach(function(u){i.find(c=>c.search("^"+u)!==-1)==null&&i.splice(o++,1,u)});let r=i.map(u=>$s(u,s.isRTL()));return{placement:r.shift(),modifiers:[{name:"bootstrapClasses",enabled:!!e,phase:"write",fn({state:u}){let c=new RegExp(e+"(-[a-z]+)*","gi"),_=u.elements.popper,p=u.placement,h=_.className;h=h.replace(c,""),h+=` ${Ks(e,p)}`,h=h.trim().replace(Ls," "),_.className=h}},Ti,Si,Oi,{enabled:!0,name:"flip",options:{fallbackPlacements:r}}]}}function Vn(t){return t}function Vi(){let t=d(Hs),e=null;return{createPopper(s){if(!e){let n=(s.updatePopperOptions||Vn)(Ln(s,t));e=Ai(s.hostElement,s.targetElement,n)}},update(){e&&e.update()},setOptions(s){if(e){let n=(s.updatePopperOptions||Vn)(Ln(s,t));e.setOptions(n)}},destroy(){e&&(e.destroy(),e=null)}}}function $i(t){return e=>(e.modifiers.push(Ii,{name:"offset",options:{offset:()=>t}}),e)}var mu=new Date(1882,10,12),gu=new Date(2174,10,25);var vu=1e3*60*60*24;var ji=1080,Qs=24*ji,Js=12*ji+793,yu=29*Qs+Js,bu=11*ji+204;var eo=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),qs=(()=>{let e=class e{constructor(){this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=i=>i,this.container=null}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),to=(()=>{let e=class e{constructor(){this._disabled=!1,this.nativeElement=d(W).nativeElement,this.tabindex=0}set disabled(i){this._disabled=i===""||i===!0}get disabled(){return this._disabled}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:3,hostBindings:function(n,o){n&2&&(ee("tabIndex",o.disabled?-1:o.tabindex),P("disabled",o.disabled))},inputs:{tabindex:"tabindex",disabled:"disabled"}});let t=e;return t})(),wu=(()=>{let e=class e{constructor(){this.item=d(to)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["button","ngbDropdownItem",""]],hostVars:1,hostBindings:function(n,o){n&2&&ee("disabled",o.item.disabled)}});let t=e;return t})(),Ys=(()=>{let e=class e{constructor(){this.dropdown=d(io),this.nativeElement=d(W).nativeElement}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,to,4),n&2){let a;q(a=Y())&&(o.menuItems=a)}},hostAttrs:[1,"dropdown-menu"],hostVars:2,hostBindings:function(n,o){n&1&&pe("keydown.ArrowUp",function(a){return o.dropdown.onKeyDown(a)})("keydown.ArrowDown",function(a){return o.dropdown.onKeyDown(a)})("keydown.Home",function(a){return o.dropdown.onKeyDown(a)})("keydown.End",function(a){return o.dropdown.onKeyDown(a)})("keydown.Enter",function(a){return o.dropdown.onKeyDown(a)})("keydown.Space",function(a){return o.dropdown.onKeyDown(a)})("keydown.Tab",function(a){return o.dropdown.onKeyDown(a)})("keydown.Shift.Tab",function(a){return o.dropdown.onKeyDown(a)}),n&2&&P("show",o.dropdown.isOpen())}});let t=e;return t})(),Gi=(()=>{let e=class e{constructor(){this.dropdown=d(io),this.nativeElement=d(W).nativeElement}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(n,o){n&2&&(he("aria-expanded",o.dropdown.isOpen()),P("show",o.dropdown.isOpen()))}});let t=e;return t})(),Ou=(()=>{let e=class e extends Gi{};e.\u0275fac=(()=>{let i;return function(o){return(i||(i=ai(e)))(o||e)}})(),e.\u0275dir=T({type:e,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(n,o){n&1&&pe("click",function(){return o.dropdown.toggle()})("keydown.ArrowUp",function(a){return o.dropdown.onKeyDown(a)})("keydown.ArrowDown",function(a){return o.dropdown.onKeyDown(a)})("keydown.Home",function(a){return o.dropdown.onKeyDown(a)})("keydown.End",function(a){return o.dropdown.onKeyDown(a)})("keydown.Tab",function(a){return o.dropdown.onKeyDown(a)})("keydown.Shift.Tab",function(a){return o.dropdown.onKeyDown(a)}),n&2&&(he("aria-expanded",o.dropdown.isOpen()),P("show",o.dropdown.isOpen()))},features:[vi([{provide:Gi,useExisting:si(()=>e)}]),di]});let t=e;return t})(),io=(()=>{let e=class e{constructor(){this._changeDetector=d(_e),this._config=d(qs),this._document=d(ae),this._injector=d(re),this._ngZone=d(le),this._nativeElement=d(W).nativeElement,this._destroyCloseHandlers$=new j,this._bodyContainer=null,this._positioning=Vi(),this.autoClose=this._config.autoClose,this._open=!1,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.container=this._config.container,this.openChange=new O}ngOnInit(){this.display||(this.display=this._nativeElement.closest(".navbar")?"static":"dynamic")}ngAfterContentInit(){st({write:()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()}},{injector:this._injector})}ngOnChanges(i){if(i.container&&this._open&&this._applyContainer(this.container),i.placement&&!i.placement.firstChange&&(this._positioning.setOptions({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement}),this._applyPlacementClasses()),i.dropdownClass){let{currentValue:n,previousValue:o}=i.dropdownClass;this._applyCustomDropdownClass(n,o)}i.autoClose&&this._open&&(this.autoClose=i.autoClose.currentValue,this._setCloseHandlers())}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&(this._anchor.nativeElement.focus(),this.display==="dynamic"&&this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,updatePopperOptions:i=>this.popperOptions($i([0,2])(i))}),this._applyPlacementClasses(),this._afterRenderRef=Ft({write:()=>{this._positionMenu()}},{injector:this._injector})})))}_setCloseHandlers(){this._destroyCloseHandlers$.next(),Li(this._ngZone,this._document,this.autoClose,i=>{this.close(),i===0&&this._anchor.nativeElement.focus()},this._destroyCloseHandlers$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._positioning.destroy(),this._afterRenderRef?.destroy(),this._destroyCloseHandlers$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this.close()}onKeyDown(i){let{key:n}=i,o=this._getMenuElements(),r=-1,a=null,l=this._isEventFromToggle(i);if(!l&&o.length&&o.forEach((u,c)=>{u.contains(i.target)&&(a=u),u===zn(this._document)&&(r=c)}),n===" "||n==="Enter"){a&&(this.autoClose===!0||this.autoClose==="inside")&&X(a,"click").pipe(tt(1)).subscribe(()=>this.close());return}if(n==="Tab"){if(i.target&&this.isOpen()&&this.autoClose)if(this._anchor.nativeElement===i.target){this.container==="body"&&!i.shiftKey?(this._menu.nativeElement.setAttribute("tabindex","0"),this._menu.nativeElement.focus(),this._menu.nativeElement.removeAttribute("tabindex")):i.shiftKey&&this.close();return}else if(this.container==="body"){let u=this._menu.nativeElement.querySelectorAll(Yn);i.shiftKey&&i.target===u[0]?(this._anchor.nativeElement.focus(),i.preventDefault()):!i.shiftKey&&i.target===u[u.length-1]&&(this._anchor.nativeElement.focus(),this.close())}else X(i.target,"focusout").pipe(tt(1)).subscribe(({relatedTarget:u})=>{this._nativeElement.contains(u)||this.close()});return}if(l||a){if(this.open(),o.length){switch(n){case"ArrowDown":r=Math.min(r+1,o.length-1);break;case"ArrowUp":if(this._isDropup()&&r===-1){r=o.length-1;break}r=Math.max(r-1,0);break;case"Home":r=0;break;case"End":r=o.length-1;break}o[r].focus()}i.preventDefault()}}_isDropup(){return this._nativeElement.classList.contains("dropup")}_isEventFromToggle(i){return this._anchor.nativeElement.contains(i.target)}_getMenuElements(){return this._menu?this._menu.menuItems.filter(({disabled:i})=>!i).map(({nativeElement:i})=>i):[]}_positionMenu(){let i=this._menu;this.isOpen()&&i&&(this.display==="dynamic"?(this._positioning.update(),this._applyPlacementClasses()):this._applyPlacementClasses(this._getFirstPlacement(this.placement)))}_getFirstPlacement(i){return Array.isArray(i)?i[0]:i.split(" ")[0]}_resetContainer(){this._menu&&this._nativeElement.appendChild(this._menu.nativeElement),this._bodyContainer&&(this._document.body.removeChild(this._bodyContainer),this._bodyContainer=null)}_applyContainer(i=null){if(this._resetContainer(),i==="body"){let n=this._menu.nativeElement,o=this._bodyContainer=this._bodyContainer||this._document.createElement("div");o.style.position="absolute",n.style.position="static",o.style.zIndex="1055",o.appendChild(n),this._document.body.appendChild(o)}this._applyCustomDropdownClass(this.dropdownClass)}_applyCustomDropdownClass(i,n){let o=this.container==="body"?this._bodyContainer:this._nativeElement;o&&(n&&o.classList.remove(n),i&&o.classList.add(i))}_applyPlacementClasses(i){if(this._menu){i||(i=this._getFirstPlacement(this.placement)),this._nativeElement.classList.remove("dropup","dropdown"),this.display==="static"?this._menu.nativeElement.setAttribute("data-bs-popper","static"):this._menu.nativeElement.removeAttribute("data-bs-popper");let n=i.search("^top")!==-1?"dropup":"dropdown";this._nativeElement.classList.add(n),this._bodyContainer&&(this._bodyContainer.classList.remove("dropup","dropdown"),this._bodyContainer.classList.add(n))}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbDropdown",""]],contentQueries:function(n,o,r){if(n&1&&(fe(r,Ys,5),fe(r,Gi,5)),n&2){let a;q(a=Y())&&(o._menu=a.first),q(a=Y())&&(o._anchor=a.first)}},hostVars:2,hostBindings:function(n,o){n&2&&P("show",o.isOpen())},inputs:{autoClose:"autoClose",dropdownClass:"dropdownClass",_open:[0,"open","_open"],placement:"placement",popperOptions:"popperOptions",container:"container",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],features:[je]});let t=e;return t})();var no=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),Zs=(()=>{let e=class e{constructor(){this._ngbConfig=d(qe),this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0,this.role="dialog"}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),be=class{constructor(e,s,i){this.nodes=e,this.viewRef=s,this.componentRef=i}},Xt=class{constructor(e){this._componentType=e,this._windowRef=null,this._contentRef=null,this._document=d(ae),this._applicationRef=d(ui),this._injector=d(re),this._viewContainerRef=d(ci),this._ngZone=d(le)}open(e,s,i=!1){this._windowRef||(this._contentRef=this._getContentRef(e,s),this._windowRef=this._viewContainerRef.createComponent(this._componentType,{injector:this._injector,projectableNodes:this._contentRef.nodes}));let{nativeElement:n}=this._windowRef.location,o=new j;st({mixedReadWrite:()=>{o.next(),o.complete()}},{injector:this._injector});let r=o.pipe(tn(()=>Z(this._ngZone,n,({classList:a})=>a.add("show"),{animation:i,runningTransition:"continue"})));return{windowRef:this._windowRef,transition$:r}}close(e=!1){return this._windowRef?Z(this._ngZone,this._windowRef.location.nativeElement,({classList:s})=>s.remove("show"),{animation:e,runningTransition:"stop"}).pipe(it(()=>{this._windowRef?.destroy(),this._contentRef?.viewRef?.destroy(),this._windowRef=null,this._contentRef=null})):et(void 0)}_getContentRef(e,s){if(e)if(e instanceof ot){let i=e.createEmbeddedView(s);return this._applicationRef.attachView(i),new be([i.rootNodes],i)}else return new be([[this._document.createTextNode(`${e}`)]]);else return new be([])}},er=(()=>{let e=class e{constructor(){this._document=d(ae)}hide(){let i=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),n=this._document.body,o=n.style,{overflow:r,paddingRight:a}=o;if(i>0){let l=parseFloat(window.getComputedStyle(n).paddingRight);o.paddingRight=`${l+i}px`}return o.overflow="hidden",()=>{i>0&&(o.paddingRight=a),o.overflow=r}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),tr=["animation","backdropClass"],ir=(()=>{let e=class e{constructor(){this._nativeElement=d(W).nativeElement,this._zone=d(le),this._injector=d(re),this._cdRef=d(_e)}ngOnInit(){st({mixedReadWrite:()=>Z(this._zone,this._nativeElement,(i,n)=>{n&&qt(i),i.classList.add("show")},{animation:this.animation,runningTransition:"continue"})},{injector:this._injector})}hide(){return Z(this._zone,this._nativeElement,({classList:i})=>i.remove("show"),{animation:this.animation,runningTransition:"stop"})}updateOptions(i){tr.forEach(n=>{Ce(i[n])&&(this[n]=i[n])}),this._cdRef.markForCheck()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1055"],hostVars:6,hostBindings:function(n,o){n&2&&(Oe("modal-backdrop"+(o.backdropClass?" "+o.backdropClass:"")),P("show",!o.animation)("fade",o.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},decls:0,vars:0,template:function(n,o){},encapsulation:2});let t=e;return t})(),Kt=class{update(e){}close(e){}dismiss(e){}},Hi=class{update(e){this._windowCmptRef.instance.updateOptions(e),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._backdropCmptRef.instance.updateOptions(e)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(B(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(B(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}constructor(e,s,i,n){this._windowCmptRef=e,this._contentRef=s,this._backdropCmptRef=i,this._beforeDismiss=n,this._closed=new j,this._dismissed=new j,this._hidden=new j,e.instance.dismissEvent.subscribe(o=>{this.dismiss(o)}),this.result=new Promise((o,r)=>{this._resolve=o,this._reject=r}),this.result.then(null,()=>{})}close(e){this._windowCmptRef&&(this._closed.next(e),this._resolve(e),this._removeModalElements())}_dismiss(e){this._dismissed.next(e),this._reject(e),this._removeModalElements()}dismiss(e){if(this._windowCmptRef)if(!this._beforeDismiss)this._dismiss(e);else{let s=this._beforeDismiss();Ds(s)?s.then(i=>{i!==!1&&this._dismiss(e)},()=>{}):s!==!1&&this._dismiss(e)}}_removeModalElements(){let e=this._windowCmptRef.instance.hide(),s=this._backdropCmptRef?this._backdropCmptRef.instance.hide():et(void 0);e.subscribe(()=>{let{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef?.viewRef?.destroy(),this._windowCmptRef=null,this._contentRef=null}),s.subscribe(()=>{if(this._backdropCmptRef){let{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),It(e,s).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}},Ui=function(t){return t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC",t}(Ui||{}),nr=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","role","scrollable","size","windowClass","modalDialogClass"],or=(()=>{let e=class e{constructor(){this._document=d(ae),this._elRef=d(W),this._zone=d(le),this._injector=d(re),this._cdRef=d(_e),this._closed$=new j,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.role="dialog",this.dismissEvent=new O,this.shown=new j,this.hidden=new j}get fullscreenClass(){return this.fullscreen===!0?" modal-fullscreen":Jt(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(i){this.dismissEvent.emit(i)}ngOnInit(){this._elWithFocus=this._document.activeElement,st({mixedReadWrite:()=>this._show()},{injector:this._injector})}ngOnDestroy(){this._disableEventHandling()}hide(){let{nativeElement:i}=this._elRef,n={animation:this.animation,runningTransition:"stop"},o=Z(this._zone,i,()=>i.classList.remove("show"),n),r=Z(this._zone,this._dialogEl.nativeElement,()=>{},n),a=It(o,r);return a.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),a}updateOptions(i){nr.forEach(n=>{Ce(i[n])&&(this[n]=i[n])}),this._cdRef.markForCheck()}_show(){let i={animation:this.animation,runningTransition:"continue"},n=Z(this._zone,this._elRef.nativeElement,(r,a)=>{a&&qt(r),r.classList.add("show")},i),o=Z(this._zone,this._dialogEl.nativeElement,()=>{},i);It(n,o).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){let{nativeElement:i}=this._elRef;this._zone.runOutsideAngular(()=>{X(i,"keydown").pipe(B(this._closed$),Fe(o=>o.key==="Escape")).subscribe(o=>{this.keyboard?requestAnimationFrame(()=>{o.defaultPrevented||this._zone.run(()=>this.dismiss(Ui.ESC))}):this.backdrop==="static"&&this._bumpBackdrop()});let n=!1;X(this._dialogEl.nativeElement,"mousedown").pipe(B(this._closed$),it(()=>n=!1),oi(()=>X(i,"mouseup").pipe(B(this._closed$),tt(1))),Fe(({target:o})=>i===o)).subscribe(()=>{n=!0}),X(i,"click").pipe(B(this._closed$)).subscribe(({target:o})=>{i===o&&(this.backdrop==="static"?this._bumpBackdrop():this.backdrop===!0&&!n&&this._zone.run(()=>this.dismiss(Ui.BACKDROP_CLICK))),n=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){let{nativeElement:i}=this._elRef;if(!i.contains(document.activeElement)){let n=i.querySelector("[ngbAutofocus]"),o=Zn(i)[0];(n||o||i).focus()}}_restoreFocus(){let i=this._document.body,n=this._elWithFocus,o;n&&n.focus&&i.contains(n)?o=n:o=i,this._zone.runOutsideAngular(()=>{setTimeout(()=>o.focus()),this._elWithFocus=null})}_bumpBackdrop(){this.backdrop==="static"&&Z(this._zone,this._elRef.nativeElement,({classList:i})=>(i.add("modal-static"),()=>i.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["ngb-modal-window"]],viewQuery:function(n,o){if(n&1&&Gt(cs,7),n&2){let r;q(r=Y())&&(o._dialogEl=r.first)}},hostAttrs:["tabindex","-1"],hostVars:8,hostBindings:function(n,o){n&2&&(he("aria-modal",!0)("aria-labelledby",o.ariaLabelledBy)("aria-describedby",o.ariaDescribedBy)("role",o.role),Oe("modal d-block"+(o.windowClass?" "+o.windowClass:"")),P("fade",o.animation))},inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",fullscreen:"fullscreen",keyboard:"keyboard",role:"role",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:Qt,decls:4,vars:2,consts:[["dialog",""],["role","document"],[1,"modal-content"]],template:function(n,o){n&1&&(lt(),rt(0,"div",1,0)(2,"div",2),ct(3),at()()),n&2&&Oe("modal-dialog"+(o.size?" modal-"+o.size:"")+(o.centered?" modal-dialog-centered":"")+o.fullscreenClass+(o.scrollable?" modal-dialog-scrollable":"")+(o.modalDialogClass?" "+o.modalDialogClass:""))},styles:[`ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}
3
+ `],encapsulation:2});let t=e;return t})(),sr=(()=>{let e=class e{constructor(){this._applicationRef=d(ui),this._injector=d(re),this._environmentInjector=d(ri),this._document=d(ae),this._scrollBar=d(er),this._activeWindowCmptHasChanged=new j,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new O;let i=d(le);this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){let n=this._windowCmpts[this._windowCmpts.length-1];Gs(i,n.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(n.location.nativeElement)}})}_restoreScrollBar(){let i=this._scrollBarRestoreFn;i&&(this._scrollBarRestoreFn=null,i())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(i,n,o){let r=o.container instanceof HTMLElement?o.container:Ce(o.container)?this._document.querySelector(o.container):this._document.body;if(!r)throw new Error(`The specified modal container "${o.container||"body"}" was not found in the DOM.`);this._hideScrollBar();let a=new Kt;i=o.injector||i;let l=i.get(ri,null)||this._environmentInjector,u=this._getContentRef(i,l,n,a,o),c=o.backdrop!==!1?this._attachBackdrop(r):void 0,_=this._attachWindowComponent(r,u.nodes),p=new Hi(_,u,c,o.beforeDismiss);return this._registerModalRef(p),this._registerWindowCmpt(_),p.hidden.pipe(tt(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(this._document.body.classList.remove("modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),a.close=h=>{p.close(h)},a.dismiss=h=>{p.dismiss(h)},a.update=h=>{p.update(h)},p.update(o),this._modalRefs.length===1&&this._document.body.classList.add("modal-open"),c&&c.instance&&c.changeDetectorRef.detectChanges(),_.changeDetectorRef.detectChanges(),p}get activeInstances(){return this._activeInstances}dismissAll(i){this._modalRefs.forEach(n=>n.dismiss(i))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(i){let n=Ht(ir,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(n.hostView),i.appendChild(n.location.nativeElement),n}_attachWindowComponent(i,n){let o=Ht(or,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:n});return this._applicationRef.attachView(o.hostView),i.appendChild(o.location.nativeElement),o}_getContentRef(i,n,o,r,a){return o?o instanceof ot?this._createFromTemplateRef(o,r):Jt(o)?this._createFromString(o):this._createFromComponent(i,n,o,r,a):new be([])}_createFromTemplateRef(i,n){let o={$implicit:n,close(a){n.close(a)},dismiss(a){n.dismiss(a)}},r=i.createEmbeddedView(o);return this._applicationRef.attachView(r),new be([r.rootNodes],r)}_createFromString(i){let n=this._document.createTextNode(`${i}`);return new be([[n]])}_createFromComponent(i,n,o,r,a){let l=re.create({providers:[{provide:Kt,useValue:r}],parent:i}),u=Ht(o,{environmentInjector:n,elementInjector:l}),c=u.location.nativeElement;return a.scrollable&&c.classList.add("component-host-scrollable"),this._applicationRef.attachView(u.hostView),new be([[c]],u.hostView,u)}_setAriaHidden(i){let n=i.parentElement;n&&i!==this._document.body&&(Array.from(n.children).forEach(o=>{o!==i&&o.nodeName!=="SCRIPT"&&(this._ariaHiddenValues.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}),this._setAriaHidden(n))}_revertAriaHidden(){this._ariaHiddenValues.forEach((i,n)=>{i?n.setAttribute("aria-hidden",i):n.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(i){let n=()=>{let o=this._modalRefs.indexOf(i);o>-1&&(this._modalRefs.splice(o,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(i),this._activeInstances.emit(this._modalRefs),i.result.then(n,n)}_registerWindowCmpt(i){this._windowCmpts.push(i),this._activeWindowCmptHasChanged.next(),i.onDestroy(()=>{let n=this._windowCmpts.indexOf(i);n>-1&&(this._windowCmpts.splice(n,1),this._activeWindowCmptHasChanged.next())})}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),rr=(()=>{let e=class e{constructor(){this._injector=d(re),this._modalStack=d(sr),this._config=d(Zs)}open(i,n={}){let o=Mt(ii(Mt({},this._config),{animation:this._config.animation}),n);return this._modalStack.open(this._injector,i,o)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(i){this._modalStack.dismissAll(i)}hasOpenModals(){return this._modalStack.hasOpenModals()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),oo=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({providers:[rr]});let t=e;return t})(),ar=(()=>{let e=class e{constructor(){this._ngbConfig=d(qe),this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),so=t=>Ce(t)&&t!=="",lr=0,cr=(()=>{let e=class e{constructor(){this.templateRef=d(ot)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["ng-template","ngbNavContent",""]]});let t=e;return t})();var ro=(()=>{let e=class e{constructor(){this._nav=d(ao),this._nativeElement=d(W).nativeElement,this.disabled=!1,this.shown=new O,this.hidden=new O}ngOnInit(){Ce(this.domId)||(this.domId=`ngb-nav-${lr++}`)}get active(){return this._nav.activeId===this.id}get id(){return so(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(Ce(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}isNgContainer(){return this._nativeElement.nodeType===Node.COMMENT_NODE}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbNavItem",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,cr,4),n&2){let a;q(a=Y())&&(o.contentTpl=a.first)}},hostAttrs:[1,"nav-item"],inputs:{destroyOnHide:"destroyOnHide",disabled:"disabled",domId:"domId",_id:[0,"ngbNavItem","_id"]},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbNavItem"]});let t=e;return t})(),ao=(()=>{let e=class e{constructor(i){this.role=i,this._config=d(ar),this._cd=d(_e),this._document=d(ae),this._nativeElement=d(W).nativeElement,this.destroyRef=d(nt),this._navigatingWithKeyboard=!1,this.activeIdChange=new O,this.animation=this._config.animation,this.destroyOnHide=this._config.destroyOnHide,this.orientation=this._config.orientation,this.roles=this._config.roles,this.keyboard=this._config.keyboard,this.shown=new O,this.hidden=new O,this.navItemChange$=new j,this.navChange=new O}click(i){i.disabled||this._updateActiveId(i.id)}onFocusout({relatedTarget:i}){this._nativeElement.contains(i)||(this._navigatingWithKeyboard=!1)}onKeyDown(i){if(this.roles!=="tablist"||!this.keyboard)return;let n=this.links.filter(a=>!a.navItem.disabled),{length:o}=n,r=-1;if(n.forEach((a,l)=>{a.nativeElement===this._document.activeElement&&(r=l)}),o){switch(i.key){case"ArrowUp":case"ArrowLeft":r=(r-1+o)%o;break;case"ArrowRight":case"ArrowDown":r=(r+1)%o;break;case"Home":r=0;break;case"End":r=o-1;break}this.keyboard==="changeWithArrows"&&this.select(n[r].navItem.id),n[r].nativeElement.focus(),this._navigatingWithKeyboard=!0,i.preventDefault()}}select(i){this._updateActiveId(i,!1)}ngAfterContentInit(){if(!Ce(this.activeId)){let i=this.items.first?this.items.first.id:null;so(i)&&(this._updateActiveId(i,!1),this._cd.detectChanges())}this.items.changes.pipe(dt(this.destroyRef)).subscribe(()=>this._notifyItemChanged(this.activeId))}ngOnChanges({activeId:i}){i&&!i.firstChange&&this._notifyItemChanged(i.currentValue)}_updateActiveId(i,n=!0){if(this.activeId!==i){let o=!1;n&&this.navChange.emit({activeId:this.activeId,nextId:i,preventDefault:()=>{o=!0}}),o||(this.activeId=i,this.activeIdChange.emit(i),this._notifyItemChanged(i))}}_notifyItemChanged(i){this.navItemChange$.next(this._getItemById(i))}_getItemById(i){return this.items&&this.items.find(n=>n.id===i)||null}};e.\u0275fac=function(n){return new(n||e)(li("role"))},e.\u0275dir=T({type:e,selectors:[["","ngbNav",""]],contentQueries:function(n,o,r){if(n&1&&(fe(r,ro,4),fe(r,lo,5)),n&2){let a;q(a=Y())&&(o.items=a),q(a=Y())&&(o.links=a)}},hostAttrs:[1,"nav"],hostVars:4,hostBindings:function(n,o){n&1&&pe("keydown.arrowLeft",function(a){return o.onKeyDown(a)})("keydown.arrowRight",function(a){return o.onKeyDown(a)})("keydown.arrowDown",function(a){return o.onKeyDown(a)})("keydown.arrowUp",function(a){return o.onKeyDown(a)})("keydown.Home",function(a){return o.onKeyDown(a)})("keydown.End",function(a){return o.onKeyDown(a)})("focusout",function(a){return o.onFocusout(a)}),n&2&&(he("aria-orientation",o.orientation==="vertical"&&o.roles==="tablist"?"vertical":void 0)("role",o.role?o.role:o.roles?"tablist":void 0),P("flex-column",o.orientation==="vertical"))},inputs:{activeId:"activeId",animation:"animation",destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard"},outputs:{activeIdChange:"activeIdChange",shown:"shown",hidden:"hidden",navChange:"navChange"},exportAs:["ngbNav"],features:[je]});let t=e;return t})(),lo=(()=>{let e=class e{constructor(i){this.role=i,this.navItem=d(ro),this.nav=d(ao),this.nativeElement=d(W).nativeElement}get tabindex(){return this.nav.keyboard===!1?this.navItem.disabled?-1:void 0:this.nav._navigatingWithKeyboard||this.navItem.disabled||!this.navItem.active?-1:void 0}};e.\u0275fac=function(n){return new(n||e)(li("role"))},e.\u0275dir=T({type:e,selectors:[["","ngbNavLink",""]],hostAttrs:[1,"nav-link"],hostVars:12,hostBindings:function(n,o){n&2&&(ee("id",o.navItem.domId),he("role",o.role?o.role:o.nav.roles?"tab":void 0)("tabindex",o.tabindex)("aria-controls",o.navItem.isPanelInDom()?o.navItem.panelDomId:null)("aria-selected",o.navItem.active)("aria-disabled",o.navItem.disabled),P("nav-item",o.navItem.isNgContainer())("active",o.navItem.active)("disabled",o.navItem.disabled))}});let t=e;return t})(),Du=(()=>{let e=class e extends lo{};e.\u0275fac=(()=>{let i;return function(o){return(i||(i=ai(e)))(o||e)}})(),e.\u0275dir=T({type:e,selectors:[["button","ngbNavLink",""]],hostAttrs:["type","button"],hostVars:1,hostBindings:function(n,o){n&1&&pe("click",function(){return o.nav.click(o.navItem)}),n&2&&ee("disabled",o.navItem.disabled)},features:[di]});let t=e;return t})();var dr=({classList:t})=>(t.remove("show"),()=>t.remove("active")),ur=(t,e)=>{e&&qt(t),t.classList.add("show")},$n=(()=>{let e=class e{constructor(){this.nativeElement=d(W).nativeElement}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbNavPane",""]],hostAttrs:[1,"tab-pane"],hostVars:5,hostBindings:function(n,o){n&2&&(ee("id",o.item.panelDomId),he("role",o.role?o.role:o.nav.roles?"tabpanel":void 0)("aria-labelledby",o.item.domId),P("fade",o.nav.animation))},inputs:{item:"item",nav:"nav",role:"role"}});let t=e;return t})(),Eu=(()=>{let e=class e{constructor(){this._cd=d(_e),this._ngZone=d(le),this._activePane=null}isPanelTransitioning(i){return this._activePane?.item===i}ngAfterViewInit(){this._updateActivePane(),this.nav.navItemChange$.pipe(dt(this.nav.destroyRef),ln(this._activePane?.item||null),sn(),an(1)).subscribe(i=>{let n={animation:this.nav.animation,runningTransition:"stop"};this._cd.detectChanges(),this._activePane?Z(this._ngZone,this._activePane.nativeElement,dr,n).subscribe(()=>{let o=this._activePane?.item;this._activePane=this._getPaneForItem(i),this._cd.markForCheck(),this._activePane&&(this._activePane.nativeElement.classList.add("active"),Z(this._ngZone,this._activePane.nativeElement,ur,n).subscribe(()=>{i&&(i.shown.emit(),this.nav.shown.emit(i.id))})),o&&(o.hidden.emit(),this.nav.hidden.emit(o.id))}):this._updateActivePane()})}_updateActivePane(){this._activePane=this._getActivePane(),this._activePane?.nativeElement.classList.add("show","active")}_getPaneForItem(i){return this._panes&&this._panes.find(n=>n.item===i)||null}_getActivePane(){return this._panes&&this._panes.find(i=>i.item.active)||null}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["","ngbNavOutlet",""]],viewQuery:function(n,o){if(n&1&&Gt($n,5),n&2){let r;q(r=Y())&&(o._panes=r)}},hostAttrs:[1,"tab-content"],inputs:{paneRole:"paneRole",nav:[0,"ngbNavOutlet","nav"]},attrs:ds,decls:2,vars:0,consts:[["ngbNavPane","",3,"item","nav","role"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,o){n&1&&Pt(0,ps,1,1,null,null,un),n&2&&At(o.nav.items)},dependencies:[$n,yi],encapsulation:2,changeDetection:0});let t=e;return t})();var co=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var uo=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),hr={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]};function pr(t){let e=(t||"").trim();if(e.length===0)return[];let s=e.split(/\s+/).map(n=>n.split(":")).map(n=>hr[n[0]]||n),i=s.filter(n=>n.includes("manual"));if(i.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(i.length===1&&s.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return i.length?[]:s}function fr(t,e,s,i,n,o=0,r=0,a=Tt,l=Tt){let u=pr(e);if(u.length===0)return()=>{};let c=new Set,_=[],p;function h(f,m){t.addEventListener(f,m),_.push(()=>t.removeEventListener(f,m))}function v(f,m){clearTimeout(p),m>0?p=setTimeout(f,m):f()}for(let[f,m]of u)if(m?(h(f,()=>{c.add(f),v(()=>c.size>0&&i(),o)}),h(m,()=>{c.delete(f),v(()=>c.size===0&&n(),r)})):h(f,()=>s()?v(n,r):v(i,o)),f==="mouseenter"&&m==="mouseleave"&&r>0){let w=a.subscribe(()=>{c.delete(f),clearTimeout(p)}),E=l.subscribe(()=>{c.delete(f),v(()=>c.size===0&&n(),r)});_.push(()=>w.unsubscribe(),()=>E.unsubscribe())}return _.push(()=>clearTimeout(p)),()=>_.forEach(f=>f())}var ho=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var po=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var fo=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var _o=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var mo=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var go=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),_r=(()=>{let e=class e{constructor(){this._ngbConfig=d(qe),this.autoClose=!0,this.placement="auto",this.popperOptions=i=>i,this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),mr=0,gr=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["ngb-tooltip-window"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(n,o){n&1&&pe("mouseenter",function(){return o.onMouseEnter()})("mouseleave",function(){return o.onMouseLeave()}),n&2&&(ee("id",o.id),Oe("tooltip"+(o.tooltipClass?" "+o.tooltipClass:"")),P("fade",o.animation))},inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass",onMouseEnter:"onMouseEnter",onMouseLeave:"onMouseLeave"},ngContentSelectors:Qt,decls:3,vars:0,consts:[["data-popper-arrow","",1,"tooltip-arrow"],[1,"tooltip-inner"]],template:function(n,o){n&1&&(lt(),pn(0,"div",0),rt(1,"div",1),ct(2),at())},styles:[`ngb-tooltip-window{pointer-events:none;position:absolute}ngb-tooltip-window .tooltip-inner{pointer-events:auto}ngb-tooltip-window.bs-tooltip-top,ngb-tooltip-window.bs-tooltip-bottom{padding-left:0;padding-right:0}ngb-tooltip-window.bs-tooltip-start,ngb-tooltip-window.bs-tooltip-end{padding-top:0;padding-bottom:0}
4
+ `],encapsulation:2,changeDetection:0});let t=e;return t})(),Mu=(()=>{let e=class e{constructor(){this._config=d(_r),this.animation=this._config.animation,this.autoClose=this._config.autoClose,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.triggers=this._config.triggers,this.container=this._config.container,this.disableTooltip=this._config.disableTooltip,this.tooltipClass=this._config.tooltipClass,this.openDelay=this._config.openDelay,this.closeDelay=this._config.closeDelay,this.shown=new O,this.hidden=new O,this._nativeElement=d(W).nativeElement,this._ngZone=d(le),this._document=d(ae),this._changeDetector=d(_e),this._injector=d(re),this._ngbTooltipWindowId=`ngb-tooltip-${mr++}`,this._popupService=new Xt(gr),this._windowRef=null,this._positioning=Vi(),this._mouseEnterTooltip=new j,this._mouseLeaveTooltip=new j,this._opening=!0,this._transitioning=!1}set ngbTooltip(i){this._ngbTooltip=i,!i&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(i){if(!this._opening&&this._transitioning&&(this._transitioning=!1,Gn(this._windowRef.location.nativeElement)),!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){let{windowRef:n,transition$:o}=this._popupService.open(this._ngbTooltip,i??this.tooltipContext,this.animation);this._opening=!0,this._transitioning=!0,this._windowRef=n,this._windowRef.setInput("animation",this.animation),this._windowRef.setInput("tooltipClass",this.tooltipClass),this._windowRef.setInput("id",this._ngbTooltipWindowId),this._windowRef.setInput("onMouseEnter",()=>this._mouseEnterTooltip.next()),this._windowRef.setInput("onMouseLeave",()=>this._mouseLeaveTooltip.next()),this._getPositionTargetElement().setAttribute("aria-describedby",this._ngbTooltipWindowId),this.container==="body"&&this._document.body.appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._getPositionTargetElement(),targetElement:this._windowRef.location.nativeElement,placement:this.placement,baseClass:"bs-tooltip",updatePopperOptions:r=>this.popperOptions($i([0,6])(r))}),Promise.resolve().then(()=>{this._positioning.update()}),this._afterRenderRef=Ft({mixedReadWrite:()=>{this._positioning.update()}},{injector:this._injector})}),Li(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement],[this._nativeElement]),o.subscribe(()=>{this._transitioning&&(this._transitioning=!1,this.shown.emit())})}}close(i=this.animation){this._opening&&this._transitioning&&(this._transitioning=!1,Gn(this._windowRef.location.nativeElement)),this._windowRef!=null&&(this._getPositionTargetElement().removeAttribute("aria-describedby"),this._opening=!1,this._transitioning=!0,this._popupService.close(i).subscribe(()=>{this._windowRef=null,this._positioning.destroy(),this._afterRenderRef?.destroy(),this._transitioning&&(this._transitioning=!1,this.hidden.emit()),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return this._windowRef!=null}ngOnInit(){this._unregisterListenersFn=fr(this._nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay,this._mouseEnterTooltip,this._mouseLeaveTooltip)}ngOnChanges({tooltipClass:i}){i&&this.isOpen()&&this._windowRef.setInput("tooltipClass",i.currentValue)}ngOnDestroy(){this.close(!1),this._unregisterListenersFn?.()}_getPositionTargetElement(){return(Jt(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget)||this._nativeElement}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbTooltip",""]],inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",popperOptions:"popperOptions",triggers:"triggers",positionTarget:"positionTarget",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",tooltipContext:"tooltipContext",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],features:[je]});let t=e;return t})(),vo=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),vr=(()=>{let e=class e{constructor(){this.highlightClass="ngb-highlight",this.accentSensitive=!0}ngOnChanges(i){!this.accentSensitive&&!String.prototype.normalize&&(console.warn("The `accentSensitive` input in `ngb-highlight` cannot be set to `false` in a browser that does not implement the `String.normalize` function. You will have to include a polyfill in your application to use this feature in the current browser."),this.accentSensitive=!0);let n=vt(this.result),o=Array.isArray(this.term)?this.term:[this.term],r=c=>this.accentSensitive?c:An(c),a=o.map(c=>Es(r(vt(c)))).filter(c=>c),l=this.accentSensitive?n:An(n),u=a.length?l.split(new RegExp(`(${a.join("|")})`,"gmi")):[n];if(this.accentSensitive)this.parts=u;else{let c=0;this.parts=u.map(_=>n.substring(c,c+=_.length))}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["ngb-highlight"]],inputs:{highlightClass:"highlightClass",result:"result",term:"term",accentSensitive:"accentSensitive"},features:[je],decls:2,vars:0,consts:[[3,"class"]],template:function(n,o){n&1&&Pt(0,ms,2,1,null,null,hi),n&2&&At(o.parts)},styles:[`.ngb-highlight{font-weight:700}
5
+ `],encapsulation:2,changeDetection:0});let t=e;return t})(),yr=new cn("live announcer delay",{providedIn:"root",factory:()=>100});function jn(t,e=!1){let s=t.body.querySelector("#ngb-live");return s==null&&e&&(s=t.createElement("div"),s.setAttribute("id","ngb-live"),s.setAttribute("aria-live","polite"),s.setAttribute("aria-atomic","true"),s.classList.add("visually-hidden"),t.body.appendChild(s)),s}var br=(()=>{let e=class e{constructor(){this._document=d(ae),this._delay=d(yr)}ngOnDestroy(){let i=jn(this._document);i&&i.parentElement.removeChild(i)}say(i){let n=jn(this._document,!0),o=this._delay;if(n!=null){n.textContent="";let r=()=>n.textContent=i;o===null?r():setTimeout(r,o)}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),wr=(()=>{let e=class e{constructor(){this.editable=!0,this.focusFirst=!0,this.selectOnExact=!1,this.showHint=!1,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=i=>i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Or=(()=>{let e=class e{constructor(){this.activeIdx=0,this.focusFirst=!0,this.formatter=vt,this.selectEvent=new O,this.activeChangeEvent=new O}hasActive(){return this.activeIdx>-1&&this.activeIdx<this.results.length}getActive(){return this.results[this.activeIdx]}markActive(i){this.activeIdx=i,this._activeChanged()}next(){this.activeIdx===this.results.length-1?this.activeIdx=this.focusFirst?(this.activeIdx+1)%this.results.length:-1:this.activeIdx++,this._activeChanged()}prev(){this.activeIdx<0?this.activeIdx=this.results.length-1:this.activeIdx===0?this.activeIdx=this.focusFirst?this.results.length-1:-1:this.activeIdx--,this._activeChanged()}resetActive(){this.activeIdx=this.focusFirst?0:-1,this._activeChanged()}select(i){this.selectEvent.emit(i)}ngOnInit(){this.resetActive()}_activeChanged(){this.activeChangeEvent.emit(this.activeIdx>=0?this.id+"-"+this.activeIdx:void 0)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["ngb-typeahead-window"]],hostAttrs:["role","listbox"],hostVars:3,hostBindings:function(n,o){n&1&&pe("mousedown",function(a){return a.preventDefault()}),n&2&&(ee("id",o.id),Oe("dropdown-menu show"+(o.popupClass?" "+o.popupClass:"")))},inputs:{id:"id",focusFirst:"focusFirst",results:"results",term:"term",formatter:"formatter",resultTemplate:"resultTemplate",popupClass:"popupClass"},outputs:{selectEvent:"select",activeChangeEvent:"activeChange"},exportAs:["ngbTypeaheadWindow"],decls:4,vars:0,consts:[["rt",""],["type","button","role","option",1,"dropdown-item",3,"id","active"],[3,"result","term"],["type","button","role","option",1,"dropdown-item",3,"mouseenter","click","id"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,o){n&1&&(xt(0,vs,1,2,"ng-template",null,0,wn),Pt(2,bs,2,9,"button",1,hi)),n&2&&(ke(2),At(o.results))},dependencies:[vr,yi],encapsulation:2});let t=e;return t})(),Dr=0,Cu=(()=>{let e=class e{constructor(){this._nativeElement=d(W).nativeElement,this._config=d(wr),this._live=d(br),this._document=d(ae),this._ngZone=d(le),this._changeDetector=d(_e),this._injector=d(re),this._popupService=new Xt(Or),this._positioning=Vi(),this._subscription=null,this._closed$=new j,this._inputValueBackup=null,this._inputValueForSelectOnExact=null,this._valueChanges$=X(this._nativeElement,"input").pipe(xe(i=>i.target.value)),this._resubscribeTypeahead$=new en(null),this._windowRef=null,this.autocomplete="off",this.container=this._config.container,this.editable=this._config.editable,this.focusFirst=this._config.focusFirst,this.selectOnExact=this._config.selectOnExact,this.showHint=this._config.showHint,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.selectItem=new O,this.activeDescendant=null,this.popupId=`ngb-typeahead-${Dr++}`,this._onTouched=()=>{},this._onChange=i=>{}}ngOnInit(){this._subscribeToUserInput()}ngOnChanges({ngbTypeahead:i}){i&&!i.firstChange&&(this._unsubscribeFromUserInput(),this._subscribeToUserInput())}ngOnDestroy(){this._closePopup(),this._unsubscribeFromUserInput()}registerOnChange(i){this._onChange=i}registerOnTouched(i){this._onTouched=i}writeValue(i){this._writeInputValue(this._formatItemForInput(i)),this.showHint&&(this._inputValueBackup=i)}setDisabledState(i){this._nativeElement.disabled=i}dismissPopup(){this.isPopupOpen()&&(this._resubscribeTypeahead$.next(null),this._closePopup(),this.showHint&&this._inputValueBackup!==null&&this._writeInputValue(this._inputValueBackup),this._changeDetector.markForCheck())}isPopupOpen(){return this._windowRef!=null}handleBlur(){this._resubscribeTypeahead$.next(null),this._onTouched()}handleKeyDown(i){if(this.isPopupOpen())switch(i.key){case"ArrowDown":i.preventDefault(),this._windowRef.instance.next(),this._showHint();break;case"ArrowUp":i.preventDefault(),this._windowRef.instance.prev(),this._showHint();break;case"Enter":case"Tab":{let n=this._windowRef.instance.getActive();Ce(n)&&(i.preventDefault(),i.stopPropagation(),this._selectResult(n)),this._closePopup();break}}}_openPopup(){if(!this.isPopupOpen()){this._inputValueBackup=this._nativeElement.value;let{windowRef:i}=this._popupService.open();this._windowRef=i,this._windowRef.setInput("id",this.popupId),this._windowRef.setInput("popupClass",this.popupClass),this._windowRef.instance.selectEvent.subscribe(n=>this._selectResultClosePopup(n)),this._windowRef.instance.activeChangeEvent.subscribe(n=>this.activeDescendant=n),this.container==="body"&&(this._windowRef.location.nativeElement.style.zIndex="1055",this._document.body.appendChild(this._windowRef.location.nativeElement)),this._changeDetector.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._windowRef&&(this._positioning.createPopper({hostElement:this._nativeElement,targetElement:this._windowRef.location.nativeElement,placement:this.placement,updatePopperOptions:n=>this.popperOptions($i([0,2])(n))}),this._afterRenderRef=Ft({mixedReadWrite:()=>{this._positioning.update()}},{injector:this._injector}))}),Li(this._ngZone,this._document,"outside",()=>this.dismissPopup(),this._closed$,[this._nativeElement,this._windowRef.location.nativeElement])}}_closePopup(){this._popupService.close().subscribe(()=>{this._positioning.destroy(),this._afterRenderRef?.destroy(),this._closed$.next(),this._windowRef=null,this.activeDescendant=null})}_selectResult(i){let n=!1;this.selectItem.emit({item:i,preventDefault:()=>{n=!0}}),this._resubscribeTypeahead$.next(null),n||(this.writeValue(i),this._onChange(i))}_selectResultClosePopup(i){this._selectResult(i),this._closePopup()}_showHint(){if(this.showHint&&this._windowRef?.instance.hasActive()&&this._inputValueBackup!=null){let i=this._inputValueBackup.toLowerCase(),n=this._formatItemForInput(this._windowRef.instance.getActive());i===n.substring(0,this._inputValueBackup.length).toLowerCase()?(this._writeInputValue(this._inputValueBackup+n.substring(this._inputValueBackup.length)),this._nativeElement.setSelectionRange.apply(this._nativeElement,[this._inputValueBackup.length,n.length])):this._writeInputValue(n)}}_formatItemForInput(i){return i!=null&&this.inputFormatter?this.inputFormatter(i):vt(i)}_writeInputValue(i){this._nativeElement.value=vt(i)}_subscribeToUserInput(){let i=this._valueChanges$.pipe(it(n=>{this._inputValueBackup=this.showHint?n:null,this._inputValueForSelectOnExact=this.selectOnExact?n:null,this._onChange(this.editable?n:null)}),this.ngbTypeahead?this.ngbTypeahead:()=>et([]));this._subscription=this._resubscribeTypeahead$.pipe(oi(()=>i)).subscribe(n=>{!n||n.length===0?this._closePopup():this.selectOnExact&&n.length===1&&this._formatItemForInput(n[0])===this._inputValueForSelectOnExact?(this._selectResult(n[0]),this._closePopup()):(this._openPopup(),this._windowRef.setInput("focusFirst",this.focusFirst),this._windowRef.setInput("results",n),this._windowRef.setInput("term",this._nativeElement.value),this.resultFormatter&&this._windowRef.setInput("formatter",this.resultFormatter),this.resultTemplate&&this._windowRef.setInput("resultTemplate",this.resultTemplate),this._windowRef.instance.resetActive(),this._windowRef.changeDetectorRef.detectChanges(),this._showHint());let o=n?n.length:0;this._live.say(o===0?"No results available":`${o} result${o===1?"":"s"} available`)})}_unsubscribeFromUserInput(){this._subscription&&this._subscription.unsubscribe(),this._subscription=null}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["input","ngbTypeahead",""]],hostAttrs:["autocapitalize","off","autocorrect","off","role","combobox"],hostVars:7,hostBindings:function(n,o){n&1&&pe("blur",function(){return o.handleBlur()})("keydown",function(a){return o.handleKeyDown(a)}),n&2&&(ee("autocomplete",o.autocomplete),he("aria-autocomplete",o.showHint?"both":"list")("aria-activedescendant",o.activeDescendant)("aria-controls",o.isPopupOpen()?o.popupId:null)("aria-expanded",o.isPopupOpen()),P("open",o.isPopupOpen()))},inputs:{autocomplete:"autocomplete",container:"container",editable:"editable",focusFirst:"focusFirst",inputFormatter:"inputFormatter",ngbTypeahead:"ngbTypeahead",resultFormatter:"resultFormatter",resultTemplate:"resultTemplate",selectOnExact:"selectOnExact",showHint:"showHint",placement:"placement",popperOptions:"popperOptions",popupClass:"popupClass"},outputs:{selectItem:"selectItem"},exportAs:["ngbTypeahead"],features:[vi([{provide:On,useExisting:si(()=>e),multi:!0}]),je]});let t=e;return t})(),yo=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var bo=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),Er=[Kn,Qn,Jn,qn,eo,no,oo,co,bo,uo,ho,po,fo,_o,mo,go,vo,yo],Tu=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({imports:[Er,Kn,Qn,Jn,qn,eo,no,oo,co,bo,uo,ho,po,fo,_o,mo,go,vo,yo]});let t=e;return t})();export{hu as a,Fs as b,pu as c,fu as d,yt as e,Xn as f,_u as g,to as h,wu as i,Ys as j,Ou as k,io as l,Kt as m,rr as n,cr as o,ro as p,ao as q,Du as r,Eu as s,Mu as t,Cu as u,Tu as v};
@@ -1 +1 @@
1
- import{b as pe}from"./chunk-B3LZRDAG.js";import{m as le}from"./chunk-XUH357B7.js";import{f as We,ga as fe,k as he,la as ue,n as X}from"./chunk-R3VPSO5X.js";var d=Object.create(null);d.open="0";d.close="1";d.ping="2";d.pong="3";d.message="4";d.upgrade="5";d.noop="6";var S=Object.create(null);Object.keys(d).forEach(r=>{S[d[r]]=r});var O={type:"error",data:"parser error"};var ye=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ge=typeof ArrayBuffer=="function",_e=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,B=({type:r,data:e},t,s)=>ye&&e instanceof Blob?t?s(e):de(e,s):ge&&(e instanceof ArrayBuffer||_e(e))?t?s(e):de(new Blob([e]),s):s(d[r]+(e||"")),de=(r,e)=>{let t=new FileReader;return t.onload=function(){let s=t.result.split(",")[1];e("b"+(s||""))},t.readAsDataURL(r)};function me(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}var $;function be(r,e){if(ye&&r.data instanceof Blob)return r.data.arrayBuffer().then(me).then(e);if(ge&&(r.data instanceof ArrayBuffer||_e(r.data)))return e(me(r.data));B(r,!1,t=>{$||($=new TextEncoder),e($.encode(t))})}var we="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r<we.length;r++)N[we.charCodeAt(r)]=r;var ke=r=>{let e=r.length*.75,t=r.length,s,i=0,n,o,c,a;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);let m=new ArrayBuffer(e),p=new Uint8Array(m);for(s=0;s<t;s+=4)n=N[r.charCodeAt(s)],o=N[r.charCodeAt(s+1)],c=N[r.charCodeAt(s+2)],a=N[r.charCodeAt(s+3)],p[i++]=n<<2|o>>4,p[i++]=(o&15)<<4|c>>2,p[i++]=(c&3)<<6|a&63;return m};var Ke=typeof ArrayBuffer=="function",L=(r,e)=>{if(typeof r!="string")return{type:"message",data:Ee(r,e)};let t=r.charAt(0);return t==="b"?{type:"message",data:Ye(r.substring(1),e)}:S[t]?r.length>1?{type:S[t],data:r.substring(1)}:{type:S[t]}:O},Ye=(r,e)=>{if(Ke){let t=ke(r);return Ee(t,e)}else return{base64:!0,data:r}},Ee=(r,e)=>{switch(e){case"blob":return r instanceof Blob?r:new Blob([r]);case"arraybuffer":default:return r instanceof ArrayBuffer?r:r.buffer}};var ve="",xe=(r,e)=>{let t=r.length,s=new Array(t),i=0;r.forEach((n,o)=>{B(n,!1,c=>{s[o]=c,++i===t&&e(s.join(ve))})})},Te=(r,e)=>{let t=r.split(ve),s=[];for(let i=0;i<t.length;i++){let n=L(t[i],e);if(s.push(n),n.type==="error")break}return s};function Ae(){return new TransformStream({transform(r,e){be(r,t=>{let s=t.length,i;if(s<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,s);else if(s<65536){i=new Uint8Array(3);let n=new DataView(i.buffer);n.setUint8(0,126),n.setUint16(1,s)}else{i=new Uint8Array(9);let n=new DataView(i.buffer);n.setUint8(0,127),n.setBigUint64(1,BigInt(s))}r.data&&typeof r.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(t)})}})}var Q;function U(r){return r.reduce((e,t)=>e+t.length,0)}function V(r,e){if(r[0].length===e)return r.shift();let t=new Uint8Array(e),s=0;for(let i=0;i<e;i++)t[i]=r[0][s++],s===r[0].length&&(r.shift(),s=0);return r.length&&s<r[0].length&&(r[0]=r[0].slice(s)),t}function Re(r,e){Q||(Q=new TextDecoder);let t=[],s=0,i=-1,n=!1;return new TransformStream({transform(o,c){for(t.push(o);;){if(s===0){if(U(t)<1)break;let a=V(t,1);n=(a[0]&128)===128,i=a[0]&127,i<126?s=3:i===126?s=1:s=2}else if(s===1){if(U(t)<2)break;let a=V(t,2);i=new DataView(a.buffer,a.byteOffset,a.length).getUint16(0),s=3}else if(s===2){if(U(t)<8)break;let a=V(t,8),m=new DataView(a.buffer,a.byteOffset,a.length),p=m.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(O);break}i=p*Math.pow(2,32)+m.getUint32(4),s=3}else{if(U(t)<i)break;let a=V(t,i);c.enqueue(L(n?a:Q.decode(a),e)),s=0}if(i===0||i>r){c.enqueue(O);break}}}})}var j=4;function f(r){if(r)return Je(r)}function Je(r){for(var e in f.prototype)r[e]=f.prototype[e];return r}f.prototype.on=f.prototype.addEventListener=function(r,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(e),this};f.prototype.once=function(r,e){function t(){this.off(r,t),e.apply(this,arguments)}return t.fn=e,this.on(r,t),this};f.prototype.off=f.prototype.removeListener=f.prototype.removeAllListeners=f.prototype.removeEventListener=function(r,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+r];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var s,i=0;i<t.length;i++)if(s=t[i],s===e||s.fn===e){t.splice(i,1);break}return t.length===0&&delete this._callbacks["$"+r],this};f.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+r],s=1;s<arguments.length;s++)e[s-1]=arguments[s];if(t){t=t.slice(0);for(var s=0,i=t.length;s<i;++s)t[s].apply(this,e)}return this};f.prototype.emitReserved=f.prototype.emit;f.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]};f.prototype.hasListeners=function(r){return!!this.listeners(r).length};var y=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),u=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Ce="arraybuffer";function M(r,...e){return e.reduce((t,s)=>(r.hasOwnProperty(s)&&(t[s]=r[s]),t),{})}var ze=u.setTimeout,Xe=u.clearTimeout;function g(r,e){e.useNativeTimers?(r.setTimeoutFn=ze.bind(u),r.clearTimeoutFn=Xe.bind(u)):(r.setTimeoutFn=u.setTimeout.bind(u),r.clearTimeoutFn=u.clearTimeout.bind(u))}var $e=1.33;function Se(r){return typeof r=="string"?Qe(r):Math.ceil((r.byteLength||r.size)*$e)}function Qe(r){let e=0,t=0;for(let s=0,i=r.length;s<i;s++)e=r.charCodeAt(s),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(s++,t+=4);return t}function H(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Oe(r){let e="";for(let t in r)r.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(r[t]));return e}function Be(r){let e={},t=r.split("&");for(let s=0,i=t.length;s<i;s++){let n=t[s].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}var W=class extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}},_=class extends f{constructor(e){super(),this.writable=!1,g(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new W(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let t=L(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let t=Oe(e);return t.length?"?"+t:""}};var P=class extends _{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||t()})),this.writable||(s++,this.once("drain",function(){--s||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let t=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};Te(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,xe(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=H()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}};var Ne=!1;try{Ne=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var Le=Ne;function je(){}var G=class extends P{constructor(e){if(super(e),typeof location<"u"){let t=location.protocol==="https:",s=location.port;s||(s=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){let s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(i,n)=>{this.onError("xhr post error",i,n)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,s)=>{this.onError("xhr poll error",t,s)}),this.pollXhr=e}},K=(()=>{class r extends f{constructor(t,s,i){super(),this.createRequest=t,g(this,i),this._opts=i,this._method=i.method||"GET",this._uri=s,this._data=i.data!==void 0?i.data:null,this._create()}_create(){var t;let s=M(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;let i=this._xhr=this.createRequest(s);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&i.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{i.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var n;i.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(i.getResponseHeader("set-cookie"))),i.readyState===4&&(i.status===200||i.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof i.status=="number"?i.status:0)},0))},i.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=r.requestsCount++,r.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=je,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete r.requests[this._index],this._xhr=null}}_onLoad(){let t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}return r.requestsCount=0,r.requests={},r})();if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Pe);else if(typeof addEventListener=="function"){let r="onpagehide"in u?"pagehide":"unload";addEventListener(r,Pe,!1)}}function Pe(){for(let r in K.requests)K.requests.hasOwnProperty(r)&&K.requests[r].abort()}var Ge=function(){let r=qe({xdomain:!1});return r&&r.responseType!==null}(),w=class extends G{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=Ge&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new K(qe,this.uri(),e)}};function qe(r){let e=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Le))return new XMLHttpRequest}catch{}if(!e)try{return new u[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var De=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",ee=class extends _{get name(){return"websocket"}doOpen(){let e=this.uri(),t=this.opts.protocols,s=De?{}:M(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let s=e[t],i=t===e.length-1;B(s,this.supportsBinary,n=>{try{this.doWrite(s,n)}catch{}i&&y(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=H()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},Z=u.WebSocket||u.MozWebSocket,k=class extends ee{createSocket(e,t,s){return De?new Z(e,t,s):t?new Z(e,t):new Z(e)}doWrite(e,t){this.ws.send(t)}};var v=class extends _{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=Re(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),i=Ae();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();let n=()=>{s.read().then(({done:c,value:a})=>{c||(this.onPacket(a),n())}).catch(c=>{})};n();let o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let s=e[t],i=t===e.length-1;this._writer.write(s).then(()=>{i&&y(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var te={websocket:k,webtransport:v,polling:w};var Ze=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,et=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function x(r){if(r.length>8e3)throw"URI too long";let e=r,t=r.indexOf("["),s=r.indexOf("]");t!=-1&&s!=-1&&(r=r.substring(0,t)+r.substring(t,s).replace(/:/g,";")+r.substring(s,r.length));let i=Ze.exec(r||""),n={},o=14;for(;o--;)n[et[o]]=i[o]||"";return t!=-1&&s!=-1&&(n.source=e,n.host=n.host.substring(1,n.host.length-1).replace(/;/g,":"),n.authority=n.authority.replace("[","").replace("]","").replace(/;/g,":"),n.ipv6uri=!0),n.pathNames=tt(n,n.path),n.queryKey=st(n,n.query),n}function tt(r,e){let t=/\/{2,9}/g,s=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function st(r,e){let t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,i,n){i&&(t[i]=n)}),t}var se=typeof addEventListener=="function"&&typeof removeEventListener=="function",Y=[];se&&addEventListener("offline",()=>{Y.forEach(r=>r())},!1);var J=(()=>{class r extends f{constructor(t,s){if(super(),this.binaryType=Ce,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){let i=x(t);s.hostname=i.host,s.secure=i.protocol==="https"||i.protocol==="wss",s.port=i.port,i.query&&(s.query=i.query)}else s.host&&(s.hostname=x(s.host).host);g(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(i=>{let n=i.prototype.name;this.transports.push(n),this._transportsByName[n]=i}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Be(this.opts.query)),se&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Y.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let s=Object.assign({},this.opts.query);s.EIO=j,s.transport=t,this.id&&(s.sid=this.id);let i=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](i)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let t=this.opts.rememberUpgrade&&r.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",r.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let i=0;i<this.writeBuffer.length;i++){let n=this.writeBuffer[i].data;if(n&&(s+=Se(n)),i>0&&s>this._maxPayload)return this.writeBuffer.slice(0,i);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,y(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,i){return this._sendPacket("message",t,s,i),this}send(t,s,i){return this._sendPacket("message",t,s,i),this}_sendPacket(t,s,i,n){if(typeof s=="function"&&(n=s,s=void 0),typeof i=="function"&&(n=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;let o={type:t,data:s,options:i};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}close(){let t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},i=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}_onError(t){if(r.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),se&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let i=Y.indexOf(this._offlineEventListener);i!==-1&&Y.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}return r.protocol=j,r})(),z=class extends J{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;J.priorWebsocketSuccess=!1;let i=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",b=>{if(!s)if(b.type==="pong"&&b.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;J.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(p(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{let C=new Error("probe error");C.transport=t.name,this.emitReserved("upgradeError",C)}}))};function n(){s||(s=!0,p(),t.close(),t=null)}let o=b=>{let C=new Error("probe error: "+b);C.transport=t.name,n(),this.emitReserved("upgradeError",C)};function c(){o("transport closed")}function a(){o("socket closed")}function m(b){t&&b.name!==t.name&&n()}let p=()=>{t.removeListener("open",i),t.removeListener("error",o),t.removeListener("close",c),this.off("close",a),this.off("upgrading",m)};t.once("open",i),t.once("error",o),t.once("close",c),this.once("close",a),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}},T=class extends z{constructor(e,t={}){let s=typeof e=="object"?e:t;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(i=>te[i]).filter(i=>!!i)),super(e,s)}};var ds=T.protocol;function Fe(r,e="",t){let s=r;t=t||typeof location<"u"&&location,r==null&&(r=t.protocol+"//"+t.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=t.protocol+r:r=t.host+r),/^(https?|wss?):\/\//.test(r)||(typeof t<"u"?r=t.protocol+"//"+r:r="https://"+r),s=x(r)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";let n=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+n+":"+s.port+e,s.href=s.protocol+"://"+n+(t&&t.port===s.port?"":":"+s.port),s}var ae={};We(ae,{Decoder:()=>oe,Encoder:()=>ne,PacketType:()=>h,protocol:()=>He});var it=typeof ArrayBuffer=="function",nt=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,Ie=Object.prototype.toString,ot=typeof Blob=="function"||typeof Blob<"u"&&Ie.call(Blob)==="[object BlobConstructor]",ct=typeof File=="function"||typeof File<"u"&&Ie.call(File)==="[object FileConstructor]";function D(r){return it&&(r instanceof ArrayBuffer||nt(r))||ot&&r instanceof Blob||ct&&r instanceof File}function q(r,e){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let t=0,s=r.length;t<s;t++)if(q(r[t]))return!0;return!1}if(D(r))return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return q(r.toJSON(),!0);for(let t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&q(r[t]))return!0;return!1}function Ue(r){let e=[],t=r.data,s=r;return s.data=re(t,e),s.attachments=e.length,{packet:s,buffers:e}}function re(r,e){if(!r)return r;if(D(r)){let t={_placeholder:!0,num:e.length};return e.push(r),t}else if(Array.isArray(r)){let t=new Array(r.length);for(let s=0;s<r.length;s++)t[s]=re(r[s],e);return t}else if(typeof r=="object"&&!(r instanceof Date)){let t={};for(let s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=re(r[s],e));return t}return r}function Ve(r,e){return r.data=ie(r.data,e),delete r.attachments,r}function ie(r,e){if(!r)return r;if(r&&r._placeholder===!0){if(typeof r.num=="number"&&r.num>=0&&r.num<e.length)return e[r.num];throw new Error("illegal attachments")}else if(Array.isArray(r))for(let t=0;t<r.length;t++)r[t]=ie(r[t],e);else if(typeof r=="object")for(let t in r)Object.prototype.hasOwnProperty.call(r,t)&&(r[t]=ie(r[t],e));return r}var at=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],He=5,h=function(r){return r[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK",r}(h||{}),ne=class{constructor(e){this.replacer=e}encode(e){return(e.type===h.EVENT||e.type===h.ACK)&&q(e)?this.encodeAsBinary({type:e.type===h.EVENT?h.BINARY_EVENT:h.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===h.BINARY_EVENT||e.type===h.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=Ue(e),s=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(s),i}};function Me(r){return Object.prototype.toString.call(r)==="[object Object]"}var oe=class r extends f{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);let s=t.type===h.BINARY_EVENT;s||t.type===h.BINARY_ACK?(t.type=s?h.EVENT:h.ACK,this.reconstructor=new ce(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(D(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0,s={type:Number(e.charAt(0))};if(h[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===h.BINARY_EVENT||s.type===h.BINARY_ACK){let n=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);let o=e.substring(n,t);if(o!=Number(o)||e.charAt(t)!=="-")throw new Error("Illegal attachments");s.attachments=Number(o)}if(e.charAt(t+1)==="/"){let n=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););s.nsp=e.substring(n,t)}else s.nsp="/";let i=e.charAt(t+1);if(i!==""&&Number(i)==i){let n=t+1;for(;++t;){let o=e.charAt(t);if(o==null||Number(o)!=o){--t;break}if(t===e.length)break}s.id=Number(e.substring(n,t+1))}if(e.charAt(++t)){let n=this.tryParse(e.substr(t));if(r.isPayloadValid(s.type,n))s.data=n;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case h.CONNECT:return Me(t);case h.DISCONNECT:return t===void 0;case h.CONNECT_ERROR:return typeof t=="string"||Me(t);case h.EVENT:case h.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&at.indexOf(t[0])===-1);case h.ACK:case h.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},ce=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let t=Ve(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function l(r,e,t){return r.on(e,t),function(){r.off(e,t)}}var ht=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),A=class extends f{constructor(e,t,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[l(e,"open",this.onopen.bind(this)),l(e,"packet",this.onpacket.bind(this)),l(e,"error",this.onerror.bind(this)),l(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var s,i,n;if(ht.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let o={type:h.EVENT,data:t};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){let p=this.ids++,b=t.pop();this._registerAckCallback(p,b),o.id=p}let c=(i=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||i===void 0?void 0:i.writable,a=this.connected&&!(!((n=this.io.engine)===null||n===void 0)&&n._hasPingExpired());return this.flags.volatile&&!c||(a?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(e,t){var s;let i=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(i===void 0){this.acks[e]=t;return}let n=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===e&&this.sendBuffer.splice(c,1);t.call(this,new Error("operation has timed out"))},i),o=(...c)=>{this.io.clearTimeoutFn(n),t.apply(this,c)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise((s,i)=>{let n=(o,c)=>o?i(o):s(c);n.withError=!0,t.push(n),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());let s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...n)=>s!==this._queue[0]?void 0:(i!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(i)):(this._queue.shift(),t&&t(null,...n)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:h.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(s=>String(s.id)===e)){let s=this.acks[e];delete this.acks[e],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case h.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case h.EVENT:case h.BINARY_EVENT:this.onevent(e);break;case h.ACK:case h.BINARY_ACK:this.onack(e);break;case h.DISCONNECT:this.ondisconnect();break;case h.CONNECT_ERROR:this.destroy();let s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let s of t)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,s=!1;return function(...i){s||(s=!0,t.packet({type:h.ACK,id:e,data:i}))}}onack(e){let t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:h.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let s of t)s.apply(this,e.data)}}};function E(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}E.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*r);r=(Math.floor(e*10)&1)==0?r-t:r+t}return Math.min(r,this.max)|0};E.prototype.reset=function(){this.attempts=0};E.prototype.setMin=function(r){this.ms=r};E.prototype.setMax=function(r){this.max=r};E.prototype.setJitter=function(r){this.jitter=r};var R=class extends f{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,g(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((s=t.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new E({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;let i=t.parser||ae;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new T(this.uri,this.opts);let t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;let i=l(t,"open",function(){s.onopen(),e&&e()}),n=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),e?e(c):this.maybeReconnectOnOpen()},o=l(t,"error",n);if(this._timeout!==!1){let c=this._timeout,a=this.setTimeoutFn(()=>{i(),n(new Error("timeout")),t.close()},c);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}return this.subs.push(i),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(l(e,"ping",this.onping.bind(this)),l(e,"data",this.ondata.bind(this)),l(e,"error",this.onerror.bind(this)),l(e,"close",this.onclose.bind(this)),l(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){y(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new A(this,e,t),this.nsps[e]=s),s}_destroy(e){let t=Object.keys(this.nsps);for(let s of t)if(this.nsps[s].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var F={};function I(r,e){typeof r=="object"&&(e=r,r=void 0),e=e||{};let t=Fe(r,e.path||"/socket.io"),s=t.source,i=t.id,n=t.path,o=F[i]&&n in F[i].nsps,c=e.forceNew||e["force new connection"]||e.multiplex===!1||o,a;return c?a=new R(s,e):(F[i]||(F[i]=new R(s,e)),a=F[i]),t.query&&!e.query&&(e.query=t.queryKey),a.socket(t.path,e)}Object.assign(I,{Manager:R,Socket:A,io:I,connect:I});var cr=(()=>{class r{$auth=ue(pe);namespaceConnectionCache={};constructor(){}connectToNamespace(t){if(this.namespaceConnectionCache[t]){let s=this.namespaceConnectionCache[t];return s.connected=new X,setTimeout(()=>{s.socket.connected&&s.connected.next(void 0)}),s.socket.on("connect",()=>{s.connected.next(void 0)}),s.end=()=>{s.socket.emit("end"),s.socket.removeAllListeners(),s.connected.complete()},this.namespaceConnectionCache[t]}else{let s=this.establishConnectionToNamespace(t);return s.connected=new X,s.socket.on("connect",()=>{s.connected.next(void 0)}),s.end=()=>{s.socket.emit("end"),s.socket.removeAllListeners(),s.connected.complete()},this.namespaceConnectionCache[t]=s,s}}getExistingNamespace(t){return this.namespaceConnectionCache[t]}establishConnectionToNamespace(t){let s=I(`${le.api.socket}/${t}`,{query:{token:this.$auth.token}});return{socket:s,request:(n,o)=>new he(c=>{s.emit(n,o,a=>{typeof a=="object"&&a.error?c.error(a):c.next(a),c.complete()})})}}static \u0275fac=function(s){return new(s||r)};static \u0275prov=fe({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{cr as a};
1
+ import{b as pe}from"./chunk-S42WFQ2L.js";import{m as le}from"./chunk-DVQU3KHF.js";import{f as We,ga as fe,k as he,la as ue,n as X}from"./chunk-ULJPS3WS.js";var d=Object.create(null);d.open="0";d.close="1";d.ping="2";d.pong="3";d.message="4";d.upgrade="5";d.noop="6";var S=Object.create(null);Object.keys(d).forEach(r=>{S[d[r]]=r});var O={type:"error",data:"parser error"};var ye=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ge=typeof ArrayBuffer=="function",_e=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,B=({type:r,data:e},t,s)=>ye&&e instanceof Blob?t?s(e):de(e,s):ge&&(e instanceof ArrayBuffer||_e(e))?t?s(e):de(new Blob([e]),s):s(d[r]+(e||"")),de=(r,e)=>{let t=new FileReader;return t.onload=function(){let s=t.result.split(",")[1];e("b"+(s||""))},t.readAsDataURL(r)};function me(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}var $;function be(r,e){if(ye&&r.data instanceof Blob)return r.data.arrayBuffer().then(me).then(e);if(ge&&(r.data instanceof ArrayBuffer||_e(r.data)))return e(me(r.data));B(r,!1,t=>{$||($=new TextEncoder),e($.encode(t))})}var we="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r<we.length;r++)N[we.charCodeAt(r)]=r;var ke=r=>{let e=r.length*.75,t=r.length,s,i=0,n,o,c,a;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);let m=new ArrayBuffer(e),p=new Uint8Array(m);for(s=0;s<t;s+=4)n=N[r.charCodeAt(s)],o=N[r.charCodeAt(s+1)],c=N[r.charCodeAt(s+2)],a=N[r.charCodeAt(s+3)],p[i++]=n<<2|o>>4,p[i++]=(o&15)<<4|c>>2,p[i++]=(c&3)<<6|a&63;return m};var Ke=typeof ArrayBuffer=="function",L=(r,e)=>{if(typeof r!="string")return{type:"message",data:Ee(r,e)};let t=r.charAt(0);return t==="b"?{type:"message",data:Ye(r.substring(1),e)}:S[t]?r.length>1?{type:S[t],data:r.substring(1)}:{type:S[t]}:O},Ye=(r,e)=>{if(Ke){let t=ke(r);return Ee(t,e)}else return{base64:!0,data:r}},Ee=(r,e)=>{switch(e){case"blob":return r instanceof Blob?r:new Blob([r]);case"arraybuffer":default:return r instanceof ArrayBuffer?r:r.buffer}};var ve="",xe=(r,e)=>{let t=r.length,s=new Array(t),i=0;r.forEach((n,o)=>{B(n,!1,c=>{s[o]=c,++i===t&&e(s.join(ve))})})},Te=(r,e)=>{let t=r.split(ve),s=[];for(let i=0;i<t.length;i++){let n=L(t[i],e);if(s.push(n),n.type==="error")break}return s};function Ae(){return new TransformStream({transform(r,e){be(r,t=>{let s=t.length,i;if(s<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,s);else if(s<65536){i=new Uint8Array(3);let n=new DataView(i.buffer);n.setUint8(0,126),n.setUint16(1,s)}else{i=new Uint8Array(9);let n=new DataView(i.buffer);n.setUint8(0,127),n.setBigUint64(1,BigInt(s))}r.data&&typeof r.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(t)})}})}var Q;function U(r){return r.reduce((e,t)=>e+t.length,0)}function V(r,e){if(r[0].length===e)return r.shift();let t=new Uint8Array(e),s=0;for(let i=0;i<e;i++)t[i]=r[0][s++],s===r[0].length&&(r.shift(),s=0);return r.length&&s<r[0].length&&(r[0]=r[0].slice(s)),t}function Re(r,e){Q||(Q=new TextDecoder);let t=[],s=0,i=-1,n=!1;return new TransformStream({transform(o,c){for(t.push(o);;){if(s===0){if(U(t)<1)break;let a=V(t,1);n=(a[0]&128)===128,i=a[0]&127,i<126?s=3:i===126?s=1:s=2}else if(s===1){if(U(t)<2)break;let a=V(t,2);i=new DataView(a.buffer,a.byteOffset,a.length).getUint16(0),s=3}else if(s===2){if(U(t)<8)break;let a=V(t,8),m=new DataView(a.buffer,a.byteOffset,a.length),p=m.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(O);break}i=p*Math.pow(2,32)+m.getUint32(4),s=3}else{if(U(t)<i)break;let a=V(t,i);c.enqueue(L(n?a:Q.decode(a),e)),s=0}if(i===0||i>r){c.enqueue(O);break}}}})}var j=4;function f(r){if(r)return Je(r)}function Je(r){for(var e in f.prototype)r[e]=f.prototype[e];return r}f.prototype.on=f.prototype.addEventListener=function(r,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(e),this};f.prototype.once=function(r,e){function t(){this.off(r,t),e.apply(this,arguments)}return t.fn=e,this.on(r,t),this};f.prototype.off=f.prototype.removeListener=f.prototype.removeAllListeners=f.prototype.removeEventListener=function(r,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+r];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var s,i=0;i<t.length;i++)if(s=t[i],s===e||s.fn===e){t.splice(i,1);break}return t.length===0&&delete this._callbacks["$"+r],this};f.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+r],s=1;s<arguments.length;s++)e[s-1]=arguments[s];if(t){t=t.slice(0);for(var s=0,i=t.length;s<i;++s)t[s].apply(this,e)}return this};f.prototype.emitReserved=f.prototype.emit;f.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]};f.prototype.hasListeners=function(r){return!!this.listeners(r).length};var y=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),u=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Ce="arraybuffer";function M(r,...e){return e.reduce((t,s)=>(r.hasOwnProperty(s)&&(t[s]=r[s]),t),{})}var ze=u.setTimeout,Xe=u.clearTimeout;function g(r,e){e.useNativeTimers?(r.setTimeoutFn=ze.bind(u),r.clearTimeoutFn=Xe.bind(u)):(r.setTimeoutFn=u.setTimeout.bind(u),r.clearTimeoutFn=u.clearTimeout.bind(u))}var $e=1.33;function Se(r){return typeof r=="string"?Qe(r):Math.ceil((r.byteLength||r.size)*$e)}function Qe(r){let e=0,t=0;for(let s=0,i=r.length;s<i;s++)e=r.charCodeAt(s),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(s++,t+=4);return t}function H(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Oe(r){let e="";for(let t in r)r.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(r[t]));return e}function Be(r){let e={},t=r.split("&");for(let s=0,i=t.length;s<i;s++){let n=t[s].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}var W=class extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}},_=class extends f{constructor(e){super(),this.writable=!1,g(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new W(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let t=L(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let t=Oe(e);return t.length?"?"+t:""}};var P=class extends _{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||t()})),this.writable||(s++,this.once("drain",function(){--s||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let t=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};Te(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,xe(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=H()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}};var Ne=!1;try{Ne=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var Le=Ne;function je(){}var G=class extends P{constructor(e){if(super(e),typeof location<"u"){let t=location.protocol==="https:",s=location.port;s||(s=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){let s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(i,n)=>{this.onError("xhr post error",i,n)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,s)=>{this.onError("xhr poll error",t,s)}),this.pollXhr=e}},K=(()=>{class r extends f{constructor(t,s,i){super(),this.createRequest=t,g(this,i),this._opts=i,this._method=i.method||"GET",this._uri=s,this._data=i.data!==void 0?i.data:null,this._create()}_create(){var t;let s=M(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;let i=this._xhr=this.createRequest(s);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&i.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{i.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var n;i.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(i.getResponseHeader("set-cookie"))),i.readyState===4&&(i.status===200||i.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof i.status=="number"?i.status:0)},0))},i.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=r.requestsCount++,r.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=je,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete r.requests[this._index],this._xhr=null}}_onLoad(){let t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}return r.requestsCount=0,r.requests={},r})();if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Pe);else if(typeof addEventListener=="function"){let r="onpagehide"in u?"pagehide":"unload";addEventListener(r,Pe,!1)}}function Pe(){for(let r in K.requests)K.requests.hasOwnProperty(r)&&K.requests[r].abort()}var Ge=function(){let r=qe({xdomain:!1});return r&&r.responseType!==null}(),w=class extends G{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=Ge&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new K(qe,this.uri(),e)}};function qe(r){let e=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Le))return new XMLHttpRequest}catch{}if(!e)try{return new u[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var De=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",ee=class extends _{get name(){return"websocket"}doOpen(){let e=this.uri(),t=this.opts.protocols,s=De?{}:M(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let s=e[t],i=t===e.length-1;B(s,this.supportsBinary,n=>{try{this.doWrite(s,n)}catch{}i&&y(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=H()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},Z=u.WebSocket||u.MozWebSocket,k=class extends ee{createSocket(e,t,s){return De?new Z(e,t,s):t?new Z(e,t):new Z(e)}doWrite(e,t){this.ws.send(t)}};var v=class extends _{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=Re(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),i=Ae();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();let n=()=>{s.read().then(({done:c,value:a})=>{c||(this.onPacket(a),n())}).catch(c=>{})};n();let o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let s=e[t],i=t===e.length-1;this._writer.write(s).then(()=>{i&&y(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var te={websocket:k,webtransport:v,polling:w};var Ze=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,et=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function x(r){if(r.length>8e3)throw"URI too long";let e=r,t=r.indexOf("["),s=r.indexOf("]");t!=-1&&s!=-1&&(r=r.substring(0,t)+r.substring(t,s).replace(/:/g,";")+r.substring(s,r.length));let i=Ze.exec(r||""),n={},o=14;for(;o--;)n[et[o]]=i[o]||"";return t!=-1&&s!=-1&&(n.source=e,n.host=n.host.substring(1,n.host.length-1).replace(/;/g,":"),n.authority=n.authority.replace("[","").replace("]","").replace(/;/g,":"),n.ipv6uri=!0),n.pathNames=tt(n,n.path),n.queryKey=st(n,n.query),n}function tt(r,e){let t=/\/{2,9}/g,s=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function st(r,e){let t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,i,n){i&&(t[i]=n)}),t}var se=typeof addEventListener=="function"&&typeof removeEventListener=="function",Y=[];se&&addEventListener("offline",()=>{Y.forEach(r=>r())},!1);var J=(()=>{class r extends f{constructor(t,s){if(super(),this.binaryType=Ce,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){let i=x(t);s.hostname=i.host,s.secure=i.protocol==="https"||i.protocol==="wss",s.port=i.port,i.query&&(s.query=i.query)}else s.host&&(s.hostname=x(s.host).host);g(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(i=>{let n=i.prototype.name;this.transports.push(n),this._transportsByName[n]=i}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Be(this.opts.query)),se&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Y.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let s=Object.assign({},this.opts.query);s.EIO=j,s.transport=t,this.id&&(s.sid=this.id);let i=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](i)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let t=this.opts.rememberUpgrade&&r.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",r.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let i=0;i<this.writeBuffer.length;i++){let n=this.writeBuffer[i].data;if(n&&(s+=Se(n)),i>0&&s>this._maxPayload)return this.writeBuffer.slice(0,i);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,y(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,i){return this._sendPacket("message",t,s,i),this}send(t,s,i){return this._sendPacket("message",t,s,i),this}_sendPacket(t,s,i,n){if(typeof s=="function"&&(n=s,s=void 0),typeof i=="function"&&(n=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;let o={type:t,data:s,options:i};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}close(){let t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},i=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}_onError(t){if(r.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),se&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let i=Y.indexOf(this._offlineEventListener);i!==-1&&Y.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}return r.protocol=j,r})(),z=class extends J{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;J.priorWebsocketSuccess=!1;let i=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",b=>{if(!s)if(b.type==="pong"&&b.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;J.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(p(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{let C=new Error("probe error");C.transport=t.name,this.emitReserved("upgradeError",C)}}))};function n(){s||(s=!0,p(),t.close(),t=null)}let o=b=>{let C=new Error("probe error: "+b);C.transport=t.name,n(),this.emitReserved("upgradeError",C)};function c(){o("transport closed")}function a(){o("socket closed")}function m(b){t&&b.name!==t.name&&n()}let p=()=>{t.removeListener("open",i),t.removeListener("error",o),t.removeListener("close",c),this.off("close",a),this.off("upgrading",m)};t.once("open",i),t.once("error",o),t.once("close",c),this.once("close",a),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}},T=class extends z{constructor(e,t={}){let s=typeof e=="object"?e:t;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(i=>te[i]).filter(i=>!!i)),super(e,s)}};var ds=T.protocol;function Fe(r,e="",t){let s=r;t=t||typeof location<"u"&&location,r==null&&(r=t.protocol+"//"+t.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=t.protocol+r:r=t.host+r),/^(https?|wss?):\/\//.test(r)||(typeof t<"u"?r=t.protocol+"//"+r:r="https://"+r),s=x(r)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";let n=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+n+":"+s.port+e,s.href=s.protocol+"://"+n+(t&&t.port===s.port?"":":"+s.port),s}var ae={};We(ae,{Decoder:()=>oe,Encoder:()=>ne,PacketType:()=>h,protocol:()=>He});var it=typeof ArrayBuffer=="function",nt=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,Ie=Object.prototype.toString,ot=typeof Blob=="function"||typeof Blob<"u"&&Ie.call(Blob)==="[object BlobConstructor]",ct=typeof File=="function"||typeof File<"u"&&Ie.call(File)==="[object FileConstructor]";function D(r){return it&&(r instanceof ArrayBuffer||nt(r))||ot&&r instanceof Blob||ct&&r instanceof File}function q(r,e){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let t=0,s=r.length;t<s;t++)if(q(r[t]))return!0;return!1}if(D(r))return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return q(r.toJSON(),!0);for(let t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&q(r[t]))return!0;return!1}function Ue(r){let e=[],t=r.data,s=r;return s.data=re(t,e),s.attachments=e.length,{packet:s,buffers:e}}function re(r,e){if(!r)return r;if(D(r)){let t={_placeholder:!0,num:e.length};return e.push(r),t}else if(Array.isArray(r)){let t=new Array(r.length);for(let s=0;s<r.length;s++)t[s]=re(r[s],e);return t}else if(typeof r=="object"&&!(r instanceof Date)){let t={};for(let s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=re(r[s],e));return t}return r}function Ve(r,e){return r.data=ie(r.data,e),delete r.attachments,r}function ie(r,e){if(!r)return r;if(r&&r._placeholder===!0){if(typeof r.num=="number"&&r.num>=0&&r.num<e.length)return e[r.num];throw new Error("illegal attachments")}else if(Array.isArray(r))for(let t=0;t<r.length;t++)r[t]=ie(r[t],e);else if(typeof r=="object")for(let t in r)Object.prototype.hasOwnProperty.call(r,t)&&(r[t]=ie(r[t],e));return r}var at=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],He=5,h=function(r){return r[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK",r}(h||{}),ne=class{constructor(e){this.replacer=e}encode(e){return(e.type===h.EVENT||e.type===h.ACK)&&q(e)?this.encodeAsBinary({type:e.type===h.EVENT?h.BINARY_EVENT:h.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===h.BINARY_EVENT||e.type===h.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=Ue(e),s=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(s),i}};function Me(r){return Object.prototype.toString.call(r)==="[object Object]"}var oe=class r extends f{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);let s=t.type===h.BINARY_EVENT;s||t.type===h.BINARY_ACK?(t.type=s?h.EVENT:h.ACK,this.reconstructor=new ce(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(D(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0,s={type:Number(e.charAt(0))};if(h[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===h.BINARY_EVENT||s.type===h.BINARY_ACK){let n=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);let o=e.substring(n,t);if(o!=Number(o)||e.charAt(t)!=="-")throw new Error("Illegal attachments");s.attachments=Number(o)}if(e.charAt(t+1)==="/"){let n=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););s.nsp=e.substring(n,t)}else s.nsp="/";let i=e.charAt(t+1);if(i!==""&&Number(i)==i){let n=t+1;for(;++t;){let o=e.charAt(t);if(o==null||Number(o)!=o){--t;break}if(t===e.length)break}s.id=Number(e.substring(n,t+1))}if(e.charAt(++t)){let n=this.tryParse(e.substr(t));if(r.isPayloadValid(s.type,n))s.data=n;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case h.CONNECT:return Me(t);case h.DISCONNECT:return t===void 0;case h.CONNECT_ERROR:return typeof t=="string"||Me(t);case h.EVENT:case h.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&at.indexOf(t[0])===-1);case h.ACK:case h.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},ce=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let t=Ve(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function l(r,e,t){return r.on(e,t),function(){r.off(e,t)}}var ht=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),A=class extends f{constructor(e,t,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[l(e,"open",this.onopen.bind(this)),l(e,"packet",this.onpacket.bind(this)),l(e,"error",this.onerror.bind(this)),l(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var s,i,n;if(ht.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let o={type:h.EVENT,data:t};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){let p=this.ids++,b=t.pop();this._registerAckCallback(p,b),o.id=p}let c=(i=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||i===void 0?void 0:i.writable,a=this.connected&&!(!((n=this.io.engine)===null||n===void 0)&&n._hasPingExpired());return this.flags.volatile&&!c||(a?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(e,t){var s;let i=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(i===void 0){this.acks[e]=t;return}let n=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===e&&this.sendBuffer.splice(c,1);t.call(this,new Error("operation has timed out"))},i),o=(...c)=>{this.io.clearTimeoutFn(n),t.apply(this,c)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise((s,i)=>{let n=(o,c)=>o?i(o):s(c);n.withError=!0,t.push(n),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());let s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...n)=>s!==this._queue[0]?void 0:(i!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(i)):(this._queue.shift(),t&&t(null,...n)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:h.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(s=>String(s.id)===e)){let s=this.acks[e];delete this.acks[e],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case h.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case h.EVENT:case h.BINARY_EVENT:this.onevent(e);break;case h.ACK:case h.BINARY_ACK:this.onack(e);break;case h.DISCONNECT:this.ondisconnect();break;case h.CONNECT_ERROR:this.destroy();let s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let s of t)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,s=!1;return function(...i){s||(s=!0,t.packet({type:h.ACK,id:e,data:i}))}}onack(e){let t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:h.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let s of t)s.apply(this,e.data)}}};function E(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}E.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*r);r=(Math.floor(e*10)&1)==0?r-t:r+t}return Math.min(r,this.max)|0};E.prototype.reset=function(){this.attempts=0};E.prototype.setMin=function(r){this.ms=r};E.prototype.setMax=function(r){this.max=r};E.prototype.setJitter=function(r){this.jitter=r};var R=class extends f{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,g(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((s=t.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new E({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;let i=t.parser||ae;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new T(this.uri,this.opts);let t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;let i=l(t,"open",function(){s.onopen(),e&&e()}),n=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),e?e(c):this.maybeReconnectOnOpen()},o=l(t,"error",n);if(this._timeout!==!1){let c=this._timeout,a=this.setTimeoutFn(()=>{i(),n(new Error("timeout")),t.close()},c);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}return this.subs.push(i),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(l(e,"ping",this.onping.bind(this)),l(e,"data",this.ondata.bind(this)),l(e,"error",this.onerror.bind(this)),l(e,"close",this.onclose.bind(this)),l(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){y(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new A(this,e,t),this.nsps[e]=s),s}_destroy(e){let t=Object.keys(this.nsps);for(let s of t)if(this.nsps[s].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var F={};function I(r,e){typeof r=="object"&&(e=r,r=void 0),e=e||{};let t=Fe(r,e.path||"/socket.io"),s=t.source,i=t.id,n=t.path,o=F[i]&&n in F[i].nsps,c=e.forceNew||e["force new connection"]||e.multiplex===!1||o,a;return c?a=new R(s,e):(F[i]||(F[i]=new R(s,e)),a=F[i]),t.query&&!e.query&&(e.query=t.queryKey),a.socket(t.path,e)}Object.assign(I,{Manager:R,Socket:A,io:I,connect:I});var cr=(()=>{class r{$auth=ue(pe);namespaceConnectionCache={};connectToNamespace(t){if(this.namespaceConnectionCache[t]){let s=this.namespaceConnectionCache[t];return s.connected=new X,setTimeout(()=>{s.socket.connected&&s.connected.next(void 0)}),s.socket.on("connect",()=>{s.connected.next(void 0)}),s.end=()=>{s.socket.emit("end"),s.socket.removeAllListeners(),s.connected.complete()},this.namespaceConnectionCache[t]}else{let s=this.establishConnectionToNamespace(t);return s.connected=new X,s.socket.on("connect",()=>{s.connected.next(void 0)}),s.end=()=>{s.socket.emit("end"),s.socket.removeAllListeners(),s.connected.complete()},this.namespaceConnectionCache[t]=s,s}}getExistingNamespace(t){return this.namespaceConnectionCache[t]}establishConnectionToNamespace(t){let s=I(`${le.api.socket}/${t}`,{query:{token:this.$auth.token}});return{socket:s,request:(n,o)=>new he(c=>{s.emit(n,o,a=>{typeof a=="object"&&a.error?c.error(a):c.next(a),c.complete()})})}}static \u0275fac=function(s){return new(s||r)};static \u0275prov=fe({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{cr as a};
@@ -0,0 +1 @@
1
+ import{m as k}from"./chunk-C3HWKB2Q.js";import{b as I}from"./chunk-R3563DDE.js";import{$b as B,Ac as b,Hb as p,Hc as d,Ib as M,Ic as c,Jb as x,Sb as n,Tb as o,Ub as l,Xa as _,ab as t,cc as s,dc as y,la as v,mb as E,pc as f,qc as m,rc as g,sc as u}from"./chunk-ULJPS3WS.js";function L(i,T){if(i&1&&l(0,"i",13),i&2){let r=y();f(b("fas fa-fw ",r.faIconClass," mb-3"))}}var $=(()=>{class i{$activeModal=v(k);title;message;confirmButtonLabel;confirmButtonClass;faIconClass;dismissModal(){this.$activeModal.dismiss("Dismiss")}closeModal(){this.$activeModal.close()}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=E({type:i,selectors:[["ng-component"]],inputs:{title:"title",message:"message",confirmButtonLabel:"confirmButtonLabel",confirmButtonClass:"confirmButtonClass",faIconClass:"faIconClass"},decls:19,vars:16,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center"],[2,"font-size","75px",3,"class"],[1,"mb-0","text-center",3,"innerHTML"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",3,"click"],[2,"font-size","75px"]],template:function(a,e){a&1&&(n(0,"div",0)(1,"div",1)(2,"h5",2),m(3),o(),n(4,"button",3),d(5,"translate"),s("click",function(){return e.dismissModal()}),o()(),n(6,"div",4),M(7,L,1,3,"i",5),l(8,"p",6),o(),n(9,"div",7)(10,"div",8)(11,"button",9),d(12,"translate"),s("click",function(){return e.dismissModal()}),m(13),d(14,"translate"),o()(),l(15,"div",10),n(16,"div",11)(17,"button",12),s("click",function(){return e.closeModal()}),m(18),o()()()()),a&2&&(t(3),g(e.title),t(),p("aria-label",c(5,10,"form.button_close")),t(3),x(e.faIconClass?7:-1),t(),B("innerHTML",e.message,_),t(3),p("aria-label",c(12,12,"form.button_close")),t(2),u(" ",c(14,14,"form.button_close")," "),t(4),f(b("btn ",e.confirmButtonClass||"btn-primary")),t(),u(" ",e.confirmButtonLabel," "))},dependencies:[I],encapsulation:2})}return i})();export{$ as a};
@@ -0,0 +1,4 @@
1
+ import{a as P}from"./chunk-HUAADM2I.js";import{a as O}from"./chunk-THGDS273.js";import{c as y,e as E,l as k,z as $}from"./chunk-WFYBML4S.js";import{b as D}from"./chunk-GEIS2BWE.js";import{b as L}from"./chunk-W4PQWIYG.js";import{k as I,n as H}from"./chunk-DVQU3KHF.js";import{a as T}from"./chunk-R3563DDE.js";import"./chunk-Q4CZ7LVK.js";import{Ib as m,Jb as u,Ob as f,Pb as d,Qb as s,Rb as w,_b as g,ab as p,bc as _,dc as a,h as S,la as r,mb as x,qc as v,ra as l,sa as c,w as C,xc as b,yc as M,zc as V}from"./chunk-ULJPS3WS.js";function z(i,h){i&1&&w(0,"i",6)}function A(i,h){i&1&&w(0,"i",7)}function F(i,h){if(i&1){let t=g();d(0,"ngx-monaco-editor",10),_("onInit",function(e){l(t);let o=a();return c(o.onEditorInit(e))})("keydown.control.s",function(e){l(t);let o=a();return e.preventDefault(),c(o.onSave())})("keydown.meta.s",function(e){l(t);let o=a();return e.preventDefault(),c(o.onSave())}),s()}if(i&2){let t=a();f("options",t.editorOptions)("model",t.monacoEditorModel)}}function W(i,h){if(i&1){let t=g();d(0,"textarea",11),V("ngModelChange",function(e){l(t);let o=a();return M(o.startupScript,e)||(o.startupScript=e),c(e)}),v(1," "),s()}if(i&2){let t=a();b("ngModel",t.startupScript)}}var tt=(()=>{class i{$api=r(H);$md=r(O);$route=r(D);$settings=r(L);$toastr=r(I);$translate=r(T);lastHeight;visualViewPortEventCallback;startupScript;saveInProgress;isMobile=!1;options={printMargin:!1};monacoEditor;editorOptions;monacoEditorModel;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"shell",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light",automaticLayout:!0},this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(t=>{this.startupScript=t.startupScript.script}),this.monacoEditorModel={value:"",language:"shell"}}onEditorInit(t){this.monacoEditor=t,this.monacoEditor.getModel().setValue(this.startupScript)}onSave(){return S(this,null,function*(){if(!this.saveInProgress){if(this.saveInProgress=!0,this.isMobile||(yield this.monacoEditor.getAction("editor.action.formatDocument").run(),this.startupScript=this.monacoEditor.getModel().getValue()),!["#!/bin/sh","#!/bin/bash"].includes(this.startupScript.split(`
2
+ `)[0].trim())){this.$toastr.error(this.$translate.instant("platform.docker.must_use_hashbang"),this.$translate.instant("toast.title_error")),this.startupScript=`#!/bin/sh
3
+
4
+ ${this.startupScript}`,this.isMobile||this.monacoEditor.getModel().setValue(this.startupScript),this.saveInProgress=!1;return}try{yield C(this.$api.put("/platform-tools/docker/startup-script",{script:this.startupScript})),this.$toastr.success(this.$translate.instant("platform.docker.restart_required"),this.$translate.instant("platform.docker.script_saved"))}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}ngOnDestroy(){window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.enableTouchMove()),this.monacoEditor&&this.monacoEditor.dispose()}visualViewPortChanged(){this.lastHeight<window.visualViewport.height&&document.activeElement.blur(),window.visualViewport.height<window.innerHeight?(this.$md.enableTouchMove(),this.lastHeight=window.visualViewport.height):window.visualViewport.height===window.innerHeight&&(this.$md.disableTouchMove(),this.lastHeight=window.visualViewport.height)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=x({type:i,selectors:[["ng-component"]],decls:11,vars:4,consts:[[1,"flex-column","d-flex","align-items-stretch","h-100"],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0","font-monospace"],[1,"col-6","text-end"],[1,"btn","btn-primary","waves-effect","m-0",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"fas","fa-fw","fa-floppy-disk"],[1,"flex-grow-1","h-100","w-100","my-2",3,"options","model"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-2",3,"ngModel"],[1,"flex-grow-1","h-100","w-100","my-2",3,"onInit","keydown.control.s","keydown.meta.s","options","model"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-2",3,"ngModelChange","ngModel"]],template:function(n,e){n&1&&(d(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),v(4,"startup.sh"),s()(),d(5,"div",4)(6,"button",5),_("click",function(){return e.onSave()}),m(7,z,1,0,"i",6)(8,A,1,0,"i",7),s()()(),m(9,F,1,2,"ngx-monaco-editor",8),m(10,W,2,1,"textarea",9),s()),n&2&&(p(6),f("disabled",e.saveInProgress),p(),u(e.saveInProgress?7:8),p(2),u(e.isMobile?-1:9),p(),u(e.isMobile?10:-1))},dependencies:[P,$,y,E,k],encapsulation:2})}return i})();export{tt as StartupScriptComponent};
@@ -1 +1 @@
1
- import{ga as o,n as e}from"./chunk-R3VPSO5X.js";var n=new e,f=(()=>{class t{readyEvent;constructor(){this.readyEvent=n}static \u0275fac=function(r){return new(r||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function d(){n.next(void 0)}export{f as a,d as b};
1
+ import{ga as o,n as e}from"./chunk-ULJPS3WS.js";var n=new e,f=(()=>{class t{readyEvent;constructor(){this.readyEvent=n}static \u0275fac=function(r){return new(r||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function d(){n.next(void 0)}export{f as a,d as b};
@@ -0,0 +1 @@
1
+ import{d as f,g as s}from"./chunk-GEIS2BWE.js";import{k as u,n as d}from"./chunk-DVQU3KHF.js";import{a as l}from"./chunk-R3563DDE.js";import"./chunk-Q4CZ7LVK.js";import{ga as m,h as p,ha as i,la as e,nb as a,w as c}from"./chunk-ULJPS3WS.js";var n=(()=>{class t{$api=e(d);$router=e(f);$toastr=e(u);$translate=e(l);resolve(){return p(this,null,function*(){try{return yield c(this.$api.get("/platform-tools/docker/startup-script"))}catch(r){console.error(r),this.$toastr.error(r.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(o){return new(o||t)};static \u0275prov=m({token:t,factory:t.\u0275fac})}return t})();var S=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"startup-script",loadComponent:()=>import("./chunk-CR7NFTHI.js").then(t=>t.StartupScriptComponent),resolve:{startupScript:n}},{path:"restart-container",loadComponent:()=>import("./chunk-UJNEXGXC.js").then(t=>t.ContainerRestartComponent)}],v=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({imports:[s.forChild(S),s]})}return t})();var T=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({providers:[n],imports:[v]})}return t})();export{T as DockerModule};
@@ -0,0 +1 @@
1
+ import{g as i}from"./chunk-GEIS2BWE.js";import"./chunk-Q4CZ7LVK.js";import{ha as o,nb as r}from"./chunk-ULJPS3WS.js";var m=[{path:"",loadComponent:()=>import("./chunk-3UCLNJIE.js").then(t=>t.SupportComponent)}],n=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[i.forChild(m),i]})}return t})();var s=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[n]})}return t})();export{s as SupportModule};