marketplacepos 5.41.2 → 5.41.4

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 (218) hide show
  1. package/Marketplace/3rdpartylicenses.txt +123 -123
  2. package/Marketplace/chunk-2BBMPSAE.js +93 -0
  3. package/Marketplace/chunk-3CZJUTLZ.js +1 -0
  4. package/Marketplace/chunk-4ASUM4N5.js +1 -0
  5. package/Marketplace/chunk-4G3QN54S.js +193 -0
  6. package/Marketplace/chunk-4S4G5UPJ.js +1 -0
  7. package/Marketplace/{chunk-4DV4IT7R.js → chunk-5FEQZAWX.js} +1 -1
  8. package/Marketplace/{chunk-UMY6NG57.js → chunk-5GX2GLRY.js} +1 -1
  9. package/Marketplace/{chunk-25OT4I3W.js → chunk-5MRT2EFE.js} +1 -1
  10. package/Marketplace/chunk-62PFQNHJ.js +1 -0
  11. package/Marketplace/chunk-6ALHX2I4.js +1 -0
  12. package/Marketplace/{chunk-SYENQYR7.js → chunk-6IAGGRZN.js} +1 -1
  13. package/Marketplace/{chunk-FWG4H3QG.js → chunk-6NNAICJE.js} +1 -1
  14. package/Marketplace/{chunk-WGXUKTYP.js → chunk-6XFYITUD.js} +1 -1
  15. package/Marketplace/chunk-742J5UZZ.js +1 -0
  16. package/Marketplace/{chunk-4CTORK4F.js → chunk-7477X7LJ.js} +1 -1
  17. package/Marketplace/{chunk-R76V3PTN.js → chunk-75BDXSG3.js} +10 -10
  18. package/Marketplace/{chunk-ACIMXBIC.js → chunk-77IUCPIQ.js} +1 -1
  19. package/Marketplace/{chunk-ZR5IXNXB.js → chunk-7FUVW73P.js} +1 -1
  20. package/Marketplace/chunk-7G53KEUW.js +1 -0
  21. package/Marketplace/chunk-7GQIIDFF.js +4 -0
  22. package/Marketplace/chunk-7P3SGW2P.js +1 -0
  23. package/Marketplace/{chunk-PO7JVKK3.js → chunk-7TWBIV3T.js} +1 -1
  24. package/Marketplace/chunk-AIIRPK4M.js +1 -0
  25. package/Marketplace/chunk-B54QGLED.js +2 -0
  26. package/Marketplace/chunk-BG6DO7RW.js +5 -0
  27. package/Marketplace/{chunk-4M63ID5T.js → chunk-BUFEIJAI.js} +1 -1
  28. package/Marketplace/{chunk-SIYMMMKQ.js → chunk-CH2MLZU7.js} +1 -1
  29. package/Marketplace/{chunk-KX5AWR75.js → chunk-COBHWPGI.js} +1 -1
  30. package/Marketplace/chunk-D54NUPYF.js +153 -0
  31. package/Marketplace/chunk-DPLEMBB4.js +1 -0
  32. package/Marketplace/{chunk-R5TTZPDX.js → chunk-DVE7IIN7.js} +11 -11
  33. package/Marketplace/{chunk-PBGDP6XV.js → chunk-E3HHEPKQ.js} +1 -1
  34. package/Marketplace/chunk-E3HMIPER.js +2 -0
  35. package/Marketplace/{chunk-KQQCKHF3.js → chunk-E6HA2AGS.js} +1 -1
  36. package/Marketplace/{chunk-JOBWFOGC.js → chunk-EGTYAIU5.js} +1 -1
  37. package/Marketplace/chunk-EYNCNJ3I.js +1 -0
  38. package/Marketplace/chunk-FX6CFPPN.js +1 -0
  39. package/Marketplace/chunk-G5CQLP7H.js +1 -0
  40. package/Marketplace/{chunk-OKAPL3YZ.js → chunk-G6EG5QJS.js} +1 -1
  41. package/Marketplace/{chunk-IKPRRD5D.js → chunk-GBABJLPQ.js} +1 -1
  42. package/Marketplace/{chunk-MCJRJUAO.js → chunk-GCJBQRHI.js} +1 -1
  43. package/Marketplace/{chunk-ZIOAOUAM.js → chunk-GHQH62TZ.js} +1 -1
  44. package/Marketplace/chunk-GPEVUTDI.js +2 -0
  45. package/Marketplace/chunk-HMB7FZD7.js +1 -0
  46. package/Marketplace/chunk-HNYOBOEW.js +4 -0
  47. package/Marketplace/chunk-HUMGZRJQ.js +1 -0
  48. package/Marketplace/{chunk-GPC4DECX.js → chunk-ICSMRW7O.js} +1 -1
  49. package/Marketplace/chunk-IIJMZKPL.js +1 -0
  50. package/Marketplace/{chunk-6X2OBNJQ.js → chunk-ITTRZMEX.js} +4 -4
  51. package/Marketplace/{chunk-A2YNWIX6.js → chunk-IYYVZ6B6.js} +1 -1
  52. package/Marketplace/{chunk-XQGRC7V2.js → chunk-J3P46Z53.js} +1 -1
  53. package/Marketplace/{chunk-LHD7CYML.js → chunk-J7AGLBPL.js} +1 -1
  54. package/Marketplace/{chunk-NRCXYGO3.js → chunk-JBKHY4HH.js} +5 -5
  55. package/Marketplace/chunk-JTZJTXCN.js +1 -0
  56. package/Marketplace/chunk-K2H6WANG.js +1 -0
  57. package/Marketplace/chunk-K3FQGMAY.js +1 -0
  58. package/Marketplace/chunk-KC2DJUBC.js +1 -0
  59. package/Marketplace/{chunk-HPYTL6TX.js → chunk-KHWTOD6H.js} +1 -1
  60. package/Marketplace/chunk-KOJ2R5XW.js +1 -0
  61. package/Marketplace/chunk-KVP6OL4J.js +2 -0
  62. package/Marketplace/{chunk-2TZBEYNY.js → chunk-KXZCGKQW.js} +1 -1
  63. package/Marketplace/chunk-L4JWBBBC.js +1 -0
  64. package/Marketplace/chunk-LEMNVA5V.js +3 -0
  65. package/Marketplace/chunk-LFJIZAV2.js +15 -0
  66. package/Marketplace/chunk-LJTMOYLO.js +1 -0
  67. package/Marketplace/chunk-LPXBSHUI.js +180 -0
  68. package/Marketplace/{chunk-LSXUXG54.js → chunk-M3SJUKTG.js} +1 -1
  69. package/Marketplace/chunk-MATSRG2L.js +447 -0
  70. package/Marketplace/{chunk-XEMNZHW6.js → chunk-MNFHFW3E.js} +1 -1
  71. package/Marketplace/chunk-O5SSMLCS.js +1 -0
  72. package/Marketplace/{chunk-YPVYJUXS.js → chunk-OAS72QB2.js} +1 -1
  73. package/Marketplace/chunk-OAVAVDIP.js +1 -0
  74. package/Marketplace/{chunk-TNKPTRB3.js → chunk-OE2JYQHN.js} +1 -1
  75. package/Marketplace/{chunk-6MPSYC77.js → chunk-OLSC6KHB.js} +1 -1
  76. package/Marketplace/{chunk-JRWFZQ5K.js → chunk-PPDHTO44.js} +1 -1
  77. package/Marketplace/chunk-PQ6Z7K5L.js +1 -0
  78. package/Marketplace/chunk-PXB4YEY3.js +1 -0
  79. package/Marketplace/chunk-PZTMYAA7.js +1 -0
  80. package/Marketplace/{chunk-M5IQRAHV.js → chunk-Q2OEJFVT.js} +1 -1
  81. package/Marketplace/{chunk-6LH7FSOW.js → chunk-Q72ZXPDP.js} +1 -1
  82. package/Marketplace/{chunk-SXLKJLAE.js → chunk-QCZIDOKW.js} +1 -1
  83. package/Marketplace/chunk-QJFAPDI7.js +1 -0
  84. package/Marketplace/chunk-REYGC4GG.js +1 -0
  85. package/Marketplace/{chunk-FBZW4Y3J.js → chunk-RGR34QZ3.js} +1 -1
  86. package/Marketplace/{chunk-MQXPOHBV.js → chunk-RIHLYYZU.js} +1 -1
  87. package/Marketplace/{chunk-55OI2SUF.js → chunk-RVYGL22E.js} +1 -1
  88. package/Marketplace/chunk-S7LCZRSD.js +1 -0
  89. package/Marketplace/chunk-SL4ID42P.js +1 -0
  90. package/Marketplace/chunk-SZ6MQ6EW.js +1 -0
  91. package/Marketplace/chunk-T5ONJF63.js +7 -0
  92. package/Marketplace/chunk-T6QOFDEE.js +1 -0
  93. package/Marketplace/{chunk-HFKKITEW.js → chunk-TMFFA26Y.js} +1 -1
  94. package/Marketplace/chunk-TXPNZLOJ.js +5 -0
  95. package/Marketplace/chunk-TZXF4K2V.js +1 -0
  96. package/Marketplace/{chunk-GHBGGQNM.js → chunk-UBMI3NQH.js} +1 -1
  97. package/Marketplace/chunk-UUUVVJG4.js +2 -0
  98. package/Marketplace/{chunk-5XI7HWS5.js → chunk-V2OJQHE3.js} +2 -2
  99. package/Marketplace/{chunk-TGMCGROM.js → chunk-V5WYSCVT.js} +1 -1
  100. package/Marketplace/chunk-VDSO2BHA.js +1 -0
  101. package/Marketplace/chunk-VETHPEVU.js +1 -0
  102. package/Marketplace/{chunk-SH7KN2AS.js → chunk-VGXQU74M.js} +1 -1
  103. package/Marketplace/chunk-VSEWXNVC.js +291 -0
  104. package/Marketplace/{chunk-OZ77CAJD.js → chunk-WAW37FIG.js} +1 -1
  105. package/Marketplace/chunk-XFCMKJV6.js +1 -0
  106. package/Marketplace/chunk-XM6GN4VF.js +1 -0
  107. package/Marketplace/chunk-Y7VC2AGS.js +1 -0
  108. package/Marketplace/chunk-YIUQQGOQ.js +1 -0
  109. package/Marketplace/chunk-YPM6IC2W.js +1 -0
  110. package/Marketplace/{chunk-UPYS4A4M.js → chunk-YXFTLQ5M.js} +1 -1
  111. package/Marketplace/chunk-Z46DDENN.js +1 -0
  112. package/Marketplace/{chunk-E2CS7ZMC.js → chunk-ZD5LURJS.js} +1 -1
  113. package/Marketplace/{chunk-WHZ44BAL.js → chunk-ZZVNB72Q.js} +1 -1
  114. package/Marketplace/index.html +3 -3
  115. package/Marketplace/main-5HHAD6NX.js +1 -0
  116. package/Marketplace/{styles-X3FXEB7T.css → styles-NJFTKO3E.css} +1 -1
  117. package/package.json +1 -1
  118. package/Marketplace/chunk-2BUABOHG.js +0 -1
  119. package/Marketplace/chunk-2SXRC4IG.js +0 -1
  120. package/Marketplace/chunk-2ZTDLZVZ.js +0 -1
  121. package/Marketplace/chunk-33IXC6UG.js +0 -1
  122. package/Marketplace/chunk-4HZR3O3W.js +0 -1
  123. package/Marketplace/chunk-4JG3ZRYP.js +0 -5
  124. package/Marketplace/chunk-4PZ5Q3HI.js +0 -1
  125. package/Marketplace/chunk-4YOHPIVG.js +0 -1
  126. package/Marketplace/chunk-5B4KSPFM.js +0 -1
  127. package/Marketplace/chunk-5DIRXS7I.js +0 -1
  128. package/Marketplace/chunk-5EQNOCXP.js +0 -1
  129. package/Marketplace/chunk-5JYR3YJW.js +0 -1
  130. package/Marketplace/chunk-5QAURMZF.js +0 -222
  131. package/Marketplace/chunk-5ZX2OVBB.js +0 -1
  132. package/Marketplace/chunk-66YHNWRR.js +0 -1
  133. package/Marketplace/chunk-6IFZ2TO6.js +0 -1
  134. package/Marketplace/chunk-6RSAOZUV.js +0 -1
  135. package/Marketplace/chunk-6SBCWEJJ.js +0 -1
  136. package/Marketplace/chunk-6UEHSA6E.js +0 -1
  137. package/Marketplace/chunk-7H5ILTTK.js +0 -1
  138. package/Marketplace/chunk-A4F37V57.js +0 -1
  139. package/Marketplace/chunk-AGRVVEIR.js +0 -397
  140. package/Marketplace/chunk-ALKC77XL.js +0 -78
  141. package/Marketplace/chunk-AVEGIEYT.js +0 -193
  142. package/Marketplace/chunk-BBVWQJ7M.js +0 -1
  143. package/Marketplace/chunk-BM4KX73T.js +0 -1
  144. package/Marketplace/chunk-BQTUAYGY.js +0 -1
  145. package/Marketplace/chunk-C7QA2BEN.js +0 -3
  146. package/Marketplace/chunk-CEQA4PTY.js +0 -1
  147. package/Marketplace/chunk-CMZW5QAE.js +0 -1
  148. package/Marketplace/chunk-CSSG7NAJ.js +0 -1
  149. package/Marketplace/chunk-DG32XLYI.js +0 -1
  150. package/Marketplace/chunk-DJILLV4M.js +0 -1
  151. package/Marketplace/chunk-DS4AAABV.js +0 -1
  152. package/Marketplace/chunk-EL2JACEW.js +0 -1
  153. package/Marketplace/chunk-EU2KAMEK.js +0 -1
  154. package/Marketplace/chunk-EVLYO3HX.js +0 -1
  155. package/Marketplace/chunk-F4GMWHYJ.js +0 -33
  156. package/Marketplace/chunk-FFAZ3Q3F.js +0 -1
  157. package/Marketplace/chunk-FUWROOE4.js +0 -265
  158. package/Marketplace/chunk-GCECFUOP.js +0 -1
  159. package/Marketplace/chunk-GOS4RIF2.js +0 -1
  160. package/Marketplace/chunk-GZXQUJKX.js +0 -1
  161. package/Marketplace/chunk-H4PA2O6O.js +0 -1
  162. package/Marketplace/chunk-H6WIS2HR.js +0 -2
  163. package/Marketplace/chunk-HPGFBOM4.js +0 -1
  164. package/Marketplace/chunk-HTQJCQ32.js +0 -1
  165. package/Marketplace/chunk-IARG7PLL.js +0 -1
  166. package/Marketplace/chunk-IIMHYIRJ.js +0 -1
  167. package/Marketplace/chunk-JS55A2RS.js +0 -7
  168. package/Marketplace/chunk-JV4MMNGD.js +0 -79
  169. package/Marketplace/chunk-K6YEZYU4.js +0 -5
  170. package/Marketplace/chunk-KJHSB4A2.js +0 -1
  171. package/Marketplace/chunk-KOKHDU4I.js +0 -1
  172. package/Marketplace/chunk-KTIKLSOU.js +0 -1
  173. package/Marketplace/chunk-KTXS7IPU.js +0 -1
  174. package/Marketplace/chunk-KWQS4KX7.js +0 -1
  175. package/Marketplace/chunk-KXS76PRS.js +0 -70
  176. package/Marketplace/chunk-KYIY3VQ6.js +0 -141
  177. package/Marketplace/chunk-LOPJ3O56.js +0 -1
  178. package/Marketplace/chunk-LR4UZ2OS.js +0 -30
  179. package/Marketplace/chunk-LWSRD5LF.js +0 -1
  180. package/Marketplace/chunk-MGVYUYPC.js +0 -15
  181. package/Marketplace/chunk-MP43HA4R.js +0 -1
  182. package/Marketplace/chunk-MTUIRWOB.js +0 -2
  183. package/Marketplace/chunk-MZI5AYCE.js +0 -1
  184. package/Marketplace/chunk-NTW6FBP5.js +0 -1
  185. package/Marketplace/chunk-NZA4BEER.js +0 -102
  186. package/Marketplace/chunk-O55KM5KY.js +0 -1
  187. package/Marketplace/chunk-OZ7LWNOK.js +0 -15
  188. package/Marketplace/chunk-P5FCWMYK.js +0 -1
  189. package/Marketplace/chunk-PE5AFID4.js +0 -1
  190. package/Marketplace/chunk-PEA6KVUS.js +0 -252
  191. package/Marketplace/chunk-PW42BQIY.js +0 -1
  192. package/Marketplace/chunk-Q6V3IOGL.js +0 -1
  193. package/Marketplace/chunk-REL734JM.js +0 -1
  194. package/Marketplace/chunk-RHRJXX4W.js +0 -1
  195. package/Marketplace/chunk-S3YMF63V.js +0 -1
  196. package/Marketplace/chunk-SD7M7HOB.js +0 -1
  197. package/Marketplace/chunk-SLQA5QBT.js +0 -1
  198. package/Marketplace/chunk-SRJREA2O.js +0 -5
  199. package/Marketplace/chunk-T4K3CJ2R.js +0 -1
  200. package/Marketplace/chunk-TQ4ZLZ7C.js +0 -1
  201. package/Marketplace/chunk-TQIIWFRF.js +0 -1
  202. package/Marketplace/chunk-UDQBFSOV.js +0 -1
  203. package/Marketplace/chunk-UF4FKEE7.js +0 -93
  204. package/Marketplace/chunk-UJYSVGLV.js +0 -1
  205. package/Marketplace/chunk-UYW53K3I.js +0 -1
  206. package/Marketplace/chunk-VRI3CYGG.js +0 -1
  207. package/Marketplace/chunk-WTAJSWM2.js +0 -4
  208. package/Marketplace/chunk-WX5S3HCU.js +0 -1
  209. package/Marketplace/chunk-XGYBJAFE.js +0 -1
  210. package/Marketplace/chunk-YP2IPJ2O.js +0 -1
  211. package/Marketplace/chunk-Z3ITXK3D.js +0 -1
  212. package/Marketplace/chunk-Z3KD73SP.js +0 -2
  213. package/Marketplace/chunk-ZAVDOMSW.js +0 -1
  214. package/Marketplace/chunk-ZGZ74AJR.js +0 -1
  215. package/Marketplace/chunk-ZIUDNFYT.js +0 -1
  216. package/Marketplace/chunk-ZLNGASME.js +0 -1
  217. package/Marketplace/chunk-ZNDU44GH.js +0 -51
  218. package/Marketplace/main-SPNULRF2.js +0 -1
