pcm-agents 0.6.11 → 0.6.13

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 (292) hide show
  1. package/dist/cjs/error-event-J_ZWIqWF.js +33 -0
  2. package/dist/cjs/error-event-J_ZWIqWF.js.map +1 -0
  3. package/dist/cjs/{index-CvEfNyEj.js → index-CRlt8Nv6.js} +53 -3
  4. package/dist/cjs/index-CRlt8Nv6.js.map +1 -0
  5. package/dist/cjs/index-WNdOTXnX.js +11068 -0
  6. package/dist/cjs/index-WNdOTXnX.js.map +1 -0
  7. package/dist/cjs/index.cjs.js +2 -2
  8. package/dist/cjs/loader.cjs.js +3 -5
  9. package/dist/cjs/loader.cjs.js.map +1 -1
  10. package/dist/cjs/message.service-DGUsA-FY.js +135 -0
  11. package/dist/cjs/message.service-DGUsA-FY.js.map +1 -0
  12. package/dist/cjs/{pcm-1zhanshi-mnms-modal_17.cjs.entry.js → pcm-1zhanshi-mnms-modal_21.cjs.entry.js} +3276 -216
  13. package/dist/cjs/pcm-1zhanshi-mnms-modal_21.cjs.entry.js.map +1 -0
  14. package/dist/cjs/pcm-agents.cjs.js +4 -6
  15. package/dist/cjs/pcm-agents.cjs.js.map +1 -1
  16. package/dist/cjs/pcm-message.cjs.entry.js +3 -3
  17. package/dist/cjs/pcm-message.cjs.entry.js.map +1 -1
  18. package/dist/cjs/pcm-message.entry.cjs.js.map +1 -1
  19. package/dist/cjs/pcm-mnms-video-modal.cjs.entry.js +8 -8
  20. package/dist/cjs/pcm-mnms-video-modal.cjs.entry.js.map +1 -1
  21. package/dist/cjs/pcm-mnms-video-modal.entry.cjs.js.map +1 -1
  22. package/dist/cjs/pcm-mnms-zp-modal.cjs.entry.js +29 -86
  23. package/dist/cjs/pcm-mnms-zp-modal.cjs.entry.js.map +1 -1
  24. package/dist/cjs/pcm-mnms-zp-modal.entry.cjs.js.map +1 -1
  25. package/dist/cjs/{sentry-reporter-BWFtw_aT.js → sentry-reporter-tpI4WdkE.js} +12 -40
  26. package/dist/cjs/sentry-reporter-tpI4WdkE.js.map +1 -0
  27. package/dist/collection/collection-manifest.json +5 -1
  28. package/dist/collection/components/pcm-1zhanshi-mnms-modal/pcm-1zhanshi-mnms-modal.js.map +1 -1
  29. package/dist/collection/components/pcm-app-chat-modal/pcm-app-chat-modal.css +986 -986
  30. package/dist/collection/components/pcm-app-chat-modal/pcm-app-chat-modal.js +7 -9
  31. package/dist/collection/components/pcm-app-chat-modal/pcm-app-chat-modal.js.map +1 -1
  32. package/dist/collection/components/pcm-button/pcm-button.css +199 -199
  33. package/dist/collection/components/pcm-button/pcm-button.js +6 -6
  34. package/dist/collection/components/pcm-button/pcm-button.js.map +1 -1
  35. package/dist/collection/components/pcm-card/pcm-card.css +259 -259
  36. package/dist/collection/components/pcm-card/pcm-card.js +1 -1
  37. package/dist/collection/components/pcm-card/pcm-card.js.map +1 -1
  38. package/dist/collection/components/pcm-chat-message/pcm-chat-message.css +554 -554
  39. package/dist/collection/components/pcm-chat-message/pcm-chat-message.js +3 -3
  40. package/dist/collection/components/pcm-chat-message/pcm-chat-message.js.map +1 -1
  41. package/dist/collection/components/pcm-drawer/pcm-drawer.css +102 -102
  42. package/dist/collection/components/pcm-drawer/pcm-drawer.js +1 -1
  43. package/dist/collection/components/pcm-drawer/pcm-drawer.js.map +1 -1
  44. package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.css +854 -854
  45. package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.js +5 -7
  46. package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.js.map +1 -1
  47. package/dist/collection/components/pcm-htws-modal/pcm-htws-modal.css +95 -95
  48. package/dist/collection/components/pcm-htws-modal/pcm-htws-modal.js +1 -1
  49. package/dist/collection/components/pcm-htws-modal/pcm-htws-modal.js.map +1 -1
  50. package/dist/collection/components/pcm-hyzj-modal/pcm-hyzj-modal.js +2 -2
  51. package/dist/collection/components/pcm-hyzj-modal/pcm-hyzj-modal.js.map +1 -1
  52. package/dist/collection/components/pcm-jd-modal/pcm-jd-modal.css +312 -312
  53. package/dist/collection/components/pcm-jd-modal/pcm-jd-modal.js +1 -1
  54. package/dist/collection/components/pcm-jd-modal/pcm-jd-modal.js.map +1 -1
  55. package/dist/collection/components/pcm-jlpp-modal/pcm-jlpp-modal.js +2 -2
  56. package/dist/collection/components/pcm-jlpp-modal/pcm-jlpp-modal.js.map +1 -1
  57. package/dist/collection/components/pcm-message/pcm-message.css +64 -64
  58. package/dist/collection/components/pcm-message/pcm-message.js +2 -2
  59. package/dist/collection/components/pcm-message/pcm-message.js.map +1 -1
  60. package/dist/collection/components/pcm-mnct-modal/pcm-mnct-modal.css +1 -1
  61. package/dist/collection/components/pcm-mnct-modal/pcm-mnct-modal.js +2 -2
  62. package/dist/collection/components/pcm-mnct-modal/pcm-mnct-modal.js.map +1 -1
  63. package/dist/collection/components/pcm-mnms-modal/pcm-mnms-modal.js +67 -84
  64. package/dist/collection/components/pcm-mnms-modal/pcm-mnms-modal.js.map +1 -1
  65. package/dist/collection/components/pcm-mnms-video-modal/pcm-mnms-video-modal.js +2 -2
  66. package/dist/collection/components/pcm-mnms-video-modal/pcm-mnms-video-modal.js.map +1 -1
  67. package/dist/collection/components/pcm-mnms-zp-modal/pcm-mnms-zp-modal.js +67 -84
  68. package/dist/collection/components/pcm-mnms-zp-modal/pcm-mnms-zp-modal.js.map +1 -1
  69. package/dist/collection/components/pcm-mobile-input-btn/pcm-mobile-input-btn.css +140 -0
  70. package/dist/collection/components/pcm-mobile-input-btn/pcm-mobile-input-btn.js +307 -0
  71. package/dist/collection/components/pcm-mobile-input-btn/pcm-mobile-input-btn.js.map +1 -0
  72. package/dist/collection/components/pcm-mobile-input-btn/uploadNumberSDK.js +25 -0
  73. package/dist/collection/components/pcm-mobile-input-btn/uploadNumberSDK.js.map +1 -0
  74. package/dist/collection/components/pcm-mobile-upload-btn/pcm-mobile-upload-btn.css +127 -0
  75. package/dist/collection/components/pcm-mobile-upload-btn/pcm-mobile-upload-btn.js +350 -0
  76. package/dist/collection/components/pcm-mobile-upload-btn/pcm-mobile-upload-btn.js.map +1 -0
  77. package/dist/collection/components/pcm-mobile-upload-btn/uploadNumberSDK.js +25 -0
  78. package/dist/collection/components/pcm-mobile-upload-btn/uploadNumberSDK.js.map +1 -0
  79. package/dist/collection/components/pcm-msbg-modal/pcm-msbg-modal.js +2 -2
  80. package/dist/collection/components/pcm-msbg-modal/pcm-msbg-modal.js.map +1 -1
  81. package/dist/collection/components/pcm-qgqjl-modal/pcm-qgqjl-modal.css +1 -1
  82. package/dist/collection/components/pcm-qgqjl-modal/pcm-qgqjl-modal.js +2 -2
  83. package/dist/collection/components/pcm-qgqjl-modal/pcm-qgqjl-modal.js.map +1 -1
  84. package/dist/collection/components/pcm-time-count-down/pcm-time-count-down.css +0 -0
  85. package/dist/collection/components/pcm-time-count-down/pcm-time-count-down.js +106 -0
  86. package/dist/collection/components/pcm-time-count-down/pcm-time-count-down.js.map +1 -0
  87. package/dist/collection/components/pcm-upload/pcm-upload.css +0 -0
  88. package/dist/collection/components/pcm-upload/pcm-upload.js +408 -0
  89. package/dist/collection/components/pcm-upload/pcm-upload.js.map +1 -0
  90. package/dist/collection/components/pcm-zsk-chat-modal/pcm-zsk-chat-modal.css +969 -969
  91. package/dist/collection/components/pcm-zsk-chat-modal/pcm-zsk-chat-modal.js +3 -5
  92. package/dist/collection/components/pcm-zsk-chat-modal/pcm-zsk-chat-modal.js.map +1 -1
  93. package/dist/collection/components/pcm-zygh-modal/pcm-zygh-modal.css +68 -68
  94. package/dist/collection/components/pcm-zygh-modal/pcm-zygh-modal.js +4 -4
  95. package/dist/collection/components/pcm-zygh-modal/pcm-zygh-modal.js.map +1 -1
  96. package/dist/collection/global/global.css +401 -398
  97. package/dist/collection/global/markdown.css +1233 -1233
  98. package/dist/collection/global/message.js.map +1 -1
  99. package/dist/collection/index.js.map +1 -1
  100. package/dist/collection/interfaces/chat.js.map +1 -1
  101. package/dist/collection/interfaces/events.js.map +1 -1
  102. package/dist/collection/services/message.service.js.map +1 -1
  103. package/dist/collection/utils/env.js +3 -0
  104. package/dist/collection/utils/env.js.map +1 -1
  105. package/dist/collection/utils/error-event.js.map +1 -1
  106. package/dist/collection/utils/init.js.map +1 -1
  107. package/dist/collection/utils/sentry-reporter.js.map +1 -1
  108. package/dist/collection/utils/utils.js +48 -24
  109. package/dist/collection/utils/utils.js.map +1 -1
  110. package/dist/components/index.js +3 -5482
  111. package/dist/components/index.js.map +1 -1
  112. package/dist/components/{p-AYWZDCn8.js → p-B0WOTw9J.js} +51 -4
  113. package/dist/components/p-B0WOTw9J.js.map +1 -0
  114. package/dist/components/{p-DUQ46MUh.js → p-BGXbWUJg.js} +3 -3
  115. package/dist/components/{p-DUQ46MUh.js.map → p-BGXbWUJg.js.map} +1 -1
  116. package/dist/{esm/sentry-reporter-BFBS363a.js → components/p-BW3r6Lrf.js} +5 -32
  117. package/dist/components/p-BW3r6Lrf.js.map +1 -0
  118. package/dist/{esm/app-globals-Chti62re.js → components/p-BdiUKin5.js} +9619 -4296
  119. package/dist/components/p-BdiUKin5.js.map +1 -0
  120. package/dist/components/{p-FjtoYPVY.js → p-BywzltXy.js} +10 -9
  121. package/dist/components/p-BywzltXy.js.map +1 -0
  122. package/dist/components/p-C2OsjtRx.js +208 -0
  123. package/dist/components/p-C2OsjtRx.js.map +1 -0
  124. package/dist/components/{p-D2Z8casl.js → p-CuIvbaWY.js} +5 -5
  125. package/dist/components/p-CuIvbaWY.js.map +1 -0
  126. package/dist/components/p-D0ZMoyH8.js +251 -0
  127. package/dist/components/p-D0ZMoyH8.js.map +1 -0
  128. package/dist/components/{p-CjbFHLT7.js → p-De3VHEUn.js} +7 -71
  129. package/dist/components/p-De3VHEUn.js.map +1 -0
  130. package/dist/components/p-Dv8qvK0w.js +2646 -0
  131. package/dist/components/p-Dv8qvK0w.js.map +1 -0
  132. package/dist/components/p-RD3mwuBX.js +226 -0
  133. package/dist/components/p-RD3mwuBX.js.map +1 -0
  134. package/dist/components/p-njngFX_n.js +80 -0
  135. package/dist/components/p-njngFX_n.js.map +1 -0
  136. package/dist/components/pcm-1zhanshi-mnms-modal.js +7 -7
  137. package/dist/components/pcm-1zhanshi-mnms-modal.js.map +1 -1
  138. package/dist/components/pcm-app-chat-modal.js +1 -1
  139. package/dist/components/pcm-button.js +2 -2
  140. package/dist/components/pcm-button.js.map +1 -1
  141. package/dist/components/pcm-card.js +3 -3
  142. package/dist/components/pcm-card.js.map +1 -1
  143. package/dist/components/pcm-chat-message.js +1 -1
  144. package/dist/components/pcm-drawer.js +1 -1
  145. package/dist/components/pcm-hr-chat-modal.js +5 -4
  146. package/dist/components/pcm-hr-chat-modal.js.map +1 -1
  147. package/dist/components/pcm-htws-modal.js +8 -7
  148. package/dist/components/pcm-htws-modal.js.map +1 -1
  149. package/dist/components/pcm-hyzj-modal.js +8 -7
  150. package/dist/components/pcm-hyzj-modal.js.map +1 -1
  151. package/dist/components/pcm-jd-modal.js +8 -7
  152. package/dist/components/pcm-jd-modal.js.map +1 -1
  153. package/dist/components/pcm-jlpp-modal.js +8 -7
  154. package/dist/components/pcm-jlpp-modal.js.map +1 -1
  155. package/dist/components/pcm-message.js +3 -3
  156. package/dist/components/pcm-message.js.map +1 -1
  157. package/dist/components/pcm-mnct-modal.js +8 -7
  158. package/dist/components/pcm-mnct-modal.js.map +1 -1
  159. package/dist/components/pcm-mnms-modal.js +60 -90
  160. package/dist/components/pcm-mnms-modal.js.map +1 -1
  161. package/dist/components/pcm-mnms-video-modal.js +8 -7
  162. package/dist/components/pcm-mnms-video-modal.js.map +1 -1
  163. package/dist/components/pcm-mnms-zp-modal.js +60 -90
  164. package/dist/components/pcm-mnms-zp-modal.js.map +1 -1
  165. package/dist/components/pcm-mobile-input-btn.d.ts +11 -0
  166. package/dist/components/pcm-mobile-input-btn.js +9 -0
  167. package/dist/components/pcm-mobile-input-btn.js.map +1 -0
  168. package/dist/components/pcm-mobile-upload-btn.d.ts +11 -0
  169. package/dist/components/pcm-mobile-upload-btn.js +9 -0
  170. package/dist/components/pcm-mobile-upload-btn.js.map +1 -0
  171. package/dist/components/pcm-msbg-modal.js +8 -7
  172. package/dist/components/pcm-msbg-modal.js.map +1 -1
  173. package/dist/components/pcm-qgqjl-modal.js +8 -7
  174. package/dist/components/pcm-qgqjl-modal.js.map +1 -1
  175. package/dist/components/pcm-time-count-down.d.ts +11 -0
  176. package/dist/components/pcm-time-count-down.js +9 -0
  177. package/dist/components/pcm-time-count-down.js.map +1 -0
  178. package/dist/components/pcm-upload.d.ts +11 -0
  179. package/dist/components/pcm-upload.js +9 -0
  180. package/dist/components/pcm-upload.js.map +1 -0
  181. package/dist/components/pcm-zsk-chat-modal.js +4 -4
  182. package/dist/components/pcm-zsk-chat-modal.js.map +1 -1
  183. package/dist/components/pcm-zygh-modal.js +8 -7
  184. package/dist/components/pcm-zygh-modal.js.map +1 -1
  185. package/dist/esm/error-event-C0FYX2-Z.js +31 -0
  186. package/dist/esm/error-event-C0FYX2-Z.js.map +1 -0
  187. package/dist/esm/{index-GyOE8SlD.js → index-BnNqOUZf.js} +51 -4
  188. package/dist/esm/index-BnNqOUZf.js.map +1 -0
  189. package/dist/esm/index-BuVfV0zo.js +11035 -0
  190. package/dist/esm/index-BuVfV0zo.js.map +1 -0
  191. package/dist/esm/index.js +2 -2
  192. package/dist/esm/loader.js +3 -5
  193. package/dist/esm/loader.js.map +1 -1
  194. package/dist/esm/message.service-DXVhHj6-.js +133 -0
  195. package/dist/esm/message.service-DXVhHj6-.js.map +1 -0
  196. package/dist/esm/{pcm-1zhanshi-mnms-modal_17.entry.js → pcm-1zhanshi-mnms-modal_21.entry.js} +3225 -169
  197. package/dist/esm/pcm-1zhanshi-mnms-modal_21.entry.js.map +1 -0
  198. package/dist/esm/pcm-agents.js +4 -6
  199. package/dist/esm/pcm-agents.js.map +1 -1
  200. package/dist/esm/pcm-message.entry.js +3 -3
  201. package/dist/esm/pcm-message.entry.js.map +1 -1
  202. package/dist/esm/pcm-mnms-video-modal.entry.js +5 -5
  203. package/dist/esm/pcm-mnms-video-modal.entry.js.map +1 -1
  204. package/dist/esm/pcm-mnms-zp-modal.entry.js +28 -85
  205. package/dist/esm/pcm-mnms-zp-modal.entry.js.map +1 -1
  206. package/dist/esm/sentry-reporter-CYzy4_8O.js +70 -0
  207. package/dist/esm/sentry-reporter-CYzy4_8O.js.map +1 -0
  208. package/dist/pcm-agents/index.esm.js +1 -1
  209. package/dist/pcm-agents/loader.esm.js.map +1 -1
  210. package/dist/pcm-agents/p-18a06873.entry.js +2 -0
  211. package/dist/pcm-agents/p-18a06873.entry.js.map +1 -0
  212. package/dist/pcm-agents/p-47e2e1d0.entry.js +2 -0
  213. package/dist/pcm-agents/p-47e2e1d0.entry.js.map +1 -0
  214. package/dist/pcm-agents/{p-3608c0c6.entry.js → p-7a582f00.entry.js} +2 -2
  215. package/dist/pcm-agents/p-7a582f00.entry.js.map +1 -0
  216. package/dist/pcm-agents/p-BhFnI70g.js +2 -0
  217. package/dist/pcm-agents/p-BhFnI70g.js.map +1 -0
  218. package/dist/pcm-agents/p-BuVfV0zo.js +3 -0
  219. package/dist/pcm-agents/p-BuVfV0zo.js.map +1 -0
  220. package/dist/pcm-agents/p-C0FYX2-Z.js +2 -0
  221. package/dist/pcm-agents/p-C0FYX2-Z.js.map +1 -0
  222. package/dist/pcm-agents/p-DXVhHj6-.js +2 -0
  223. package/dist/pcm-agents/p-DXVhHj6-.js.map +1 -0
  224. package/dist/pcm-agents/p-DkeaAFic.js +2 -0
  225. package/dist/pcm-agents/p-DkeaAFic.js.map +1 -0
  226. package/dist/pcm-agents/p-f5f96853.entry.js +245 -0
  227. package/dist/pcm-agents/p-f5f96853.entry.js.map +1 -0
  228. package/dist/pcm-agents/pcm-agents.esm.js +1 -1
  229. package/dist/pcm-agents/pcm-agents.esm.js.map +1 -1
  230. package/dist/pcm-agents/pcm-message.entry.esm.js.map +1 -1
  231. package/dist/pcm-agents/pcm-mnms-video-modal.entry.esm.js.map +1 -1
  232. package/dist/pcm-agents/pcm-mnms-zp-modal.entry.esm.js.map +1 -1
  233. package/dist/store/auth.store.js.map +1 -1
  234. package/dist/store/config.store.js.map +1 -1
  235. package/dist/types/components/pcm-mnms-modal/pcm-mnms-modal.d.ts +9 -4
  236. package/dist/types/components/pcm-mnms-zp-modal/pcm-mnms-zp-modal.d.ts +9 -4
  237. package/dist/types/components/pcm-mobile-input-btn/pcm-mobile-input-btn.d.ts +36 -0
  238. package/dist/types/components/pcm-mobile-input-btn/uploadNumberSDK.d.ts +9 -0
  239. package/dist/types/components/pcm-mobile-upload-btn/pcm-mobile-upload-btn.d.ts +44 -0
  240. package/dist/types/components/pcm-mobile-upload-btn/uploadNumberSDK.d.ts +9 -0
  241. package/dist/types/components/pcm-time-count-down/pcm-time-count-down.d.ts +15 -0
  242. package/dist/types/components/pcm-upload/pcm-upload.d.ts +54 -0
  243. package/dist/types/components/pcm-upload/type.d.ts +4 -0
  244. package/dist/types/components.d.ts +798 -30
  245. package/dist/types/stencil-public-runtime.d.ts +1 -1
  246. package/dist/types/utils/env.d.ts +2 -0
  247. package/dist/types/utils/utils.d.ts +30 -12
  248. package/package.json +70 -69
  249. package/dist/cjs/app-globals-BIO4q6tX.js +0 -5487
  250. package/dist/cjs/app-globals-BIO4q6tX.js.map +0 -1
  251. package/dist/cjs/exports-Dc-pQh4A.js +0 -4087
  252. package/dist/cjs/exports-Dc-pQh4A.js.map +0 -1
  253. package/dist/cjs/index-C_qhED9Z.js +0 -1538
  254. package/dist/cjs/index-C_qhED9Z.js.map +0 -1
  255. package/dist/cjs/index-CvEfNyEj.js.map +0 -1
  256. package/dist/cjs/pcm-1zhanshi-mnms-modal_17.cjs.entry.js.map +0 -1
  257. package/dist/cjs/sentry-reporter-BWFtw_aT.js.map +0 -1
  258. package/dist/components/p-75J0r72D.js +0 -4017
  259. package/dist/components/p-75J0r72D.js.map +0 -1
  260. package/dist/components/p-AYWZDCn8.js.map +0 -1
  261. package/dist/components/p-CR7WLzmM.js +0 -1303
  262. package/dist/components/p-CR7WLzmM.js.map +0 -1
  263. package/dist/components/p-CjbFHLT7.js.map +0 -1
  264. package/dist/components/p-D2Z8casl.js.map +0 -1
  265. package/dist/components/p-FjtoYPVY.js.map +0 -1
  266. package/dist/esm/app-globals-Chti62re.js.map +0 -1
  267. package/dist/esm/exports-Bs-zO1WZ.js +0 -4017
  268. package/dist/esm/exports-Bs-zO1WZ.js.map +0 -1
  269. package/dist/esm/index-Bq0K-WqZ.js +0 -1528
  270. package/dist/esm/index-Bq0K-WqZ.js.map +0 -1
  271. package/dist/esm/index-GyOE8SlD.js.map +0 -1
  272. package/dist/esm/pcm-1zhanshi-mnms-modal_17.entry.js.map +0 -1
  273. package/dist/esm/sentry-reporter-BFBS363a.js.map +0 -1
  274. package/dist/pcm-agents/p-2Gpw8rvH.js +0 -2
  275. package/dist/pcm-agents/p-2Gpw8rvH.js.map +0 -1
  276. package/dist/pcm-agents/p-3608c0c6.entry.js.map +0 -1
  277. package/dist/pcm-agents/p-60d7a0b0.entry.js +0 -2
  278. package/dist/pcm-agents/p-60d7a0b0.entry.js.map +0 -1
  279. package/dist/pcm-agents/p-9e6efc2d.entry.js +0 -2
  280. package/dist/pcm-agents/p-9e6efc2d.entry.js.map +0 -1
  281. package/dist/pcm-agents/p-BUV0S8Cc.js +0 -2
  282. package/dist/pcm-agents/p-BUV0S8Cc.js.map +0 -1
  283. package/dist/pcm-agents/p-Bq0K-WqZ.js +0 -3
  284. package/dist/pcm-agents/p-Bq0K-WqZ.js.map +0 -1
  285. package/dist/pcm-agents/p-Bs-zO1WZ.js +0 -2
  286. package/dist/pcm-agents/p-Bs-zO1WZ.js.map +0 -1
  287. package/dist/pcm-agents/p-CeRTfvY9.js +0 -2
  288. package/dist/pcm-agents/p-CeRTfvY9.js.map +0 -1
  289. package/dist/pcm-agents/p-e6c87a78.entry.js +0 -2
  290. package/dist/pcm-agents/p-e6c87a78.entry.js.map +0 -1
  291. /package/dist/types/{code/agents-sdk → Users/debugksir/Documents/pcm/sdk}/packages/pcm-agents/.stencil/store/auth.store.d.ts +0 -0
  292. /package/dist/types/{code/agents-sdk → Users/debugksir/Documents/pcm/sdk}/packages/pcm-agents/.stencil/store/config.store.d.ts +0 -0
@@ -1,1538 +0,0 @@
1
- 'use strict';
2
-
3
- const NAMESPACE = 'pcm-agents';
4
- const BUILD = /* pcm-agents */ { hydratedSelectorName: "hydrated", lazyLoad: true, updatable: true};
5
-
6
- /*
7
- Stencil Client Platform v4.31.0 | MIT Licensed | https://stenciljs.com
8
- */
9
- var __defProp = Object.defineProperty;
10
- var __export = (target, all) => {
11
- for (var name in all)
12
- __defProp(target, name, { get: all[name], enumerable: true });
13
- };
14
-
15
- // src/utils/constants.ts
16
- var SVG_NS = "http://www.w3.org/2000/svg";
17
- var HTML_NS = "http://www.w3.org/1999/xhtml";
18
-
19
- // src/utils/es2022-rewire-class-members.ts
20
- var reWireGetterSetter = (instance, hostRef) => {
21
- var _a;
22
- const cmpMeta = hostRef.$cmpMeta$;
23
- const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
24
- members.map(([memberName, [memberFlags]]) => {
25
- if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
26
- const ogValue = instance[memberName];
27
- const ogDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(instance), memberName);
28
- Object.defineProperty(instance, memberName, {
29
- get() {
30
- return ogDescriptor.get.call(this);
31
- },
32
- set(newValue) {
33
- ogDescriptor.set.call(this, newValue);
34
- },
35
- configurable: true,
36
- enumerable: true
37
- });
38
- instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
39
- }
40
- });
41
- };
42
-
43
- // src/client/client-host-ref.ts
44
- var getHostRef = (ref) => {
45
- if (ref.__stencil__getHostRef) {
46
- return ref.__stencil__getHostRef();
47
- }
48
- return void 0;
49
- };
50
- var registerInstance = (lazyInstance, hostRef) => {
51
- lazyInstance.__stencil__getHostRef = () => hostRef;
52
- hostRef.$lazyInstance$ = lazyInstance;
53
- {
54
- reWireGetterSetter(lazyInstance, hostRef);
55
- }
56
- };
57
- var registerHost = (hostElement, cmpMeta) => {
58
- const hostRef = {
59
- $flags$: 0,
60
- $hostElement$: hostElement,
61
- $cmpMeta$: cmpMeta,
62
- $instanceValues$: /* @__PURE__ */ new Map()
63
- };
64
- {
65
- hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
66
- }
67
- {
68
- hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
69
- hostElement["s-p"] = [];
70
- hostElement["s-rc"] = [];
71
- }
72
- const ref = hostRef;
73
- hostElement.__stencil__getHostRef = () => ref;
74
- return ref;
75
- };
76
- var isMemberInElement = (elm, memberName) => memberName in elm;
77
- var consoleError = (e, el) => (0, console.error)(e, el);
78
-
79
- // src/client/client-load-module.ts
80
- var cmpModules = /* @__PURE__ */ new Map();
81
- var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
82
- const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
83
- const bundleId = cmpMeta.$lazyBundleId$;
84
- if (!bundleId) {
85
- return void 0;
86
- }
87
- const module = cmpModules.get(bundleId) ;
88
- if (module) {
89
- return module[exportName];
90
- }
91
-
92
- if (!hmrVersionId || !BUILD.hotModuleReplacement) {
93
- const processMod = importedModule => {
94
- cmpModules.set(bundleId, importedModule);
95
- return importedModule[exportName];
96
- }
97
- switch(bundleId) {
98
-
99
- case 'pcm-message.cjs':
100
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
101
- /* webpackMode: "lazy" */
102
- './pcm-message.cjs.entry.js')); }).then(processMod, consoleError);
103
- case 'pcm-mnms-video-modal.cjs':
104
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
105
- /* webpackMode: "lazy" */
106
- './pcm-mnms-video-modal.cjs.entry.js')); }).then(processMod, consoleError);
107
- case 'pcm-mnms-zp-modal.cjs':
108
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
109
- /* webpackMode: "lazy" */
110
- './pcm-mnms-zp-modal.cjs.entry.js')); }).then(processMod, consoleError);
111
- case 'pcm-1zhanshi-mnms-modal_17.cjs':
112
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
113
- /* webpackMode: "lazy" */
114
- './pcm-1zhanshi-mnms-modal_17.cjs.entry.js')); }).then(processMod, consoleError);
115
- }
116
- }
117
- return import(
118
- /* @vite-ignore */
119
- /* webpackInclude: /\.entry\.js$/ */
120
- /* webpackExclude: /\.system\.entry\.js$/ */
121
- /* webpackMode: "lazy" */
122
- `./${bundleId}.entry.js${""}`
123
- ).then(
124
- (importedModule) => {
125
- {
126
- cmpModules.set(bundleId, importedModule);
127
- }
128
- return importedModule[exportName];
129
- },
130
- (e) => {
131
- consoleError(e, hostRef.$hostElement$);
132
- }
133
- );
134
- };
135
-
136
- // src/client/client-style.ts
137
- var styles = /* @__PURE__ */ new Map();
138
- var HYDRATED_STYLE_ID = "sty-id";
139
- var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
140
- var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
141
- var win = typeof window !== "undefined" ? window : {};
142
- var plt = {
143
- $flags$: 0,
144
- $resourcesUrl$: "",
145
- jmp: (h2) => h2(),
146
- raf: (h2) => requestAnimationFrame(h2),
147
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
148
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
149
- ce: (eventName, opts) => new CustomEvent(eventName, opts)
150
- };
151
- var promiseResolve = (v) => Promise.resolve(v);
152
- var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
153
- try {
154
- new CSSStyleSheet();
155
- return typeof new CSSStyleSheet().replaceSync === "function";
156
- } catch (e) {
157
- }
158
- return false;
159
- })() ;
160
- var queuePending = false;
161
- var queueDomReads = [];
162
- var queueDomWrites = [];
163
- var queueTask = (queue, write) => (cb) => {
164
- queue.push(cb);
165
- if (!queuePending) {
166
- queuePending = true;
167
- if (write && plt.$flags$ & 4 /* queueSync */) {
168
- nextTick(flush);
169
- } else {
170
- plt.raf(flush);
171
- }
172
- }
173
- };
174
- var consume = (queue) => {
175
- for (let i2 = 0; i2 < queue.length; i2++) {
176
- try {
177
- queue[i2](performance.now());
178
- } catch (e) {
179
- consoleError(e);
180
- }
181
- }
182
- queue.length = 0;
183
- };
184
- var flush = () => {
185
- consume(queueDomReads);
186
- {
187
- consume(queueDomWrites);
188
- if (queuePending = queueDomReads.length > 0) {
189
- plt.raf(flush);
190
- }
191
- }
192
- };
193
- var nextTick = (cb) => promiseResolve().then(cb);
194
- var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
195
- var isComplexType = (o) => {
196
- o = typeof o;
197
- return o === "object" || o === "function";
198
- };
199
-
200
- // src/utils/query-nonce-meta-tag-content.ts
201
- function queryNonceMetaTagContent(doc) {
202
- var _a, _b, _c;
203
- return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
204
- }
205
-
206
- // src/utils/regular-expression.ts
207
- var escapeRegExpSpecialCharacters = (text) => {
208
- return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
209
- };
210
-
211
- // src/utils/result.ts
212
- var result_exports = {};
213
- __export(result_exports, {
214
- err: () => err,
215
- map: () => map,
216
- ok: () => ok,
217
- unwrap: () => unwrap,
218
- unwrapErr: () => unwrapErr
219
- });
220
- var ok = (value) => ({
221
- isOk: true,
222
- isErr: false,
223
- value
224
- });
225
- var err = (value) => ({
226
- isOk: false,
227
- isErr: true,
228
- value
229
- });
230
- function map(result, fn) {
231
- if (result.isOk) {
232
- const val = fn(result.value);
233
- if (val instanceof Promise) {
234
- return val.then((newVal) => ok(newVal));
235
- } else {
236
- return ok(val);
237
- }
238
- }
239
- if (result.isErr) {
240
- const value = result.value;
241
- return err(value);
242
- }
243
- throw "should never get here";
244
- }
245
- var unwrap = (result) => {
246
- if (result.isOk) {
247
- return result.value;
248
- } else {
249
- throw result.value;
250
- }
251
- };
252
- var unwrapErr = (result) => {
253
- if (result.isErr) {
254
- return result.value;
255
- } else {
256
- throw result.value;
257
- }
258
- };
259
- var createTime = (fnName, tagName = "") => {
260
- {
261
- return () => {
262
- return;
263
- };
264
- }
265
- };
266
- var uniqueTime = (key, measureText) => {
267
- {
268
- return () => {
269
- return;
270
- };
271
- }
272
- };
273
- var h = (nodeName, vnodeData, ...children) => {
274
- let child = null;
275
- let key = null;
276
- let simple = false;
277
- let lastSimple = false;
278
- const vNodeChildren = [];
279
- const walk = (c) => {
280
- for (let i2 = 0; i2 < c.length; i2++) {
281
- child = c[i2];
282
- if (Array.isArray(child)) {
283
- walk(child);
284
- } else if (child != null && typeof child !== "boolean") {
285
- if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
286
- child = String(child);
287
- }
288
- if (simple && lastSimple) {
289
- vNodeChildren[vNodeChildren.length - 1].$text$ += child;
290
- } else {
291
- vNodeChildren.push(simple ? newVNode(null, child) : child);
292
- }
293
- lastSimple = simple;
294
- }
295
- }
296
- };
297
- walk(children);
298
- if (vnodeData) {
299
- if (vnodeData.key) {
300
- key = vnodeData.key;
301
- }
302
- {
303
- const classData = vnodeData.className || vnodeData.class;
304
- if (classData) {
305
- vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
306
- }
307
- }
308
- }
309
- if (typeof nodeName === "function") {
310
- return nodeName(
311
- vnodeData === null ? {} : vnodeData,
312
- vNodeChildren,
313
- vdomFnUtils
314
- );
315
- }
316
- const vnode = newVNode(nodeName, null);
317
- vnode.$attrs$ = vnodeData;
318
- if (vNodeChildren.length > 0) {
319
- vnode.$children$ = vNodeChildren;
320
- }
321
- {
322
- vnode.$key$ = key;
323
- }
324
- return vnode;
325
- };
326
- var newVNode = (tag, text) => {
327
- const vnode = {
328
- $flags$: 0,
329
- $tag$: tag,
330
- $text$: text,
331
- $elm$: null,
332
- $children$: null
333
- };
334
- {
335
- vnode.$attrs$ = null;
336
- }
337
- {
338
- vnode.$key$ = null;
339
- }
340
- return vnode;
341
- };
342
- var Host = {};
343
- var isHost = (node) => node && node.$tag$ === Host;
344
- var vdomFnUtils = {
345
- forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
346
- map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
347
- };
348
- var convertToPublic = (node) => ({
349
- vattrs: node.$attrs$,
350
- vchildren: node.$children$,
351
- vkey: node.$key$,
352
- vname: node.$name$,
353
- vtag: node.$tag$,
354
- vtext: node.$text$
355
- });
356
- var convertToPrivate = (node) => {
357
- if (typeof node.vtag === "function") {
358
- const vnodeData = { ...node.vattrs };
359
- if (node.vkey) {
360
- vnodeData.key = node.vkey;
361
- }
362
- if (node.vname) {
363
- vnodeData.name = node.vname;
364
- }
365
- return h(node.vtag, vnodeData, ...node.vchildren || []);
366
- }
367
- const vnode = newVNode(node.vtag, node.vtext);
368
- vnode.$attrs$ = node.vattrs;
369
- vnode.$children$ = node.vchildren;
370
- vnode.$key$ = node.vkey;
371
- vnode.$name$ = node.vname;
372
- return vnode;
373
- };
374
- var createSupportsRuleRe = (selector) => {
375
- const safeSelector2 = escapeRegExpSpecialCharacters(selector);
376
- return new RegExp(
377
- // First capture group: match any context before the selector that's not inside @supports selector()
378
- // Using negative lookahead to avoid matching inside @supports selector(...) condition
379
- `(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
380
- "g"
381
- );
382
- };
383
- createSupportsRuleRe("::slotted");
384
- createSupportsRuleRe(":host");
385
- createSupportsRuleRe(":host-context");
386
- var parsePropertyValue = (propValue, propType) => {
387
- if (propValue != null && !isComplexType(propValue)) {
388
- if (propType & 4 /* Boolean */) {
389
- return propValue === "false" ? false : propValue === "" || !!propValue;
390
- }
391
- if (propType & 2 /* Number */) {
392
- return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
393
- }
394
- if (propType & 1 /* String */) {
395
- return String(propValue);
396
- }
397
- return propValue;
398
- }
399
- return propValue;
400
- };
401
- var getElement = (ref) => getHostRef(ref).$hostElement$ ;
402
-
403
- // src/runtime/event-emitter.ts
404
- var createEvent = (ref, name, flags) => {
405
- const elm = getElement(ref);
406
- return {
407
- emit: (detail) => {
408
- return emitEvent(elm, name, {
409
- bubbles: true,
410
- composed: true,
411
- cancelable: true,
412
- detail
413
- });
414
- }
415
- };
416
- };
417
- var emitEvent = (elm, name, opts) => {
418
- const ev = plt.ce(name, opts);
419
- elm.dispatchEvent(ev);
420
- return ev;
421
- };
422
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
423
- var registerStyle = (scopeId2, cssText, allowCS) => {
424
- let style = styles.get(scopeId2);
425
- if (supportsConstructableStylesheets && allowCS) {
426
- style = style || new CSSStyleSheet();
427
- if (typeof style === "string") {
428
- style = cssText;
429
- } else {
430
- style.replaceSync(cssText);
431
- }
432
- } else {
433
- style = cssText;
434
- }
435
- styles.set(scopeId2, style);
436
- };
437
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
438
- var _a;
439
- const scopeId2 = getScopeId(cmpMeta);
440
- const style = styles.get(scopeId2);
441
- if (!win.document) {
442
- return scopeId2;
443
- }
444
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
445
- if (style) {
446
- if (typeof style === "string") {
447
- styleContainerNode = styleContainerNode.head || styleContainerNode;
448
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
449
- let styleElm;
450
- if (!appliedStyles) {
451
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
452
- }
453
- if (!appliedStyles.has(scopeId2)) {
454
- {
455
- styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
456
- styleElm.innerHTML = style;
457
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
458
- if (nonce != null) {
459
- styleElm.setAttribute("nonce", nonce);
460
- }
461
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
462
- if (styleContainerNode.nodeName === "HEAD") {
463
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
464
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
465
- styleContainerNode.insertBefore(
466
- styleElm,
467
- (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
468
- );
469
- } else if ("host" in styleContainerNode) {
470
- if (supportsConstructableStylesheets) {
471
- const stylesheet = new CSSStyleSheet();
472
- stylesheet.replaceSync(style);
473
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
474
- } else {
475
- const existingStyleContainer = styleContainerNode.querySelector("style");
476
- if (existingStyleContainer) {
477
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
478
- } else {
479
- styleContainerNode.prepend(styleElm);
480
- }
481
- }
482
- } else {
483
- styleContainerNode.append(styleElm);
484
- }
485
- }
486
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
487
- styleContainerNode.insertBefore(styleElm, null);
488
- }
489
- }
490
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
491
- styleElm.innerHTML += SLOT_FB_CSS;
492
- }
493
- if (appliedStyles) {
494
- appliedStyles.add(scopeId2);
495
- }
496
- }
497
- } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
498
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
499
- }
500
- }
501
- return scopeId2;
502
- };
503
- var attachStyles = (hostRef) => {
504
- const cmpMeta = hostRef.$cmpMeta$;
505
- const elm = hostRef.$hostElement$;
506
- const flags = cmpMeta.$flags$;
507
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
508
- const scopeId2 = addStyle(
509
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
510
- cmpMeta);
511
- if (flags & 10 /* needsScopedEncapsulation */) {
512
- elm["s-sc"] = scopeId2;
513
- elm.classList.add(scopeId2 + "-h");
514
- }
515
- endAttachStyles();
516
- };
517
- var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
518
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
519
- if (oldValue === newValue) {
520
- return;
521
- }
522
- let isProp = isMemberInElement(elm, memberName);
523
- let ln = memberName.toLowerCase();
524
- if (memberName === "class") {
525
- const classList = elm.classList;
526
- const oldClasses = parseClassList(oldValue);
527
- let newClasses = parseClassList(newValue);
528
- {
529
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
530
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
531
- }
532
- } else if (memberName === "style") {
533
- {
534
- for (const prop in oldValue) {
535
- if (!newValue || newValue[prop] == null) {
536
- if (prop.includes("-")) {
537
- elm.style.removeProperty(prop);
538
- } else {
539
- elm.style[prop] = "";
540
- }
541
- }
542
- }
543
- }
544
- for (const prop in newValue) {
545
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
546
- if (prop.includes("-")) {
547
- elm.style.setProperty(prop, newValue[prop]);
548
- } else {
549
- elm.style[prop] = newValue[prop];
550
- }
551
- }
552
- }
553
- } else if (memberName === "key") ; else if (memberName === "ref") {
554
- if (newValue) {
555
- newValue(elm);
556
- }
557
- } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
558
- if (memberName[2] === "-") {
559
- memberName = memberName.slice(3);
560
- } else if (isMemberInElement(win, ln)) {
561
- memberName = ln.slice(2);
562
- } else {
563
- memberName = ln[2] + memberName.slice(3);
564
- }
565
- if (oldValue || newValue) {
566
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
567
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
568
- if (oldValue) {
569
- plt.rel(elm, memberName, oldValue, capture);
570
- }
571
- if (newValue) {
572
- plt.ael(elm, memberName, newValue, capture);
573
- }
574
- }
575
- } else {
576
- const isComplex = isComplexType(newValue);
577
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
578
- try {
579
- if (!elm.tagName.includes("-")) {
580
- const n = newValue == null ? "" : newValue;
581
- if (memberName === "list") {
582
- isProp = false;
583
- } else if (oldValue == null || elm[memberName] != n) {
584
- if (typeof elm.__lookupSetter__(memberName) === "function") {
585
- elm[memberName] = n;
586
- } else {
587
- elm.setAttribute(memberName, n);
588
- }
589
- }
590
- } else if (elm[memberName] !== newValue) {
591
- elm[memberName] = newValue;
592
- }
593
- } catch (e) {
594
- }
595
- }
596
- if (newValue == null || newValue === false) {
597
- if (newValue !== false || elm.getAttribute(memberName) === "") {
598
- {
599
- elm.removeAttribute(memberName);
600
- }
601
- }
602
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
603
- newValue = newValue === true ? "" : newValue;
604
- {
605
- elm.setAttribute(memberName, newValue);
606
- }
607
- }
608
- }
609
- };
610
- var parseClassListRegex = /\s/;
611
- var parseClassList = (value) => {
612
- if (typeof value === "object" && value && "baseVal" in value) {
613
- value = value.baseVal;
614
- }
615
- if (!value || typeof value !== "string") {
616
- return [];
617
- }
618
- return value.split(parseClassListRegex);
619
- };
620
- var CAPTURE_EVENT_SUFFIX = "Capture";
621
- var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
622
-
623
- // src/runtime/vdom/update-element.ts
624
- var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
625
- const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
626
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
627
- const newVnodeAttrs = newVnode.$attrs$ || {};
628
- {
629
- for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
630
- if (!(memberName in newVnodeAttrs)) {
631
- setAccessor(
632
- elm,
633
- memberName,
634
- oldVnodeAttrs[memberName],
635
- void 0,
636
- isSvgMode2,
637
- newVnode.$flags$);
638
- }
639
- }
640
- }
641
- for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
642
- setAccessor(
643
- elm,
644
- memberName,
645
- oldVnodeAttrs[memberName],
646
- newVnodeAttrs[memberName],
647
- isSvgMode2,
648
- newVnode.$flags$);
649
- }
650
- };
651
- function sortedAttrNames(attrNames) {
652
- return attrNames.includes("ref") ? (
653
- // we need to sort these to ensure that `'ref'` is the last attr
654
- [...attrNames.filter((attr) => attr !== "ref"), "ref"]
655
- ) : (
656
- // no need to sort, return the original array
657
- attrNames
658
- );
659
- }
660
- var hostTagName;
661
- var isSvgMode = false;
662
- var createElm = (oldParentVNode, newParentVNode, childIndex) => {
663
- const newVNode2 = newParentVNode.$children$[childIndex];
664
- let i2 = 0;
665
- let elm;
666
- let childNode;
667
- if (newVNode2.$text$ !== null) {
668
- elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
669
- } else {
670
- if (!isSvgMode) {
671
- isSvgMode = newVNode2.$tag$ === "svg";
672
- }
673
- if (!win.document) {
674
- throw new Error(
675
- "You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
676
- );
677
- }
678
- elm = newVNode2.$elm$ = win.document.createElementNS(
679
- isSvgMode ? SVG_NS : HTML_NS,
680
- newVNode2.$tag$
681
- ) ;
682
- if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
683
- isSvgMode = false;
684
- }
685
- {
686
- updateElement(null, newVNode2, isSvgMode);
687
- }
688
- if (newVNode2.$children$) {
689
- for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
690
- childNode = createElm(oldParentVNode, newVNode2, i2);
691
- if (childNode) {
692
- elm.appendChild(childNode);
693
- }
694
- }
695
- }
696
- {
697
- if (newVNode2.$tag$ === "svg") {
698
- isSvgMode = false;
699
- } else if (elm.tagName === "foreignObject") {
700
- isSvgMode = true;
701
- }
702
- }
703
- }
704
- elm["s-hn"] = hostTagName;
705
- return elm;
706
- };
707
- var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
708
- let containerElm = parentElm;
709
- let childNode;
710
- if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
711
- containerElm = containerElm.shadowRoot;
712
- }
713
- for (; startIdx <= endIdx; ++startIdx) {
714
- if (vnodes[startIdx]) {
715
- childNode = createElm(null, parentVNode, startIdx);
716
- if (childNode) {
717
- vnodes[startIdx].$elm$ = childNode;
718
- insertBefore(containerElm, childNode, before);
719
- }
720
- }
721
- }
722
- };
723
- var removeVnodes = (vnodes, startIdx, endIdx) => {
724
- for (let index = startIdx; index <= endIdx; ++index) {
725
- const vnode = vnodes[index];
726
- if (vnode) {
727
- const elm = vnode.$elm$;
728
- nullifyVNodeRefs(vnode);
729
- if (elm) {
730
- elm.remove();
731
- }
732
- }
733
- }
734
- };
735
- var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
736
- let oldStartIdx = 0;
737
- let newStartIdx = 0;
738
- let idxInOld = 0;
739
- let i2 = 0;
740
- let oldEndIdx = oldCh.length - 1;
741
- let oldStartVnode = oldCh[0];
742
- let oldEndVnode = oldCh[oldEndIdx];
743
- let newEndIdx = newCh.length - 1;
744
- let newStartVnode = newCh[0];
745
- let newEndVnode = newCh[newEndIdx];
746
- let node;
747
- let elmToMove;
748
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
749
- if (oldStartVnode == null) {
750
- oldStartVnode = oldCh[++oldStartIdx];
751
- } else if (oldEndVnode == null) {
752
- oldEndVnode = oldCh[--oldEndIdx];
753
- } else if (newStartVnode == null) {
754
- newStartVnode = newCh[++newStartIdx];
755
- } else if (newEndVnode == null) {
756
- newEndVnode = newCh[--newEndIdx];
757
- } else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
758
- patch(oldStartVnode, newStartVnode, isInitialRender);
759
- oldStartVnode = oldCh[++oldStartIdx];
760
- newStartVnode = newCh[++newStartIdx];
761
- } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
762
- patch(oldEndVnode, newEndVnode, isInitialRender);
763
- oldEndVnode = oldCh[--oldEndIdx];
764
- newEndVnode = newCh[--newEndIdx];
765
- } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
766
- patch(oldStartVnode, newEndVnode, isInitialRender);
767
- insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
768
- oldStartVnode = oldCh[++oldStartIdx];
769
- newEndVnode = newCh[--newEndIdx];
770
- } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
771
- patch(oldEndVnode, newStartVnode, isInitialRender);
772
- insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
773
- oldEndVnode = oldCh[--oldEndIdx];
774
- newStartVnode = newCh[++newStartIdx];
775
- } else {
776
- idxInOld = -1;
777
- {
778
- for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
779
- if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
780
- idxInOld = i2;
781
- break;
782
- }
783
- }
784
- }
785
- if (idxInOld >= 0) {
786
- elmToMove = oldCh[idxInOld];
787
- if (elmToMove.$tag$ !== newStartVnode.$tag$) {
788
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
789
- } else {
790
- patch(elmToMove, newStartVnode, isInitialRender);
791
- oldCh[idxInOld] = void 0;
792
- node = elmToMove.$elm$;
793
- }
794
- newStartVnode = newCh[++newStartIdx];
795
- } else {
796
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
797
- newStartVnode = newCh[++newStartIdx];
798
- }
799
- if (node) {
800
- {
801
- insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
802
- }
803
- }
804
- }
805
- }
806
- if (oldStartIdx > oldEndIdx) {
807
- addVnodes(
808
- parentElm,
809
- newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
810
- newVNode2,
811
- newCh,
812
- newStartIdx,
813
- newEndIdx
814
- );
815
- } else if (newStartIdx > newEndIdx) {
816
- removeVnodes(oldCh, oldStartIdx, oldEndIdx);
817
- }
818
- };
819
- var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
820
- if (leftVNode.$tag$ === rightVNode.$tag$) {
821
- if (!isInitialRender) {
822
- return leftVNode.$key$ === rightVNode.$key$;
823
- }
824
- if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
825
- leftVNode.$key$ = rightVNode.$key$;
826
- }
827
- return true;
828
- }
829
- return false;
830
- };
831
- var patch = (oldVNode, newVNode2, isInitialRender = false) => {
832
- const elm = newVNode2.$elm$ = oldVNode.$elm$;
833
- const oldChildren = oldVNode.$children$;
834
- const newChildren = newVNode2.$children$;
835
- const tag = newVNode2.$tag$;
836
- const text = newVNode2.$text$;
837
- if (text === null) {
838
- {
839
- isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
840
- }
841
- {
842
- updateElement(oldVNode, newVNode2, isSvgMode);
843
- }
844
- if (oldChildren !== null && newChildren !== null) {
845
- updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
846
- } else if (newChildren !== null) {
847
- if (oldVNode.$text$ !== null) {
848
- elm.textContent = "";
849
- }
850
- addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
851
- } else if (
852
- // don't do this on initial render as it can cause non-hydrated content to be removed
853
- !isInitialRender && BUILD.updatable && oldChildren !== null
854
- ) {
855
- removeVnodes(oldChildren, 0, oldChildren.length - 1);
856
- }
857
- if (isSvgMode && tag === "svg") {
858
- isSvgMode = false;
859
- }
860
- } else if (oldVNode.$text$ !== text) {
861
- elm.data = text;
862
- }
863
- };
864
- var nullifyVNodeRefs = (vNode) => {
865
- {
866
- vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
867
- vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
868
- }
869
- };
870
- var insertBefore = (parent, newNode, reference) => {
871
- {
872
- return parent == null ? void 0 : parent.insertBefore(newNode, reference);
873
- }
874
- };
875
- var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
876
- const hostElm = hostRef.$hostElement$;
877
- const cmpMeta = hostRef.$cmpMeta$;
878
- const oldVNode = hostRef.$vnode$ || newVNode(null, null);
879
- const isHostElement = isHost(renderFnResults);
880
- const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
881
- hostTagName = hostElm.tagName;
882
- if (cmpMeta.$attrsToReflect$) {
883
- rootVnode.$attrs$ = rootVnode.$attrs$ || {};
884
- cmpMeta.$attrsToReflect$.map(
885
- ([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
886
- );
887
- }
888
- if (isInitialLoad && rootVnode.$attrs$) {
889
- for (const key of Object.keys(rootVnode.$attrs$)) {
890
- if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
891
- rootVnode.$attrs$[key] = hostElm[key];
892
- }
893
- }
894
- }
895
- rootVnode.$tag$ = null;
896
- rootVnode.$flags$ |= 4 /* isHost */;
897
- hostRef.$vnode$ = rootVnode;
898
- rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
899
- patch(oldVNode, rootVnode, isInitialLoad);
900
- };
901
-
902
- // src/runtime/update-component.ts
903
- var attachToAncestor = (hostRef, ancestorComponent) => {
904
- if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
905
- const index = ancestorComponent["s-p"].push(
906
- new Promise(
907
- (r) => hostRef.$onRenderResolve$ = () => {
908
- ancestorComponent["s-p"].splice(index - 1, 1);
909
- r();
910
- }
911
- )
912
- );
913
- }
914
- };
915
- var scheduleUpdate = (hostRef, isInitialLoad) => {
916
- {
917
- hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
918
- }
919
- if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
920
- hostRef.$flags$ |= 512 /* needsRerender */;
921
- return;
922
- }
923
- attachToAncestor(hostRef, hostRef.$ancestorComponent$);
924
- const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
925
- return writeTask(dispatch) ;
926
- };
927
- var dispatchHooks = (hostRef, isInitialLoad) => {
928
- const elm = hostRef.$hostElement$;
929
- const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
930
- const instance = hostRef.$lazyInstance$ ;
931
- if (!instance) {
932
- throw new Error(
933
- `Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
934
- );
935
- }
936
- let maybePromise;
937
- if (isInitialLoad) {
938
- maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
939
- } else {
940
- maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
941
- }
942
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
943
- endSchedule();
944
- return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
945
- };
946
- var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
947
- console.error(err2);
948
- fn();
949
- }) : fn();
950
- var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
951
- var updateComponent = async (hostRef, instance, isInitialLoad) => {
952
- var _a;
953
- const elm = hostRef.$hostElement$;
954
- const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
955
- const rc = elm["s-rc"];
956
- if (isInitialLoad) {
957
- attachStyles(hostRef);
958
- }
959
- const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
960
- {
961
- callRender(hostRef, instance, elm, isInitialLoad);
962
- }
963
- if (rc) {
964
- rc.map((cb) => cb());
965
- elm["s-rc"] = void 0;
966
- }
967
- endRender();
968
- endUpdate();
969
- {
970
- const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
971
- const postUpdate = () => postUpdateComponent(hostRef);
972
- if (childrenPromises.length === 0) {
973
- postUpdate();
974
- } else {
975
- Promise.all(childrenPromises).then(postUpdate);
976
- hostRef.$flags$ |= 4 /* isWaitingForChildren */;
977
- childrenPromises.length = 0;
978
- }
979
- }
980
- };
981
- var renderingRef = null;
982
- var callRender = (hostRef, instance, elm, isInitialLoad) => {
983
- try {
984
- renderingRef = instance;
985
- instance = instance.render() ;
986
- {
987
- hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
988
- }
989
- {
990
- hostRef.$flags$ |= 2 /* hasRendered */;
991
- }
992
- {
993
- {
994
- {
995
- renderVdom(hostRef, instance, isInitialLoad);
996
- }
997
- }
998
- }
999
- } catch (e) {
1000
- consoleError(e, hostRef.$hostElement$);
1001
- }
1002
- renderingRef = null;
1003
- return null;
1004
- };
1005
- var getRenderingRef = () => renderingRef;
1006
- var postUpdateComponent = (hostRef) => {
1007
- const tagName = hostRef.$cmpMeta$.$tagName$;
1008
- const elm = hostRef.$hostElement$;
1009
- const endPostUpdate = createTime("postUpdate", tagName);
1010
- const instance = hostRef.$lazyInstance$ ;
1011
- const ancestorComponent = hostRef.$ancestorComponent$;
1012
- safeCall(instance, "componentDidRender", void 0, elm);
1013
- if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1014
- hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1015
- {
1016
- addHydratedFlag(elm);
1017
- }
1018
- safeCall(instance, "componentDidLoad", void 0, elm);
1019
- endPostUpdate();
1020
- {
1021
- hostRef.$onReadyResolve$(elm);
1022
- if (!ancestorComponent) {
1023
- appDidLoad();
1024
- }
1025
- }
1026
- } else {
1027
- safeCall(instance, "componentDidUpdate", void 0, elm);
1028
- endPostUpdate();
1029
- }
1030
- {
1031
- hostRef.$onInstanceResolve$(elm);
1032
- }
1033
- {
1034
- if (hostRef.$onRenderResolve$) {
1035
- hostRef.$onRenderResolve$();
1036
- hostRef.$onRenderResolve$ = void 0;
1037
- }
1038
- if (hostRef.$flags$ & 512 /* needsRerender */) {
1039
- nextTick(() => scheduleUpdate(hostRef, false));
1040
- }
1041
- hostRef.$flags$ &= -517;
1042
- }
1043
- };
1044
- var forceUpdate = (ref) => {
1045
- {
1046
- const hostRef = getHostRef(ref);
1047
- const isConnected = hostRef.$hostElement$.isConnected;
1048
- if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1049
- scheduleUpdate(hostRef, false);
1050
- }
1051
- return isConnected;
1052
- }
1053
- };
1054
- var appDidLoad = (who) => {
1055
- nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1056
- };
1057
- var safeCall = (instance, method, arg, elm) => {
1058
- if (instance && instance[method]) {
1059
- try {
1060
- return instance[method](arg);
1061
- } catch (e) {
1062
- consoleError(e, elm);
1063
- }
1064
- }
1065
- return void 0;
1066
- };
1067
- var addHydratedFlag = (elm) => {
1068
- var _a;
1069
- return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") ;
1070
- };
1071
-
1072
- // src/runtime/set-value.ts
1073
- var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1074
- var setValue = (ref, propName, newVal, cmpMeta) => {
1075
- const hostRef = getHostRef(ref);
1076
- if (!hostRef) {
1077
- throw new Error(
1078
- `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
1079
- );
1080
- }
1081
- const elm = hostRef.$hostElement$ ;
1082
- const oldVal = hostRef.$instanceValues$.get(propName);
1083
- const flags = hostRef.$flags$;
1084
- const instance = hostRef.$lazyInstance$ ;
1085
- newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1086
- const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1087
- const didValueChange = newVal !== oldVal && !areBothNaN;
1088
- if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
1089
- hostRef.$instanceValues$.set(propName, newVal);
1090
- if (instance) {
1091
- if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
1092
- const watchMethods = cmpMeta.$watchers$[propName];
1093
- if (watchMethods) {
1094
- watchMethods.map((watchMethodName) => {
1095
- try {
1096
- instance[watchMethodName](newVal, oldVal, propName);
1097
- } catch (e) {
1098
- consoleError(e, elm);
1099
- }
1100
- });
1101
- }
1102
- }
1103
- if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1104
- if (instance.componentShouldUpdate) {
1105
- if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
1106
- return;
1107
- }
1108
- }
1109
- scheduleUpdate(hostRef, false);
1110
- }
1111
- }
1112
- }
1113
- };
1114
-
1115
- // src/runtime/proxy-component.ts
1116
- var proxyComponent = (Cstr, cmpMeta, flags) => {
1117
- var _a, _b;
1118
- const prototype = Cstr.prototype;
1119
- if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
1120
- if (Cstr.watchers && !cmpMeta.$watchers$) {
1121
- cmpMeta.$watchers$ = Cstr.watchers;
1122
- }
1123
- const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1124
- members.map(([memberName, [memberFlags]]) => {
1125
- if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1126
- const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1127
- if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1128
- if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1129
- if (flags & 1 /* isElementConstructor */ || !origGetter) {
1130
- Object.defineProperty(prototype, memberName, {
1131
- get() {
1132
- {
1133
- if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
1134
- return getValue(this, memberName);
1135
- }
1136
- const ref = getHostRef(this);
1137
- const instance = ref ? ref.$lazyInstance$ : prototype;
1138
- if (!instance) return;
1139
- return instance[memberName];
1140
- }
1141
- },
1142
- configurable: true,
1143
- enumerable: true
1144
- });
1145
- }
1146
- Object.defineProperty(prototype, memberName, {
1147
- set(newValue) {
1148
- const ref = getHostRef(this);
1149
- if (origSetter) {
1150
- const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1151
- if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1152
- newValue = ref.$instanceValues$.get(memberName);
1153
- } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
1154
- ref.$instanceValues$.set(memberName, currentValue);
1155
- }
1156
- origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
1157
- newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1158
- setValue(this, memberName, newValue, cmpMeta);
1159
- return;
1160
- }
1161
- {
1162
- if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1163
- setValue(this, memberName, newValue, cmpMeta);
1164
- if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1165
- ref.$onReadyPromise$.then(() => {
1166
- if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1167
- ref.$lazyInstance$[memberName] = newValue;
1168
- }
1169
- });
1170
- }
1171
- return;
1172
- }
1173
- const setterSetVal = () => {
1174
- const currentValue = ref.$lazyInstance$[memberName];
1175
- if (!ref.$instanceValues$.get(memberName) && currentValue) {
1176
- ref.$instanceValues$.set(memberName, currentValue);
1177
- }
1178
- ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
1179
- setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1180
- };
1181
- if (ref.$lazyInstance$) {
1182
- setterSetVal();
1183
- } else {
1184
- ref.$onReadyPromise$.then(() => setterSetVal());
1185
- }
1186
- }
1187
- }
1188
- });
1189
- } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1190
- Object.defineProperty(prototype, memberName, {
1191
- value(...args) {
1192
- var _a2;
1193
- const ref = getHostRef(this);
1194
- return (_a2 = ref == null ? void 0 : ref.$onInstancePromise$) == null ? void 0 : _a2.then(() => {
1195
- var _a3;
1196
- return (_a3 = ref.$lazyInstance$) == null ? void 0 : _a3[memberName](...args);
1197
- });
1198
- }
1199
- });
1200
- }
1201
- });
1202
- if ((flags & 1 /* isElementConstructor */)) {
1203
- const attrNameToPropName = /* @__PURE__ */ new Map();
1204
- prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
1205
- plt.jmp(() => {
1206
- var _a2;
1207
- const propName = attrNameToPropName.get(attrName);
1208
- if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1209
- newValue = this[propName];
1210
- delete this[propName];
1211
- } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
1212
- this[propName] == newValue) {
1213
- return;
1214
- } else if (propName == null) {
1215
- const hostRef = getHostRef(this);
1216
- const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
1217
- if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
1218
- const instance = hostRef.$lazyInstance$ ;
1219
- const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
1220
- entry == null ? void 0 : entry.forEach((callbackName) => {
1221
- if (instance[callbackName] != null) {
1222
- instance[callbackName].call(instance, newValue, oldValue, attrName);
1223
- }
1224
- });
1225
- }
1226
- return;
1227
- }
1228
- const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1229
- newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1230
- if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1231
- this[propName] = newValue;
1232
- }
1233
- });
1234
- };
1235
- Cstr.observedAttributes = Array.from(
1236
- /* @__PURE__ */ new Set([
1237
- ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
1238
- ...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
1239
- var _a2;
1240
- const attrName = m[1] || propName;
1241
- attrNameToPropName.set(attrName, propName);
1242
- if (m[0] & 512 /* ReflectAttr */) {
1243
- (_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
1244
- }
1245
- return attrName;
1246
- })
1247
- ])
1248
- );
1249
- }
1250
- }
1251
- return Cstr;
1252
- };
1253
-
1254
- // src/runtime/initialize-component.ts
1255
- var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1256
- let Cstr;
1257
- if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1258
- hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1259
- const bundleId = cmpMeta.$lazyBundleId$;
1260
- if (bundleId) {
1261
- const CstrImport = loadModule(cmpMeta, hostRef);
1262
- if (CstrImport && "then" in CstrImport) {
1263
- const endLoad = uniqueTime();
1264
- Cstr = await CstrImport;
1265
- endLoad();
1266
- } else {
1267
- Cstr = CstrImport;
1268
- }
1269
- if (!Cstr) {
1270
- throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1271
- }
1272
- if (!Cstr.isProxied) {
1273
- {
1274
- cmpMeta.$watchers$ = Cstr.watchers;
1275
- }
1276
- proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1277
- Cstr.isProxied = true;
1278
- }
1279
- const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
1280
- {
1281
- hostRef.$flags$ |= 8 /* isConstructingInstance */;
1282
- }
1283
- try {
1284
- new Cstr(hostRef);
1285
- } catch (e) {
1286
- consoleError(e, elm);
1287
- }
1288
- {
1289
- hostRef.$flags$ &= -9 /* isConstructingInstance */;
1290
- }
1291
- {
1292
- hostRef.$flags$ |= 128 /* isWatchReady */;
1293
- }
1294
- endNewInstance();
1295
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
1296
- } else {
1297
- Cstr = elm.constructor;
1298
- const cmpTag = elm.localName;
1299
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1300
- }
1301
- if (Cstr && Cstr.style) {
1302
- let style;
1303
- if (typeof Cstr.style === "string") {
1304
- style = Cstr.style;
1305
- }
1306
- const scopeId2 = getScopeId(cmpMeta);
1307
- if (!styles.has(scopeId2)) {
1308
- const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
1309
- registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
1310
- endRegisterStyles();
1311
- }
1312
- }
1313
- }
1314
- const ancestorComponent = hostRef.$ancestorComponent$;
1315
- const schedule = () => scheduleUpdate(hostRef, true);
1316
- if (ancestorComponent && ancestorComponent["s-rc"]) {
1317
- ancestorComponent["s-rc"].push(schedule);
1318
- } else {
1319
- schedule();
1320
- }
1321
- };
1322
- var fireConnectedCallback = (instance, elm) => {
1323
- {
1324
- safeCall(instance, "connectedCallback", void 0, elm);
1325
- }
1326
- };
1327
-
1328
- // src/runtime/connected-callback.ts
1329
- var connectedCallback = (elm) => {
1330
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1331
- const hostRef = getHostRef(elm);
1332
- const cmpMeta = hostRef.$cmpMeta$;
1333
- const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
1334
- if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1335
- hostRef.$flags$ |= 1 /* hasConnected */;
1336
- {
1337
- let ancestorComponent = elm;
1338
- while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
1339
- if (ancestorComponent["s-p"]) {
1340
- attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
1341
- break;
1342
- }
1343
- }
1344
- }
1345
- if (cmpMeta.$members$) {
1346
- Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1347
- if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
1348
- const value = elm[memberName];
1349
- delete elm[memberName];
1350
- elm[memberName] = value;
1351
- }
1352
- });
1353
- }
1354
- {
1355
- initializeComponent(elm, hostRef, cmpMeta);
1356
- }
1357
- } else {
1358
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1359
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
1360
- } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1361
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1362
- }
1363
- }
1364
- endConnected();
1365
- }
1366
- };
1367
- var disconnectInstance = (instance, elm) => {
1368
- {
1369
- safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1370
- }
1371
- };
1372
- var disconnectedCallback = async (elm) => {
1373
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1374
- const hostRef = getHostRef(elm);
1375
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1376
- disconnectInstance(hostRef.$lazyInstance$, elm);
1377
- } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1378
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1379
- }
1380
- }
1381
- if (rootAppliedStyles.has(elm)) {
1382
- rootAppliedStyles.delete(elm);
1383
- }
1384
- if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1385
- rootAppliedStyles.delete(elm.shadowRoot);
1386
- }
1387
- };
1388
-
1389
- // src/runtime/bootstrap-lazy.ts
1390
- var bootstrapLazy = (lazyBundles, options = {}) => {
1391
- var _a;
1392
- if (!win.document) {
1393
- console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
1394
- return;
1395
- }
1396
- const endBootstrap = createTime();
1397
- const cmpTags = [];
1398
- const exclude = options.exclude || [];
1399
- const customElements2 = win.customElements;
1400
- const head = win.document.head;
1401
- const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
1402
- const dataStyles = /* @__PURE__ */ win.document.createElement("style");
1403
- const deferredConnectedCallbacks = [];
1404
- let appLoadFallback;
1405
- let isBootstrapping = true;
1406
- Object.assign(plt, options);
1407
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
1408
- let hasSlotRelocation = false;
1409
- lazyBundles.map((lazyBundle) => {
1410
- lazyBundle[1].map((compactMeta) => {
1411
- var _a2;
1412
- const cmpMeta = {
1413
- $flags$: compactMeta[0],
1414
- $tagName$: compactMeta[1],
1415
- $members$: compactMeta[2],
1416
- $listeners$: compactMeta[3]
1417
- };
1418
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1419
- hasSlotRelocation = true;
1420
- }
1421
- {
1422
- cmpMeta.$members$ = compactMeta[2];
1423
- }
1424
- {
1425
- cmpMeta.$attrsToReflect$ = [];
1426
- }
1427
- {
1428
- cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
1429
- }
1430
- const tagName = cmpMeta.$tagName$;
1431
- const HostElement = class extends HTMLElement {
1432
- // StencilLazyHost
1433
- constructor(self) {
1434
- super(self);
1435
- this.hasRegisteredEventListeners = false;
1436
- self = this;
1437
- registerHost(self, cmpMeta);
1438
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1439
- {
1440
- if (!self.shadowRoot) {
1441
- {
1442
- self.attachShadow({ mode: "open" });
1443
- }
1444
- } else {
1445
- if (self.shadowRoot.mode !== "open") {
1446
- throw new Error(
1447
- `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${self.shadowRoot.mode} but Stencil only supports open shadow roots.`
1448
- );
1449
- }
1450
- }
1451
- }
1452
- }
1453
- }
1454
- connectedCallback() {
1455
- getHostRef(this);
1456
- if (!this.hasRegisteredEventListeners) {
1457
- this.hasRegisteredEventListeners = true;
1458
- }
1459
- if (appLoadFallback) {
1460
- clearTimeout(appLoadFallback);
1461
- appLoadFallback = null;
1462
- }
1463
- if (isBootstrapping) {
1464
- deferredConnectedCallbacks.push(this);
1465
- } else {
1466
- plt.jmp(() => connectedCallback(this));
1467
- }
1468
- }
1469
- disconnectedCallback() {
1470
- plt.jmp(() => disconnectedCallback(this));
1471
- plt.raf(() => {
1472
- var _a3;
1473
- const hostRef = getHostRef(this);
1474
- const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1475
- if (i2 > -1) {
1476
- deferredConnectedCallbacks.splice(i2, 1);
1477
- }
1478
- if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1479
- delete hostRef.$vnode$.$elm$;
1480
- }
1481
- });
1482
- }
1483
- componentOnReady() {
1484
- return getHostRef(this).$onReadyPromise$;
1485
- }
1486
- };
1487
- cmpMeta.$lazyBundleId$ = lazyBundle[0];
1488
- if (!exclude.includes(tagName) && !customElements2.get(tagName)) {
1489
- cmpTags.push(tagName);
1490
- customElements2.define(
1491
- tagName,
1492
- proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */)
1493
- );
1494
- }
1495
- });
1496
- });
1497
- if (cmpTags.length > 0) {
1498
- if (hasSlotRelocation) {
1499
- dataStyles.textContent += SLOT_FB_CSS;
1500
- }
1501
- {
1502
- dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
1503
- }
1504
- if (dataStyles.innerHTML.length) {
1505
- dataStyles.setAttribute("data-styles", "");
1506
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
1507
- if (nonce != null) {
1508
- dataStyles.setAttribute("nonce", nonce);
1509
- }
1510
- head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
1511
- }
1512
- }
1513
- isBootstrapping = false;
1514
- if (deferredConnectedCallbacks.length) {
1515
- deferredConnectedCallbacks.map((host) => host.connectedCallback());
1516
- } else {
1517
- {
1518
- plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
1519
- }
1520
- }
1521
- endBootstrap();
1522
- };
1523
-
1524
- // src/runtime/nonce.ts
1525
- var setNonce = (nonce) => plt.$nonce$ = nonce;
1526
-
1527
- exports.bootstrapLazy = bootstrapLazy;
1528
- exports.createEvent = createEvent;
1529
- exports.forceUpdate = forceUpdate;
1530
- exports.getElement = getElement;
1531
- exports.getRenderingRef = getRenderingRef;
1532
- exports.h = h;
1533
- exports.promiseResolve = promiseResolve;
1534
- exports.registerInstance = registerInstance;
1535
- exports.setNonce = setNonce;
1536
- //# sourceMappingURL=index-C_qhED9Z.js.map
1537
-
1538
- //# sourceMappingURL=index-C_qhED9Z.js.map