@@ -0,0 +1,193 @@
1
+ import{a as lt,n as Bt}from"./chunk-GPEVUTDI.js";import{Ca as It,Eb as Mt,Fb as Ft,Gb as kt,Qa as F,Sb as Ht,Va as xt,f as H,ja as A,ka as Lt,ma as wt,od as Ut,pa as x,qd as mt,sa as Nt,sb as Pt,tc as $t,uc as Wt,wb as Dt}from"./chunk-T5ONJF63.js";import{a as I}from"./chunk-K2H6WANG.js";function Ae(t,n){return t?t.classList?t.classList.contains(n):new RegExp("(^| )"+n+"( |$)","gi").test(t.className):!1}function Re(t,n){if(t&&n){let e=i=>{Ae(t,i)||(t.classList?t.classList.add(i):t.className+=" "+i)};[n].flat().filter(Boolean).forEach(i=>i.split(" ").forEach(e))}}function Le(){return window.innerWidth-document.documentElement.offsetWidth}function $(t){for(let n of document?.styleSheets)try{for(let e of n?.cssRules)for(let i of e?.style)if(t.test(i))return{name:i,value:e.style.getPropertyValue(i).trim()}}catch{}return null}function si(t="p-overflow-hidden"){let n=$(/-scrollbar-width$/);n?.name&&document.body.style.setProperty(n.name,Le()+"px"),Re(document.body,t)}function we(t,n){if(t&&n){let e=i=>{t.classList?t.classList.remove(i):t.className=t.className.replace(new RegExp("(^|\\b)"+i.split(" ").join("|")+"(\\b|$)","gi")," ")};[n].flat().filter(Boolean).forEach(i=>i.split(" ").forEach(e))}}function oi(t="p-overflow-hidden"){let n=$(/-scrollbar-width$/);n?.name&&document.body.style.removeProperty(n.name),we(document.body,t)}function Vt(t){let n={width:0,height:0};return t&&(t.style.visibility="hidden",t.style.display="block",n.width=t.offsetWidth,n.height=t.offsetHeight,t.style.display="none",t.style.visibility="visible"),n}function Gt(){let t=window,n=document,e=n.documentElement,i=n.getElementsByTagName("body")[0],r=t.innerWidth||e.clientWidth||i.clientWidth,s=t.innerHeight||e.clientHeight||i.clientHeight;return{width:r,height:s}}function Ne(){let t=document.documentElement;return(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}function Ie(){let t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}function ai(t,n,e=!0){var i,r,s,o;if(t){let c=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:Vt(t),l=c.height,a=c.width,p=n.offsetHeight,d=n.offsetWidth,u=n.getBoundingClientRect(),f=Ie(),m=Ne(),y=Gt(),E,T,v="top";u.top+p+l>y.height?(E=u.top+f-l,v="bottom",E<0&&(E=f)):E=p+u.top+f,u.left+a>y.width?T=Math.max(0,u.left+m+d-a):T=u.left+m,t.style.top=E+"px",t.style.left=T+"px",t.style.transformOrigin=v,e&&(t.style.marginTop=v==="bottom"?`calc(${(r=(i=$(/-anchor-gutter$/))==null?void 0:i.value)!=null?r:"2px"} * -1)`:(o=(s=$(/-anchor-gutter$/))==null?void 0:s.value)!=null?o:"")}}function ci(t,n){t&&(typeof n=="string"?t.style.cssText=n:Object.entries(n||{}).forEach(([e,i])=>t.style[e]=i))}function li(t,n){if(t instanceof HTMLElement){let e=t.offsetWidth;if(n){let i=getComputedStyle(t);e+=parseFloat(i.marginLeft)+parseFloat(i.marginRight)}return e}return 0}function pi(t,n,e=!0){var i,r,s,o;if(t){let c=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:Vt(t),l=n.offsetHeight,a=n.getBoundingClientRect(),p=Gt(),d,u,f="top";a.top+l+c.height>p.height?(d=-1*c.height,f="bottom",a.top+d<0&&(d=-1*a.top)):d=l,c.width>p.width?u=a.left*-1:a.left+c.width>p.width?u=(a.left+c.width-p.width)*-1:u=0,t.style.top=d+"px",t.style.left=u+"px",t.style.transformOrigin=f,e&&(t.style.marginTop=f==="bottom"?`calc(${(r=(i=$(/-anchor-gutter$/))==null?void 0:i.value)!=null?r:"2px"} * -1)`:(o=(s=$(/-anchor-gutter$/))==null?void 0:s.value)!=null?o:"")}}function K(t){return typeof HTMLElement=="object"?t instanceof HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string"}function gt(t){let n=t;return t&&typeof t=="object"&&(t.hasOwnProperty("current")?n=t.current:t.hasOwnProperty("el")&&(t.el.hasOwnProperty("nativeElement")?n=t.el.nativeElement:n=t.el)),K(n)?n:void 0}function ui(t,n){let e=gt(t);if(e)e.appendChild(n);else throw new Error("Cannot append "+n+" to "+t)}function yt(t,n={}){if(K(t)){let e=(i,r)=>{var s,o;let c=(s=t?.$attrs)!=null&&s[i]?[(o=t?.$attrs)==null?void 0:o[i]]:[];return[r].flat().reduce((l,a)=>{if(a!=null){let p=typeof a;if(p==="string"||p==="number")l.push(a);else if(p==="object"){let d=Array.isArray(a)?e(i,a):Object.entries(a).map(([u,f])=>i==="style"&&(f||f===0)?`${u.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${f}`:f?u:void 0);l=d.length?l.concat(d.filter(u=>!!u)):l}}return l},c)};Object.entries(n).forEach(([i,r])=>{if(r!=null){let s=i.match(/^on(.+)/);s?t.addEventListener(s[1].toLowerCase(),r):i==="p-bind"||i==="pBind"?yt(t,r):(r=i==="class"?[...new Set(e("class",r))].join(" ").trim():i==="style"?e("style",r).join(";").trim():r,(t.$attrs=t.$attrs||{})&&(t.$attrs[i]=r),t.setAttribute(i,r))}})}}function di(t,n){if(t){t.style.opacity="0";let e=+new Date,i="0",r=function(){i=`${+t.style.opacity+(new Date().getTime()-e)/n}`,t.style.opacity=i,e=+new Date,+i<1&&(window.requestAnimationFrame&&requestAnimationFrame(r)||setTimeout(r,16))};r()}}function xe(t,n){return K(t)?Array.from(t.querySelectorAll(n)):[]}function fi(t,n){return K(t)?t.matches(n)?t:t.querySelector(n):null}function hi(t,n){t&&document.activeElement!==t&&t.focus(n)}function Kt(t,n=""){let e=xe(t,`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n},
2
+ [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n},
3
+ input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n},
4
+ select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n},
5
+ textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n},
6
+ [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n},
7
+ [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}`),i=[];for(let r of e)getComputedStyle(r).display!="none"&&getComputedStyle(r).visibility!="hidden"&&i.push(r);return i}function mi(t,n){let e=Kt(t,n);return e.length>0?e[0]:null}function gi(t){if(t){let n=t.offsetHeight,e=getComputedStyle(t);return n-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)+parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),n}return 0}function jt(t){if(t){let n=t.parentNode;return n&&n instanceof ShadowRoot&&n.host&&(n=n.host),n}return null}function yi(t){var n;if(t){let e=(n=jt(t))==null?void 0:n.childNodes,i=0;if(e)for(let r=0;r<e.length;r++){if(e[r]===t)return i;e[r].nodeType===1&&i++}}return-1}function Si(t,n){let e=Kt(t,n);return e.length>0?e[e.length-1]:null}function Ei(t){if(t){let n=t.getBoundingClientRect();return{top:n.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:n.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}}function Pe(t,n){if(t){let e=t.offsetHeight;if(n){let i=getComputedStyle(t);e+=parseFloat(i.marginTop)+parseFloat(i.marginBottom)}return e}return 0}function _i(){if(window.getSelection)return window.getSelection().toString();if(document.getSelection)return document.getSelection().toString()}function De(t){return!!(t!==null&&typeof t<"u"&&t.nodeName&&jt(t))}function bi(t,n){var e;if(t)switch(t){case"document":return document;case"window":return window;case"body":return document.body;case"@next":return n?.nextElementSibling;case"@prev":return n?.previousElementSibling;case"@parent":return n?.parentElement;case"@grandparent":return(e=n?.parentElement)==null?void 0:e.parentElement;default:if(typeof t=="string")return document.querySelector(t);let r=gt((s=>!!(s&&s.constructor&&s.call&&s.apply))(t)?t():t);return r?.nodeType===9||De(r)?r:void 0}}function Ti(t){if(t){let n=t.offsetWidth,e=getComputedStyle(t);return n-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth),n}return 0}function vi(t){return!!(t&&t.offsetParent!=null)}function Oi(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function Ci(t){var n;t&&("remove"in Element.prototype?t.remove():(n=t.parentNode)==null||n.removeChild(t))}function Ai(t,n){let e=gt(t);if(e)e.removeChild(n);else throw new Error("Cannot remove "+n+" from "+t)}function Ri(t,n){let e=getComputedStyle(t).getPropertyValue("borderTopWidth"),i=e?parseFloat(e):0,r=getComputedStyle(t).getPropertyValue("paddingTop"),s=r?parseFloat(r):0,o=t.getBoundingClientRect(),l=n.getBoundingClientRect().top+document.body.scrollTop-(o.top+document.body.scrollTop)-i-s,a=t.scrollTop,p=t.clientHeight,d=Pe(n);l<0?t.scrollTop=a+l:l+d>p&&(t.scrollTop=a+l-p+d)}function Li(t,n="",e){K(t)&&e!==null&&e!==void 0&&t.setAttribute(n,e)}function Yt(){let t=new Map;return{on(n,e){let i=t.get(n);return i?i.push(e):i=[e],t.set(n,i),this},off(n,e){let i=t.get(n);return i&&i.splice(i.indexOf(e)>>>0,1),this},emit(n,e){let i=t.get(n);i&&i.slice().map(r=>{r(e)})},clear(){t.clear()}}}var Me=Object.defineProperty,zt=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,qt=(t,n,e)=>n in t?Me(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,He=(t,n)=>{for(var e in n||(n={}))Fe.call(n,e)&&qt(t,e,n[e]);if(zt)for(var e of zt(n))ke.call(n,e)&&qt(t,e,n[e]);return t};function j(t){return t==null||t===""||Array.isArray(t)&&t.length===0||!(t instanceof Date)&&typeof t=="object"&&Object.keys(t).length===0}function St(t,n,e=new WeakSet){if(t===n)return!0;if(!t||!n||typeof t!="object"||typeof n!="object"||e.has(t)||e.has(n))return!1;e.add(t).add(n);let i=Array.isArray(t),r=Array.isArray(n),s,o,c;if(i&&r){if(o=t.length,o!=n.length)return!1;for(s=o;s--!==0;)if(!St(t[s],n[s],e))return!1;return!0}if(i!=r)return!1;let l=t instanceof Date,a=n instanceof Date;if(l!=a)return!1;if(l&&a)return t.getTime()==n.getTime();let p=t instanceof RegExp,d=n instanceof RegExp;if(p!=d)return!1;if(p&&d)return t.toString()==n.toString();let u=Object.keys(t);if(o=u.length,o!==Object.keys(n).length)return!1;for(s=o;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,u[s]))return!1;for(s=o;s--!==0;)if(c=u[s],!St(t[c],n[c],e))return!1;return!0}function $e(t,n){return St(t,n)}function Qt(t){return!!(t&&t.constructor&&t.call&&t.apply)}function h(t){return!j(t)}function pt(t,n){if(!t||!n)return null;try{let e=t[n];if(h(e))return e}catch{}if(Object.keys(t).length){if(Qt(n))return n(t);if(n.indexOf(".")===-1)return t[n];{let e=n.split("."),i=t;for(let r=0,s=e.length;r<s;++r){if(i==null)return null;i=i[e[r]]}return i}}return null}function Et(t,n,e){return e?pt(t,e)===pt(n,e):$e(t,n)}function xi(t,n){if(t!=null&&n&&n.length){for(let e of n)if(Et(t,e))return!0}return!1}function Pi(t,n){let e=-1;if(h(t))try{e=t.findLastIndex(n)}catch{e=t.lastIndexOf([...t].reverse().find(n))}return e}function R(t,n=!0){return t instanceof Object&&t.constructor===Object&&(n||Object.keys(t).length!==0)}function O(t,...n){return Qt(t)?t(...n):t}function D(t,n=!0){return typeof t=="string"&&(n||t!=="")}function Zt(t){return D(t)?t.replace(/(-|_)/g,"").toLowerCase():t}function Jt(t,n="",e={}){let i=Zt(n).split("."),r=i.shift();return r?R(t)?Jt(O(t[Object.keys(t).find(s=>Zt(s)===r)||""],e),i.join("."),e):void 0:O(t,e)}function ut(t,n=!0){return Array.isArray(t)&&(n||t.length!==0)}function Di(t){return t instanceof Date&&t.constructor===Date}function Xt(t){return h(t)&&!isNaN(t)}function Mi(t=""){return h(t)&&t.length===1&&!!t.match(/\S| /)}function _(t,n){if(n){let e=n.test(t);return n.lastIndex=0,e}return!1}function Y(...t){let n=(e={},i={})=>{let r=He({},e);return Object.keys(i).forEach(s=>{R(i[s])&&s in e&&R(e[s])?r[s]=n(e[s],i[s]):r[s]=i[s]}),r};return t.reduce((e,i,r)=>r===0?i:n(e,i),{})}function k(t){return t&&t.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,"").replace(/ {2,}/g," ").replace(/ ([{:}]) /g,"$1").replace(/([;,]) /g,"$1").replace(/ !/g,"!").replace(/: /g,":")}function b(t){if(t&&/[\xC0-\xFF\u0100-\u017E]/.test(t)){let e={A:/[\xC0-\xC5\u0100\u0102\u0104]/g,AE:/[\xC6]/g,C:/[\xC7\u0106\u0108\u010A\u010C]/g,D:/[\xD0\u010E\u0110]/g,E:/[\xC8-\xCB\u0112\u0114\u0116\u0118\u011A]/g,G:/[\u011C\u011E\u0120\u0122]/g,H:/[\u0124\u0126]/g,I:/[\xCC-\xCF\u0128\u012A\u012C\u012E\u0130]/g,IJ:/[\u0132]/g,J:/[\u0134]/g,K:/[\u0136]/g,L:/[\u0139\u013B\u013D\u013F\u0141]/g,N:/[\xD1\u0143\u0145\u0147\u014A]/g,O:/[\xD2-\xD6\xD8\u014C\u014E\u0150]/g,OE:/[\u0152]/g,R:/[\u0154\u0156\u0158]/g,S:/[\u015A\u015C\u015E\u0160]/g,T:/[\u0162\u0164\u0166]/g,U:/[\xD9-\xDC\u0168\u016A\u016C\u016E\u0170\u0172]/g,W:/[\u0174]/g,Y:/[\xDD\u0176\u0178]/g,Z:/[\u0179\u017B\u017D]/g,a:/[\xE0-\xE5\u0101\u0103\u0105]/g,ae:/[\xE6]/g,c:/[\xE7\u0107\u0109\u010B\u010D]/g,d:/[\u010F\u0111]/g,e:/[\xE8-\xEB\u0113\u0115\u0117\u0119\u011B]/g,g:/[\u011D\u011F\u0121\u0123]/g,i:/[\xEC-\xEF\u0129\u012B\u012D\u012F\u0131]/g,ij:/[\u0133]/g,j:/[\u0135]/g,k:/[\u0137,\u0138]/g,l:/[\u013A\u013C\u013E\u0140\u0142]/g,n:/[\xF1\u0144\u0146\u0148\u014B]/g,p:/[\xFE]/g,o:/[\xF2-\xF6\xF8\u014D\u014F\u0151]/g,oe:/[\u0153]/g,r:/[\u0155\u0157\u0159]/g,s:/[\u015B\u015D\u015F\u0161]/g,t:/[\u0163\u0165\u0167]/g,u:/[\xF9-\xFC\u0169\u016B\u016D\u016F\u0171\u0173]/g,w:/[\u0175]/g,y:/[\xFD\xFF\u0177]/g,z:/[\u017A\u017C\u017E]/g};for(let i in e)t=t.replace(e[i],i)}return t}function dt(t){return D(t)?t.replace(/(_)/g,"-").replace(/[A-Z]/g,(n,e)=>e===0?n:"-"+n.toLowerCase()).toLowerCase():t}function _t(t){return D(t)?t.replace(/[A-Z]/g,(n,e)=>e===0?n:"."+n.toLowerCase()).toLowerCase():t}var ft={};function ki(t="pui_id_"){return ft.hasOwnProperty(t)||(ft[t]=0),ft[t]++,`${t}${ft[t]}`}function We(){let t=[],n=(o,c,l=999)=>{let a=r(o,c,l),p=a.value+(a.key===o?0:l)+1;return t.push({key:o,value:p}),p},e=o=>{t=t.filter(c=>c.value!==o)},i=(o,c)=>r(o,c).value,r=(o,c,l=0)=>[...t].reverse().find(a=>c?!0:a.key===o)||{key:o,value:l},s=o=>o&&parseInt(o.style.zIndex,10)||0;return{get:s,set:(o,c,l)=>{c&&(c.style.zIndex=String(n(o,!0,l)))},clear:o=>{o&&(e(s(o)),o.style.zIndex="")},getCurrent:o=>i(o,!0)}}var $i=We();var Ue=["*"];var S=(()=>{class t{static STARTS_WITH="startsWith";static CONTAINS="contains";static NOT_CONTAINS="notContains";static ENDS_WITH="endsWith";static EQUALS="equals";static NOT_EQUALS="notEquals";static IN="in";static LESS_THAN="lt";static LESS_THAN_OR_EQUAL_TO="lte";static GREATER_THAN="gt";static GREATER_THAN_OR_EQUAL_TO="gte";static BETWEEN="between";static IS="is";static IS_NOT="isNot";static BEFORE="before";static AFTER="after";static DATE_IS="dateIs";static DATE_IS_NOT="dateIsNot";static DATE_BEFORE="dateBefore";static DATE_AFTER="dateAfter"}return t})(),Ji=(()=>{class t{static AND="and";static OR="or"}return t})(),Xi=(()=>{class t{filter(e,i,r,s,o){let c=[];if(e)for(let l of e)for(let a of i){let p=pt(l,a);if(this.filters[s](p,r,o)){c.push(l);break}}return c}filters={startsWith:(e,i,r)=>{if(i==null||i.trim()==="")return!0;if(e==null)return!1;let s=b(i.toString()).toLocaleLowerCase(r);return b(e.toString()).toLocaleLowerCase(r).slice(0,s.length)===s},contains:(e,i,r)=>{if(i==null||typeof i=="string"&&i.trim()==="")return!0;if(e==null)return!1;let s=b(i.toString()).toLocaleLowerCase(r);return b(e.toString()).toLocaleLowerCase(r).indexOf(s)!==-1},notContains:(e,i,r)=>{if(i==null||typeof i=="string"&&i.trim()==="")return!0;if(e==null)return!1;let s=b(i.toString()).toLocaleLowerCase(r);return b(e.toString()).toLocaleLowerCase(r).indexOf(s)===-1},endsWith:(e,i,r)=>{if(i==null||i.trim()==="")return!0;if(e==null)return!1;let s=b(i.toString()).toLocaleLowerCase(r),o=b(e.toString()).toLocaleLowerCase(r);return o.indexOf(s,o.length-s.length)!==-1},equals:(e,i,r)=>i==null||typeof i=="string"&&i.trim()===""?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()===i.getTime():e==i?!0:b(e.toString()).toLocaleLowerCase(r)==b(i.toString()).toLocaleLowerCase(r),notEquals:(e,i,r)=>i==null||typeof i=="string"&&i.trim()===""?!1:e==null?!0:e.getTime&&i.getTime?e.getTime()!==i.getTime():e==i?!1:b(e.toString()).toLocaleLowerCase(r)!=b(i.toString()).toLocaleLowerCase(r),in:(e,i)=>{if(i==null||i.length===0)return!0;for(let r=0;r<i.length;r++)if(Et(e,i[r]))return!0;return!1},between:(e,i)=>i==null||i[0]==null||i[1]==null?!0:e==null?!1:e.getTime?i[0].getTime()<=e.getTime()&&e.getTime()<=i[1].getTime():i[0]<=e&&e<=i[1],lt:(e,i,r)=>i==null?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()<i.getTime():e<i,lte:(e,i,r)=>i==null?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()<=i.getTime():e<=i,gt:(e,i,r)=>i==null?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()>i.getTime():e>i,gte:(e,i,r)=>i==null?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()>=i.getTime():e>=i,is:(e,i,r)=>this.filters.equals(e,i,r),isNot:(e,i,r)=>this.filters.notEquals(e,i,r),before:(e,i,r)=>this.filters.lt(e,i,r),after:(e,i,r)=>this.filters.gt(e,i,r),dateIs:(e,i)=>i==null?!0:e==null?!1:e.toDateString()===i.toDateString(),dateIsNot:(e,i)=>i==null?!0:e==null?!1:e.toDateString()!==i.toDateString(),dateBefore:(e,i)=>i==null?!0:e==null?!1:e.getTime()<i.getTime(),dateAfter:(e,i)=>i==null?!0:e==null?!1:(e.setHours(0,0,0,0),e.getTime()>i.getTime())};register(e,i){this.filters[e]=i}static \u0275fac=function(i){return new(i||t)};static \u0275prov=A({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var tn=(()=>{class t{clickSource=new H;clickObservable=this.clickSource.asObservable();add(e){e&&this.clickSource.next(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=A({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var en=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Mt({type:t,selectors:[["p-footer"]],standalone:!1,ngContentSelectors:Ue,decls:1,vars:0,template:function(i,r){i&1&&($t(),Wt(0))},encapsulation:2})}return t})(),nn=(()=>{class t{template;type;name;constructor(e){this.template=e}getType(){return this.name}static \u0275fac=function(i){return new(i||t)(Dt(Pt))};static \u0275dir=kt({type:t,selectors:[["","pTemplate",""]],inputs:{type:"type",name:[0,"pTemplate","name"]}})}return t})(),rn=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Ft({type:t});static \u0275inj=Lt({imports:[Bt]})}return t})(),sn=(()=>{class t{static STARTS_WITH="startsWith";static CONTAINS="contains";static NOT_CONTAINS="notContains";static ENDS_WITH="endsWith";static EQUALS="equals";static NOT_EQUALS="notEquals";static NO_FILTER="noFilter";static LT="lt";static LTE="lte";static GT="gt";static GTE="gte";static IS="is";static IS_NOT="isNot";static BEFORE="before";static AFTER="after";static CLEAR="clear";static APPLY="apply";static MATCH_ALL="matchAll";static MATCH_ANY="matchAny";static ADD_RULE="addRule";static REMOVE_RULE="removeRule";static ACCEPT="accept";static REJECT="reject";static CHOOSE="choose";static UPLOAD="upload";static CANCEL="cancel";static PENDING="pending";static FILE_SIZE_TYPES="fileSizeTypes";static DAY_NAMES="dayNames";static DAY_NAMES_SHORT="dayNamesShort";static DAY_NAMES_MIN="dayNamesMin";static MONTH_NAMES="monthNames";static MONTH_NAMES_SHORT="monthNamesShort";static FIRST_DAY_OF_WEEK="firstDayOfWeek";static TODAY="today";static WEEK_HEADER="weekHeader";static WEAK="weak";static MEDIUM="medium";static STRONG="strong";static PASSWORD_PROMPT="passwordPrompt";static EMPTY_MESSAGE="emptyMessage";static EMPTY_FILTER_MESSAGE="emptyFilterMessage";static SHOW_FILTER_MENU="showFilterMenu";static HIDE_FILTER_MENU="hideFilterMenu";static SELECTION_MESSAGE="selectionMessage";static ARIA="aria";static SELECT_COLOR="selectColor";static BROWSE_FILES="browseFiles"}return t})(),on=(()=>{class t{dragStartSource=new H;dragStopSource=new H;dragStart$=this.dragStartSource.asObservable();dragStop$=this.dragStopSource.asObservable();startDrag(e){this.dragStartSource.next(e)}stopDrag(e){this.dragStopSource.next(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=A({token:t,factory:t.\u0275fac})}return t})();var Be=Object.defineProperty,Ve=Object.defineProperties,Ge=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable,te=(t,n,e)=>n in t?Be(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,w=(t,n)=>{for(var e in n||(n={}))ie.call(n,e)&&te(t,e,n[e]);if(ht)for(var e of ht(n))ne.call(n,e)&&te(t,e,n[e]);return t},Tt=(t,n)=>Ve(t,Ge(n)),P=(t,n)=>{var e={};for(var i in t)ie.call(t,i)&&n.indexOf(i)<0&&(e[i]=t[i]);if(t!=null&&ht)for(var i of ht(t))n.indexOf(i)<0&&ne.call(t,i)&&(e[i]=t[i]);return e};function ln(...t){return Y(...t)}var Ke=Yt(),N=Ke;function ee(t,n){ut(t)?t.push(...n||[]):R(t)&&Object.assign(t,n)}function je(t){return R(t)&&t.hasOwnProperty("value")&&t.hasOwnProperty("type")?t.value:t}function Ye(t){return t.replaceAll(/ /g,"").replace(/[^\w]/g,"-")}function vt(t="",n=""){return Ye(`${D(t,!1)&&D(n,!1)?`${t}-`:t}${n}`)}function re(t="",n=""){return`--${vt(t,n)}`}function ze(t=""){let n=(t.match(/{/g)||[]).length,e=(t.match(/}/g)||[]).length;return(n+e)%2!==0}function se(t,n="",e="",i=[],r){if(D(t)){let s=/{([^}]*)}/g,o=t.trim();if(ze(o))return;if(_(o,s)){let c=o.replaceAll(s,p=>{let u=p.replace(/{|}/g,"").split(".").filter(f=>!i.some(m=>_(f,m)));return`var(${re(e,dt(u.join("-")))}${h(r)?`, ${r}`:""})`}),l=/(\d+\s+[\+\-\*\/]\s+\d+)/g,a=/var\([^)]+\)/g;return _(c.replace(a,"0"),l)?`calc(${c})`:c}return o}else if(Xt(t))return t}function qe(t,n,e){D(n,!1)&&t.push(`${n}:${e};`)}function W(t,n){return t?`${t}{${n}}`:""}var U=(...t)=>Ze(g.getTheme(),...t),Ze=(t={},n,e,i)=>{if(n){let{variable:r,options:s}=g.defaults||{},{prefix:o,transform:c}=t?.options||s||{},a=_(n,/{([^}]*)}/g)?n:`{${n}}`;return i==="value"||j(i)&&c==="strict"?g.getTokenValue(n):se(a,void 0,o,[r.excludedKeyRegex],e)}return""};function Qe(t,n={}){let e=g.defaults.variable,{prefix:i=e.prefix,selector:r=e.selector,excludedKeyRegex:s=e.excludedKeyRegex}=n,o=(a,p="")=>Object.entries(a).reduce((d,[u,f])=>{let m=_(u,s)?vt(p):vt(p,dt(u)),y=je(f);if(R(y)){let{variables:E,tokens:T}=o(y,m);ee(d.tokens,T),ee(d.variables,E)}else d.tokens.push((i?m.replace(`${i}-`,""):m).replaceAll("-",".")),qe(d.variables,re(m),se(y,m,i,[s]));return d},{variables:[],tokens:[]}),{variables:c,tokens:l}=o(t,i);return{value:c,tokens:l,declarations:c.join(""),css:W(r,c.join(""))}}var L={regex:{rules:{class:{pattern:/^\.([a-zA-Z][\w-]*)$/,resolve(t){return{type:"class",selector:t,matched:this.pattern.test(t.trim())}}},attr:{pattern:/^\[(.*)\]$/,resolve(t){return{type:"attr",selector:`:root${t}`,matched:this.pattern.test(t.trim())}}},media:{pattern:/^@media (.*)$/,resolve(t){return{type:"media",selector:`${t}{:root{[CSS]}}`,matched:this.pattern.test(t.trim())}}},system:{pattern:/^system$/,resolve(t){return{type:"system",selector:"@media (prefers-color-scheme: dark){:root{[CSS]}}",matched:this.pattern.test(t.trim())}}},custom:{resolve(t){return{type:"custom",selector:t,matched:!0}}}},resolve(t){let n=Object.keys(this.rules).filter(e=>e!=="custom").map(e=>this.rules[e]);return[t].flat().map(e=>{var i;return(i=n.map(r=>r.resolve(e)).find(r=>r.matched))!=null?i:this.rules.custom.resolve(e)})}},_toVariables(t,n){return Qe(t,{prefix:n?.prefix})},getCommon({name:t="",theme:n={},params:e,set:i,defaults:r}){var s,o,c,l,a,p,d;let{preset:u,options:f}=n,m,y,E,T,v,M,C;if(h(u)&&f.transform!=="strict"){let{primitive:z,semantic:q,extend:Z}=u,B=q||{},{colorScheme:Q}=B,J=P(B,["colorScheme"]),X=Z||{},{colorScheme:tt}=X,V=P(X,["colorScheme"]),G=Q||{},{dark:et}=G,it=P(G,["dark"]),nt=tt||{},{dark:rt}=nt,st=P(nt,["dark"]),ot=h(z)?this._toVariables({primitive:z},f):{},at=h(J)?this._toVariables({semantic:J},f):{},ct=h(it)?this._toVariables({light:it},f):{},Ot=h(et)?this._toVariables({dark:et},f):{},Ct=h(V)?this._toVariables({semantic:V},f):{},At=h(st)?this._toVariables({light:st},f):{},Rt=h(rt)?this._toVariables({dark:rt},f):{},[ce,le]=[(s=ot.declarations)!=null?s:"",ot.tokens],[pe,ue]=[(o=at.declarations)!=null?o:"",at.tokens||[]],[de,fe]=[(c=ct.declarations)!=null?c:"",ct.tokens||[]],[he,me]=[(l=Ot.declarations)!=null?l:"",Ot.tokens||[]],[ge,ye]=[(a=Ct.declarations)!=null?a:"",Ct.tokens||[]],[Se,Ee]=[(p=At.declarations)!=null?p:"",At.tokens||[]],[_e,be]=[(d=Rt.declarations)!=null?d:"",Rt.tokens||[]];m=this.transformCSS(t,ce,"light","variable",f,i,r),y=le;let Te=this.transformCSS(t,`${pe}${de}`,"light","variable",f,i,r),ve=this.transformCSS(t,`${he}`,"dark","variable",f,i,r);E=`${Te}${ve}`,T=[...new Set([...ue,...fe,...me])];let Oe=this.transformCSS(t,`${ge}${Se}color-scheme:light`,"light","variable",f,i,r),Ce=this.transformCSS(t,`${_e}color-scheme:dark`,"dark","variable",f,i,r);v=`${Oe}${Ce}`,M=[...new Set([...ye,...Ee,...be])],C=O(u.css,{dt:U})}return{primitive:{css:m,tokens:y},semantic:{css:E,tokens:T},global:{css:v,tokens:M},style:C}},getPreset({name:t="",preset:n={},options:e,params:i,set:r,defaults:s,selector:o}){var c,l,a;let p,d,u;if(h(n)&&e.transform!=="strict"){let f=t.replace("-directive",""),m=n,{colorScheme:y,extend:E,css:T}=m,v=P(m,["colorScheme","extend","css"]),M=E||{},{colorScheme:C}=M,z=P(M,["colorScheme"]),q=y||{},{dark:Z}=q,B=P(q,["dark"]),Q=C||{},{dark:J}=Q,X=P(Q,["dark"]),tt=h(v)?this._toVariables({[f]:w(w({},v),z)},e):{},V=h(B)?this._toVariables({[f]:w(w({},B),X)},e):{},G=h(Z)?this._toVariables({[f]:w(w({},Z),J)},e):{},[et,it]=[(c=tt.declarations)!=null?c:"",tt.tokens||[]],[nt,rt]=[(l=V.declarations)!=null?l:"",V.tokens||[]],[st,ot]=[(a=G.declarations)!=null?a:"",G.tokens||[]],at=this.transformCSS(f,`${et}${nt}`,"light","variable",e,r,s,o),ct=this.transformCSS(f,st,"dark","variable",e,r,s,o);p=`${at}${ct}`,d=[...new Set([...it,...rt,...ot])],u=O(T,{dt:U})}return{css:p,tokens:d,style:u}},getPresetC({name:t="",theme:n={},params:e,set:i,defaults:r}){var s;let{preset:o,options:c}=n,l=(s=o?.components)==null?void 0:s[t];return this.getPreset({name:t,preset:l,options:c,params:e,set:i,defaults:r})},getPresetD({name:t="",theme:n={},params:e,set:i,defaults:r}){var s;let o=t.replace("-directive",""),{preset:c,options:l}=n,a=(s=c?.directives)==null?void 0:s[o];return this.getPreset({name:o,preset:a,options:l,params:e,set:i,defaults:r})},applyDarkColorScheme(t){return!(t.darkModeSelector==="none"||t.darkModeSelector===!1)},getColorSchemeOption(t,n){var e;return this.applyDarkColorScheme(t)?this.regex.resolve(t.darkModeSelector===!0?n.options.darkModeSelector:(e=t.darkModeSelector)!=null?e:n.options.darkModeSelector):[]},getLayerOrder(t,n={},e,i){let{cssLayer:r}=n;return r?`@layer ${O(r.order||"primeui",e)}`:""},getCommonStyleSheet({name:t="",theme:n={},params:e,props:i={},set:r,defaults:s}){let o=this.getCommon({name:t,theme:n,params:e,set:r,defaults:s}),c=Object.entries(i).reduce((l,[a,p])=>l.push(`${a}="${p}"`)&&l,[]).join(" ");return Object.entries(o||{}).reduce((l,[a,p])=>{if(p?.css){let d=k(p?.css),u=`${a}-variables`;l.push(`<style type="text/css" data-primevue-style-id="${u}" ${c}>${d}</style>`)}return l},[]).join("")},getStyleSheet({name:t="",theme:n={},params:e,props:i={},set:r,defaults:s}){var o;let c={name:t,theme:n,params:e,set:r,defaults:s},l=(o=t.includes("-directive")?this.getPresetD(c):this.getPresetC(c))==null?void 0:o.css,a=Object.entries(i).reduce((p,[d,u])=>p.push(`${d}="${u}"`)&&p,[]).join(" ");return l?`<style type="text/css" data-primevue-style-id="${t}-variables" ${a}>${k(l)}</style>`:""},createTokens(t={},n,e="",i="",r={}){return Object.entries(t).forEach(([s,o])=>{let c=_(s,n.variable.excludedKeyRegex)?e:e?`${e}.${_t(s)}`:_t(s),l=i?`${i}.${s}`:s;R(o)?this.createTokens(o,n,c,l,r):(r[c]||(r[c]={paths:[],computed(a,p={}){var d,u;return this.paths.length===1?(d=this.paths[0])==null?void 0:d.computed(this.paths[0].scheme,p.binding):a&&a!=="none"?(u=this.paths.find(f=>f.scheme===a))==null?void 0:u.computed(a,p.binding):this.paths.map(f=>f.computed(f.scheme,p[f.scheme]))}}),r[c].paths.push({path:l,value:o,scheme:l.includes("colorScheme.light")?"light":l.includes("colorScheme.dark")?"dark":"none",computed(a,p={}){let d=/{([^}]*)}/g,u=o;if(p.name=this.path,p.binding||(p.binding={}),_(o,d)){let m=o.trim().replaceAll(d,T=>{var v;let M=T.replace(/{|}/g,""),C=(v=r[M])==null?void 0:v.computed(a,p);return ut(C)&&C.length===2?`light-dark(${C[0].value},${C[1].value})`:C?.value}),y=/(\d+\w*\s+[\+\-\*\/]\s+\d+\w*)/g,E=/var\([^)]+\)/g;u=_(m.replace(E,"0"),y)?`calc(${m})`:m}return j(p.binding)&&delete p.binding,{colorScheme:a,path:this.path,paths:p,value:u.includes("undefined")?void 0:u}}}))}),r},getTokenValue(t,n,e){var i;let s=(l=>l.split(".").filter(p=>!_(p.toLowerCase(),e.variable.excludedKeyRegex)).join("."))(n),o=n.includes("colorScheme.light")?"light":n.includes("colorScheme.dark")?"dark":void 0,c=[(i=t[s])==null?void 0:i.computed(o)].flat().filter(l=>l);return c.length===1?c[0].value:c.reduce((l={},a)=>{let p=a,{colorScheme:d}=p,u=P(p,["colorScheme"]);return l[d]=u,l},void 0)},getSelectorRule(t,n,e,i){return e==="class"||e==="attr"?W(h(n)?`${t}${n},${t} ${n}`:t,i):W(t,h(n)?W(n,i):i)},transformCSS(t,n,e,i,r={},s,o,c){if(h(n)){let{cssLayer:l}=r;if(i!=="style"){let a=this.getColorSchemeOption(r,o);n=e==="dark"?a.reduce((p,{type:d,selector:u})=>(h(u)&&(p+=u.includes("[CSS]")?u.replace("[CSS]",n):this.getSelectorRule(u,c,d,n)),p),""):W(c??":root",n)}if(l){let a={name:"primeui",order:"primeui"};R(l)&&(a.name=O(l.name,{name:t,type:i})),h(a.name)&&(n=W(`@layer ${a.name}`,n),s?.layerNames(a.name))}return n}return""}},g={defaults:{variable:{prefix:"p",selector:":root",excludedKeyRegex:/^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states|extend|css)$/gi},options:{prefix:"p",darkModeSelector:"system",cssLayer:!1}},_theme:void 0,_layerNames:new Set,_loadedStyleNames:new Set,_loadingStyles:new Set,_tokens:{},update(t={}){let{theme:n}=t;n&&(this._theme=Tt(w({},n),{options:w(w({},this.defaults.options),n.options)}),this._tokens=L.createTokens(this.preset,this.defaults),this.clearLoadedStyleNames())},get theme(){return this._theme},get preset(){var t;return((t=this.theme)==null?void 0:t.preset)||{}},get options(){var t;return((t=this.theme)==null?void 0:t.options)||{}},get tokens(){return this._tokens},getTheme(){return this.theme},setTheme(t){this.update({theme:t}),N.emit("theme:change",t)},getPreset(){return this.preset},setPreset(t){this._theme=Tt(w({},this.theme),{preset:t}),this._tokens=L.createTokens(t,this.defaults),this.clearLoadedStyleNames(),N.emit("preset:change",t),N.emit("theme:change",this.theme)},getOptions(){return this.options},setOptions(t){this._theme=Tt(w({},this.theme),{options:t}),this.clearLoadedStyleNames(),N.emit("options:change",t),N.emit("theme:change",this.theme)},getLayerNames(){return[...this._layerNames]},setLayerNames(t){this._layerNames.add(t)},getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(t){return this._loadedStyleNames.has(t)},setLoadedStyleName(t){this._loadedStyleNames.add(t)},deleteLoadedStyleName(t){this._loadedStyleNames.delete(t)},clearLoadedStyleNames(){this._loadedStyleNames.clear()},getTokenValue(t){return L.getTokenValue(this.tokens,t,this.defaults)},getCommon(t="",n){return L.getCommon({name:t,theme:this.theme,params:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getComponent(t="",n){let e={name:t,theme:this.theme,params:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return L.getPresetC(e)},getDirective(t="",n){let e={name:t,theme:this.theme,params:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return L.getPresetD(e)},getCustomPreset(t="",n,e,i){let r={name:t,preset:n,options:this.options,selector:e,params:i,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return L.getPreset(r)},getLayerOrderCSS(t=""){return L.getLayerOrder(t,this.options,{names:this.getLayerNames()},this.defaults)},transformCSS(t="",n,e="style",i){return L.transformCSS(t,n,i,e,this.options,{layerNames:this.setLayerNames.bind(this)},this.defaults)},getCommonStyleSheet(t="",n,e={}){return L.getCommonStyleSheet({name:t,theme:this.theme,params:n,props:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getStyleSheet(t,n,e={}){return L.getStyleSheet({name:t,theme:this.theme,params:n,props:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},onStyleMounted(t){this._loadingStyles.add(t)},onStyleUpdated(t){this._loadingStyles.add(t)},onStyleLoaded(t,{name:n}){this._loadingStyles.size&&(this._loadingStyles.delete(n),N.emit(`theme:${n}:load`,t),!this._loadingStyles.size&&N.emit("theme:load"))}};var Je=0,oe=(()=>{class t{document=x(lt);use(e,i={}){let r=!1,s=e,o=null,{immediate:c=!0,manual:l=!1,name:a=`style_${++Je}`,id:p=void 0,media:d=void 0,nonce:u=void 0,first:f=!1,props:m={}}=i;if(this.document){if(o=this.document.querySelector(`style[data-primeng-style-id="${a}"]`)||p&&this.document.getElementById(p)||this.document.createElement("style"),!o.isConnected){s=e;let y=this.document.head;f&&y.firstChild?y.insertBefore(o,y.firstChild):y.appendChild(o),yt(o,{type:"text/css",media:d,nonce:u,"data-primeng-style-id":a})}return o.textContent!==s&&(o.textContent=s),{id:p,name:a,el:o,css:s}}}static \u0275fac=function(i){return new(i||t)};static \u0275prov=A({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Nn={_loadedStyleNames:new Set,getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(t){return this._loadedStyleNames.has(t)},setLoadedStyleName(t){this._loadedStyleNames.add(t)},deleteLoadedStyleName(t){this._loadedStyleNames.delete(t)},clearLoadedStyleNames(){this._loadedStyleNames.clear()}},Xe=({dt:t})=>`
8
+ *,
9
+ ::before,
10
+ ::after {
11
+ box-sizing: border-box;
12
+ }
13
+
14
+ /* Non ng overlay animations */
15
+ .p-connected-overlay {
16
+ opacity: 0;
17
+ transform: scaleY(0.8);
18
+ transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1),
19
+ opacity 0.12s cubic-bezier(0, 0, 0.2, 1);
20
+ }
21
+
22
+ .p-connected-overlay-visible {
23
+ opacity: 1;
24
+ transform: scaleY(1);
25
+ }
26
+
27
+ .p-connected-overlay-hidden {
28
+ opacity: 0;
29
+ transform: scaleY(1);
30
+ transition: opacity 0.1s linear;
31
+ }
32
+
33
+ /* NG based overlay animations */
34
+ .p-connected-overlay-enter-from {
35
+ opacity: 0;
36
+ transform: scaleY(0.8);
37
+ }
38
+
39
+ .p-connected-overlay-leave-to {
40
+ opacity: 0;
41
+ }
42
+
43
+ .p-connected-overlay-enter-active {
44
+ transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1),
45
+ opacity 0.12s cubic-bezier(0, 0, 0.2, 1);
46
+ }
47
+
48
+ .p-connected-overlay-leave-active {
49
+ transition: opacity 0.1s linear;
50
+ }
51
+
52
+ /* Toggleable Content */
53
+ .p-toggleable-content-enter-from,
54
+ .p-toggleable-content-leave-to {
55
+ max-height: 0;
56
+ }
57
+
58
+ .p-toggleable-content-enter-to,
59
+ .p-toggleable-content-leave-from {
60
+ max-height: 1000px;
61
+ }
62
+
63
+ .p-toggleable-content-leave-active {
64
+ overflow: hidden;
65
+ transition: max-height 0.45s cubic-bezier(0, 1, 0, 1);
66
+ }
67
+
68
+ .p-toggleable-content-enter-active {
69
+ overflow: hidden;
70
+ transition: max-height 1s ease-in-out;
71
+ }
72
+
73
+ .p-disabled,
74
+ .p-disabled * {
75
+ cursor: default;
76
+ pointer-events: none;
77
+ user-select: none;
78
+ }
79
+
80
+ .p-disabled,
81
+ .p-component:disabled {
82
+ opacity: ${t("disabled.opacity")};
83
+ }
84
+
85
+ .pi {
86
+ font-size: ${t("icon.size")};
87
+ }
88
+
89
+ .p-icon {
90
+ width: ${t("icon.size")};
91
+ height: ${t("icon.size")};
92
+ }
93
+
94
+ .p-unselectable-text {
95
+ user-select: none;
96
+ }
97
+
98
+ .p-overlay-mask {
99
+ background: ${t("mask.background")};
100
+ color: ${t("mask.color")};
101
+ position: fixed;
102
+ top: 0;
103
+ left: 0;
104
+ width: 100%;
105
+ height: 100%;
106
+ }
107
+
108
+ .p-overlay-mask-enter {
109
+ animation: p-overlay-mask-enter-animation ${t("mask.transition.duration")} forwards;
110
+ }
111
+
112
+ .p-overlay-mask-leave {
113
+ animation: p-overlay-mask-leave-animation ${t("mask.transition.duration")} forwards;
114
+ }
115
+ /* Temporarily disabled, distrupts PrimeNG overlay animations */
116
+ /* @keyframes p-overlay-mask-enter-animation {
117
+ from {
118
+ background: transparent;
119
+ }
120
+ to {
121
+ background: ${t("mask.background")};
122
+ }
123
+ }
124
+ @keyframes p-overlay-mask-leave-animation {
125
+ from {
126
+ background: ${t("mask.background")};
127
+ }
128
+ to {
129
+ background: transparent;
130
+ }
131
+ }*/
132
+
133
+ .p-iconwrapper {
134
+ display: inline-flex;
135
+ justify-content: center;
136
+ align-items: center;
137
+ }
138
+ `,ti=({dt:t})=>`
139
+ .p-hidden-accessible {
140
+ border: 0;
141
+ clip: rect(0 0 0 0);
142
+ height: 1px;
143
+ margin: -1px;
144
+ overflow: hidden;
145
+ padding: 0;
146
+ position: absolute;
147
+ width: 1px;
148
+ }
149
+
150
+ .p-hidden-accessible input,
151
+ .p-hidden-accessible select {
152
+ transform: scale(0);
153
+ }
154
+
155
+ .p-overflow-hidden {
156
+ overflow: hidden;
157
+ padding-right: ${t("scrollbar.width")};
158
+ }
159
+
160
+ /* @todo move to baseiconstyle.ts */
161
+
162
+ .p-icon {
163
+ display: inline-block;
164
+ vertical-align: baseline;
165
+ }
166
+
167
+ .p-icon-spin {
168
+ -webkit-animation: p-icon-spin 2s infinite linear;
169
+ animation: p-icon-spin 2s infinite linear;
170
+ }
171
+
172
+ @-webkit-keyframes p-icon-spin {
173
+ 0% {
174
+ -webkit-transform: rotate(0deg);
175
+ transform: rotate(0deg);
176
+ }
177
+ 100% {
178
+ -webkit-transform: rotate(359deg);
179
+ transform: rotate(359deg);
180
+ }
181
+ }
182
+
183
+ @keyframes p-icon-spin {
184
+ 0% {
185
+ -webkit-transform: rotate(0deg);
186
+ transform: rotate(0deg);
187
+ }
188
+ 100% {
189
+ -webkit-transform: rotate(359deg);
190
+ transform: rotate(359deg);
191
+ }
192
+ }
193
+ `,ae=(()=>{class t{name="base";useStyle=x(oe);theme=void 0;css=void 0;classes={};inlineStyles={};load=(e,i={},r=s=>s)=>{let s=r(O(e,{dt:U}));return s?this.useStyle.use(k(s),I({name:this.name},i)):{}};loadCSS=(e={})=>this.load(this.css,e);loadTheme=(e={},i="")=>this.load(this.theme,e,(r="")=>g.transformCSS(e.name||this.name,`${r}${i}`));loadGlobalCSS=(e={})=>this.load(ti,e);loadGlobalTheme=(e={},i="")=>this.load(Xe,e,(r="")=>g.transformCSS(e.name||this.name,`${r}${i}`));getCommonTheme=e=>g.getCommon(this.name,e);getComponentTheme=e=>g.getComponent(this.name,e);getDirectiveTheme=e=>g.getDirective(this.name,e);getPresetTheme=(e,i,r)=>g.getCustomPreset(this.name,e,i,r);getLayerOrderThemeCSS=()=>g.getLayerOrderCSS(this.name);getStyleSheet=(e="",i={})=>{if(this.css){let r=O(this.css,{dt:U}),s=k(`${r}${e}`),o=Object.entries(i).reduce((c,[l,a])=>c.push(`${l}="${a}"`)&&c,[]).join(" ");return`<style type="text/css" data-primeng-style-id="${this.name}" ${o}>${s}</style>`}return""};getCommonThemeStyleSheet=(e,i={})=>g.getCommonStyleSheet(this.name,e,i);getThemeStyleSheet=(e,i={})=>{let r=[g.getStyleSheet(this.name,e,i)];if(this.theme){let s=this.name==="base"?"global-style":`${this.name}-style`,o=O(this.theme,{dt:U}),c=k(g.transformCSS(s,o)),l=Object.entries(i).reduce((a,[p,d])=>a.push(`${p}="${d}"`)&&a,[]).join(" ");r.push(`<style type="text/css" data-primeng-style-id="${s}" ${l}>${c}</style>`)}return r.join("")};static \u0275fac=function(i){return new(i||t)};static \u0275prov=A({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ei=(()=>{class t{theme=F(void 0);csp=F({nonce:void 0});isThemeChanged=!1;document=x(lt);baseStyle=x(ae);constructor(){mt(()=>{N.on("theme:change",e=>{Ut(()=>{this.isThemeChanged=!0,this.theme.set(e)})})}),mt(()=>{let e=this.theme();this.document&&e&&(this.isThemeChanged||this.onThemeChange(e),this.isThemeChanged=!1)})}ngOnDestroy(){g.clearLoadedStyleNames(),N.clear()}onThemeChange(e){g.setTheme(e),this.document&&this.loadCommonTheme()}loadCommonTheme(){if(this.theme()!=="none"&&!g.isStyleNameLoaded("common")){let{primitive:e,semantic:i,global:r,style:s}=this.baseStyle.getCommonTheme?.()||{},o={nonce:this.csp?.()?.nonce};this.baseStyle.load(e?.css,I({name:"primitive-variables"},o)),this.baseStyle.load(i?.css,I({name:"semantic-variables"},o)),this.baseStyle.load(r?.css,I({name:"global-variables"},o)),this.baseStyle.loadGlobalTheme(I({name:"global-style"},o),s),g.setLoadedStyleName("common")}}setThemeConfig(e){let{theme:i,csp:r}=e||{};i&&this.theme.set(i),r&&this.csp.set(r)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=A({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ii=(()=>{class t extends ei{ripple=F(!1);platformId=x(xt);inputStyle=F(null);inputVariant=F(null);overlayOptions={};csp=F({nonce:void 0});filterMatchModeOptions={text:[S.STARTS_WITH,S.CONTAINS,S.NOT_CONTAINS,S.ENDS_WITH,S.EQUALS,S.NOT_EQUALS],numeric:[S.EQUALS,S.NOT_EQUALS,S.LESS_THAN,S.LESS_THAN_OR_EQUAL_TO,S.GREATER_THAN,S.GREATER_THAN_OR_EQUAL_TO],date:[S.DATE_IS,S.DATE_IS_NOT,S.DATE_BEFORE,S.DATE_AFTER]};translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",pending:"Pending",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",searchMessage:"Search results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyFilterMessage:"No results found",fileChosenMessage:"Files",noFileChosenMessage:"No file chosen",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"{page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",previousPageLabel:"Previous Page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left",listLabel:"Option List",selectColor:"Select a color",removeLabel:"Remove",browseFiles:"Browse Files",maximizeLabel:"Maximize"}};zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100};translationSource=new H;translationObserver=this.translationSource.asObservable();getTranslation(e){return this.translation[e]}setTranslation(e){this.translation=I(I({},this.translation),e),this.translationSource.next(this.translation)}setConfig(e){let{csp:i,ripple:r,inputStyle:s,inputVariant:o,theme:c,overlayOptions:l,translation:a,filterMatchModeOptions:p}=e||{};i&&this.csp.set(i),r&&this.ripple.set(r),s&&this.inputStyle.set(s),o&&this.inputVariant.set(o),l&&(this.overlayOptions=l),a&&this.setTranslation(a),p&&(this.filterMatchModeOptions=p),c&&this.setThemeConfig({theme:c,csp:i})}static \u0275fac=(()=>{let e;return function(r){return(e||(e=It(t)))(r||t)}})();static \u0275prov=A({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ni=new wt("PRIME_NG_CONFIG");function Wn(...t){let n=t?.map(i=>({provide:ni,useValue:i,multi:!1})),e=Ht(()=>{let i=x(ii);t?.forEach(r=>i.setConfig(r))});return Nt([...n,e])}export{Ae as a,Re as b,si as c,we as d,oi as e,Gt as f,Ne as g,Ie as h,ai as i,ci as j,li as k,pi as l,ui as m,di as n,xe as o,fi as p,hi as q,Kt as r,mi as s,gi as t,yi as u,Si as v,Ei as w,Pe as x,_i as y,bi as z,Ti as A,vi as B,Oi as C,Ci as D,Ai as E,Ri as F,Li as G,j as H,$e as I,h as J,pt as K,Et as L,xi as M,Pi as N,Jt as O,Di as P,Mi as Q,b as R,ki as S,S as T,Ji as U,Xi as V,tn as W,en as X,nn as Y,rn as Z,sn as _,on as $,ln as aa,N as ba,g as ca,Nn as da,ae as ea,ii as fa,Wn as ga};
@@ -0,0 +1 @@
1
+ import{j as r,k as C}from"./chunk-LEMNVA5V.js";import{b as l,e as S}from"./chunk-BUFEIJAI.js";import{b as a,c as u}from"./chunk-PXB4YEY3.js";import{aa as p,ea as h,ja as c,oa as o,v as s}from"./chunk-T5ONJF63.js";var y=(()=>{class i{constructor(e,t,n){this.httpService=e,this.toastr=t,this.tokenService=n}saveChannel(e){return this.httpService.post("/api/Channel/SubmitChannel",e).pipe(p(t=>this.tokenService.refreshToken().pipe(s(n=>t))))}getLastSync(e){return this.httpService.get(`${r.ChannelGetLastSyncByID}/?ID=${e}`)}getChannel(e){return this.httpService.post(r.GetChannel,e)}getChannelLoader(){return this.httpService.get(r.GetChannelLoader)}testShopID(e){return this.httpService.post(r.TestShopID,e).pipe(h(t=>{this.showTostrSuccessTestShopID(t)}))}updateChannelIndex(e){return this.httpService.post(r.UpdateChannelIndex,e)}deleteChannel(e){return this.httpService.post(r.DeleteChannel,e)}mapChannelImage(e){return e.map(t=>(t.img=u.getChannelLogoByTypeId(t.TypeID),t))}showTostrSuccessTestShopID(e){let t="";for(var n in e)t+=n+" : "+e[n]+"<br/>";this.toastr.success(t,"Success",{enableHtml:!0,closeButton:!0,positionClass:"toast-bottom-right"})}getRegisterByOutletName(e){return this.httpService.post(r.GetRegisterByOutletName,{Outlet:e})}getChannelRowCount(e){return this.httpService.post(r.GetChannelRowCount,e).pipe(s(t=>t.Count))}getChannelWarehouse(e){return this.httpService.get(`${r.GetChannelWarehouse}/?ChannelID=${e}`)}unSynchronizedWarehouse(e){return this.httpService.delete(`${r.UnSynchronizedWarehouse}?ID=${e}`)}authorizedChannel(e){let t=this.getApiAuthorize(e);return this.httpService.post(`/api/${t}`,null).pipe(h(n=>{window.open(n.Url,"_blank")}))}getApiAuthorize(e){let t;switch(e){case a.Shopee:t="ChannelAuthorization/ShopeeV2_URL";break;case a.Tiktok:t="ChannelAuthorization/Tiktok_URL";break;case a.Lazada:t="ChannelAuthorization/Lazada_URL";break}return t}static{this.\u0275fac=function(t){return new(t||i)(o(S),o(l),o(C))}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{y as a};
@@ -1 +1 @@
1
- import{b as de}from"./chunk-C7QA2BEN.js";import{b as ge,e as fe}from"./chunk-4M63ID5T.js";import{g as he,ja as ue,oa as U}from"./chunk-JS55A2RS.js";import{a as _,b as $,c as A,i as g}from"./chunk-66YHNWRR.js";var C=class extends Error{constructor(e,t){let o=new.target.prototype;super(`${e}: Status code '${t}'`),this.statusCode=t,this.__proto__=o}},P=class extends Error{constructor(e="A timeout occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},S=class extends Error{constructor(e="An abort occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},j=class extends Error{constructor(e,t){let o=new.target.prototype;super(e),this.transport=t,this.errorType="UnsupportedTransportError",this.__proto__=o}},O=class extends Error{constructor(e,t){let o=new.target.prototype;super(e),this.transport=t,this.errorType="DisabledTransportError",this.__proto__=o}},F=class extends Error{constructor(e,t){let o=new.target.prototype;super(e),this.transport=t,this.errorType="FailedToStartTransportError",this.__proto__=o}},M=class extends Error{constructor(e){let t=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=t}},q=class extends Error{constructor(e,t){let o=new.target.prototype;super(e),this.innerErrors=t,this.__proto__=o}};var H=class{constructor(e,t,o){this.statusCode=e,this.statusText=t,this.content=o}},k=class{get(e,t){return this.send($(_({},t),{method:"GET",url:e}))}post(e,t){return this.send($(_({},t),{method:"POST",url:e}))}delete(e,t){return this.send($(_({},t),{method:"DELETE",url:e}))}getCookieString(e){return""}};var s=function(r){return r[r.Trace=0]="Trace",r[r.Debug=1]="Debug",r[r.Information=2]="Information",r[r.Warning=3]="Warning",r[r.Error=4]="Error",r[r.Critical=5]="Critical",r[r.None=6]="None",r}(s||{});var E=class{constructor(){}log(e,t){}};E.instance=new E;var be="8.0.17",d=class{static isRequired(e,t){if(e==null)throw new Error(`The '${t}' argument is required.`)}static isNotEmpty(e,t){if(!e||e.match(/^\s*$/))throw new Error(`The '${t}' argument should not be empty.`)}static isIn(e,t,o){if(!(e in t))throw new Error(`Unknown ${o} value: ${e}.`)}},p=class r{static get isBrowser(){return!r.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!r.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!r.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}};function x(r,e){let t="";return v(r)?(t=`Binary data of length ${r.byteLength}`,e&&(t+=`. Content: '${Se(r)}'`)):typeof r=="string"&&(t=`String data of length ${r.length}`,e&&(t+=`. Content: '${r}'`)),t}function Se(r){let e=new Uint8Array(r),t="";return e.forEach(o=>{let n=o<16?"0":"";t+=`0x${n}${o.toString(16)} `}),t.substr(0,t.length-1)}function v(r){return r&&typeof ArrayBuffer<"u"&&(r instanceof ArrayBuffer||r.constructor&&r.constructor.name==="ArrayBuffer")}function J(r,e,t,o,n,i){return g(this,null,function*(){let c={},[a,l]=I();c[a]=l,r.log(s.Trace,`(${e} transport) sending data. ${x(n,i.logMessageContent)}.`);let u=v(n)?"arraybuffer":"text",f=yield t.post(o,{content:n,headers:_(_({},c),i.headers),responseType:u,timeout:i.timeout,withCredentials:i.withCredentials});r.log(s.Trace,`(${e} transport) request complete. Response status: ${f.statusCode}.`)})}function pe(r){return r===void 0?new R(s.Information):r===null?E.instance:r.log!==void 0?r:new R(r)}var z=class{constructor(e,t){this._subject=e,this._observer=t}dispose(){let e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(t=>{})}},R=class{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){let o=`[${new Date().toISOString()}] ${s[e]}: ${t}`;switch(e){case s.Critical:case s.Error:this.out.error(o);break;case s.Warning:this.out.warn(o);break;case s.Information:this.out.info(o);break;default:this.out.log(o);break}}}};function I(){let r="X-SignalR-User-Agent";return p.isNode&&(r="User-Agent"),[r,Ce(be,ye(),ke(),ve())]}function Ce(r,e,t,o){let n="Microsoft SignalR/",i=r.split(".");return n+=`${i[0]}.${i[1]}`,n+=` (${r}; `,e&&e!==""?n+=`${e}; `:n+="Unknown OS; ",n+=`${t}`,o?n+=`; ${o}`:n+="; Unknown Runtime Version",n+=")",n}function ye(){if(p.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function ve(){if(p.isNode)return process.versions.node}function ke(){return p.isNode?"NodeJS":"Browser"}function V(r){return r.stack?r.stack:r.message?r.message:`${r}`}function _e(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}var K=class extends k{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||p.isNode){let t=typeof __webpack_require__=="function"?__non_webpack_require__:A;this._jar=new(t("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=t("node-fetch"):this._fetchType=fetch,this._fetchType=t("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(_e());if(typeof AbortController>"u"){let t=typeof __webpack_require__=="function"?__non_webpack_require__:A;this._abortControllerType=t("abort-controller")}else this._abortControllerType=AbortController}send(e){return g(this,null,function*(){if(e.abortSignal&&e.abortSignal.aborted)throw new S;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");let t=new this._abortControllerType,o;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),o=new S});let n=null;if(e.timeout){let l=e.timeout;n=setTimeout(()=>{t.abort(),this._logger.log(s.Warning,"Timeout from HTTP request."),o=new P},l)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},v(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");let i;try{i=yield this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:_({"X-Requested-With":"XMLHttpRequest"},e.headers),method:e.method,mode:"cors",redirect:"follow",signal:t.signal})}catch(l){throw o||(this._logger.log(s.Warning,`Error from HTTP request. ${l}.`),l)}finally{n&&clearTimeout(n),e.abortSignal&&(e.abortSignal.onabort=null)}if(!i.ok){let l=yield me(i,"text");throw new C(l||i.statusText,i.status)}let a=yield me(i,e.responseType);return new H(i.status,i.statusText,a)})}getCookieString(e){let t="";return p.isNode&&this._jar&&this._jar.getCookies(e,(o,n)=>t=n.join("; ")),t}};function me(r,e){let t;switch(e){case"arraybuffer":t=r.arrayBuffer();break;case"text":t=r.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:t=r.text();break}return t}var X=class extends k{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?new Promise((t,o)=>{let n=new XMLHttpRequest;n.open(e.method,e.url,!0),n.withCredentials=e.withCredentials===void 0?!0:e.withCredentials,n.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(v(e.content)?n.setRequestHeader("Content-Type","application/octet-stream"):n.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));let i=e.headers;i&&Object.keys(i).forEach(c=>{n.setRequestHeader(c,i[c])}),e.responseType&&(n.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{n.abort(),o(new S)}),e.timeout&&(n.timeout=e.timeout),n.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),n.status>=200&&n.status<300?t(new H(n.status,n.statusText,n.response||n.responseText)):o(new C(n.response||n.responseText||n.statusText,n.status))},n.onerror=()=>{this._logger.log(s.Warning,`Error from HTTP request. ${n.status}: ${n.statusText}.`),o(new C(n.statusText,n.status))},n.ontimeout=()=>{this._logger.log(s.Warning,"Timeout from HTTP request."),o(new P)},n.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}};var G=class extends k{constructor(e){if(super(),typeof fetch<"u"||p.isNode)this._httpClient=new K(e);else if(typeof XMLHttpRequest<"u")this._httpClient=new X(e);else throw new Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}};var y=class r{static write(e){return`${e}${r.RecordSeparator}`}static parse(e){if(e[e.length-1]!==r.RecordSeparator)throw new Error("Message is incomplete.");let t=e.split(r.RecordSeparator);return t.pop(),t}};y.RecordSeparatorCode=30;y.RecordSeparator=String.fromCharCode(y.RecordSeparatorCode);var Y=class{writeHandshakeRequest(e){return y.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,o;if(v(e)){let a=new Uint8Array(e),l=a.indexOf(y.RecordSeparatorCode);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(a.slice(0,u))),o=a.byteLength>u?a.slice(u).buffer:null}else{let a=e,l=a.indexOf(y.RecordSeparator);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=a.substring(0,u),o=a.length>u?a.substring(u):null}let n=y.parse(t),i=JSON.parse(n[0]);if(i.type)throw new Error("Expected a handshake response from the server.");return[o,i]}};var h=function(r){return r[r.Invocation=1]="Invocation",r[r.StreamItem=2]="StreamItem",r[r.Completion=3]="Completion",r[r.StreamInvocation=4]="StreamInvocation",r[r.CancelInvocation=5]="CancelInvocation",r[r.Ping=6]="Ping",r[r.Close=7]="Close",r[r.Ack=8]="Ack",r[r.Sequence=9]="Sequence",r}(h||{});var Q=class{constructor(){this.observers=[]}next(e){for(let t of this.observers)t.next(e)}error(e){for(let t of this.observers)t.error&&t.error(e)}complete(){for(let e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new z(this,e)}};var Z=class{constructor(e,t,o){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=t,this._bufferSize=o}_send(e){return g(this,null,function*(){let t=this._protocol.writeMessage(e),o=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let n=()=>{},i=()=>{};v(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(o=new Promise((c,a)=>{n=c,i=a})),this._messages.push(new ce(t,this._totalMessageCount,n,i))}try{this._reconnectInProgress||(yield this._connection.send(t))}catch{this._disconnected()}yield o})}_ack(e){let t=-1;for(let o=0;o<this._messages.length;o++){let n=this._messages[o];if(n._id<=e.sequenceId)t=o,v(n._message)?this._bufferedByteCount-=n._message.byteLength:this._bufferedByteCount-=n._message.length,n._resolver();else if(this._bufferedByteCount<this._bufferSize)n._resolver();else break}t!==-1&&(this._messages=this._messages.slice(t+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type!==h.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;let t=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,t<=this._latestReceivedSequenceId?(t===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=t,this._ackTimer(),!0)}_resetSequence(e){if(e.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}_resend(){return g(this,null,function*(){let e=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;yield this._connection.send(this._protocol.writeMessage({type:h.Sequence,sequenceId:e}));let t=this._messages;for(let o of t)yield this._connection.send(o._message);this._reconnectInProgress=!1})}_dispose(e){e??(e=new Error("Unable to reconnect to server."));for(let t of this._messages)t._rejector(e)}_isInvocationMessage(e){switch(e.type){case h.Invocation:case h.StreamItem:case h.Completion:case h.StreamInvocation:case h.CancelInvocation:return!0;case h.Close:case h.Sequence:case h.Ping:case h.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(()=>g(this,null,function*(){try{this._reconnectInProgress||(yield this._connection.send(this._protocol.writeMessage({type:h.Ack,sequenceId:this._latestReceivedSequenceId})))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0}),1e3))}},ce=class{constructor(e,t,o,n){this._message=e,this._id=t,this._resolver=o,this._rejector=n}};var Ee=30*1e3,Ie=15*1e3,Te=1e5,m=function(r){return r.Disconnected="Disconnected",r.Connecting="Connecting",r.Connected="Connected",r.Disconnecting="Disconnecting",r.Reconnecting="Reconnecting",r}(m||{}),ee=class r{static create(e,t,o,n,i,c,a){return new r(e,t,o,n,i,c,a)}constructor(e,t,o,n,i,c,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(s.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},d.isRequired(e,"connection"),d.isRequired(t,"logger"),d.isRequired(o,"protocol"),this.serverTimeoutInMilliseconds=i??Ee,this.keepAliveIntervalInMilliseconds=c??Ie,this._statefulReconnectBufferSize=a??Te,this._logger=t,this._protocol=o,this.connection=e,this._reconnectPolicy=n,this._handshakeProtocol=new Y,this.connection.onreceive=l=>this._processIncomingData(l),this.connection.onclose=l=>this._connectionClosed(l),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=m.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:h.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==m.Disconnected&&this._connectionState!==m.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}_startWithStateTransitions(){return g(this,null,function*(){if(this._connectionState!==m.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=m.Connecting,this._logger.log(s.Debug,"Starting HubConnection.");try{yield this._startInternal(),p.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=m.Connected,this._connectionStarted=!0,this._logger.log(s.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=m.Disconnected,this._logger.log(s.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}})}_startInternal(){return g(this,null,function*(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;let e=new Promise((t,o)=>{this._handshakeResolver=t,this._handshakeRejecter=o});yield this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);let o={protocol:this._protocol.name,version:t};if(this._logger.log(s.Debug,"Sending handshake request."),yield this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(o)),this._logger.log(s.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),yield e,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new Z(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||(yield this._sendMessage(this._cachedPingMessage))}catch(t){throw this._logger.log(s.Debug,`Hub handshake failed with error '${t}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),yield this.connection.stop(t),t}})}stop(){return g(this,null,function*(){let e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),yield this._stopPromise;try{yield e}catch{}})}_stopInternal(e){if(this._connectionState===m.Disconnected)return this._logger.log(s.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===m.Disconnecting)return this._logger.log(s.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;let t=this._connectionState;return this._connectionState=m.Disconnecting,this._logger.log(s.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(s.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(t===m.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new S("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}_sendCloseMessage(){return g(this,null,function*(){try{yield this._sendWithProtocol(this._createCloseMessage())}catch{}})}stream(e,...t){let[o,n]=this._replaceStreamingParams(t),i=this._createStreamInvocation(e,t,n),c,a=new Q;return a.cancelCallback=()=>{let l=this._createCancelInvocation(i.invocationId);return delete this._callbacks[i.invocationId],c.then(()=>this._sendWithProtocol(l))},this._callbacks[i.invocationId]=(l,u)=>{if(u){a.error(u);return}else l&&(l.type===h.Completion?l.error?a.error(new Error(l.error)):a.complete():a.next(l.item))},c=this._sendWithProtocol(i).catch(l=>{a.error(l),delete this._callbacks[i.invocationId]}),this._launchStreams(o,c),a}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){let[o,n]=this._replaceStreamingParams(t),i=this._sendWithProtocol(this._createInvocation(e,t,!0,n));return this._launchStreams(o,i),i}invoke(e,...t){let[o,n]=this._replaceStreamingParams(t),i=this._createInvocation(e,t,!1,n);return new Promise((a,l)=>{this._callbacks[i.invocationId]=(f,T)=>{if(T){l(T);return}else f&&(f.type===h.Completion?f.error?l(new Error(f.error)):a(f.result):l(new Error(`Unexpected message type: ${f.type}`)))};let u=this._sendWithProtocol(i).catch(f=>{l(f),delete this._callbacks[i.invocationId]});this._launchStreams(o,u)})}on(e,t){!e||!t||(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(t)===-1&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();let o=this._methods[e];if(o)if(t){let n=o.indexOf(t);n!==-1&&(o.splice(n,1),o.length===0&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){let t=this._protocol.parseMessages(e,this._logger);for(let o of t)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(o)))switch(o.type){case h.Invocation:this._invokeClientMethod(o).catch(n=>{this._logger.log(s.Error,`Invoke client method threw error: ${V(n)}`)});break;case h.StreamItem:case h.Completion:{let n=this._callbacks[o.invocationId];if(n){o.type===h.Completion&&delete this._callbacks[o.invocationId];try{n(o)}catch(i){this._logger.log(s.Error,`Stream callback threw error: ${V(i)}`)}}break}case h.Ping:break;case h.Close:{this._logger.log(s.Information,"Close message received from server.");let n=o.error?new Error("Server returned an error on close: "+o.error):void 0;o.allowReconnect===!0?this.connection.stop(n):this._stopPromise=this._stopInternal(n);break}case h.Ack:this._messageBuffer&&this._messageBuffer._ack(o);break;case h.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(o);break;default:this._logger.log(s.Warning,`Invalid message type: ${o.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,o;try{[o,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(n){let i="Error parsing handshake response: "+n;this._logger.log(s.Error,i);let c=new Error(i);throw this._handshakeRejecter(c),c}if(t.error){let n="Server returned handshake error: "+t.error;this._logger.log(s.Error,n);let i=new Error(n);throw this._handshakeRejecter(i),i}else this._logger.log(s.Debug,"Server handshake complete.");return this._handshakeResolver(),o}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if((!this.connection.features||!this.connection.features.inherentKeepAlive)&&(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle===void 0)){let e=this._nextKeepAlive-new Date().getTime();e<0&&(e=0),this._pingServerHandle=setTimeout(()=>g(this,null,function*(){if(this._connectionState===m.Connected)try{yield this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}),e)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}_invokeClientMethod(e){return g(this,null,function*(){let t=e.target.toLowerCase(),o=this._methods[t];if(!o){this._logger.log(s.Warning,`No client method with the name '${t}' found.`),e.invocationId&&(this._logger.log(s.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),yield this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)));return}let n=o.slice(),i=!!e.invocationId,c,a,l;for(let u of n)try{let f=c;c=yield u.apply(this,e.arguments),i&&c&&f&&(this._logger.log(s.Error,`Multiple results provided for '${t}'. Sending error to server.`),l=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),a=void 0}catch(f){a=f,this._logger.log(s.Error,`A callback for the method '${t}' threw error '${f}'.`)}l?yield this._sendWithProtocol(l):i?(a?l=this._createCompletionMessage(e.invocationId,`${a}`,null):c!==void 0?l=this._createCompletionMessage(e.invocationId,null,c):(this._logger.log(s.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),l=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),yield this._sendWithProtocol(l)):c&&this._logger.log(s.Error,`Result given for '${t}' method but server is not expecting a result.`)})}_connectionClosed(e){this._logger.log(s.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new S("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===m.Disconnecting?this._completeClose(e):this._connectionState===m.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===m.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=m.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),p.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(t=>t.apply(this,[e]))}catch(t){this._logger.log(s.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}_reconnect(e){return g(this,null,function*(){let t=Date.now(),o=0,n=e!==void 0?e:new Error("Attempting to reconnect due to a unknown error."),i=this._getNextRetryDelay(o++,0,n);if(i===null){this._logger.log(s.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(e);return}if(this._connectionState=m.Reconnecting,e?this._logger.log(s.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(s.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(c=>c.apply(this,[e]))}catch(c){this._logger.log(s.Error,`An onreconnecting callback called with error '${e}' threw error '${c}'.`)}if(this._connectionState!==m.Reconnecting){this._logger.log(s.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;i!==null;){if(this._logger.log(s.Information,`Reconnect attempt number ${o} will start in ${i} ms.`),yield new Promise(c=>{this._reconnectDelayHandle=setTimeout(c,i)}),this._reconnectDelayHandle=void 0,this._connectionState!==m.Reconnecting){this._logger.log(s.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(yield this._startInternal(),this._connectionState=m.Connected,this._logger.log(s.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(c=>c.apply(this,[this.connection.connectionId]))}catch(c){this._logger.log(s.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${c}'.`)}return}catch(c){if(this._logger.log(s.Information,`Reconnect attempt failed because of error '${c}'.`),this._connectionState!==m.Reconnecting){this._logger.log(s.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===m.Disconnecting&&this._completeClose();return}n=c instanceof Error?c:new Error(c.toString()),i=this._getNextRetryDelay(o++,Date.now()-t,n)}}this._logger.log(s.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${o} failed attempts. Connection disconnecting.`),this._completeClose()})}_getNextRetryDelay(e,t,o){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:o})}catch(n){return this._logger.log(s.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${n}'.`),null}}_cancelCallbacksWithError(e){let t=this._callbacks;this._callbacks={},Object.keys(t).forEach(o=>{let n=t[o];try{n(null,e)}catch(i){this._logger.log(s.Error,`Stream 'error' callback called with '${e}' threw error: ${V(i)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,o,n){if(o)return n.length!==0?{arguments:t,streamIds:n,target:e,type:h.Invocation}:{arguments:t,target:e,type:h.Invocation};{let i=this._invocationId;return this._invocationId++,n.length!==0?{arguments:t,invocationId:i.toString(),streamIds:n,target:e,type:h.Invocation}:{arguments:t,invocationId:i.toString(),target:e,type:h.Invocation}}}_launchStreams(e,t){if(e.length!==0){t||(t=Promise.resolve());for(let o in e)e[o].subscribe({complete:()=>{t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(o)))},error:n=>{let i;n instanceof Error?i=n.message:n&&n.toString?i=n.toString():i="Unknown error",t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(o,i)))},next:n=>{t=t.then(()=>this._sendWithProtocol(this._createStreamItemMessage(o,n)))}})}}_replaceStreamingParams(e){let t=[],o=[];for(let n=0;n<e.length;n++){let i=e[n];if(this._isObservable(i)){let c=this._invocationId;this._invocationId++,t[c]=i,o.push(c.toString()),e.splice(n,1)}}return[t,o]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,t,o){let n=this._invocationId;return this._invocationId++,o.length!==0?{arguments:t,invocationId:n.toString(),streamIds:o,target:e,type:h.StreamInvocation}:{arguments:t,invocationId:n.toString(),target:e,type:h.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:h.CancelInvocation}}_createStreamItemMessage(e,t){return{invocationId:e,item:t,type:h.StreamItem}}_createCompletionMessage(e,t,o){return t?{error:t,invocationId:e,type:h.Completion}:{invocationId:e,result:o,type:h.Completion}}_createCloseMessage(){return{type:h.Close}}};var Pe=[0,2e3,1e4,3e4,null],L=class{constructor(e){this._retryDelays=e!==void 0?[...e,null]:Pe}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}};var D=(()=>{class r{}return r.Authorization="Authorization",r.Cookie="Cookie",r})();var te=class extends k{constructor(e,t){super(),this._innerClient=e,this._accessTokenFactory=t}send(e){return g(this,null,function*(){let t=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(t=!1,this._accessToken=yield this._accessTokenFactory()),this._setAuthorizationHeader(e);let o=yield this._innerClient.send(e);return t&&o.statusCode===401&&this._accessTokenFactory?(this._accessToken=yield this._accessTokenFactory(),this._setAuthorizationHeader(e),yield this._innerClient.send(e)):o})}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[D.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[D.Authorization]&&delete e.headers[D.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}};var b=function(r){return r[r.None=0]="None",r[r.WebSockets=1]="WebSockets",r[r.ServerSentEvents=2]="ServerSentEvents",r[r.LongPolling=4]="LongPolling",r}(b||{}),w=function(r){return r[r.Text=1]="Text",r[r.Binary=2]="Binary",r}(w||{});var oe=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};var W=class{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,o){this._httpClient=e,this._logger=t,this._pollAbort=new oe,this._options=o,this._running=!1,this.onreceive=null,this.onclose=null}connect(e,t){return g(this,null,function*(){if(d.isRequired(e,"url"),d.isRequired(t,"transferFormat"),d.isIn(t,w,"transferFormat"),this._url=e,this._logger.log(s.Trace,"(LongPolling transport) Connecting."),t===w.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");let[o,n]=I(),i=_({[o]:n},this._options.headers),c={abortSignal:this._pollAbort.signal,headers:i,timeout:1e5,withCredentials:this._options.withCredentials};t===w.Binary&&(c.responseType="arraybuffer");let a=`${e}&_=${Date.now()}`;this._logger.log(s.Trace,`(LongPolling transport) polling: ${a}.`);let l=yield this._httpClient.get(a,c);l.statusCode!==200?(this._logger.log(s.Error,`(LongPolling transport) Unexpected response code: ${l.statusCode}.`),this._closeError=new C(l.statusText||"",l.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,c)})}_poll(e,t){return g(this,null,function*(){try{for(;this._running;)try{let o=`${e}&_=${Date.now()}`;this._logger.log(s.Trace,`(LongPolling transport) polling: ${o}.`);let n=yield this._httpClient.get(o,t);n.statusCode===204?(this._logger.log(s.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):n.statusCode!==200?(this._logger.log(s.Error,`(LongPolling transport) Unexpected response code: ${n.statusCode}.`),this._closeError=new C(n.statusText||"",n.statusCode),this._running=!1):n.content?(this._logger.log(s.Trace,`(LongPolling transport) data received. ${x(n.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(n.content)):this._logger.log(s.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(o){this._running?o instanceof P?this._logger.log(s.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=o,this._running=!1):this._logger.log(s.Trace,`(LongPolling transport) Poll errored after shutdown: ${o.message}`)}}finally{this._logger.log(s.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}})}send(e){return g(this,null,function*(){return this._running?J(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return g(this,null,function*(){this._logger.log(s.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{yield this._receiving,this._logger.log(s.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);let e={},[t,o]=I();e[t]=o;let n={headers:_(_({},e),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials},i;try{yield this._httpClient.delete(this._url,n)}catch(c){i=c}i?i instanceof C&&(i.statusCode===404?this._logger.log(s.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(s.Trace,`(LongPolling transport) Error sending a DELETE request: ${i}`)):this._logger.log(s.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(s.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}})}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(s.Trace,e),this.onclose(this._closeError)}}};var ne=class{constructor(e,t,o,n){this._httpClient=e,this._accessToken=t,this._logger=o,this._options=n,this.onreceive=null,this.onclose=null}connect(e,t){return g(this,null,function*(){return d.isRequired(e,"url"),d.isRequired(t,"transferFormat"),d.isIn(t,w,"transferFormat"),this._logger.log(s.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((o,n)=>{let i=!1;if(t!==w.Text){n(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let c;if(p.isBrowser||p.isWebWorker)c=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{let a=this._httpClient.getCookieString(e),l={};l.Cookie=a;let[u,f]=I();l[u]=f,c=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:_(_({},l),this._options.headers)})}try{c.onmessage=a=>{if(this.onreceive)try{this._logger.log(s.Trace,`(SSE transport) data received. ${x(a.data,this._options.logMessageContent)}.`),this.onreceive(a.data)}catch(l){this._close(l);return}},c.onerror=a=>{i?this._close():n(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},c.onopen=()=>{this._logger.log(s.Information,`SSE connected to ${this._url}`),this._eventSource=c,i=!0,o()}}catch(a){n(a);return}})})}send(e){return g(this,null,function*(){return this._eventSource?J(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}};var re=class{constructor(e,t,o,n,i,c){this._logger=o,this._accessTokenFactory=t,this._logMessageContent=n,this._webSocketConstructor=i,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=c}connect(e,t){return g(this,null,function*(){d.isRequired(e,"url"),d.isRequired(t,"transferFormat"),d.isIn(t,w,"transferFormat"),this._logger.log(s.Trace,"(WebSockets transport) Connecting.");let o;return this._accessTokenFactory&&(o=yield this._accessTokenFactory()),new Promise((n,i)=>{e=e.replace(/^http/,"ws");let c,a=this._httpClient.getCookieString(e),l=!1;if(p.isNode||p.isReactNative){let u={},[f,T]=I();u[f]=T,o&&(u[D.Authorization]=`Bearer ${o}`),a&&(u[D.Cookie]=a),c=new this._webSocketConstructor(e,void 0,{headers:_(_({},u),this._headers)})}else o&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(o)}`);c||(c=new this._webSocketConstructor(e)),t===w.Binary&&(c.binaryType="arraybuffer"),c.onopen=u=>{this._logger.log(s.Information,`WebSocket connected to ${e}.`),this._webSocket=c,l=!0,n()},c.onerror=u=>{let f=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?f=u.error:f="There was an error with the transport",this._logger.log(s.Information,`(WebSockets transport) ${f}.`)},c.onmessage=u=>{if(this._logger.log(s.Trace,`(WebSockets transport) data received. ${x(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(f){this._close(f);return}},c.onclose=u=>{if(l)this._close(u);else{let f=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?f=u.error:f="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",i(new Error(f))}}})})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(s.Trace,`(WebSockets transport) sending data. ${x(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(s.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(e.wasClean===!1||e.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}};var we=100,se=class{constructor(e,t={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,d.isRequired(e,"url"),this._logger=pe(t.logger),this.baseUrl=this._resolveUrl(e),t=t||{},t.logMessageContent=t.logMessageContent===void 0?!1:t.logMessageContent,typeof t.withCredentials=="boolean"||t.withCredentials===void 0)t.withCredentials=t.withCredentials===void 0?!0:t.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.timeout=t.timeout===void 0?100*1e3:t.timeout;let o=null,n=null;if(p.isNode&&typeof A<"u"){let i=typeof __webpack_require__=="function"?__non_webpack_require__:A;o=i("ws"),n=i("eventsource")}!p.isNode&&typeof WebSocket<"u"&&!t.WebSocket?t.WebSocket=WebSocket:p.isNode&&!t.WebSocket&&o&&(t.WebSocket=o),!p.isNode&&typeof EventSource<"u"&&!t.EventSource?t.EventSource=EventSource:p.isNode&&!t.EventSource&&typeof n<"u"&&(t.EventSource=n),this._httpClient=new te(t.httpClient||new G(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}start(e){return g(this,null,function*(){if(e=e||w.Binary,d.isIn(e,w,"transferFormat"),this._logger.log(s.Debug,`Starting connection with transfer format '${w[e]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),yield this._startInternalPromise,this._connectionState==="Disconnecting"){let t="Failed to start the HttpConnection before stop() was called.";return this._logger.log(s.Error,t),yield this._stopPromise,Promise.reject(new S(t))}else if(this._connectionState!=="Connected"){let t="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(s.Error,t),Promise.reject(new S(t))}this._connectionStarted=!0})}send(e){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new ae(this.transport)),this._sendQueue.send(e))}stop(e){return g(this,null,function*(){if(this._connectionState==="Disconnected")return this._logger.log(s.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(s.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(t=>{this._stopPromiseResolver=t}),yield this._stopInternal(e),yield this._stopPromise})}_stopInternal(e){return g(this,null,function*(){this._stopError=e;try{yield this._startInternalPromise}catch{}if(this.transport){try{yield this.transport.stop()}catch(t){this._logger.log(s.Error,`HttpConnection.transport.stop() threw error '${t}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(s.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")})}_startInternal(e){return g(this,null,function*(){let t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===b.WebSockets)this.transport=this._constructTransport(b.WebSockets),yield this._startTransport(t,e);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let o=null,n=0;do{if(o=yield this._getNegotiationResponse(t),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new S("The connection was stopped during negotiation.");if(o.error)throw new Error(o.error);if(o.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(o.url&&(t=o.url),o.accessToken){let i=o.accessToken;this._accessTokenFactory=()=>i,this._httpClient._accessToken=i,this._httpClient._accessTokenFactory=void 0}n++}while(o.url&&n<we);if(n===we&&o.url)throw new Error("Negotiate redirection limit exceeded.");yield this._createTransport(t,this._options.transport,o,e)}this.transport instanceof W&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(s.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(o){return this._logger.log(s.Error,"Failed to start the connection: "+o),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(o)}})}_getNegotiationResponse(e){return g(this,null,function*(){let t={},[o,n]=I();t[o]=n;let i=this._resolveNegotiateUrl(e);this._logger.log(s.Debug,`Sending negotiation request: ${i}.`);try{let c=yield this._httpClient.post(i,{content:"",headers:_(_({},t),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(c.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${c.statusCode}'`));let a=JSON.parse(c.content);return(!a.negotiateVersion||a.negotiateVersion<1)&&(a.connectionToken=a.connectionId),a.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new M("Client didn't negotiate Stateful Reconnect but the server did.")):a}catch(c){let a="Failed to complete negotiation with the server: "+c;return c instanceof C&&c.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(s.Error,a),Promise.reject(new M(a))}})}_createConnectUrl(e,t){return t?e+(e.indexOf("?")===-1?"?":"&")+`id=${t}`:e}_createTransport(e,t,o,n){return g(this,null,function*(){let i=this._createConnectUrl(e,o.connectionToken);if(this._isITransport(t)){this._logger.log(s.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,yield this._startTransport(i,n),this.connectionId=o.connectionId;return}let c=[],a=o.availableTransports||[],l=o;for(let u of a){let f=this._resolveTransportOrError(u,t,n,l?.useStatefulReconnect===!0);if(f instanceof Error)c.push(`${u.transport} failed:`),c.push(f);else if(this._isITransport(f)){if(this.transport=f,!l){try{l=yield this._getNegotiationResponse(e)}catch(T){return Promise.reject(T)}i=this._createConnectUrl(e,l.connectionToken)}try{yield this._startTransport(i,n),this.connectionId=l.connectionId;return}catch(T){if(this._logger.log(s.Error,`Failed to start the transport '${u.transport}': ${T}`),l=void 0,c.push(new F(`${u.transport} failed: ${T}`,b[u.transport])),this._connectionState!=="Connecting"){let le="Failed to select transport before stop() was called.";return this._logger.log(s.Debug,le),Promise.reject(new S(le))}}}}return c.length>0?Promise.reject(new q(`Unable to connect to the server with any of the available transports. ${c.join(" ")}`,c)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))})}_constructTransport(e){switch(e){case b.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new re(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case b.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new ne(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case b.LongPolling:return new W(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=o=>g(this,null,function*(){let n=!1;if(this.features.reconnect)try{this.features.disconnected(),yield this.transport.connect(e,t),yield this.features.resend()}catch{n=!0}else{this._stopConnection(o);return}n&&this._stopConnection(o)}):this.transport.onclose=o=>this._stopConnection(o),this.transport.connect(e,t)}_resolveTransportOrError(e,t,o,n){let i=b[e.transport];if(i==null)return this._logger.log(s.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(xe(t,i))if(e.transferFormats.map(a=>w[a]).indexOf(o)>=0){if(i===b.WebSockets&&!this._options.WebSocket||i===b.ServerSentEvents&&!this._options.EventSource)return this._logger.log(s.Debug,`Skipping transport '${b[i]}' because it is not supported in your environment.'`),new j(`'${b[i]}' is not supported in your environment.`,i);this._logger.log(s.Debug,`Selecting transport '${b[i]}'.`);try{return this.features.reconnect=i===b.WebSockets?n:void 0,this._constructTransport(i)}catch(a){return a}}else return this._logger.log(s.Debug,`Skipping transport '${b[i]}' because it does not support the requested transfer format '${w[o]}'.`),new Error(`'${b[i]}' does not support ${w[o]}.`);else return this._logger.log(s.Debug,`Skipping transport '${b[i]}' because it was disabled by the client.`),new O(`'${b[i]}' is disabled by the client.`,i)}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(s.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(s.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(s.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(s.Error,`Connection disconnected with error '${e}'.`):this._logger.log(s.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(t=>{this._logger.log(s.Error,`TransportSendQueue.stop() threw error '${t}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(s.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!p.isBrowser)throw new Error(`Cannot resolve '${e}'.`);let t=window.document.createElement("a");return t.href=e,this._logger.log(s.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){let t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";let o=new URLSearchParams(t.searchParams);return o.has("negotiateVersion")||o.append("negotiateVersion",this._negotiateVersion.toString()),o.has("useStatefulReconnect")?o.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&o.append("useStatefulReconnect","true"),t.search=o.toString(),t.toString()}};function xe(r,e){return!r||(e&r)!==0}var ae=class r{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new N,this._transportResult=new N,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new N),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}_sendLoop(){return g(this,null,function*(){for(;;){if(yield this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new N;let e=this._transportResult;this._transportResult=void 0;let t=typeof this._buffer[0]=="string"?this._buffer.join(""):r._concatBuffers(this._buffer);this._buffer.length=0;try{yield this._transport.send(t),e.resolve()}catch(o){e.reject(o)}}})}static _concatBuffers(e){let t=e.map(i=>i.byteLength).reduce((i,c)=>i+c),o=new Uint8Array(t),n=0;for(let i of e)o.set(new Uint8Array(i),n),n+=i.byteLength;return o.buffer}},N=class{constructor(){this.promise=new Promise((e,t)=>[this._resolver,this._rejecter]=[e,t])}resolve(){this._resolver()}reject(e){this._rejecter(e)}};var Re="json",ie=class{constructor(){this.name=Re,this.version=2,this.transferFormat=w.Text}parseMessages(e,t){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];t===null&&(t=E.instance);let o=y.parse(e),n=[];for(let i of o){let c=JSON.parse(i);if(typeof c.type!="number")throw new Error("Invalid payload.");switch(c.type){case h.Invocation:this._isInvocationMessage(c);break;case h.StreamItem:this._isStreamItemMessage(c);break;case h.Completion:this._isCompletionMessage(c);break;case h.Ping:break;case h.Close:break;case h.Ack:this._isAckMessage(c);break;case h.Sequence:this._isSequenceMessage(c);break;default:t.log(s.Information,"Unknown message type '"+c.type+"' ignored.");continue}n.push(c)}return n}writeMessage(e){return y.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,t){if(typeof e!="string"||e==="")throw new Error(t)}};var De={trace:s.Trace,debug:s.Debug,info:s.Information,information:s.Information,warn:s.Warning,warning:s.Warning,error:s.Error,critical:s.Critical,none:s.None};function $e(r){let e=De[r.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${r}`)}var B=class{configureLogging(e){if(d.isRequired(e,"logging"),Ae(e))this.logger=e;else if(typeof e=="string"){let t=$e(e);this.logger=new R(t)}else this.logger=new R(e);return this}withUrl(e,t){return d.isRequired(e,"url"),d.isNotEmpty(e,"url"),this.url=e,typeof t=="object"?this.httpConnectionOptions=_(_({},this.httpConnectionOptions),t):this.httpConnectionOptions=$(_({},this.httpConnectionOptions),{transport:t}),this}withHubProtocol(e){return d.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new L(e):this.reconnectPolicy=e:this.reconnectPolicy=new L,this}withServerTimeout(e){return d.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return d.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e?.bufferSize,this}build(){let e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");let t=new se(this.url,e);return ee.create(t,this.logger||E.instance,this.protocol||new ie,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}};function Ae(r){return r.log!==void 0}var Ao=(()=>{class r{constructor(t,o,n){this.decodeTokenService=t,this.toastr=o,this.httpService=n,this.initNotifications(),this.parseToken=this.decodeTokenService.getParseToken(),this.buildConnection()}initNotifications(){let t=JSON.parse(localStorage.getItem("Notifications"));this._notifications=new he(t||[])}setNotification(t){let n=[...this._notifications.value,t];this.saveNotificationTotal(n),this._notifications.next(n)}saveNotificationTotal(t=[]){localStorage.setItem("Notifications",JSON.stringify(t))}getNotification(){return this._notifications.asObservable()}getNotificationDetail(t){return this.httpService.post("/api/notification/GetByID",{ID:t})}buildConnection(){this.hubConnection=new B().withUrl("/MarketplaceHub").withAutomaticReconnect().configureLogging(s.Information).build(),this.startConnection(),this.onConnectionClose(),this.subscribeNotification()}connectToRegister(){this.hubConnection.invoke("SubscribeGroup",this.parseToken.PID)}startConnection(){this.hubConnection.start().then(()=>{this.connectToRegister()}).catch(t=>console.log("Error while starting connection: "+t))}onConnectionClose(){this.hubConnection.onclose(()=>{this.buildConnection()})}subscribeNotification(){this.hubConnection.on("Notification",t=>{let o=JSON.parse(t);this.setNotification(o),o.ID==this.parseToken.PID&&(o.StatusCode!=200?this.toastr.error(o.Message,o.Title,{enableHtml:!0}):this.toastr.success(o.Message,o.Title,{enableHtml:!0}))})}clearNotification(){localStorage.removeItem("Notifications"),this._notifications.next([])}static{this.\u0275fac=function(o){return new(o||r)(U(de),U(ge),U(fe))}}static{this.\u0275prov=ue({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{Ao as a};
1
+ import{d as de}from"./chunk-LEMNVA5V.js";import{b as ge,e as fe}from"./chunk-BUFEIJAI.js";import{g as he,ja as ue,oa as U}from"./chunk-T5ONJF63.js";import{a as _,b as $,c as A,i as g}from"./chunk-K2H6WANG.js";var C=class extends Error{constructor(e,t){let o=new.target.prototype;super(`${e}: Status code '${t}'`),this.statusCode=t,this.__proto__=o}},P=class extends Error{constructor(e="A timeout occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},S=class extends Error{constructor(e="An abort occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},j=class extends Error{constructor(e,t){let o=new.target.prototype;super(e),this.transport=t,this.errorType="UnsupportedTransportError",this.__proto__=o}},O=class extends Error{constructor(e,t){let o=new.target.prototype;super(e),this.transport=t,this.errorType="DisabledTransportError",this.__proto__=o}},F=class extends Error{constructor(e,t){let o=new.target.prototype;super(e),this.transport=t,this.errorType="FailedToStartTransportError",this.__proto__=o}},M=class extends Error{constructor(e){let t=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=t}},q=class extends Error{constructor(e,t){let o=new.target.prototype;super(e),this.innerErrors=t,this.__proto__=o}};var H=class{constructor(e,t,o){this.statusCode=e,this.statusText=t,this.content=o}},k=class{get(e,t){return this.send($(_({},t),{method:"GET",url:e}))}post(e,t){return this.send($(_({},t),{method:"POST",url:e}))}delete(e,t){return this.send($(_({},t),{method:"DELETE",url:e}))}getCookieString(e){return""}};var s=function(r){return r[r.Trace=0]="Trace",r[r.Debug=1]="Debug",r[r.Information=2]="Information",r[r.Warning=3]="Warning",r[r.Error=4]="Error",r[r.Critical=5]="Critical",r[r.None=6]="None",r}(s||{});var E=class{constructor(){}log(e,t){}};E.instance=new E;var be="8.0.17",d=class{static isRequired(e,t){if(e==null)throw new Error(`The '${t}' argument is required.`)}static isNotEmpty(e,t){if(!e||e.match(/^\s*$/))throw new Error(`The '${t}' argument should not be empty.`)}static isIn(e,t,o){if(!(e in t))throw new Error(`Unknown ${o} value: ${e}.`)}},p=class r{static get isBrowser(){return!r.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!r.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!r.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}};function x(r,e){let t="";return v(r)?(t=`Binary data of length ${r.byteLength}`,e&&(t+=`. Content: '${Se(r)}'`)):typeof r=="string"&&(t=`String data of length ${r.length}`,e&&(t+=`. Content: '${r}'`)),t}function Se(r){let e=new Uint8Array(r),t="";return e.forEach(o=>{let n=o<16?"0":"";t+=`0x${n}${o.toString(16)} `}),t.substr(0,t.length-1)}function v(r){return r&&typeof ArrayBuffer<"u"&&(r instanceof ArrayBuffer||r.constructor&&r.constructor.name==="ArrayBuffer")}function J(r,e,t,o,n,i){return g(this,null,function*(){let c={},[a,l]=I();c[a]=l,r.log(s.Trace,`(${e} transport) sending data. ${x(n,i.logMessageContent)}.`);let u=v(n)?"arraybuffer":"text",f=yield t.post(o,{content:n,headers:_(_({},c),i.headers),responseType:u,timeout:i.timeout,withCredentials:i.withCredentials});r.log(s.Trace,`(${e} transport) request complete. Response status: ${f.statusCode}.`)})}function pe(r){return r===void 0?new R(s.Information):r===null?E.instance:r.log!==void 0?r:new R(r)}var z=class{constructor(e,t){this._subject=e,this._observer=t}dispose(){let e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(t=>{})}},R=class{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){let o=`[${new Date().toISOString()}] ${s[e]}: ${t}`;switch(e){case s.Critical:case s.Error:this.out.error(o);break;case s.Warning:this.out.warn(o);break;case s.Information:this.out.info(o);break;default:this.out.log(o);break}}}};function I(){let r="X-SignalR-User-Agent";return p.isNode&&(r="User-Agent"),[r,Ce(be,ye(),ke(),ve())]}function Ce(r,e,t,o){let n="Microsoft SignalR/",i=r.split(".");return n+=`${i[0]}.${i[1]}`,n+=` (${r}; `,e&&e!==""?n+=`${e}; `:n+="Unknown OS; ",n+=`${t}`,o?n+=`; ${o}`:n+="; Unknown Runtime Version",n+=")",n}function ye(){if(p.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function ve(){if(p.isNode)return process.versions.node}function ke(){return p.isNode?"NodeJS":"Browser"}function V(r){return r.stack?r.stack:r.message?r.message:`${r}`}function _e(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}var K=class extends k{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||p.isNode){let t=typeof __webpack_require__=="function"?__non_webpack_require__:A;this._jar=new(t("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=t("node-fetch"):this._fetchType=fetch,this._fetchType=t("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(_e());if(typeof AbortController>"u"){let t=typeof __webpack_require__=="function"?__non_webpack_require__:A;this._abortControllerType=t("abort-controller")}else this._abortControllerType=AbortController}send(e){return g(this,null,function*(){if(e.abortSignal&&e.abortSignal.aborted)throw new S;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");let t=new this._abortControllerType,o;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),o=new S});let n=null;if(e.timeout){let l=e.timeout;n=setTimeout(()=>{t.abort(),this._logger.log(s.Warning,"Timeout from HTTP request."),o=new P},l)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},v(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");let i;try{i=yield this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:_({"X-Requested-With":"XMLHttpRequest"},e.headers),method:e.method,mode:"cors",redirect:"follow",signal:t.signal})}catch(l){throw o||(this._logger.log(s.Warning,`Error from HTTP request. ${l}.`),l)}finally{n&&clearTimeout(n),e.abortSignal&&(e.abortSignal.onabort=null)}if(!i.ok){let l=yield me(i,"text");throw new C(l||i.statusText,i.status)}let a=yield me(i,e.responseType);return new H(i.status,i.statusText,a)})}getCookieString(e){let t="";return p.isNode&&this._jar&&this._jar.getCookies(e,(o,n)=>t=n.join("; ")),t}};function me(r,e){let t;switch(e){case"arraybuffer":t=r.arrayBuffer();break;case"text":t=r.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:t=r.text();break}return t}var X=class extends k{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?new Promise((t,o)=>{let n=new XMLHttpRequest;n.open(e.method,e.url,!0),n.withCredentials=e.withCredentials===void 0?!0:e.withCredentials,n.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(v(e.content)?n.setRequestHeader("Content-Type","application/octet-stream"):n.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));let i=e.headers;i&&Object.keys(i).forEach(c=>{n.setRequestHeader(c,i[c])}),e.responseType&&(n.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{n.abort(),o(new S)}),e.timeout&&(n.timeout=e.timeout),n.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),n.status>=200&&n.status<300?t(new H(n.status,n.statusText,n.response||n.responseText)):o(new C(n.response||n.responseText||n.statusText,n.status))},n.onerror=()=>{this._logger.log(s.Warning,`Error from HTTP request. ${n.status}: ${n.statusText}.`),o(new C(n.statusText,n.status))},n.ontimeout=()=>{this._logger.log(s.Warning,"Timeout from HTTP request."),o(new P)},n.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}};var G=class extends k{constructor(e){if(super(),typeof fetch<"u"||p.isNode)this._httpClient=new K(e);else if(typeof XMLHttpRequest<"u")this._httpClient=new X(e);else throw new Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}};var y=class r{static write(e){return`${e}${r.RecordSeparator}`}static parse(e){if(e[e.length-1]!==r.RecordSeparator)throw new Error("Message is incomplete.");let t=e.split(r.RecordSeparator);return t.pop(),t}};y.RecordSeparatorCode=30;y.RecordSeparator=String.fromCharCode(y.RecordSeparatorCode);var Y=class{writeHandshakeRequest(e){return y.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,o;if(v(e)){let a=new Uint8Array(e),l=a.indexOf(y.RecordSeparatorCode);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(a.slice(0,u))),o=a.byteLength>u?a.slice(u).buffer:null}else{let a=e,l=a.indexOf(y.RecordSeparator);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=a.substring(0,u),o=a.length>u?a.substring(u):null}let n=y.parse(t),i=JSON.parse(n[0]);if(i.type)throw new Error("Expected a handshake response from the server.");return[o,i]}};var h=function(r){return r[r.Invocation=1]="Invocation",r[r.StreamItem=2]="StreamItem",r[r.Completion=3]="Completion",r[r.StreamInvocation=4]="StreamInvocation",r[r.CancelInvocation=5]="CancelInvocation",r[r.Ping=6]="Ping",r[r.Close=7]="Close",r[r.Ack=8]="Ack",r[r.Sequence=9]="Sequence",r}(h||{});var Q=class{constructor(){this.observers=[]}next(e){for(let t of this.observers)t.next(e)}error(e){for(let t of this.observers)t.error&&t.error(e)}complete(){for(let e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new z(this,e)}};var Z=class{constructor(e,t,o){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=t,this._bufferSize=o}_send(e){return g(this,null,function*(){let t=this._protocol.writeMessage(e),o=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let n=()=>{},i=()=>{};v(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(o=new Promise((c,a)=>{n=c,i=a})),this._messages.push(new ce(t,this._totalMessageCount,n,i))}try{this._reconnectInProgress||(yield this._connection.send(t))}catch{this._disconnected()}yield o})}_ack(e){let t=-1;for(let o=0;o<this._messages.length;o++){let n=this._messages[o];if(n._id<=e.sequenceId)t=o,v(n._message)?this._bufferedByteCount-=n._message.byteLength:this._bufferedByteCount-=n._message.length,n._resolver();else if(this._bufferedByteCount<this._bufferSize)n._resolver();else break}t!==-1&&(this._messages=this._messages.slice(t+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type!==h.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;let t=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,t<=this._latestReceivedSequenceId?(t===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=t,this._ackTimer(),!0)}_resetSequence(e){if(e.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}_resend(){return g(this,null,function*(){let e=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;yield this._connection.send(this._protocol.writeMessage({type:h.Sequence,sequenceId:e}));let t=this._messages;for(let o of t)yield this._connection.send(o._message);this._reconnectInProgress=!1})}_dispose(e){e??(e=new Error("Unable to reconnect to server."));for(let t of this._messages)t._rejector(e)}_isInvocationMessage(e){switch(e.type){case h.Invocation:case h.StreamItem:case h.Completion:case h.StreamInvocation:case h.CancelInvocation:return!0;case h.Close:case h.Sequence:case h.Ping:case h.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(()=>g(this,null,function*(){try{this._reconnectInProgress||(yield this._connection.send(this._protocol.writeMessage({type:h.Ack,sequenceId:this._latestReceivedSequenceId})))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0}),1e3))}},ce=class{constructor(e,t,o,n){this._message=e,this._id=t,this._resolver=o,this._rejector=n}};var Ee=30*1e3,Ie=15*1e3,Te=1e5,m=function(r){return r.Disconnected="Disconnected",r.Connecting="Connecting",r.Connected="Connected",r.Disconnecting="Disconnecting",r.Reconnecting="Reconnecting",r}(m||{}),ee=class r{static create(e,t,o,n,i,c,a){return new r(e,t,o,n,i,c,a)}constructor(e,t,o,n,i,c,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(s.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},d.isRequired(e,"connection"),d.isRequired(t,"logger"),d.isRequired(o,"protocol"),this.serverTimeoutInMilliseconds=i??Ee,this.keepAliveIntervalInMilliseconds=c??Ie,this._statefulReconnectBufferSize=a??Te,this._logger=t,this._protocol=o,this.connection=e,this._reconnectPolicy=n,this._handshakeProtocol=new Y,this.connection.onreceive=l=>this._processIncomingData(l),this.connection.onclose=l=>this._connectionClosed(l),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=m.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:h.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==m.Disconnected&&this._connectionState!==m.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}_startWithStateTransitions(){return g(this,null,function*(){if(this._connectionState!==m.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=m.Connecting,this._logger.log(s.Debug,"Starting HubConnection.");try{yield this._startInternal(),p.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=m.Connected,this._connectionStarted=!0,this._logger.log(s.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=m.Disconnected,this._logger.log(s.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}})}_startInternal(){return g(this,null,function*(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;let e=new Promise((t,o)=>{this._handshakeResolver=t,this._handshakeRejecter=o});yield this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);let o={protocol:this._protocol.name,version:t};if(this._logger.log(s.Debug,"Sending handshake request."),yield this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(o)),this._logger.log(s.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),yield e,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new Z(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||(yield this._sendMessage(this._cachedPingMessage))}catch(t){throw this._logger.log(s.Debug,`Hub handshake failed with error '${t}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),yield this.connection.stop(t),t}})}stop(){return g(this,null,function*(){let e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),yield this._stopPromise;try{yield e}catch{}})}_stopInternal(e){if(this._connectionState===m.Disconnected)return this._logger.log(s.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===m.Disconnecting)return this._logger.log(s.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;let t=this._connectionState;return this._connectionState=m.Disconnecting,this._logger.log(s.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(s.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(t===m.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new S("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}_sendCloseMessage(){return g(this,null,function*(){try{yield this._sendWithProtocol(this._createCloseMessage())}catch{}})}stream(e,...t){let[o,n]=this._replaceStreamingParams(t),i=this._createStreamInvocation(e,t,n),c,a=new Q;return a.cancelCallback=()=>{let l=this._createCancelInvocation(i.invocationId);return delete this._callbacks[i.invocationId],c.then(()=>this._sendWithProtocol(l))},this._callbacks[i.invocationId]=(l,u)=>{if(u){a.error(u);return}else l&&(l.type===h.Completion?l.error?a.error(new Error(l.error)):a.complete():a.next(l.item))},c=this._sendWithProtocol(i).catch(l=>{a.error(l),delete this._callbacks[i.invocationId]}),this._launchStreams(o,c),a}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){let[o,n]=this._replaceStreamingParams(t),i=this._sendWithProtocol(this._createInvocation(e,t,!0,n));return this._launchStreams(o,i),i}invoke(e,...t){let[o,n]=this._replaceStreamingParams(t),i=this._createInvocation(e,t,!1,n);return new Promise((a,l)=>{this._callbacks[i.invocationId]=(f,T)=>{if(T){l(T);return}else f&&(f.type===h.Completion?f.error?l(new Error(f.error)):a(f.result):l(new Error(`Unexpected message type: ${f.type}`)))};let u=this._sendWithProtocol(i).catch(f=>{l(f),delete this._callbacks[i.invocationId]});this._launchStreams(o,u)})}on(e,t){!e||!t||(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(t)===-1&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();let o=this._methods[e];if(o)if(t){let n=o.indexOf(t);n!==-1&&(o.splice(n,1),o.length===0&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){let t=this._protocol.parseMessages(e,this._logger);for(let o of t)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(o)))switch(o.type){case h.Invocation:this._invokeClientMethod(o).catch(n=>{this._logger.log(s.Error,`Invoke client method threw error: ${V(n)}`)});break;case h.StreamItem:case h.Completion:{let n=this._callbacks[o.invocationId];if(n){o.type===h.Completion&&delete this._callbacks[o.invocationId];try{n(o)}catch(i){this._logger.log(s.Error,`Stream callback threw error: ${V(i)}`)}}break}case h.Ping:break;case h.Close:{this._logger.log(s.Information,"Close message received from server.");let n=o.error?new Error("Server returned an error on close: "+o.error):void 0;o.allowReconnect===!0?this.connection.stop(n):this._stopPromise=this._stopInternal(n);break}case h.Ack:this._messageBuffer&&this._messageBuffer._ack(o);break;case h.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(o);break;default:this._logger.log(s.Warning,`Invalid message type: ${o.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,o;try{[o,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(n){let i="Error parsing handshake response: "+n;this._logger.log(s.Error,i);let c=new Error(i);throw this._handshakeRejecter(c),c}if(t.error){let n="Server returned handshake error: "+t.error;this._logger.log(s.Error,n);let i=new Error(n);throw this._handshakeRejecter(i),i}else this._logger.log(s.Debug,"Server handshake complete.");return this._handshakeResolver(),o}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if((!this.connection.features||!this.connection.features.inherentKeepAlive)&&(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle===void 0)){let e=this._nextKeepAlive-new Date().getTime();e<0&&(e=0),this._pingServerHandle=setTimeout(()=>g(this,null,function*(){if(this._connectionState===m.Connected)try{yield this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}),e)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}_invokeClientMethod(e){return g(this,null,function*(){let t=e.target.toLowerCase(),o=this._methods[t];if(!o){this._logger.log(s.Warning,`No client method with the name '${t}' found.`),e.invocationId&&(this._logger.log(s.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),yield this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)));return}let n=o.slice(),i=!!e.invocationId,c,a,l;for(let u of n)try{let f=c;c=yield u.apply(this,e.arguments),i&&c&&f&&(this._logger.log(s.Error,`Multiple results provided for '${t}'. Sending error to server.`),l=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),a=void 0}catch(f){a=f,this._logger.log(s.Error,`A callback for the method '${t}' threw error '${f}'.`)}l?yield this._sendWithProtocol(l):i?(a?l=this._createCompletionMessage(e.invocationId,`${a}`,null):c!==void 0?l=this._createCompletionMessage(e.invocationId,null,c):(this._logger.log(s.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),l=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),yield this._sendWithProtocol(l)):c&&this._logger.log(s.Error,`Result given for '${t}' method but server is not expecting a result.`)})}_connectionClosed(e){this._logger.log(s.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new S("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===m.Disconnecting?this._completeClose(e):this._connectionState===m.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===m.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=m.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),p.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(t=>t.apply(this,[e]))}catch(t){this._logger.log(s.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}_reconnect(e){return g(this,null,function*(){let t=Date.now(),o=0,n=e!==void 0?e:new Error("Attempting to reconnect due to a unknown error."),i=this._getNextRetryDelay(o++,0,n);if(i===null){this._logger.log(s.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(e);return}if(this._connectionState=m.Reconnecting,e?this._logger.log(s.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(s.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(c=>c.apply(this,[e]))}catch(c){this._logger.log(s.Error,`An onreconnecting callback called with error '${e}' threw error '${c}'.`)}if(this._connectionState!==m.Reconnecting){this._logger.log(s.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;i!==null;){if(this._logger.log(s.Information,`Reconnect attempt number ${o} will start in ${i} ms.`),yield new Promise(c=>{this._reconnectDelayHandle=setTimeout(c,i)}),this._reconnectDelayHandle=void 0,this._connectionState!==m.Reconnecting){this._logger.log(s.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(yield this._startInternal(),this._connectionState=m.Connected,this._logger.log(s.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(c=>c.apply(this,[this.connection.connectionId]))}catch(c){this._logger.log(s.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${c}'.`)}return}catch(c){if(this._logger.log(s.Information,`Reconnect attempt failed because of error '${c}'.`),this._connectionState!==m.Reconnecting){this._logger.log(s.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===m.Disconnecting&&this._completeClose();return}n=c instanceof Error?c:new Error(c.toString()),i=this._getNextRetryDelay(o++,Date.now()-t,n)}}this._logger.log(s.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${o} failed attempts. Connection disconnecting.`),this._completeClose()})}_getNextRetryDelay(e,t,o){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:o})}catch(n){return this._logger.log(s.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${n}'.`),null}}_cancelCallbacksWithError(e){let t=this._callbacks;this._callbacks={},Object.keys(t).forEach(o=>{let n=t[o];try{n(null,e)}catch(i){this._logger.log(s.Error,`Stream 'error' callback called with '${e}' threw error: ${V(i)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,o,n){if(o)return n.length!==0?{arguments:t,streamIds:n,target:e,type:h.Invocation}:{arguments:t,target:e,type:h.Invocation};{let i=this._invocationId;return this._invocationId++,n.length!==0?{arguments:t,invocationId:i.toString(),streamIds:n,target:e,type:h.Invocation}:{arguments:t,invocationId:i.toString(),target:e,type:h.Invocation}}}_launchStreams(e,t){if(e.length!==0){t||(t=Promise.resolve());for(let o in e)e[o].subscribe({complete:()=>{t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(o)))},error:n=>{let i;n instanceof Error?i=n.message:n&&n.toString?i=n.toString():i="Unknown error",t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(o,i)))},next:n=>{t=t.then(()=>this._sendWithProtocol(this._createStreamItemMessage(o,n)))}})}}_replaceStreamingParams(e){let t=[],o=[];for(let n=0;n<e.length;n++){let i=e[n];if(this._isObservable(i)){let c=this._invocationId;this._invocationId++,t[c]=i,o.push(c.toString()),e.splice(n,1)}}return[t,o]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,t,o){let n=this._invocationId;return this._invocationId++,o.length!==0?{arguments:t,invocationId:n.toString(),streamIds:o,target:e,type:h.StreamInvocation}:{arguments:t,invocationId:n.toString(),target:e,type:h.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:h.CancelInvocation}}_createStreamItemMessage(e,t){return{invocationId:e,item:t,type:h.StreamItem}}_createCompletionMessage(e,t,o){return t?{error:t,invocationId:e,type:h.Completion}:{invocationId:e,result:o,type:h.Completion}}_createCloseMessage(){return{type:h.Close}}};var Pe=[0,2e3,1e4,3e4,null],L=class{constructor(e){this._retryDelays=e!==void 0?[...e,null]:Pe}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}};var D=(()=>{class r{}return r.Authorization="Authorization",r.Cookie="Cookie",r})();var te=class extends k{constructor(e,t){super(),this._innerClient=e,this._accessTokenFactory=t}send(e){return g(this,null,function*(){let t=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(t=!1,this._accessToken=yield this._accessTokenFactory()),this._setAuthorizationHeader(e);let o=yield this._innerClient.send(e);return t&&o.statusCode===401&&this._accessTokenFactory?(this._accessToken=yield this._accessTokenFactory(),this._setAuthorizationHeader(e),yield this._innerClient.send(e)):o})}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[D.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[D.Authorization]&&delete e.headers[D.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}};var b=function(r){return r[r.None=0]="None",r[r.WebSockets=1]="WebSockets",r[r.ServerSentEvents=2]="ServerSentEvents",r[r.LongPolling=4]="LongPolling",r}(b||{}),w=function(r){return r[r.Text=1]="Text",r[r.Binary=2]="Binary",r}(w||{});var oe=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};var W=class{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,o){this._httpClient=e,this._logger=t,this._pollAbort=new oe,this._options=o,this._running=!1,this.onreceive=null,this.onclose=null}connect(e,t){return g(this,null,function*(){if(d.isRequired(e,"url"),d.isRequired(t,"transferFormat"),d.isIn(t,w,"transferFormat"),this._url=e,this._logger.log(s.Trace,"(LongPolling transport) Connecting."),t===w.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");let[o,n]=I(),i=_({[o]:n},this._options.headers),c={abortSignal:this._pollAbort.signal,headers:i,timeout:1e5,withCredentials:this._options.withCredentials};t===w.Binary&&(c.responseType="arraybuffer");let a=`${e}&_=${Date.now()}`;this._logger.log(s.Trace,`(LongPolling transport) polling: ${a}.`);let l=yield this._httpClient.get(a,c);l.statusCode!==200?(this._logger.log(s.Error,`(LongPolling transport) Unexpected response code: ${l.statusCode}.`),this._closeError=new C(l.statusText||"",l.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,c)})}_poll(e,t){return g(this,null,function*(){try{for(;this._running;)try{let o=`${e}&_=${Date.now()}`;this._logger.log(s.Trace,`(LongPolling transport) polling: ${o}.`);let n=yield this._httpClient.get(o,t);n.statusCode===204?(this._logger.log(s.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):n.statusCode!==200?(this._logger.log(s.Error,`(LongPolling transport) Unexpected response code: ${n.statusCode}.`),this._closeError=new C(n.statusText||"",n.statusCode),this._running=!1):n.content?(this._logger.log(s.Trace,`(LongPolling transport) data received. ${x(n.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(n.content)):this._logger.log(s.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(o){this._running?o instanceof P?this._logger.log(s.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=o,this._running=!1):this._logger.log(s.Trace,`(LongPolling transport) Poll errored after shutdown: ${o.message}`)}}finally{this._logger.log(s.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}})}send(e){return g(this,null,function*(){return this._running?J(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return g(this,null,function*(){this._logger.log(s.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{yield this._receiving,this._logger.log(s.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);let e={},[t,o]=I();e[t]=o;let n={headers:_(_({},e),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials},i;try{yield this._httpClient.delete(this._url,n)}catch(c){i=c}i?i instanceof C&&(i.statusCode===404?this._logger.log(s.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(s.Trace,`(LongPolling transport) Error sending a DELETE request: ${i}`)):this._logger.log(s.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(s.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}})}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(s.Trace,e),this.onclose(this._closeError)}}};var ne=class{constructor(e,t,o,n){this._httpClient=e,this._accessToken=t,this._logger=o,this._options=n,this.onreceive=null,this.onclose=null}connect(e,t){return g(this,null,function*(){return d.isRequired(e,"url"),d.isRequired(t,"transferFormat"),d.isIn(t,w,"transferFormat"),this._logger.log(s.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((o,n)=>{let i=!1;if(t!==w.Text){n(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let c;if(p.isBrowser||p.isWebWorker)c=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{let a=this._httpClient.getCookieString(e),l={};l.Cookie=a;let[u,f]=I();l[u]=f,c=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:_(_({},l),this._options.headers)})}try{c.onmessage=a=>{if(this.onreceive)try{this._logger.log(s.Trace,`(SSE transport) data received. ${x(a.data,this._options.logMessageContent)}.`),this.onreceive(a.data)}catch(l){this._close(l);return}},c.onerror=a=>{i?this._close():n(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},c.onopen=()=>{this._logger.log(s.Information,`SSE connected to ${this._url}`),this._eventSource=c,i=!0,o()}}catch(a){n(a);return}})})}send(e){return g(this,null,function*(){return this._eventSource?J(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}};var re=class{constructor(e,t,o,n,i,c){this._logger=o,this._accessTokenFactory=t,this._logMessageContent=n,this._webSocketConstructor=i,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=c}connect(e,t){return g(this,null,function*(){d.isRequired(e,"url"),d.isRequired(t,"transferFormat"),d.isIn(t,w,"transferFormat"),this._logger.log(s.Trace,"(WebSockets transport) Connecting.");let o;return this._accessTokenFactory&&(o=yield this._accessTokenFactory()),new Promise((n,i)=>{e=e.replace(/^http/,"ws");let c,a=this._httpClient.getCookieString(e),l=!1;if(p.isNode||p.isReactNative){let u={},[f,T]=I();u[f]=T,o&&(u[D.Authorization]=`Bearer ${o}`),a&&(u[D.Cookie]=a),c=new this._webSocketConstructor(e,void 0,{headers:_(_({},u),this._headers)})}else o&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(o)}`);c||(c=new this._webSocketConstructor(e)),t===w.Binary&&(c.binaryType="arraybuffer"),c.onopen=u=>{this._logger.log(s.Information,`WebSocket connected to ${e}.`),this._webSocket=c,l=!0,n()},c.onerror=u=>{let f=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?f=u.error:f="There was an error with the transport",this._logger.log(s.Information,`(WebSockets transport) ${f}.`)},c.onmessage=u=>{if(this._logger.log(s.Trace,`(WebSockets transport) data received. ${x(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(f){this._close(f);return}},c.onclose=u=>{if(l)this._close(u);else{let f=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?f=u.error:f="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",i(new Error(f))}}})})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(s.Trace,`(WebSockets transport) sending data. ${x(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(s.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(e.wasClean===!1||e.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}};var we=100,se=class{constructor(e,t={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,d.isRequired(e,"url"),this._logger=pe(t.logger),this.baseUrl=this._resolveUrl(e),t=t||{},t.logMessageContent=t.logMessageContent===void 0?!1:t.logMessageContent,typeof t.withCredentials=="boolean"||t.withCredentials===void 0)t.withCredentials=t.withCredentials===void 0?!0:t.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.timeout=t.timeout===void 0?100*1e3:t.timeout;let o=null,n=null;if(p.isNode&&typeof A<"u"){let i=typeof __webpack_require__=="function"?__non_webpack_require__:A;o=i("ws"),n=i("eventsource")}!p.isNode&&typeof WebSocket<"u"&&!t.WebSocket?t.WebSocket=WebSocket:p.isNode&&!t.WebSocket&&o&&(t.WebSocket=o),!p.isNode&&typeof EventSource<"u"&&!t.EventSource?t.EventSource=EventSource:p.isNode&&!t.EventSource&&typeof n<"u"&&(t.EventSource=n),this._httpClient=new te(t.httpClient||new G(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}start(e){return g(this,null,function*(){if(e=e||w.Binary,d.isIn(e,w,"transferFormat"),this._logger.log(s.Debug,`Starting connection with transfer format '${w[e]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),yield this._startInternalPromise,this._connectionState==="Disconnecting"){let t="Failed to start the HttpConnection before stop() was called.";return this._logger.log(s.Error,t),yield this._stopPromise,Promise.reject(new S(t))}else if(this._connectionState!=="Connected"){let t="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(s.Error,t),Promise.reject(new S(t))}this._connectionStarted=!0})}send(e){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new ae(this.transport)),this._sendQueue.send(e))}stop(e){return g(this,null,function*(){if(this._connectionState==="Disconnected")return this._logger.log(s.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(s.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(t=>{this._stopPromiseResolver=t}),yield this._stopInternal(e),yield this._stopPromise})}_stopInternal(e){return g(this,null,function*(){this._stopError=e;try{yield this._startInternalPromise}catch{}if(this.transport){try{yield this.transport.stop()}catch(t){this._logger.log(s.Error,`HttpConnection.transport.stop() threw error '${t}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(s.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")})}_startInternal(e){return g(this,null,function*(){let t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===b.WebSockets)this.transport=this._constructTransport(b.WebSockets),yield this._startTransport(t,e);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let o=null,n=0;do{if(o=yield this._getNegotiationResponse(t),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new S("The connection was stopped during negotiation.");if(o.error)throw new Error(o.error);if(o.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(o.url&&(t=o.url),o.accessToken){let i=o.accessToken;this._accessTokenFactory=()=>i,this._httpClient._accessToken=i,this._httpClient._accessTokenFactory=void 0}n++}while(o.url&&n<we);if(n===we&&o.url)throw new Error("Negotiate redirection limit exceeded.");yield this._createTransport(t,this._options.transport,o,e)}this.transport instanceof W&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(s.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(o){return this._logger.log(s.Error,"Failed to start the connection: "+o),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(o)}})}_getNegotiationResponse(e){return g(this,null,function*(){let t={},[o,n]=I();t[o]=n;let i=this._resolveNegotiateUrl(e);this._logger.log(s.Debug,`Sending negotiation request: ${i}.`);try{let c=yield this._httpClient.post(i,{content:"",headers:_(_({},t),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(c.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${c.statusCode}'`));let a=JSON.parse(c.content);return(!a.negotiateVersion||a.negotiateVersion<1)&&(a.connectionToken=a.connectionId),a.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new M("Client didn't negotiate Stateful Reconnect but the server did.")):a}catch(c){let a="Failed to complete negotiation with the server: "+c;return c instanceof C&&c.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(s.Error,a),Promise.reject(new M(a))}})}_createConnectUrl(e,t){return t?e+(e.indexOf("?")===-1?"?":"&")+`id=${t}`:e}_createTransport(e,t,o,n){return g(this,null,function*(){let i=this._createConnectUrl(e,o.connectionToken);if(this._isITransport(t)){this._logger.log(s.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,yield this._startTransport(i,n),this.connectionId=o.connectionId;return}let c=[],a=o.availableTransports||[],l=o;for(let u of a){let f=this._resolveTransportOrError(u,t,n,l?.useStatefulReconnect===!0);if(f instanceof Error)c.push(`${u.transport} failed:`),c.push(f);else if(this._isITransport(f)){if(this.transport=f,!l){try{l=yield this._getNegotiationResponse(e)}catch(T){return Promise.reject(T)}i=this._createConnectUrl(e,l.connectionToken)}try{yield this._startTransport(i,n),this.connectionId=l.connectionId;return}catch(T){if(this._logger.log(s.Error,`Failed to start the transport '${u.transport}': ${T}`),l=void 0,c.push(new F(`${u.transport} failed: ${T}`,b[u.transport])),this._connectionState!=="Connecting"){let le="Failed to select transport before stop() was called.";return this._logger.log(s.Debug,le),Promise.reject(new S(le))}}}}return c.length>0?Promise.reject(new q(`Unable to connect to the server with any of the available transports. ${c.join(" ")}`,c)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))})}_constructTransport(e){switch(e){case b.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new re(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case b.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new ne(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case b.LongPolling:return new W(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=o=>g(this,null,function*(){let n=!1;if(this.features.reconnect)try{this.features.disconnected(),yield this.transport.connect(e,t),yield this.features.resend()}catch{n=!0}else{this._stopConnection(o);return}n&&this._stopConnection(o)}):this.transport.onclose=o=>this._stopConnection(o),this.transport.connect(e,t)}_resolveTransportOrError(e,t,o,n){let i=b[e.transport];if(i==null)return this._logger.log(s.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(xe(t,i))if(e.transferFormats.map(a=>w[a]).indexOf(o)>=0){if(i===b.WebSockets&&!this._options.WebSocket||i===b.ServerSentEvents&&!this._options.EventSource)return this._logger.log(s.Debug,`Skipping transport '${b[i]}' because it is not supported in your environment.'`),new j(`'${b[i]}' is not supported in your environment.`,i);this._logger.log(s.Debug,`Selecting transport '${b[i]}'.`);try{return this.features.reconnect=i===b.WebSockets?n:void 0,this._constructTransport(i)}catch(a){return a}}else return this._logger.log(s.Debug,`Skipping transport '${b[i]}' because it does not support the requested transfer format '${w[o]}'.`),new Error(`'${b[i]}' does not support ${w[o]}.`);else return this._logger.log(s.Debug,`Skipping transport '${b[i]}' because it was disabled by the client.`),new O(`'${b[i]}' is disabled by the client.`,i)}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(s.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(s.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(s.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(s.Error,`Connection disconnected with error '${e}'.`):this._logger.log(s.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(t=>{this._logger.log(s.Error,`TransportSendQueue.stop() threw error '${t}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(s.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!p.isBrowser)throw new Error(`Cannot resolve '${e}'.`);let t=window.document.createElement("a");return t.href=e,this._logger.log(s.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){let t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";let o=new URLSearchParams(t.searchParams);return o.has("negotiateVersion")||o.append("negotiateVersion",this._negotiateVersion.toString()),o.has("useStatefulReconnect")?o.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&o.append("useStatefulReconnect","true"),t.search=o.toString(),t.toString()}};function xe(r,e){return!r||(e&r)!==0}var ae=class r{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new N,this._transportResult=new N,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new N),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}_sendLoop(){return g(this,null,function*(){for(;;){if(yield this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new N;let e=this._transportResult;this._transportResult=void 0;let t=typeof this._buffer[0]=="string"?this._buffer.join(""):r._concatBuffers(this._buffer);this._buffer.length=0;try{yield this._transport.send(t),e.resolve()}catch(o){e.reject(o)}}})}static _concatBuffers(e){let t=e.map(i=>i.byteLength).reduce((i,c)=>i+c),o=new Uint8Array(t),n=0;for(let i of e)o.set(new Uint8Array(i),n),n+=i.byteLength;return o.buffer}},N=class{constructor(){this.promise=new Promise((e,t)=>[this._resolver,this._rejecter]=[e,t])}resolve(){this._resolver()}reject(e){this._rejecter(e)}};var Re="json",ie=class{constructor(){this.name=Re,this.version=2,this.transferFormat=w.Text}parseMessages(e,t){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];t===null&&(t=E.instance);let o=y.parse(e),n=[];for(let i of o){let c=JSON.parse(i);if(typeof c.type!="number")throw new Error("Invalid payload.");switch(c.type){case h.Invocation:this._isInvocationMessage(c);break;case h.StreamItem:this._isStreamItemMessage(c);break;case h.Completion:this._isCompletionMessage(c);break;case h.Ping:break;case h.Close:break;case h.Ack:this._isAckMessage(c);break;case h.Sequence:this._isSequenceMessage(c);break;default:t.log(s.Information,"Unknown message type '"+c.type+"' ignored.");continue}n.push(c)}return n}writeMessage(e){return y.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,t){if(typeof e!="string"||e==="")throw new Error(t)}};var De={trace:s.Trace,debug:s.Debug,info:s.Information,information:s.Information,warn:s.Warning,warning:s.Warning,error:s.Error,critical:s.Critical,none:s.None};function $e(r){let e=De[r.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${r}`)}var B=class{configureLogging(e){if(d.isRequired(e,"logging"),Ae(e))this.logger=e;else if(typeof e=="string"){let t=$e(e);this.logger=new R(t)}else this.logger=new R(e);return this}withUrl(e,t){return d.isRequired(e,"url"),d.isNotEmpty(e,"url"),this.url=e,typeof t=="object"?this.httpConnectionOptions=_(_({},this.httpConnectionOptions),t):this.httpConnectionOptions=$(_({},this.httpConnectionOptions),{transport:t}),this}withHubProtocol(e){return d.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new L(e):this.reconnectPolicy=e:this.reconnectPolicy=new L,this}withServerTimeout(e){return d.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return d.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e?.bufferSize,this}build(){let e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");let t=new se(this.url,e);return ee.create(t,this.logger||E.instance,this.protocol||new ie,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}};function Ae(r){return r.log!==void 0}var Ao=(()=>{class r{constructor(t,o,n){this.decodeTokenService=t,this.toastr=o,this.httpService=n,this.initNotifications(),this.parseToken=this.decodeTokenService.getParseToken(),this.buildConnection()}initNotifications(){let t=JSON.parse(localStorage.getItem("Notifications"));this._notifications=new he(t||[])}setNotification(t){let n=[...this._notifications.value,t];this.saveNotificationTotal(n),this._notifications.next(n)}saveNotificationTotal(t=[]){localStorage.setItem("Notifications",JSON.stringify(t))}getNotification(){return this._notifications.asObservable()}getNotificationDetail(t){return this.httpService.post("/api/notification/GetByID",{ID:t})}buildConnection(){this.hubConnection=new B().withUrl("/MarketplaceHub").withAutomaticReconnect().configureLogging(s.Information).build(),this.startConnection(),this.onConnectionClose(),this.subscribeNotification()}connectToRegister(){this.hubConnection.invoke("SubscribeGroup",this.parseToken.PID)}startConnection(){this.hubConnection.start().then(()=>{this.connectToRegister()}).catch(t=>console.log("Error while starting connection: "+t))}onConnectionClose(){this.hubConnection.onclose(()=>{this.buildConnection()})}subscribeNotification(){this.hubConnection.on("Notification",t=>{let o=JSON.parse(t);this.setNotification(o),o.ID==this.parseToken.PID&&(o.StatusCode!=200?this.toastr.error(o.Message,o.Title,{enableHtml:!0}):this.toastr.success(o.Message,o.Title,{enableHtml:!0}))})}clearNotification(){localStorage.removeItem("Notifications"),this._notifications.next([])}static{this.\u0275fac=function(o){return new(o||r)(U(de),U(ge),U(fe))}}static{this.\u0275prov=ue({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{Ao as a};
@@ -1,2 +1,2 @@
1
- import{a as P,b as W,c as B}from"./chunk-NRCXYGO3.js";import{ha as N}from"./chunk-AVEGIEYT.js";import{e as x}from"./chunk-4M63ID5T.js";import{h as E,m as D,z as j}from"./chunk-CSSG7NAJ.js";import{d as V,k as I,n as F}from"./chunk-MTUIRWOB.js";import{Fc as y,Gb as S,Ka as C,Kc as v,Lc as T,Mc as b,Rc as O,Sc as M,Yb as u,ea as g,ic as h,ja as c,jc as _,oa as d,oc as k,tc as f,v as m,xb as w,ya as p,za as l}from"./chunk-JS55A2RS.js";var G=(()=>{class o{constructor(){}convertToCSV(e,t){let i;if(typeof e=="string")i=e;else{var n=typeof e=="object"?e:JSON.parse(e);i=this.transformToCSVStringFormat(n)}this.downloadCSV(i,t)}transformToCSVStringFormat(e){if(!e||!e.length)return;let t=",",i=Object.keys(e[0]);return e.map(a=>i.map(r=>{let s=a[r]===null||a[r]===void 0?"":a[r];return s=s instanceof Date?s.toLocaleString():s.toString().replace(/"/g,'""'),s.search(/("|,|\n)/g)>=0&&(s=`"${s}"`),s}).join(t)).join(`
1
+ import{a as P,b as W,c as B}from"./chunk-JBKHY4HH.js";import{X as N}from"./chunk-4G3QN54S.js";import{e as x}from"./chunk-BUFEIJAI.js";import{h as E,m as D,y as j}from"./chunk-DPLEMBB4.js";import{d as V,k as I,n as F}from"./chunk-GPEVUTDI.js";import{Dc as y,Eb as S,Ic as v,Jc as T,Ka as C,Kc as b,Pc as O,Qc as M,Wb as u,ea as g,gc as h,hc as _,ja as c,mc as k,oa as d,rc as f,v as m,wb as w,ya as p,za as l}from"./chunk-T5ONJF63.js";var G=(()=>{class o{constructor(){}convertToCSV(e,t){let i;if(typeof e=="string")i=e;else{var n=typeof e=="object"?e:JSON.parse(e);i=this.transformToCSVStringFormat(n)}this.downloadCSV(i,t)}transformToCSVStringFormat(e){if(!e||!e.length)return;let t=",",i=Object.keys(e[0]);return e.map(a=>i.map(r=>{let s=a[r]===null||a[r]===void 0?"":a[r];return s=s instanceof Date?s.toLocaleString():s.toString().replace(/"/g,'""'),s.search(/("|,|\n)/g)>=0&&(s=`"${s}"`),s}).join(t)).join(`
2
2
  `)}downloadCSV(e,t){var i=new Blob([e],{type:"text/csv;charset=utf8;"}),n=document.createElement("a");n.setAttribute("href",window.URL.createObjectURL(i)),n.setAttribute("download",t),document.body.appendChild(n),n.click(),document.body.removeChild(n)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var J=(()=>{class o{constructor(e,t){this.http=e,this.exportService=t}loadInitialPage(){return this.http.post("/api/ordersLoader/GetOrder",{})}getNewOrders(e){return this.http.post("/api/orders/GetNewOrder",e).pipe(m(t=>t.Data))}getTotalNewOrders(e,t,i){let n={ListChannelID:e,From:t,To:i};return this.http.post("/api/orders/GetCountNewOrder",n).pipe(m(a=>a.Count))}exportOrders(e,t){return this.http.post("api/Orders/ExportOrder",e).pipe(g(i=>{this.exportService.convertToCSV(i,t)}))}static{this.\u0275fac=function(t){return new(t||o)(d(x),d(G))}}static{this.\u0275prov=c({token:o,factory:o.\u0275fac})}}return o})();var R=o=>({"full-width":o}),U=()=>({standalone:!0}),ae=(()=>{class o{constructor(e){this.datePipe=e,this.fullWidth=!1,this.timeChange=new C}ngOnInit(){}onTimeChange(e){let t=null;e&&(t=this.datePipe.transform(e,"HH:mm")),this.timeChange.emit(t),this.onTimePickerChange()}onShowCalendar(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="inside")}}onTimePickerChange(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="outside")}}static{this.\u0275fac=function(t){return new(t||o)(w(I))}}static{this.\u0275cmp=S({type:o,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:"fullWidth"},outputs:{timeChange:"timeChange"},decls:4,vars:8,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body",3,"ngModelChange","onSelect","ngClass","baseZIndex","ngModel","timeOnly","ngModelOptions"],["size","small","label","Close",3,"click"]],template:function(t,i){if(t&1){let n=k();h(0,"p-datepicker",1,0),b("ngModelChange",function(r){return p(n),T(i.time,r)||(i.time=r),l(r)}),f("ngModelChange",function(r){return p(n),l(i.onTimeChange(r))})("onSelect",function(){return p(n),l(i.onShowCalendar())}),h(2,"p-footer")(3,"p-button",2),f("click",function(){return p(n),y(1).hideOverlay(),l(i.onShowCalendar())}),_()()()}t&2&&(u("ngClass",M(5,R,i.fullWidth))("baseZIndex",1100),v("ngModel",i.time),u("timeOnly",!0)("ngModelOptions",O(7,U)))},dependencies:[F,V,j,E,D,B,W,P,N],styles:["p-datepicker span.p-datepicker.custom-height{height:44px;width:70px} p-datepicker.full-width span.p-datepicker.custom-height{height:44px;width:100%!important}"]})}}return o})();export{J as a,ae as b};