pcm-agents 0.6.76 → 0.6.78

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 (187) hide show
  1. package/dist/cjs/components-position-selector.cjs.entry.js +1 -1
  2. package/dist/cjs/index-C_qhED9Z.js +2 -6
  3. package/dist/cjs/{index-DJuHr4W9.js → index-DOCJeM7I.js} +3 -3
  4. package/dist/cjs/{index-DJuHr4W9.js.map → index-DOCJeM7I.js.map} +1 -1
  5. package/dist/cjs/index.cjs.js +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/oem-htws-modal.cjs.entry.js +1 -1
  8. package/dist/cjs/oem-jd-modal.cjs.entry.js +2 -2
  9. package/dist/cjs/oem-jlpp-modal.cjs.entry.js +1 -1
  10. package/dist/cjs/oem-jlsx-modal.cjs.entry.js +24 -2
  11. package/dist/cjs/oem-jlsx-modal.cjs.entry.js.map +1 -1
  12. package/dist/cjs/oem-jlsx-modal.entry.cjs.js.map +1 -1
  13. package/dist/cjs/oem-jlzz-modal.cjs.entry.js +1 -1
  14. package/dist/cjs/oem-mnct-modal.cjs.entry.js +1 -1
  15. package/dist/cjs/oem-mnms-modal.cjs.entry.js +1 -1
  16. package/dist/cjs/oem-qgqjl-modal.cjs.entry.js +1 -1
  17. package/dist/cjs/oem-zygh-modal.cjs.entry.js +1 -1
  18. package/dist/cjs/{pcm-1zhanshi-mnms-modal_28.cjs.entry.js → pcm-1zhanshi-mnms-modal_29.cjs.entry.js} +540 -108
  19. package/dist/cjs/pcm-1zhanshi-mnms-modal_29.cjs.entry.js.map +1 -0
  20. package/dist/cjs/pcm-agents.cjs.js +1 -1
  21. package/dist/cjs/pcm-hr-chat-modal.cjs.entry.js +19 -2
  22. package/dist/cjs/pcm-hr-chat-modal.cjs.entry.js.map +1 -1
  23. package/dist/cjs/pcm-hr-chat-modal.entry.cjs.js.map +1 -1
  24. package/dist/cjs/{sentry-reporter-COJ0pOg4.js → sentry-reporter-BY3e-WWj.js} +3 -3
  25. package/dist/cjs/{sentry-reporter-COJ0pOg4.js.map → sentry-reporter-BY3e-WWj.js.map} +1 -1
  26. package/dist/collection/components/oem-jlsx-modal/oem-jlsx-modal.js +22 -0
  27. package/dist/collection/components/oem-jlsx-modal/oem-jlsx-modal.js.map +1 -1
  28. package/dist/collection/components/pcm-app-chat-modal/pcm-app-chat-modal.js +19 -0
  29. package/dist/collection/components/pcm-app-chat-modal/pcm-app-chat-modal.js.map +1 -1
  30. package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.js +17 -0
  31. package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.js.map +1 -1
  32. package/dist/collection/components/pcm-jlpp-modal/pcm-jlpp-modal.js +12 -11
  33. package/dist/collection/components/pcm-jlpp-modal/pcm-jlpp-modal.js.map +1 -1
  34. package/dist/collection/components/pcm-jlsx-modal/pcm-jlsx-modal.js +12 -0
  35. package/dist/collection/components/pcm-jlsx-modal/pcm-jlsx-modal.js.map +1 -1
  36. package/dist/collection/components/pcm-jlzz-modal/pcm-jlzz-modal.js +88 -2
  37. package/dist/collection/components/pcm-jlzz-modal/pcm-jlzz-modal.js.map +1 -1
  38. package/dist/collection/components/pcm-qgqjl-modal/pcm-qgqjl-modal.js +20 -19
  39. package/dist/collection/components/pcm-qgqjl-modal/pcm-qgqjl-modal.js.map +1 -1
  40. package/dist/collection/components/pcm-virtual-chat-modal/pcm-virtual-chat-modal.js +108 -3
  41. package/dist/collection/components/pcm-virtual-chat-modal/pcm-virtual-chat-modal.js.map +1 -1
  42. package/dist/collection/components/pcm-zsk-chat-modal/pcm-zsk-chat-modal.js +17 -0
  43. package/dist/collection/components/pcm-zsk-chat-modal/pcm-zsk-chat-modal.js.map +1 -1
  44. package/dist/collection/components/pcm-zygh-v2-modal/pcm-zygh-v2-modal.js +14 -14
  45. package/dist/collection/components/pcm-zygh-v2-modal/pcm-zygh-v2-modal.js.map +1 -1
  46. package/dist/components/components-position-selector.js +1 -1
  47. package/dist/components/index.js +1 -1
  48. package/dist/components/oem-htws-modal.js +6 -6
  49. package/dist/components/oem-jd-modal.js +4 -4
  50. package/dist/components/oem-jlpp-modal.js +8 -8
  51. package/dist/components/oem-jlsx-modal.js +28 -6
  52. package/dist/components/oem-jlsx-modal.js.map +1 -1
  53. package/dist/components/oem-jlzz-modal.js +6 -6
  54. package/dist/components/oem-mnct-modal.js +8 -8
  55. package/dist/components/oem-mnms-modal.js +9 -9
  56. package/dist/components/oem-qgqjl-modal.js +8 -8
  57. package/dist/components/oem-zygh-modal.js +6 -6
  58. package/dist/components/{p-CGRQB-kz.js → p-9hnllPbt.js} +3 -3
  59. package/dist/components/{p-CGRQB-kz.js.map → p-9hnllPbt.js.map} +1 -1
  60. package/dist/components/{p-nFix5BDn.js → p-B7cdvqSY.js} +4 -4
  61. package/dist/components/{p-nFix5BDn.js.map → p-B7cdvqSY.js.map} +1 -1
  62. package/dist/components/{p-BZeNORff.js → p-BnkPmLIU.js} +111 -6
  63. package/dist/components/p-BnkPmLIU.js.map +1 -0
  64. package/dist/components/{p-DtCXILg5.js → p-C4KAf-6-.js} +3 -3
  65. package/dist/components/{p-DtCXILg5.js.map → p-C4KAf-6-.js.map} +1 -1
  66. package/dist/components/{p-pTzOe1-b.js → p-C6OdIxkm.js} +3 -3
  67. package/dist/components/{p-pTzOe1-b.js.map → p-C6OdIxkm.js.map} +1 -1
  68. package/dist/components/{p-BJnD41Qm.js → p-DHwXxizT.js} +3 -3
  69. package/dist/components/{p-BJnD41Qm.js.map → p-DHwXxizT.js.map} +1 -1
  70. package/dist/components/{p-Caxrsbp0.js → p-Da-8BxdM.js} +24 -5
  71. package/dist/components/p-Da-8BxdM.js.map +1 -0
  72. package/dist/components/{p--B9t4xVs.js → p-QwH3TimN.js} +3 -3
  73. package/dist/components/{p--B9t4xVs.js.map → p-QwH3TimN.js.map} +1 -1
  74. package/dist/components/{p-BjKpPzZZ.js → p-ikx6J73I.js} +3 -3
  75. package/dist/components/{p-BjKpPzZZ.js.map → p-ikx6J73I.js.map} +1 -1
  76. package/dist/components/{p-CvHWzHdd.js → p-qUBE1daM.js} +3 -3
  77. package/dist/components/{p-CvHWzHdd.js.map → p-qUBE1daM.js.map} +1 -1
  78. package/dist/components/pcm-1zhanshi-mnms-modal.js +5 -5
  79. package/dist/components/pcm-app-chat-modal.js +1 -1
  80. package/dist/components/pcm-ats-mnms-modal.js +5 -5
  81. package/dist/components/pcm-card.js +1 -1
  82. package/dist/components/pcm-chat-message.js +1 -1
  83. package/dist/components/pcm-digital-human.js +1 -1
  84. package/dist/components/pcm-export-records-modal.js +1 -1
  85. package/dist/components/pcm-hr-chat-modal.js +19 -2
  86. package/dist/components/pcm-hr-chat-modal.js.map +1 -1
  87. package/dist/components/pcm-htws-modal.js +7 -7
  88. package/dist/components/pcm-hyzj-modal.js +4 -4
  89. package/dist/components/pcm-jd-modal.js +4 -4
  90. package/dist/components/pcm-jlpp-modal.js +18 -17
  91. package/dist/components/pcm-jlpp-modal.js.map +1 -1
  92. package/dist/components/pcm-jlsx-modal.js +17 -5
  93. package/dist/components/pcm-jlsx-modal.js.map +1 -1
  94. package/dist/components/pcm-jlzz-modal.js +39 -8
  95. package/dist/components/pcm-jlzz-modal.js.map +1 -1
  96. package/dist/components/pcm-mnct-modal.js +4 -4
  97. package/dist/components/pcm-mnms-modal.js +8 -8
  98. package/dist/components/pcm-mnms-zp-modal.js +8 -8
  99. package/dist/components/pcm-mobile-input-btn.js +1 -1
  100. package/dist/components/pcm-mobile-upload-btn.js +1 -1
  101. package/dist/components/pcm-msbg-modal.js +4 -4
  102. package/dist/components/pcm-qgqjl-modal.js +26 -25
  103. package/dist/components/pcm-qgqjl-modal.js.map +1 -1
  104. package/dist/components/pcm-upload.js +1 -1
  105. package/dist/components/pcm-virtual-chat-modal.js +1 -1
  106. package/dist/components/pcm-zsk-chat-modal.js +19 -2
  107. package/dist/components/pcm-zsk-chat-modal.js.map +1 -1
  108. package/dist/components/pcm-zygh-modal.js +6 -6
  109. package/dist/components/pcm-zygh-v2-modal.js +18 -18
  110. package/dist/components/pcm-zygh-v2-modal.js.map +1 -1
  111. package/dist/esm/components-position-selector.entry.js +1 -1
  112. package/dist/esm/index-Bq0K-WqZ.js +2 -6
  113. package/dist/esm/{index-DBfBNGaa.js → index-CtBK1m67.js} +3 -3
  114. package/dist/esm/{index-DBfBNGaa.js.map → index-CtBK1m67.js.map} +1 -1
  115. package/dist/esm/index.js +1 -1
  116. package/dist/esm/loader.js +1 -1
  117. package/dist/esm/oem-htws-modal.entry.js +1 -1
  118. package/dist/esm/oem-jd-modal.entry.js +2 -2
  119. package/dist/esm/oem-jlpp-modal.entry.js +1 -1
  120. package/dist/esm/oem-jlsx-modal.entry.js +24 -2
  121. package/dist/esm/oem-jlsx-modal.entry.js.map +1 -1
  122. package/dist/esm/oem-jlzz-modal.entry.js +1 -1
  123. package/dist/esm/oem-mnct-modal.entry.js +1 -1
  124. package/dist/esm/oem-mnms-modal.entry.js +1 -1
  125. package/dist/esm/oem-qgqjl-modal.entry.js +1 -1
  126. package/dist/esm/oem-zygh-modal.entry.js +1 -1
  127. package/dist/esm/{pcm-1zhanshi-mnms-modal_28.entry.js → pcm-1zhanshi-mnms-modal_29.entry.js} +540 -109
  128. package/dist/esm/pcm-1zhanshi-mnms-modal_29.entry.js.map +1 -0
  129. package/dist/esm/pcm-agents.js +1 -1
  130. package/dist/esm/pcm-hr-chat-modal.entry.js +19 -2
  131. package/dist/esm/pcm-hr-chat-modal.entry.js.map +1 -1
  132. package/dist/esm/{sentry-reporter-BcA0r0vQ.js → sentry-reporter-D8jwTnnH.js} +3 -3
  133. package/dist/esm/{sentry-reporter-BcA0r0vQ.js.map → sentry-reporter-D8jwTnnH.js.map} +1 -1
  134. package/dist/pcm-agents/index.esm.js +1 -1
  135. package/dist/pcm-agents/oem-jlsx-modal.entry.esm.js.map +1 -1
  136. package/dist/pcm-agents/p-0a831595.entry.js +2 -0
  137. package/dist/pcm-agents/{p-365a351b.entry.js.map → p-0a831595.entry.js.map} +1 -1
  138. package/dist/pcm-agents/{p-d9e464fd.entry.js → p-1cc1dbcc.entry.js} +2 -2
  139. package/dist/pcm-agents/{p-cc3c0220.entry.js → p-43cefa20.entry.js} +2 -2
  140. package/dist/pcm-agents/{p-4b363eb3.entry.js → p-5bf761de.entry.js} +2 -2
  141. package/dist/pcm-agents/{p-96c41b85.entry.js → p-680bf3a3.entry.js} +2 -2
  142. package/dist/pcm-agents/p-8452f80b.entry.js +251 -0
  143. package/dist/pcm-agents/p-8452f80b.entry.js.map +1 -0
  144. package/dist/pcm-agents/{p-86c2748a.entry.js → p-890fb793.entry.js} +2 -2
  145. package/dist/pcm-agents/{p-Dz4pPCio.js → p-B1X08zm_.js} +2 -2
  146. package/dist/pcm-agents/{p-Dz4pPCio.js.map → p-B1X08zm_.js.map} +1 -1
  147. package/dist/pcm-agents/{p-zJbvNgZt.js → p-BmPGiYO3.js} +2 -2
  148. package/dist/pcm-agents/{p-zJbvNgZt.js.map → p-BmPGiYO3.js.map} +1 -1
  149. package/dist/pcm-agents/{p-a54ca8e2.entry.js → p-a31fa268.entry.js} +2 -2
  150. package/dist/pcm-agents/{p-4b257381.entry.js → p-ad6ce0c9.entry.js} +2 -2
  151. package/dist/pcm-agents/{p-41b4b6bb.entry.js → p-b80f01e6.entry.js} +2 -2
  152. package/dist/pcm-agents/{p-e442dabc.entry.js → p-c3eb9590.entry.js} +2 -2
  153. package/dist/pcm-agents/{p-92eea906.entry.js → p-eb44bda0.entry.js} +2 -2
  154. package/dist/pcm-agents/pcm-agents.esm.js +1 -1
  155. package/dist/pcm-agents/pcm-hr-chat-modal.entry.esm.js.map +1 -1
  156. package/dist/types/components/pcm-jlpp-modal/pcm-jlpp-modal.d.ts +3 -2
  157. package/dist/types/components/pcm-jlzz-modal/pcm-jlzz-modal.d.ts +14 -0
  158. package/dist/types/components/pcm-qgqjl-modal/pcm-qgqjl-modal.d.ts +3 -2
  159. package/dist/types/components/pcm-virtual-chat-modal/pcm-virtual-chat-modal.d.ts +10 -0
  160. package/dist/types/components/pcm-zygh-v2-modal/pcm-zygh-v2-modal.d.ts +4 -4
  161. package/dist/types/components.d.ts +36 -12
  162. package/package.json +1 -1
  163. package/dist/cjs/pcm-1zhanshi-mnms-modal_28.cjs.entry.js.map +0 -1
  164. package/dist/cjs/pcm-zygh-v2-modal.cjs.entry.js +0 -260
  165. package/dist/cjs/pcm-zygh-v2-modal.cjs.entry.js.map +0 -1
  166. package/dist/cjs/pcm-zygh-v2-modal.entry.cjs.js.map +0 -1
  167. package/dist/components/p-BZeNORff.js.map +0 -1
  168. package/dist/components/p-Caxrsbp0.js.map +0 -1
  169. package/dist/esm/pcm-1zhanshi-mnms-modal_28.entry.js.map +0 -1
  170. package/dist/esm/pcm-zygh-v2-modal.entry.js +0 -258
  171. package/dist/esm/pcm-zygh-v2-modal.entry.js.map +0 -1
  172. package/dist/pcm-agents/p-210d610a.entry.js +0 -2
  173. package/dist/pcm-agents/p-210d610a.entry.js.map +0 -1
  174. package/dist/pcm-agents/p-365a351b.entry.js +0 -2
  175. package/dist/pcm-agents/p-6551d616.entry.js +0 -251
  176. package/dist/pcm-agents/p-6551d616.entry.js.map +0 -1
  177. package/dist/pcm-agents/pcm-zygh-v2-modal.entry.esm.js.map +0 -1
  178. /package/dist/pcm-agents/{p-d9e464fd.entry.js.map → p-1cc1dbcc.entry.js.map} +0 -0
  179. /package/dist/pcm-agents/{p-cc3c0220.entry.js.map → p-43cefa20.entry.js.map} +0 -0
  180. /package/dist/pcm-agents/{p-4b363eb3.entry.js.map → p-5bf761de.entry.js.map} +0 -0
  181. /package/dist/pcm-agents/{p-96c41b85.entry.js.map → p-680bf3a3.entry.js.map} +0 -0
  182. /package/dist/pcm-agents/{p-86c2748a.entry.js.map → p-890fb793.entry.js.map} +0 -0
  183. /package/dist/pcm-agents/{p-a54ca8e2.entry.js.map → p-a31fa268.entry.js.map} +0 -0
  184. /package/dist/pcm-agents/{p-4b257381.entry.js.map → p-ad6ce0c9.entry.js.map} +0 -0
  185. /package/dist/pcm-agents/{p-41b4b6bb.entry.js.map → p-b80f01e6.entry.js.map} +0 -0
  186. /package/dist/pcm-agents/{p-e442dabc.entry.js.map → p-c3eb9590.entry.js.map} +0 -0
  187. /package/dist/pcm-agents/{p-92eea906.entry.js.map → p-eb44bda0.entry.js.map} +0 -0
@@ -0,0 +1,251 @@
1
+ import{r as e,c as t,g as o,h as i}from"./p-Bq0K-WqZ.js";import{a as n,v as r,c as a,i as s,s as l,b as d,j as c,u as p,k as h,l as u,m,f as g,P as f,n as b,F as x,o as w}from"./p-B1X08zm_.js";import{E as y}from"./p-C0FYX2-Z.js";import{m as k,g as v,e as C,s as z}from"./p-CwVqDK3R.js";import{S as I}from"./p-BmPGiYO3.js";import{M as S}from"./p-DXVhHj6-.js";import"./p-Bs-zO1WZ.js";const j="";const _='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const T=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const F=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent");this.recordingError=t(this,"recordingError")}modalTitle="模拟面试";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始模拟面试";maxRecordingTime=120;waitingTime=10;fullscreen=false;customInputs={};digitalId;openingIndex=0;enableVirtualHuman=false;showEndInterviewButton=false;playbackRate=1;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;recordingError;selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return o(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;virtualChatModalRef=null;handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}async handleIsOpenChange(e){if(!e){if(this.virtualChatModalRef){await this.virtualChatModalRef.setComponentActive(false)}this.resetState()}else{await r(this.token);this.showChatModal=true}}componentWillLoad(){if(this.zIndex){a.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=y.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}resetState(){this.showChatModal=false;this.jobDescription="";this.isSubmitting=false;this.selectedFile=null;this.isUploading=false;this.uploadedFileInfo=null}handleClose=()=>{this.modalClosed.emit()};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,this.enableVirtualHuman?i("pcm-virtual-chat-modal",{ref:e=>this.virtualChatModalRef=e,isOpen:true,fullscreen:this.fullscreen,botId:"3022316191018903",digitalId:this.digitalId,openingIndex:this.openingIndex,conversationId:this.conversationId,defaultQuery:this.defaultQuery,showEndInterviewButton:this.showEndInterviewButton,maxRecordingTime:this.maxRecordingTime,waitingTime:this.waitingTime,playbackRate:this.playbackRate,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,ai_interview_type:this.digitalId}}):i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isShowHeader,fullscreen:this.fullscreen,botId:"3022316191018903",showEndInterviewButton:this.showEndInterviewButton,conversationId:this.conversationId,defaultQuery:this.defaultQuery,maxRecordingTime:this.maxRecordingTime,waitingTime:this.waitingTime,playbackRate:this.playbackRate,customInputs:{...this.customInputs,file_url:this.uploadedFileInfo?.cos_key,file_name:this.uploadedFileInfo?.file_name},interviewMode:"video"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};F.style=j+(_+T);const E="在线客服";const M="保存职位";const B="简历制作";const D="发消息";const R="会话已结束";const A="语音输入";const O="点击停止录音";const L="正在识别语音...";const H="结束面试";const U="正在结束...";const q="正在结束面试...";const P="历史会话";const $="确认完成";const N="继续录制";const V="确认结束";const W="取消";const J="点击确认完成将结束本题回答";const Q="确认要结束面试吗?";const G="新会话";const X="未知时间";const Y="时间解析失败";const K="内容预览";const Z={sunday:"周日",monday:"周一",tuesday:"周二",wednesday:"周三",thursday:"周四",friday:"周五",saturday:"周六"};const ee={recordingErrorText:"录制过程中发生错误",emptyVideo:"录制的视频为空",processVideoError:"处理录制视频时出错",deviceAccessFailed:"设备访问失败",permissionDenied:"请允许访问摄像头和麦克风权限",deviceNotFound:"未检测到摄像头或麦克风设备",unsupportedConfiguration:"摄像头不支持指定的配置",videoElementNotFound:"未找到视频元素或媒体流无效",noAudioData:"没有录制到音频数据",emptyAudio:"录制的音频为空",speechRecognitionFailed:"未能识别语音内容",sendMessageCheckNetwork:"消息发送失败,请检查网络。",browserNotSupportVideoRecording:"您的浏览器不支持视频录制,请切换到微信或Chrome、Edge使用",cameraOrMicAccessFailed:"无法访问摄像头或麦克风,请检查设备连接"};const te={pleaseStart:"请开始",nextQuestion:"下一题",generateResume:"生成简历",endInterviewMessage:"请结束面试"};const oe={userConfirmEnd:"用户确认结束面试",userCancelEnd:"用户取消结束面试"};const ie={interviewCompleted:"面试已完成,感谢您的参与!",aiReviewing:"AI正在查看面试信息...",playingQuestion:"正在播放问题,请听完后准备回答...",uploadingVideo:"正在上传视频,请稍候...",waitingForQuestion:"请等待题目...",prepareToRecord:"请准备好,{time}秒后将开始录制您的回答...",preparing:"准备中..."};const ne={completeAnswer:"完成本题回答",completeAnswerShort:"完成回答",endChatGenerateResume:"结束对话生成简历"};const re={loadingHistory:"加载历史消息中..."};const ae={greeting:"你好,我是聘才猫,一个AI助手,很高兴认识你..."};const se={recordingInProgress:"录制中",autoCompleteWarning:"即将自动完成",currentRecordingTime:"当前录制时长:",recordingStillInProgress:"注意:录制仍在进行中"};const le={loading:"加载中...",noHistory:"暂无历史会话"};const de={trySolutions:"请尝试以下解决方案:",solution1:"更换有摄像头和麦克风的设备",solution2:"确保已允许浏览器访问摄像头和麦克风",solution3:"关闭其他正在使用摄像头/麦克风的应用"};const ce={noReminderThisInterview:"本次面试不再提醒",currentQuestion:"当前第 {count} 题",fewQuestionsWarning:"警告:",fewQuestionsWarningText:"当前已回答题数小于 3 题,结束面试可能无法正常完成面试流程,建议继续完成更多题目后再结束面试。",endInterviewConfirm:"确认要结束面试吗?结束后将生成面试报告。"};var pe={modalTitle:E,saveJdButtonText:M,resumeCreation:B,sendMessage:D,conversationEnded:R,voiceInput:A,clickToStopRecording:O,recognizingSpeech:L,endInterview:H,ending:U,endingInterview:q,historyConversations:P,confirmComplete:$,continueRecording:N,confirmEnd:V,cancel:W,clickConfirmCompleteToEnd:J,confirmEndInterviewPrompt:Q,newConversation:G,unknownTime:X,timeParseError:Y,contentPreview:K,weekdays:Z,errors:ee,messages:te,logs:oe,placeholderStatus:ie,buttons:ne,loading:re,welcome:ae,recording:se,history:le,deviceError:de,confirm:ce};const he="Online Customer Service";const ue="Save Job";const me="Resume Creation";const ge="Send Message";const fe="Conversation Ended";const be="Voice Input";const xe="Click to Stop Recording";const we="Recognizing Speech...";const ye="End Interview";const ke="Ending...";const ve="Ending Interview...";const Ce="History Conversations";const ze="Confirm Complete";const Ie="Continue Recording";const Se="Confirm End";const je="Cancel";const _e='Click "Confirm Complete" to end this question';const Te="Are you sure you want to end the interview?";const Fe="New Conversation";const Ee="Unknown Time";const Me="Time Parse Error";const Be="Content Preview";const De={sunday:"Sun",monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat"};const Re={recordingErrorText:"Recording Error Occurred",emptyVideo:"Recorded Video is Empty",processVideoError:"Error Processing Recorded Video",deviceAccessFailed:"Device Access Failed",permissionDenied:"Please Allow Access to Camera and Microphone",deviceNotFound:"Camera or Microphone Not Detected",unsupportedConfiguration:"Camera Does Not Support Specified Configuration",videoElementNotFound:"Video Element Not Found or Media Stream Invalid",noAudioData:"No Audio Data Recorded",emptyAudio:"Recorded Audio is Empty",speechRecognitionFailed:"Failed to Recognize Speech Content",sendMessageCheckNetwork:"Failed to send message, please check your network.",browserNotSupportVideoRecording:"Your browser does not support video recording, please switch to WeChat, Chrome, or Edge",cameraOrMicAccessFailed:"Unable to access camera or microphone, please check device connection"};const Ae={pleaseStart:"Please Start",nextQuestion:"Next Question",generateResume:"Generate Resume",endInterviewMessage:"Please End Interview"};const Oe={userConfirmEnd:"User Confirmed End Interview",userCancelEnd:"User Cancelled End Interview"};const Le={interviewCompleted:"Interview completed, thank you for your participation!",aiReviewing:"AI is reviewing interview information...",playingQuestion:"Playing question, please listen and prepare to answer...",uploadingVideo:"Uploading video, please wait...",waitingForQuestion:"Please wait for the question...",prepareToRecord:"Get ready, recording will start in {time} seconds...",preparing:"Preparing..."};const He={completeAnswer:"Complete This Answer",completeAnswerShort:"Complete Answer",endChatGenerateResume:"End Chat and Generate Resume"};const Ue={loadingHistory:"Loading history messages..."};const qe={greeting:"Hello, I'm PinCaiMao, an AI assistant, nice to meet you..."};const Pe={recordingInProgress:"Recording",autoCompleteWarning:"Auto-complete soon",currentRecordingTime:"Current recording time: ",recordingStillInProgress:"Note: Recording still in progress"};const $e={loading:"Loading...",noHistory:"No history conversations"};const Ne={trySolutions:"Please try the following solutions:",solution1:"Switch to a device with camera and microphone",solution2:"Ensure browser access to camera and microphone is allowed",solution3:"Close other applications using camera/microphone"};const Ve={noReminderThisInterview:"Don't remind me again for this interview",currentQuestion:"Current question {count}",fewQuestionsWarning:"Warning:",fewQuestionsWarningText:"You have answered fewer than 3 questions. Ending the interview now may prevent proper completion of the interview process. It is recommended to complete more questions before ending.",endInterviewConfirm:"Are you sure you want to end the interview? An interview report will be generated after ending."};var We={modalTitle:he,saveJdButtonText:ue,resumeCreation:me,sendMessage:ge,conversationEnded:fe,voiceInput:be,clickToStopRecording:xe,recognizingSpeech:we,endInterview:ye,ending:ke,endingInterview:ve,historyConversations:Ce,confirmComplete:ze,continueRecording:Ie,confirmEnd:Se,cancel:je,clickConfirmCompleteToEnd:_e,confirmEndInterviewPrompt:Te,newConversation:Fe,unknownTime:Ee,timeParseError:Me,contentPreview:Be,weekdays:De,errors:Re,messages:Ae,logs:Oe,placeholderStatus:Le,buttons:He,loading:Ue,welcome:qe,recording:Pe,history:$e,deviceError:Ne,confirm:Ve};const Je=":host{display:block;font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;overflow-y:auto;z-index:1000}.fullscreen-overlay{padding:0;position:absolute;width:100%;height:100%}.modal-container{background:white;border-radius:8px;width:100%;max-width:900px;display:flex;flex-direction:column;position:relative;margin:auto}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.modal-container.fullscreen>div:not(.modal-header):not(.initial-upload){display:flex;flex-direction:column;flex:1;overflow:hidden;height:100%}.pc-layout{width:80%;max-width:800px;min-width:320px;min-height:400px}.video-preview.placeholder{display:flex;justify-content:center;align-items:center;background:#eaeaea}.placeholder-status{color:#00000066}.placeholder-status p{font-size:16px}.waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-container{width:100%;display:flex;flex-direction:column;align-items:center}.video-container{width:100%;display:flex;flex-wrap:wrap;justify-content:center;margin-bottom:20px}.video-area{width:100%;display:flex;flex-direction:column;align-items:center}.stop-recording-button{width:100%;height:100%;font-size:16px;background:#f44336;border-radius:6px;color:white;border:none;cursor:pointer}.stop-recording-button:hover{background:#d32f2f}.play-audio-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0;}.header-left{display:flex;align-items:center;gap:8px}.header-left div{font-size:16px}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.chat-container{background-image:url(https://pub.pincaimao.com/static/web/images/login/bg_login_m.png);background-size:100%;height:100%;border-radius:0px 0px 8px 8px}.chat-history{position:relative;flex:1;overflow-y:auto;padding:20px;scroll-behavior:smooth;height:400px}.fullscreen .chat-history{height:auto;flex:1 1 auto}.message-input{padding:16px;border-top:1px solid #eee;display:flex;gap:8px;align-items:center}.message-input input{flex:1;padding:8px 12px;border:1px solid #ddd;border-radius:4px;outline:none;transition:border-color 0.2s ease}.message-input input:focus{border-color:#bbb}.message{margin-bottom:16px;opacity:1;transition:opacity 0.3s ease}.message-content{max-width:70%;padding:8px 12px;border-radius:8px;word-break:break-word}.message-content p{margin:0;word-break:break-word}.user-message{display:flex;justify-content:flex-end}.agent-message{display:flex;justify-content:flex-start}.user-message .message-content{background-color:#007bff;color:white}.agent-message .message-content{background-color:#f1f1f1}.message-time{font-size:12px;color:#999;margin-top:4px;display:block}.cancel-button{width:150px;height:38px;background:#0d75fb;color:#fff;border:none;margin-bottom:10px;cursor:pointer;border-radius:6px}.cancel-button.disabled{background:#d9d9d9;cursor:not-allowed}.send-button{width:38px;height:38px;border-radius:16px;background:#0d75fb;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color 0.2s ease}.send-button img{width:24px;height:24px}.send-button:hover{background:#0a62d6}.send-button.disabled{background:#d9d9d9;cursor:not-allowed}.empty-state{display:flex;justify-content:center;align-items:center;height:100%;color:#999;text-align:center}.loading-container{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:rgba(255, 255, 255, 0.98);z-index:1;opacity:1;transition:opacity 0.3s ease}.loading-container p{margin-top:16px;color:#666;font-size:14px}.loading-spinner{width:40px;height:40px;border:3px solid #f3f3f3;border-top:3px solid #1890ff;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.messages-wrapper{width:100%;min-height:100%;display:flex;flex-direction:column;justify-content:flex-end}.messages-wrapper.has-overflow{justify-content:flex-start}.suggested-questions{display:flex;flex-direction:column;gap:8px;padding:16px}.suggested-question{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background-color:#f3f4f6;border-radius:4px;cursor:pointer;font-size:14px;color:#374151;transition:background-color 0.2s}.suggested-question:hover{background-color:#e5e7eb}.arrow-right{margin-left:8px}.loading-suggestions{display:flex;justify-content:center;padding:16px}.loading-spinner-small{width:20px;height:20px;border:2px solid #e5e7eb;border-top-color:#6b7280;border-radius:50%;animation:spin 0.8s linear infinite}.upload-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;color:#666;border-radius:4px;transition:background-color 0.2s}.upload-button:hover{background-color:rgba(0, 0, 0, 0.04)}.upload-button svg{width:20px;height:20px}.file-input{display:none}.selected-file{font-size:12px;color:#666;margin-left:8px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.input-wrapper{flex:1;display:flex;align-items:center;border:1px solid #ddd;border-radius:4px;padding:0 4px;background:white}.input-wrapper input{border:none;flex:1;padding:8px;outline:none}.input-wrapper:focus-within{border-color:#bbb}.file-preview{padding:8px 16px;border-top:1px solid #eee;background-color:#f9f9f9}.recording-section{border-top:1px solid #eee;display:flex;flex-direction:column;align-items:center;padding:10px 20px 0px 20px;border-radius:14px 14px 0 0;flex:0 0 auto}.recording-section .video-preview{width:100%;height:200px;max-width:400px;position:relative;margin-bottom:10px;border:1px solid #ddd;border-radius:12px;overflow:hidden}.recording-section video{width:100%;height:100%;object-fit:cover}.recording-status{position:absolute;top:10px;left:10px;background-color:rgba(0, 0, 0, 0.6);color:white;padding:4px 8px;border-radius:4px;display:flex;align-items:center;gap:5px;font-size:14px;z-index:0}.recording-status .recording-dot{display:inline-block;width:10px;height:10px;background-color:red;border-radius:50%;margin-right:5px;animation:blink 1s infinite}.recording-status.warning{color:#ff4d4f;animation:blink 1s infinite}@keyframes blink{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}.recording-section .stop-recording-button{background-color:#f44336;color:white;border:none;cursor:pointer;font-weight:bold}.recording-section .stop-recording-button:hover{background-color:#d32f2f}.fullscreen{width:100vw;border-radius:0;height:100vh;display:flex;flex-direction:column;overflow-y:auto}.recording-controls{margin-top:10px;height:53px;width:100%;max-width:400px;display:flex;justify-content:center}.recording-controls .waiting-message{text-align:center;color:white;font-size:16px;background-color:#0d75fb;border-radius:6px;width:95%;display:flex;justify-content:center;align-items:center;cursor:pointer}.recording-controls .waiting-message.loading{background:#faad14}.recording-controls .waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-controls .stop-recording-button{background-color:#dc3545;color:white;border:none;cursor:pointer;font-size:16px}.recording-controls .stop-recording-button:hover{background-color:#c82333}.recording-controls .stop-recording-button.disabled{background:#ccc;cursor:not-allowed}.recording-controls .stop-recording-button.disabled:hover{background:#ccc}.progress-container{display:flex;justify-content:space-between;align-items:center;width:100%;max-width:400px;margin-top:10px;padding:0 5px}.progress-bar-container{height:4px;background-color:#e5e5e5;border-radius:2px;overflow:hidden;margin-right:10px;width:75px}.progress-bar{height:100%;background-image:linear-gradient(111deg, #4a9fff 0%, #1058ff 100%);border-radius:2px;transition:width 0.3s ease}.progress-text{font-size:14px;color:#666;white-space:nowrap}.text-input-area{display:flex;flex-direction:column;width:100%;height:100%;padding:0px 16px 16px 16px;border-radius:8px;border:none;}.text-answer-input{flex:1;min-height:80px;padding:12px 12px 0px 12px;border:1px solid #ddd;border-radius:8px 8px 0 0;resize:none;font-size:16px;background-color:#fff;border-bottom:none;outline:none;}.input-toolbar{display:flex;justify-content:end;align-items:center;padding:8px 12px;background-color:#fff;border:1px solid #ddd;border-top:none;border-radius:0 0 8px 8px}.text-answer-input:focus{border-color:rgb(74, 144, 226);border-bottom:none}.text-answer-input:focus+.input-toolbar{border-color:rgb(74, 144, 226);border-top:none}.toolbar-actions{width:32px;height:32px;display:flex;justify-content:center;align-items:center;margin-right:10px;border:1px solid #d9d9d9;border-radius:6px}.toolbar-actions:hover{background-color:#f0f0f0}.toolbar-button{background:transparent;border:none;color:#666;cursor:pointer;padding:0;margin:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.toolbar-button>div,.toolbar-button>svg{display:flex;justify-content:center;align-items:center}.submit-text-button{padding:6px 16px;background-color:#4a90e2;color:white;border:none;border-radius:4px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color 0.2s}.submit-text-button:hover:not(.disabled){background-color:#3a7bc8}.submit-text-button.disabled{background-color:#b3b3b3;cursor:not-allowed}.toolbar-button.recording{background-color:rgba(255, 0, 0, 0.1);color:#ff3b30;animation:pulse 1.5s infinite}.toolbar-button.converting{background-color:rgba(0, 122, 255, 0.1);color:#007aff}.toolbar-button .recording-time{font-size:12px;margin-left:4px}.converting-indicator{display:flex;justify-content:center;align-items:center}.converting-indicator svg{animation:spin 1.5s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0.4)}70%{box-shadow:0 0 0 6px rgba(255, 0, 0, 0)}100%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0)}}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:0}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.workspace-section{width:100%;padding:0px 16px 16px}.workspace-toolbar{display:flex;justify-content:space-between;align-items:end;gap:12px;position:relative}.workspace-button{display:flex;align-items:center;gap:6px;padding:8px 16px;border:1px solid #d9d9d9;border-radius:6px;background:white;color:#666;font-size:14px;cursor:pointer;transition:all 0.2s ease;box-shadow:0 1px 2px rgba(0, 0, 0, 0.05)}.workspace-button:hover{border-color:#4096ff;color:#4096ff;box-shadow:0 2px 4px rgba(64, 150, 255, 0.1)}.workspace-button svg{flex-shrink:0}.workspace-button.end-interview-button{background:#ff4d4f;color:white;border-color:#ff4d4f}.workspace-button.end-interview-button:hover:not(:disabled){background:#ff7875;border-color:#ff7875;color:white;box-shadow:0 2px 4px rgba(255, 77, 79, 0.2)}.workspace-button.end-interview-button:disabled{background:#d9d9d9;border-color:#d9d9d9;color:#999;cursor:not-allowed;box-shadow:none}.digital-human-wrapper{display:flex;align-items:center;justify-content:center;width:120px;height:80px;border:1px solid #d9d9d9;border-radius:8px;background:#fafafa;overflow:hidden;position:absolute;right:0px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-item.active{background:#e6f7ff;border-color:#1890ff}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.current-indicator{flex-shrink:0;color:#1890ff;margin-left:8px}";const Qe='.markdown-body{--base-size-4:4px;--base-size-8:8px;--base-size-16:16px;--base-size-24:24px;--base-size-40:40px;--base-text-weight-normal:400;--base-text-weight-medium:500;--base-text-weight-semibold:600;--fontStack-monospace:ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;--fgColor-accent:Highlight}@media (prefers-color-scheme: dark){.markdown-body,[data-theme="dark"]{color-scheme:dark;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#59636e;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#ffffff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#818b981f;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d1d9e0;--borderColor-muted:#d1d9e0b3;--borderColor-neutral-muted:#d1d9e0b3;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#9a6700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#59636e;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#1f2328;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#59636e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#1f2328;--color-prettylights-syntax-markup-bold:#1f2328;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#d1d9e0;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#818b98}}@media (prefers-color-scheme: light){.markdown-body,[data-theme="light"]{color-scheme:light;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#59636e;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#ffffff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#818b981f;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d1d9e0;--borderColor-muted:#d1d9e0b3;--borderColor-neutral-muted:#d1d9e0b3;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#9a6700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#59636e;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#1f2328;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#59636e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#1f2328;--color-prettylights-syntax-markup-bold:#1f2328;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#d1d9e0;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#818b98}}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;margin:0;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}.markdown-body h1:hover .anchor .octicon-link:before,.markdown-body h2:hover .anchor .octicon-link:before,.markdown-body h3:hover .anchor .octicon-link:before,.markdown-body h4:hover .anchor .octicon-link:before,.markdown-body h5:hover .anchor .octicon-link:before,.markdown-body h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:\' \';display:inline-block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' version=\'1.1\' aria-hidden=\'true\'><path fill-rule=\'evenodd\' d=\'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\'></path></svg>");mask-image:url("data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' version=\'1.1\' aria-hidden=\'true\'><path fill-rule=\'evenodd\' d=\'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\'></path></svg>")}.markdown-body details,.markdown-body figcaption,.markdown-body figure{display:block}.markdown-body summary{display:list-item}.markdown-body [hidden]{display:none !important}.markdown-body a{background-color:transparent;color:var(--fgColor-accent);text-decoration:none}.markdown-body abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.markdown-body b,.markdown-body strong{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dfn{font-style:italic}.markdown-body h1{margin:.67em 0;font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body mark{background-color:var(--bgColor-attention-muted);color:var(--fgColor-default)}.markdown-body small{font-size:90%}.markdown-body sub,.markdown-body sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.markdown-body sub{bottom:-0.25em}.markdown-body sup{top:-0.5em}.markdown-body img{border-style:none;max-width:100%;box-sizing:content-box}.markdown-body code,.markdown-body kbd,.markdown-body pre,.markdown-body samp{font-family:monospace;font-size:1em}.markdown-body figure{margin:1em var(--base-size-40)}.markdown-body hr{box-sizing:content-box;overflow:hidden;background:transparent;border-bottom:1px solid var(--borderColor-muted);height:.25em;padding:0;margin:var(--base-size-24) 0;background-color:var(--borderColor-default);border:0}.markdown-body input{font:inherit;margin:0;overflow:visible;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=button],.markdown-body [type=reset],.markdown-body [type=submit]{-webkit-appearance:button;appearance:button}.markdown-body [type=checkbox],.markdown-body [type=radio]{box-sizing:border-box;padding:0}.markdown-body [type=number]::-webkit-inner-spin-button,.markdown-body [type=number]::-webkit-outer-spin-button{height:auto}.markdown-body [type=search]::-webkit-search-cancel-button,.markdown-body [type=search]::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.markdown-body ::-webkit-input-placeholder{color:inherit;opacity:.54}.markdown-body ::-webkit-file-upload-button{-webkit-appearance:button;appearance:button;font:inherit}.markdown-body a:hover{text-decoration:underline}.markdown-body ::placeholder{color:var(--fgColor-muted);opacity:1}.markdown-body hr::before{display:table;content:""}.markdown-body hr::after{display:table;clear:both;content:""}.markdown-body table{border-spacing:0;border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto;font-variant:tabular-nums}.markdown-body td,.markdown-body th{padding:0}.markdown-body details summary{cursor:pointer}.markdown-body a:focus,.markdown-body [role=button]:focus,.markdown-body input[type=radio]:focus,.markdown-body input[type=checkbox]:focus{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:focus:not(:focus-visible),.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body input[type=radio]:focus:not(:focus-visible),.markdown-body input[type=checkbox]:focus:not(:focus-visible){outline:solid 1px transparent}.markdown-body a:focus-visible,.markdown-body [role=button]:focus-visible,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus-visible{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:not([class]):focus,.markdown-body a:not([class]):focus-visible,.markdown-body input[type=radio]:focus,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus,.markdown-body input[type=checkbox]:focus-visible{outline-offset:0}.markdown-body kbd{display:inline-block;padding:var(--base-size-4);font:11px var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);line-height:10px;color:var(--fgColor-default);vertical-align:middle;background-color:var(--bgColor-muted);border:solid 1px var(--borderColor-neutral-muted);border-bottom-color:var(--borderColor-neutral-muted);border-radius:6px;box-shadow:inset 0 -1px 0 var(--borderColor-neutral-muted)}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:var(--base-size-24);margin-bottom:var(--base-size-16);font-weight:var(--base-text-weight-semibold, 600);line-height:1.25}.markdown-body h2{font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.2em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body h3{font-weight:var(--base-text-weight-semibold, 600);font-size:1.05em}.markdown-body h4{font-weight:var(--base-text-weight-semibold, 600);font-size:0.875em}.markdown-body h5{font-weight:var(--base-text-weight-semibold, 600);font-size:.85em}.markdown-body h6{font-weight:var(--base-text-weight-semibold, 600);font-size:.80em;color:var(--fgColor-muted)}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0;padding:0 1em;color:var(--fgColor-muted);border-left:.25em solid var(--borderColor-default)}.markdown-body ul,.markdown-body ol{margin-top:0;margin-bottom:0;padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ul ul ol,.markdown-body ul ol ol,.markdown-body ol ul ol,.markdown-body ol ol ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body tt,.markdown-body code,.markdown-body samp{font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0;font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px;word-wrap:normal}.markdown-body .octicon{display:inline-block;overflow:visible !important;vertical-align:text-bottom;fill:currentColor}.markdown-body input::-webkit-outer-spin-button,.markdown-body input::-webkit-inner-spin-button{margin:0;appearance:none}.markdown-body .mr-2{margin-right:var(--base-size-8, 8px) !important}.markdown-body::before{display:table;content:""}.markdown-body::after{display:table;clear:both;content:""}.markdown-body>*:first-child{margin-top:0 !important}.markdown-body>*:last-child{margin-bottom:0 !important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:var(--fgColor-danger)}.markdown-body .anchor{float:left;padding-right:var(--base-size-4);margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body p,.markdown-body blockquote,.markdown-body ul,.markdown-body ol,.markdown-body dl,.markdown-body table,.markdown-body pre,.markdown-body details{margin-top:0;margin-bottom:var(--base-size-16);font-size:16px;font-weight:400}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:var(--fgColor-default);vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 tt,.markdown-body h1 code,.markdown-body h2 tt,.markdown-body h2 code,.markdown-body h3 tt,.markdown-body h3 code,.markdown-body h4 tt,.markdown-body h4 code,.markdown-body h5 tt,.markdown-body h5 code,.markdown-body h6 tt,.markdown-body h6 code{padding:0 .2em;font-size:inherit}.markdown-body summary h1,.markdown-body summary h2,.markdown-body summary h3,.markdown-body summary h4,.markdown-body summary h5,.markdown-body summary h6{display:inline-block}.markdown-body summary h1 .anchor,.markdown-body summary h2 .anchor,.markdown-body summary h3 .anchor,.markdown-body summary h4 .anchor,.markdown-body summary h5 .anchor,.markdown-body summary h6 .anchor{margin-left:-40px}.markdown-body summary h1,.markdown-body summary h2{padding-bottom:0;border-bottom:0}.markdown-body ul.no-list,.markdown-body ol.no-list{padding:0;list-style-type:none}.markdown-body ol[type="a s"]{list-style-type:lower-alpha}.markdown-body ol[type="A s"]{list-style-type:upper-alpha}.markdown-body ol[type="i s"]{list-style-type:lower-roman}.markdown-body ol[type="I s"]{list-style-type:upper-roman}.markdown-body ol[type="1"]{list-style-type:decimal}.markdown-body div>ol:not([type]){list-style-type:decimal}.markdown-body ul ul,.markdown-body ul ol,.markdown-body ol ol,.markdown-body ol ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:var(--base-size-16)}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:var(--base-size-16);font-size:1em;font-style:italic;font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dl dd{padding:0 var(--base-size-16);margin-bottom:var(--base-size-16)}.markdown-body table th{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body table th,.markdown-body table td{padding:6px 13px;border:1px solid var(--borderColor-default)}.markdown-body table td>:last-child{margin-bottom:0}.markdown-body table tr{background-color:var(--bgColor-default);border-top:1px solid var(--borderColor-muted)}.markdown-body table tr:nth-child(2n){background-color:var(--bgColor-muted)}.markdown-body table img{background-color:transparent}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid var(--borderColor-default)}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:var(--fgColor-default)}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:.2em .4em;margin:0;font-size:85%;white-space:break-spaces;background-color:var(--bgColor-neutral-muted);border-radius:6px}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body samp{font-size:85%}.markdown-body pre code{font-size:100%}.markdown-body pre>code{padding:0;margin:0;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:var(--base-size-16)}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:var(--base-size-16);overflow:auto;font-size:85%;line-height:1.45;color:var(--fgColor-default);background-color:var(--bgColor-muted);border-radius:6px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px var(--base-size-8) 9px;text-align:right;background:var(--bgColor-default);border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:var(--base-text-weight-semibold, 600);background:var(--bgColor-muted);border-top:0}.markdown-body [data-footnote-ref]::before{content:"["}.markdown-body [data-footnote-ref]::after{content:"]"}.markdown-body .footnotes{font-size:12px;color:var(--fgColor-muted);border-top:1px solid var(--borderColor-default)}.markdown-body .footnotes ol{padding-left:var(--base-size-16)}.markdown-body .footnotes ol ul{display:inline-block;padding-left:var(--base-size-16);margin-top:var(--base-size-16)}.markdown-body .footnotes li{position:relative}.markdown-body .footnotes li:target::before{position:absolute;top:calc(var(--base-size-8)*-1);right:calc(var(--base-size-8)*-1);bottom:calc(var(--base-size-8)*-1);left:calc(var(--base-size-24)*-1);pointer-events:none;content:"";border:2px solid var(--borderColor-accent-emphasis);border-radius:6px}.markdown-body .footnotes li:target{color:var(--fgColor-default)}.markdown-body .footnotes .data-footnote-backref g-emoji{font-family:monospace}.markdown-body body:has(:modal){padding-right:var(--dialog-scrollgutter) !important}.markdown-body .pl-c{color:var(--color-prettylights-syntax-comment)}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:var(--color-prettylights-syntax-constant)}.markdown-body .pl-e,.markdown-body .pl-en{color:var(--color-prettylights-syntax-entity)}.markdown-body .pl-smi,.markdown-body .pl-s .pl-s1{color:var(--color-prettylights-syntax-storage-modifier-import)}.markdown-body .pl-ent{color:var(--color-prettylights-syntax-entity-tag)}.markdown-body .pl-k{color:var(--color-prettylights-syntax-keyword)}.markdown-body .pl-s,.markdown-body .pl-pds,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-sr .pl-sra{color:var(--color-prettylights-syntax-string)}.markdown-body .pl-v,.markdown-body .pl-smw{color:var(--color-prettylights-syntax-variable)}.markdown-body .pl-bu{color:var(--color-prettylights-syntax-brackethighlighter-unmatched)}.markdown-body .pl-ii{color:var(--color-prettylights-syntax-invalid-illegal-text);background-color:var(--color-prettylights-syntax-invalid-illegal-bg)}.markdown-body .pl-c2{color:var(--color-prettylights-syntax-carriage-return-text);background-color:var(--color-prettylights-syntax-carriage-return-bg)}.markdown-body .pl-sr .pl-cce{font-weight:bold;color:var(--color-prettylights-syntax-string-regexp)}.markdown-body .pl-ml{color:var(--color-prettylights-syntax-markup-list)}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{font-weight:bold;color:var(--color-prettylights-syntax-markup-heading)}.markdown-body .pl-mi{font-style:italic;color:var(--color-prettylights-syntax-markup-italic)}.markdown-body .pl-mb{font-weight:bold;color:var(--color-prettylights-syntax-markup-bold)}.markdown-body .pl-md{color:var(--color-prettylights-syntax-markup-deleted-text);background-color:var(--color-prettylights-syntax-markup-deleted-bg)}.markdown-body .pl-mi1{color:var(--color-prettylights-syntax-markup-inserted-text);background-color:var(--color-prettylights-syntax-markup-inserted-bg)}.markdown-body .pl-mc{color:var(--color-prettylights-syntax-markup-changed-text);background-color:var(--color-prettylights-syntax-markup-changed-bg)}.markdown-body .pl-mi2{color:var(--color-prettylights-syntax-markup-ignored-text);background-color:var(--color-prettylights-syntax-markup-ignored-bg)}.markdown-body .pl-mdr{font-weight:bold;color:var(--color-prettylights-syntax-meta-diff-range)}.markdown-body .pl-ba{color:var(--color-prettylights-syntax-brackethighlighter-angle)}.markdown-body .pl-sg{color:var(--color-prettylights-syntax-sublimelinter-gutter-mark)}.markdown-body .pl-corl{text-decoration:underline;color:var(--color-prettylights-syntax-constant-other-reference-link)}.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body [role=tabpanel][tabindex="0"]:focus:not(:focus-visible),.markdown-body button:focus:not(:focus-visible),.markdown-body summary:focus:not(:focus-visible),.markdown-body a:focus:not(:focus-visible){outline:none;box-shadow:none}.markdown-body [tabindex="0"]:focus:not(:focus-visible),.markdown-body details-dialog:focus:not(:focus-visible){outline:none}.markdown-body g-emoji{display:inline-block;min-width:1ch;font-family:"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1em;font-style:normal !important;font-weight:var(--base-text-weight-normal, 400);line-height:1;vertical-align:-0.075em}.markdown-body g-emoji img{width:1em;height:1em}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item label{font-weight:var(--base-text-weight-normal, 400)}.markdown-body .task-list-item.enabled label{cursor:pointer}.markdown-body .task-list-item+.task-list-item{margin-top:var(--base-size-4)}.markdown-body .task-list-item .handle{display:none}.markdown-body .task-list-item-checkbox{margin:0 .2em .25em -1.4em;vertical-align:middle}.markdown-body ul:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body ol:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body .contains-task-list:hover .task-list-item-convert-container,.markdown-body .contains-task-list:focus-within .task-list-item-convert-container{display:block;width:auto;height:24px;overflow:visible;clip:auto}.markdown-body ::-webkit-calendar-picker-indicator{filter:invert(50%)}.markdown-body .markdown-alert{padding:var(--base-size-8) var(--base-size-16);margin-bottom:var(--base-size-16);color:inherit;border-left:.25em solid var(--borderColor-default)}.markdown-body .markdown-alert>:first-child{margin-top:0}.markdown-body .markdown-alert>:last-child{margin-bottom:0}.markdown-body .markdown-alert .markdown-alert-title{display:flex;font-weight:var(--base-text-weight-medium, 500);align-items:center;line-height:1}.markdown-body .markdown-alert.markdown-alert-note{border-left-color:var(--borderColor-accent-emphasis)}.markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title{color:var(--fgColor-accent)}.markdown-body .markdown-alert.markdown-alert-important{border-left-color:var(--borderColor-done-emphasis)}.markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title{color:var(--fgColor-done)}.markdown-body .markdown-alert.markdown-alert-warning{border-left-color:var(--borderColor-attention-emphasis)}.markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title{color:var(--fgColor-attention)}.markdown-body .markdown-alert.markdown-alert-tip{border-left-color:var(--borderColor-success-emphasis)}.markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title{color:var(--fgColor-success)}.markdown-body .markdown-alert.markdown-alert-caution{border-left-color:var(--borderColor-danger-emphasis)}.markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title{color:var(--fgColor-danger)}.markdown-body>*:first-child>.heading-element:first-child{margin-top:0 !important}.markdown-body .highlight pre:has(+.zeroclipboard-container){min-height:52px}';const Ge=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Xe=class{locale;strings;modalTitle="在线客服";token;isOpen=false;messages=[];modalClosed;icon;zIndex;isShowHeader=true;isNeedClose=true;conversationId;showSaveJdButton=false;saveJdButtonText="保存职位";isLoading=false;currentStreamingMessage=null;shouldAutoScroll=true;isLoadingHistory=false;get hostElement(){return o(this)}streamComplete;conversationStart;defaultQuery="你好!聘才猫";maxRecordingTime=120;countdownWarningTime=30;waitingTime=10;closeResume;isRecording=false;recordingStream=null;recordedBlob=null;mediaRecorder=null;recordingTimeLeft=0;showRecordingUI=false;recordingTimer=null;recordingStartTime=0;waitingToRecord=false;waitingTimer=null;waitingTimeLeft=0;videoRef=null;currentQuestionNumber=0;interviewComplete;showCountdownWarning=false;fullscreen=false;isUploadingVideo=false;isPlayingAudio=false;recordingError;recordingStatusChange;tokenInvalid;interviewMode="text";textAnswer="";isSubmittingText=false;customInputs={};botId;isRecordingAudio=false;audioRecorder=null;audioChunks=[];isConvertingAudio=false;audioRecordingTimeLeft=60;audioRecordingTimer=null;audioRecordingStartTime=0;maxAudioRecordingTime=60;userAvatar="https://pub.pincaimao.com/static/common/i_pcm_logo.png";assistantAvatar;agentLogo="";isTaskCompleted=false;virtualmanKey="";tokenInvalidListener;showCopyButton=true;showFeedbackButtons=true;filePreviewMode="drawer";showWorkspaceHistory=false;isDrawerOpen=false;previewUrl="";previewFileName="";previewContentType="file";previewContent="";isUserScrolling=false;deviceError=null;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;showConfirmModal=false;skipConfirmThisInterview=false;showEndInterviewConfirmModal=false;isEndingInterview=false;lastCompletedAnswer="";waitingForDigitalHuman=false;digitalHumanVideoReady=false;digitalId;showEndInterviewButton=false;playbackRate=1;handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.recordingError=t(this,"recordingError");this.recordingStatusChange=t(this,"recordingStatusChange");this.tokenInvalid=t(this,"tokenInvalid");k.setOptions({breaks:true,gfm:true})}async componentWillLoad(){this.strings=this.locale==="en"?We:pe;if(this.zIndex){a.setItem("modal-zIndex",this.zIndex)}else{const e=a.getItem("modal-zIndex");if(e){this.zIndex=e}else{this.zIndex=1e3;a.setItem("modal-zIndex",1e3)}}if(this.token){n.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};document.addEventListener("pcm-token-invalid",this.tokenInvalidListener);if(!this.customInputs){this.customInputs={}}if(!this.assistantAvatar&&this.botId){this.fetchAgentLogo()}if(this.isOpen){if(this.conversationId){setTimeout((()=>this.loadHistoryMessages()),0)}else{setTimeout((()=>{this.sendMessageToAPI(this.defaultQuery)}),0)}}}handleClose=()=>{this.stopRecording();this.modalClosed.emit()};async fetchAgentLogo(){if(!this.botId)return;try{const e=await s(this.botId);if(e&&e.logo){this.agentLogo=e.logo}}catch(e){I.captureError(e,{action:"fetchAgentLogo",component:"pcm-app-chat-modal",title:"获取智能体信息失败"});y.emitError({error:e,message:"获取智能体信息失败"})}}async sendMessageToAPI(e,t){if(this.isTaskCompleted&&!this.isEndingInterview){return}this.waitingForDigitalHuman=false;this.digitalHumanVideoReady=false;this.isLoading=true;let o="";let i="";const n=new Date;const r=`${n.getHours()}:${n.getMinutes().toString().padStart(2,"0")}`;const a=e.trim()||this.strings?.messages?.pleaseStart;if(t){this.customInputs={...this.customInputs,video_url:t}}const s={id:`temp-${Date.now()}`,conversation_id:this.conversationId,inputs:this.customInputs||{},query:a,answer:"",message_files:[],feedback:{},retriever_resources:[],created_at:Math.floor(Date.now()/1e3).toString(),agent_thoughts:[],status:"normal",error:null,time:r,isStreaming:true};this.currentStreamingMessage=s;setTimeout((()=>{this.shouldAutoScroll=true;this.scrollToBottom()}),200);const d={response_mode:"streaming",conversation_id:this.conversationId,query:a,bot_id:this.botId};d.inputs={...this.customInputs};await l({url:"/sdk/v1/chat/chat-messages",method:"POST",data:d,onMessage:e=>{if(e.conversation_id&&!this.conversationId){this.conversationId=e.conversation_id;this.conversationStart.emit({conversation_id:e.conversation_id,event:e.event,message_id:e.message_id,id:e.id})}if(e.event==="node_finished"&&e.data.inputs&&e.data.inputs.LLMText){i=e.data.inputs.LLMText}if(e.event==="node_finished"&&e.data.title&&e.data.title.includes("聘才猫任务结束")){this.isTaskCompleted=true;const e=i||o||this.currentStreamingMessage?.answer||"";this.interviewComplete.emit({conversation_id:this.conversationId,current_question_number:this.currentQuestionNumber,ai_response:e})}if(e.event==="node_finished"&&e.data.title&&e.data.title.includes("聘才猫数字人题目")){const t=JSON.parse(e.data.process_data.digital_human_list);this.precreateDigitalHumanVideos(t)}if(e.event==="message"){if(e.event==="agent_message"||e.event==="message"){if(e.answer){o+=e.answer;const t={...this.currentStreamingMessage,answer:o,id:e.message_id||this.currentStreamingMessage.id,isStreaming:true,retriever_resources:e.retriever_resources||this.currentStreamingMessage.retriever_resources,agent_thoughts:e.agent_thoughts||this.currentStreamingMessage.agent_thoughts};this.currentStreamingMessage=t;this.scrollToBottom()}}}if(e.event==="error"){const t=e.data?.message||e.message||"请求失败";this.messages=[...this.messages,{...s,answer:t,error:e.data,isStreaming:false}];this.currentStreamingMessage=null;this.isLoading=false;y.emitError({error:e.data,message:t});return}if(e.event==="message_end"){this.streamComplete.emit({conversation_id:e.conversation_id||"",event:e.event,message_id:e.message_id,id:e.id})}},onError:e=>{console.error("发生错误:",e);y.emitError({error:e,message:"消息发送失败,请稍后再试"});I.captureError(e,{action:"sendMessageToAPI",component:"pcm-app-chat-modal",title:"消息发送失败"});this.messages=[...this.messages,{...s,answer:this.strings?.errors?.sendMessageCheckNetwork,error:e,isStreaming:false}];this.currentStreamingMessage=null;this.isLoading=false},onComplete:async()=>{this.isLoading=false;setTimeout((()=>{if(this.customInputs){delete this.customInputs.job_info;delete this.customInputs.file_url;delete this.customInputs.file_name}}),1e3);const e={...this.currentStreamingMessage,isStreaming:false};if(e&&e.answer){this.lastCompletedAnswer=e.answer}this.messages=[...this.messages,e];this.currentStreamingMessage=null;this.currentQuestionNumber++;if(this.isTaskCompleted||this.isEndingInterview){return}if(this.interviewMode==="video"){if(this.digitalId){this.waitingForDigitalHuman=true}else{this.startWaitingToRecord()}}}})}handleScroll=()=>{if(this.isUserScrolling){const e=this.hostElement.shadowRoot?.querySelector(".chat-history");if(!e)return;const{scrollTop:t,scrollHeight:o,clientHeight:i}=e;const n=o-t-i;this.shouldAutoScroll=n<=20}};handleTouchStart=()=>{this.isUserScrolling=true};handleTouchEnd=()=>{setTimeout((()=>{this.isUserScrolling=false}),100)};_wheelTimer=null;handleWheel=()=>{this.isUserScrolling=true;if(this._wheelTimer){clearTimeout(this._wheelTimer)}this._wheelTimer=setTimeout((()=>{this.isUserScrolling=false}),150)};scrollToBottom(){if(!this.shouldAutoScroll)return;const e=this.hostElement.shadowRoot?.querySelector(".chat-history");if(e&&this.isOpen){e.scrollTop=e.scrollHeight}}async loadHistoryMessages(){if(!this.conversationId)return;this.isLoadingHistory=true;let e=false;this.digitalHumanVideoReady=true;try{const t=await d({url:`/sdk/v1/chat/conversation`,method:"GET",data:{conversation_id:this.conversationId}});if(t.success&&t.data&&t.data.run_status=="结束"){e=true}const o=await d({url:"/sdk/v1/chat/messages",method:"GET",data:{conversation_id:this.conversationId,bot_id:this.botId,limit:20}});if(o.success&&o.data){const e=o.data.data||[];const t=e.map((e=>{const t=new Date(parseInt(e.created_at)*1e3);const o=t.getHours().toString().padStart(2,"0");const i=t.getMinutes().toString().padStart(2,"0");const n=`${o}:${i}`;return{id:e.id,conversation_id:e.conversation_id,inputs:e.inputs||{},query:e.query||"",answer:e.answer||"",message_files:e.message_files||[],feedback:e.feedback||{},retriever_resources:e.retriever_resources||[],created_at:e.created_at,agent_thoughts:e.agent_thoughts||[],status:e.status||"normal",error:e.error,time:n,isStreaming:false}}));this.messages=t;this.currentQuestionNumber=t.length||0}}catch(e){console.error("加载历史消息或会话状态失败:",e);I.captureError(e,{action:"loadHistoryMessages",component:"pcm-app-chat-modal",title:"加载历史消息失败"});y.emitError({error:e,message:"加载历史消息失败"})}finally{this.isLoadingHistory=false;setTimeout((async()=>{this.shouldAutoScroll=true;this.scrollToBottom();if(this.conversationId&&this.messages.length>0&&!e&&!this.isTaskCompleted&&!this.isEndingInterview){if(this.interviewMode==="video"){this.startWaitingToRecord()}}else if(e){this.isTaskCompleted=true}}),200)}}startWaitingToRecord(){if(this.interviewMode!=="video"){return}if(this.isTaskCompleted||this.isEndingInterview){return}if(this.waitingTimer){clearInterval(this.waitingTimer)}if(this.recordingTimer){clearInterval(this.recordingTimer)}this.waitingToRecord=true;this.waitingTimeLeft=this.waitingTime;this.waitingTimer=setInterval((()=>{this.waitingTimeLeft--;if(this.waitingTimeLeft<=0){clearInterval(this.waitingTimer);this.waitingTimer=null;this.waitingToRecord=false;this.startRecording()}}),1e3)}async startRecording(){if(this.isTaskCompleted||this.isEndingInterview){return}try{const e=await navigator.mediaDevices.getUserMedia({audio:true,video:{width:{ideal:1280},height:{ideal:720},frameRate:{ideal:30}}});this.deviceError=null;this.recordingStream=e;this.showRecordingUI=true;this.showCountdownWarning=false;this.videoRef=null;this.setupVideoPreview(e);const t=c();let o;try{o=new MediaRecorder(e,{mimeType:t,videoBitsPerSecond:8e5,audioBitsPerSecond:64e3})}catch(t){console.warn("指定的MIME类型不受支持,使用默认设置:",t);try{o=new MediaRecorder(e,{videoBitsPerSecond:8e5,audioBitsPerSecond:64e3})}catch(t){try{o=new MediaRecorder(e)}catch(e){this.recordingError.emit({type:"recorder_creation_failed",message:"无法创建媒体录制器,您的浏览器可能不支持此功能",details:e});this.showRecordingUI=false;return}}}this.mediaRecorder=o;const i=[];o.ondataavailable=e=>{if(e.data.size>0){i.push(e.data)}};o.onerror=e=>{this.recordingError.emit({type:"recording_error",message:this.strings?.errors?.recordingErrorText,details:e});this.stopRecording()};o.onstop=()=>{try{const e=t||"video/mp4";const o=new Blob(i,{type:e});if(o.size===0){this.recordingError.emit({type:"empty_recording",message:this.strings?.errors?.emptyVideo});this.showRecordingUI=false;return}this.recordedBlob=o;this.recordingStatusChange.emit({status:"stopped",details:{duration:Math.floor((Date.now()-this.recordingStartTime)/1e3),size:o.size,type:o.type}});this.uploadRecordedVideo()}catch(e){this.recordingError.emit({type:"processing_error",message:this.strings?.errors?.processVideoError,details:e});this.showRecordingUI=false;I.captureError(e,{action:"uploadRecordedVideo",component:"pcm-hr-chat-modal",title:"处理录制视频时出错"})}};try{o.start();this.isRecording=true;this.recordingStartTime=Date.now();this.recordingTimeLeft=this.maxRecordingTime;this.recordingStatusChange.emit({status:"started",details:{maxDuration:this.maxRecordingTime,mimeType:o.mimeType}})}catch(e){this.recordingError.emit({type:"start_failed",message:"开始录制失败,请检查您的设备权限",details:e});this.showRecordingUI=false;I.captureError(e,{action:"startRecording",component:"pcm-hr-chat-modal",title:"开始录制失败"});return}this.recordingTimer=setInterval((()=>{const e=Math.floor((Date.now()-this.recordingStartTime)/1e3);this.recordingTimeLeft=Math.max(0,this.maxRecordingTime-e);if(this.recordingTimeLeft<=this.countdownWarningTime&&!this.showCountdownWarning){this.showCountdownWarning=true}if(this.recordingTimeLeft<=0){this.stopRecording()}}),1e3)}catch(e){console.error("无法访问摄像头或麦克风:",e);let t=this.strings?.errors?.deviceAccessFailed;if(e.name==="NotAllowedError"){t=this.strings.errors.permissionDenied}else if(e.name==="NotFoundError"){t=this.strings.errors.deviceNotFound}else if(e.name==="NotReadableError"){t=this.strings.errors.browserNotSupportVideoRecording}else if(e.name==="OverconstrainedError"){t=this.strings.errors.unsupportedConfiguration}else{t=this.strings.errors.cameraOrMicAccessFailed}this.deviceError=t;this.showRecordingUI=false;y.emitError({error:e,message:t});I.captureError(e,{action:"startRecording",component:"pcm-app-chat-modal",title:t})}}setupVideoPreview(e){setTimeout((()=>{const t=this.hostElement.shadowRoot?.querySelector("video");if(t&&e){try{t.srcObject=e;t.play().catch((e=>{console.error("视频播放失败:",e);I.captureError(e,{action:"setupVideoPreview",component:"pcm-app-chat-modal",title:"视频播放失败"});y.emitError({error:e,message:"视频播放失败"})}))}catch(o){console.warn("设置srcObject失败,尝试替代方法:",o);try{const o=URL.createObjectURL(e);t.src=o;t.onended=()=>{URL.revokeObjectURL(o)}}catch(e){console.error("创建对象URL失败:",e);I.captureError(e,{action:"setupVideoPreview",component:"pcm-app-chat-modal",title:"创建对象URL失败"});y.emitError({error:e,message:"创建对象URL失败"})}}}else{console.warn("未找到视频元素或媒体流无效")}}),100)}stopRecording(){if(this.mediaRecorder&&this.isRecording){this.mediaRecorder.stop();this.isRecording=false;if(this.recordingTimer){clearInterval(this.recordingTimer);this.recordingTimer=null}if(this.recordingStream){this.recordingStream.getTracks().forEach((e=>e.stop()));this.recordingStream=null}this.videoRef=null}}handleStopRecording=()=>{if(this.skipConfirmThisInterview){this.stopRecording();return}this.showConfirmModal=true};handleSkipConfirmChange=e=>{const t=e.target;this.skipConfirmThisInterview=t.checked};handleConfirmModalCancel=()=>{this.showConfirmModal=false};handleConfirmModalOk=()=>{this.showConfirmModal=false;this.stopRecording()};handleConfirmModalCancelEvent=()=>{this.showConfirmModal=false};async uploadRecordedVideo(){if(!this.recordedBlob)return;try{this.isUploadingVideo=true;this.showRecordingUI=false;const e=this.recordedBlob.type.includes("webm")?"webm":"mp4";const t=`answer.${e}`;const o=new File([this.recordedBlob],t,{type:this.recordedBlob.type});const i=await p(o,{},{tags:["other"]});const n=await h(i.cos_key);if(this.isEndingInterview){await this.sendEndInterviewMessage()}else{this.sendMessageToAPI(n||this.strings?.messages?.nextQuestion,i.cos_key)}}catch(e){console.error("视频上传或处理错误:",e);this.isEndingInterview=false;I.captureError(e,{action:"uploadRecordedVideo",component:"pcm-app-chat-modal",title:"视频上传或处理失败"});y.emitError({error:e,message:"视频上传或处理失败"})}finally{this.isUploadingVideo=false;this.showRecordingUI=false;this.recordedBlob=null}}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.waitingTimer){clearInterval(this.waitingTimer);this.waitingTimer=null}if(this.recordingTimer){clearInterval(this.recordingTimer);this.recordingTimer=null}if(this.audioRecordingTimer){clearInterval(this.audioRecordingTimer);this.audioRecordingTimer=null}this.stopRecording();this.stopAudioRecording()}handleTextInputChange=e=>{const t=e.target;this.textAnswer=t.value};handleKeyDown=e=>{if(e.key==="Enter"){if(e.isComposing){return}if(e.ctrlKey){const t=e.target;const o=t.selectionStart;const i=this.textAnswer.substring(0,o);const n=this.textAnswer.substring(o);this.textAnswer=i+"\n"+n;e.preventDefault();setTimeout((()=>{const e=o+1;t.setSelectionRange(e,e)}),0);return}else{e.preventDefault();if(this.textAnswer.trim()&&!this.isSubmittingText&&!this.isLoading&&!this.currentStreamingMessage&&!this.waitingToRecord){this.submitTextAnswer()}}}};submitTextAnswer=async()=>{if(!this.textAnswer.trim()||this.isSubmittingText){return}this.isSubmittingText=true;try{const e=this.textAnswer;this.textAnswer="";await this.sendMessageToAPI(e)}catch(e){console.error("提交文本回答失败:",e);I.captureError(e,{action:"submitTextAnswer",component:"pcm-app-chat-modal",title:"提交文本回答失败"});y.emitError({error:e,message:"提交文本回答失败"})}finally{this.isSubmittingText=false}};closeResumeChat=async()=>{const e={query:this.strings?.messages?.generateResume,inputs:{mode_type:1,generate_resume:1}};this.isSubmittingText=true;try{this.customInputs=e.inputs;this.closeResume?.();await this.sendMessageToAPI(e.query)}catch(e){console.error("提交文本回答失败:",e);I.captureError(e,{action:"submitTextAnswer",component:"pcm-app-chat-modal",title:"提交文本回答失败"});y.emitError({error:e,message:"提交文本回答失败"})}finally{this.isSubmittingText=false;this.customInputs={}}};handleVoiceInputClick=()=>{if(this.isRecordingAudio){this.stopAudioRecording()}else{navigator.mediaDevices.getUserMedia({audio:true}).then((e=>{this.startRecordingWithStream(e)})).catch((e=>{console.error("麦克风权限请求失败:",e);I.captureError(e,{action:"handleVoiceInputClick",component:"pcm-app-chat-modal",title:"麦克风权限请求失败"});y.emitError({error:e,message:"麦克风权限请求失败"})}))}};startRecordingWithStream(e){try{const t=u();let o;try{o=new MediaRecorder(e,{mimeType:t})}catch(t){console.warn("指定的音频MIME类型不受支持,使用默认设置:",t);try{o=new MediaRecorder(e)}catch(t){e.getTracks().forEach((e=>e.stop()));console.error("无法创建音频录制器:",t);I.captureError(t,{action:"startRecordingWithStream",component:"pcm-app-chat-modal",title:"无法创建音频录制器"});y.emitError({error:t,message:"无法创建音频录制器"});return}}this.audioRecorder=o;this.audioChunks=[];this.isRecordingAudio=true;this.audioRecordingStartTime=Date.now();this.audioRecordingTimeLeft=this.maxAudioRecordingTime;o.ondataavailable=e=>{if(e.data.size>0){this.audioChunks.push(e.data)}};o.onstop=()=>{e.getTracks().forEach((e=>e.stop()));this.processAudioRecording()};o.start(100);this.audioRecordingTimer=setInterval((()=>{const e=Math.floor((Date.now()-this.audioRecordingStartTime)/1e3);this.audioRecordingTimeLeft=Math.max(0,this.maxAudioRecordingTime-e);if(this.audioRecordingTimeLeft<=0){this.stopAudioRecording()}}),1e3)}catch(t){e.getTracks().forEach((e=>e.stop()));console.error("开始录音失败:",t);I.captureError(t,{action:"startRecordingWithStream",component:"pcm-app-chat-modal",title:"开始录音失败"});y.emitError({error:t,message:"开始录音失败,请确保麦克风设备正常工作"})}}async processAudioRecording(){if(this.audioChunks.length===0){console.warn("没有录制到音频数据");return}try{this.isConvertingAudio=true;const e=u()||"audio/webm";const t=new Blob(this.audioChunks,{type:e});if(t.size===0){console.warn("录制的音频为空");this.isConvertingAudio=false;return}const o=e.includes("webm")?"webm":"mp3";const i=`audio_input.${o}`;const n=new File([t],i,{type:e});const r=await p(n,{},{tags:["audio"]});const a=await h(r.cos_key);if(a){const e=this.hostElement.shadowRoot?.querySelector(".text-answer-input");const t=e?.selectionStart||this.textAnswer.length;const o=this.textAnswer.substring(0,t);const i=this.textAnswer.substring(t);const n=o.length>0&&!o.endsWith(" ")?" ":"";this.textAnswer=o+n+a+i;setTimeout((()=>{if(e){const o=t+n.length+a.length;e.focus();e.setSelectionRange(o,o)}}),0)}else{console.warn("未能识别语音内容");alert("未能识别语音内容,请重试或直接输入文字")}}catch(e){console.error("处理音频录制失败:",e);I.captureError(e,{action:"processAudioRecording",component:"pcm-app-chat-modal",title:"处理音频录制失败"});y.emitError({error:e,message:"语音识别失败,请重试"})}finally{this.isConvertingAudio=false;this.audioChunks=[]}}stopAudioRecording(){if(this.audioRecorder&&this.isRecordingAudio){this.audioRecorder.stop();this.isRecordingAudio=false;if(this.audioRecordingTimer){clearInterval(this.audioRecordingTimer);this.audioRecordingTimer=null}}}handleHistoryClick=()=>{this.isHistoryDrawerOpen=true;this.loadHistoryConversations()};async loadHistoryConversations(){if(!this.botId){console.warn("没有提供botId,无法获取历史会话");return}this.isLoadingConversations=true;try{const e=await d({url:"/sdk/v1/chat/conversations",method:"GET",data:{bot_id:this.botId,limit:50,page:1}});if(e.success&&e.data){const t=e.data.data||[];this.historyConversations=t.map((e=>{let t;let o=this.strings?.unknownTime;try{const i=typeof e.created_at==="string"?parseInt(e.created_at):e.created_at;if(isNaN(i)||i<=0){console.warn("无效的时间戳:",e.created_at);t=new Date}else{t=new Date(i*1e3)}if(isNaN(t.getTime())){console.warn("无效的日期对象:",e.created_at);t=new Date}const n=new Date;const r=n.getTime()-t.getTime();const a=Math.floor(r/(1e3*60*60*24));if(a===0){o=`今天 ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else if(a===1){o=`昨天 ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else if(a>0&&a<7){const e=[this.strings?.weekdays?.sunday,this.strings?.weekdays?.monday,this.strings?.weekdays?.tuesday,this.strings?.weekdays?.wednesday,this.strings?.weekdays?.thursday,this.strings?.weekdays?.friday,this.strings?.weekdays?.saturday];o=`${e[t.getDay()]} ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else if(a<0){o=`${(t.getMonth()+1).toString().padStart(2,"0")}-${t.getDate().toString().padStart(2,"0")} ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else{o=`${(t.getMonth()+1).toString().padStart(2,"0")}-${t.getDate().toString().padStart(2,"0")} ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}}catch(t){console.error("时间格式化错误:",t,e.created_at);o=this.strings?.timeParseError}return{id:e.id,name:e.name||this.strings?.newConversation,created_at:e.created_at,updated_at:e.updated_at,status:e.status,message_count:e.message_count||0,timeDisplay:o}}))}}catch(e){console.error("获取历史会话失败:",e);I.captureError(e,{action:"loadHistoryConversations",component:"pcm-app-chat-modal",title:"获取历史会话失败"});y.emitError({error:e,message:"获取历史会话失败"})}finally{this.isLoadingConversations=false}}handleSwitchConversation=e=>{if(e===this.conversationId){this.isHistoryDrawerOpen=false;return}this.conversationId=e;this.messages=[];this.currentStreamingMessage=null;this.isTaskCompleted=false;this.currentQuestionNumber=0;this.isHistoryDrawerOpen=false;this.loadHistoryMessages()};handleFilePreviewRequest=e=>{const{url:t,fileName:o,content:i,contentType:n}=e.detail;this.previewFileName=o||this.strings?.contentPreview;this.previewContentType=n;this.previewUrl=t;this.previewContent=i||"";this.isDrawerOpen=true};isLastMessage(e){if(this.currentStreamingMessage){return false}if(this.messages.length===0){return false}const t=this.messages[this.messages.length-1];return e.id===t.id}handleDigitalHumanVideoGenerated=e=>{const{videoUrl:t}=e.detail;console.log("数字人视频生成成功:",{videoUrl:t,conversationId:this.conversationId,currentQuestionNumber:this.currentQuestionNumber});this.digitalHumanVideoReady=true};handleDigitalHumanVideoEnded=()=>{if(this.waitingForDigitalHuman&&this.interviewMode==="video"&&!this.isTaskCompleted&&!this.isEndingInterview){this.waitingForDigitalHuman=false;this.startWaitingToRecord()}};async precreateDigitalHumanVideos(e){if(!this.virtualmanKey){console.warn("VirtualmanKey尚未加载,无法预创建视频。");return}for(const t of e){if(!t||!t.trim())continue;try{await d({url:"/sdk/v1/virtual-human/create-video",method:"POST",data:{VirtualmanKey:this.virtualmanKey,InputSsml:t,SpeechParam:{Speed:1},VideoParam:{Format:"TransparentWebm"},DriverType:"Text"}})}catch(e){console.error(`为文本 "${t}" 创建视频任务失败:`,e);I.captureError(e,{action:"precreateDigitalHumanVideos",component:"pcm-app-chat-modal",title:`为文本 "${t}" 创建视频任务失败`})}}}handleAvatarDetailLoaded=e=>{if(e.detail.virtualmanKey){this.virtualmanKey=e.detail.virtualmanKey}};handleInterviewEnd=()=>{if(this.isEndingInterview||this.isTaskCompleted){return}this.showEndInterviewConfirmModal=true};handleConfirmEndInterview=async()=>{try{this.showEndInterviewConfirmModal=false;this.isEndingInterview=true;if(this.waitingTimer){clearInterval(this.waitingTimer);this.waitingTimer=null}this.waitingToRecord=false;this.waitingForDigitalHuman=false;if(this.isRecording){this.stopRecording()}else{await this.sendEndInterviewMessage()}}catch(e){console.error("点击结束发送消息失败:",e);this.isEndingInterview=false;I.captureError(e,{action:"handleConfirmEndInterview",component:"pcm-app-chat-modal",title:"点击结束发送消息失败"});y.emitError({error:e,message:"点击结束发送消息失败"})}};sendEndInterviewMessage=async()=>{try{const e=this.strings?.messages?.endInterviewMessage;await this.sendMessageToAPI(e);this.isEndingInterview=false}catch(e){console.error("发送结束面试消息失败:",e);this.isEndingInterview=false;throw e}};handleCancelEndInterview=()=>{this.showEndInterviewConfirmModal=false};getAnsweredQuestionCount=()=>this.messages.filter((e=>e.answer&&e.answer.trim())).length;render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=()=>i("div",{class:"video-preview"},i("video",{autoPlay:true,playsInline:true,muted:true,style:{transform:"scaleX(-1)"},ref:e=>{if(e&&this.recordingStream&&!this.videoRef){this.videoRef=e}}}),i("div",{class:{"recording-status":true,warning:this.showCountdownWarning}},i("span",{class:"recording-dot"}),i("span",null,this.strings.recording.recordingInProgress," ",Math.floor(this.recordingTimeLeft/60),":",(this.recordingTimeLeft%60).toString().padStart(2,"0"),this.showCountdownWarning&&` (${this.strings.recording.autoCompleteWarning})`)));const r=()=>{if(this.deviceError){return i("div",{class:"placeholder-status error-status"},i("p",null,this.deviceError),i("div",{class:"error-suggestions"},i("p",null,this.strings.deviceError.trySolutions),i("ul",null,i("li",null,this.strings.deviceError.solution1),i("li",null,this.strings.deviceError.solution2),i("li",null,this.strings.deviceError.solution3))))}if(this.isTaskCompleted){return i("div",{class:"placeholder-status"},i("p",null,this.strings.placeholderStatus.interviewCompleted))}if(this.waitingForDigitalHuman&&this.digitalId){return i("div",{class:"placeholder-status"},i("p",null,this.strings?.placeholderStatus?.aiReviewing))}if(this.isPlayingAudio){return i("div",{class:"placeholder-status"},i("p",null,this.strings?.placeholderStatus?.playingQuestion))}if(this.isUploadingVideo){return i("div",{class:"placeholder-status"},i("p",null,this.strings?.placeholderStatus?.uploadingVideo))}if(this.isLoading||this.currentStreamingMessage){return i("div",{class:"placeholder-status"},i("p",null,this.strings?.placeholderStatus?.waitingForQuestion))}if(this.waitingToRecord){return i("div",{class:"placeholder-status"},i("p",null,(this.strings?.placeholderStatus?.prepareToRecord).replace("{time}",this.waitingTimeLeft.toString())))}return i("div",{class:"placeholder-status default-status"},i("p",null,this.strings?.placeholderStatus?.preparing))};const a=()=>i("div",{class:"text-input-area"},this.botId==="39284520284983296"&&i("button",{class:{"cancel-button":true,disabled:this.messages.length<=3},disabled:this.messages.length<=3,onClick:this.closeResumeChat},this.strings?.buttons?.endChatGenerateResume),this.botId==="45444431062634496"&&i("button",{class:{"cancel-button":true,disabled:this.isLoading},disabled:this.isLoading,onClick:()=>this.closeResume?.(),title:this.strings?.resumeCreation},this.strings?.resumeCreation),i("textarea",{class:"text-answer-input",placeholder:this.isTaskCompleted?this.strings.conversationEnded:this.strings.sendMessage,value:this.textAnswer,onInput:this.handleTextInputChange,onKeyDown:this.handleKeyDown,disabled:this.isTaskCompleted||this.isRecordingAudio||this.isConvertingAudio}),i("div",{class:"input-toolbar"},i("div",{class:"toolbar-actions"},i("button",{class:{"toolbar-button":true,recording:this.isRecordingAudio,converting:this.isConvertingAudio},title:this.isRecordingAudio?this.strings.clickToStopRecording:this.isConvertingAudio?this.strings.recognizingSpeech:this.strings.voiceInput,onClick:this.handleVoiceInputClick,disabled:this.isTaskCompleted||this.isConvertingAudio||this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.waitingToRecord||this.isPlayingAudio},this.isRecordingAudio?i("div",null,i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),i("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}),i("circle",{cx:"12",cy:"11",r:"4",fill:"red"}))):this.isConvertingAudio?i("div",{class:"converting-indicator"},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}))):i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),i("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"})))),i("div",{class:{"send-button":true,disabled:this.isTaskCompleted||!this.textAnswer.trim()||this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.waitingToRecord||this.isPlayingAudio||this.isRecordingAudio||this.isConvertingAudio},onClick:()=>{if(this.isTaskCompleted||!this.textAnswer.trim()||this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.waitingToRecord||this.isPlayingAudio||this.isRecordingAudio||this.isConvertingAudio){return}this.submitTextAnswer()}},i("img",{src:"https://pcm-pub-1351162788.cos.ap-guangzhou.myqcloud.com/sdk/image/i_send.png"}))));const s=this.assistantAvatar||this.agentLogo;return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),i("div",{class:"chat-container"},i("div",{class:"chat-history",onScroll:this.handleScroll,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onWheel:this.handleWheel},this.isLoadingHistory?i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",null,this.strings?.loading?.loadingHistory)):i("div",null,[...this.messages,...this.currentStreamingMessage?[this.currentStreamingMessage]:[]].map((e=>i("div",{id:`message_${e.id}`,key:e.id},i("pcm-chat-message",{locale:this.locale,botId:this.botId,message:e,showAssistantMessage:!this.digitalId||!this.isLastMessage(e)||this.digitalHumanVideoReady||this.isTaskCompleted,userAvatar:this.userAvatar,assistantAvatar:s,showCopyButton:this.showCopyButton,showFeedbackButtons:this.showFeedbackButtons,filePreviewMode:this.filePreviewMode,onFilePreviewRequest:this.handleFilePreviewRequest,showSaveJdButton:this.showSaveJdButton,saveJdButtonText:this.saveJdButtonText})))),this.messages.length===0&&!this.currentStreamingMessage&&i("div",{class:"empty-state"},i("p",null,this.strings?.welcome?.greeting)))),i("div",{class:"recording-section"},i("div",{class:"recording-container"},(this.showWorkspaceHistory||this.digitalId||this.showEndInterviewButton&&!this.isTaskCompleted&&this.conversationId)&&i("div",{class:"workspace-section"},i("div",{class:"workspace-toolbar"},i("div",{style:{display:"flex",gap:"8px"}},!this.isTaskCompleted&&this.conversationId&&this.showEndInterviewButton&&i("button",{class:"workspace-button end-interview-button",onClick:this.handleInterviewEnd,disabled:this.isLoading||this.isEndingInterview,title:this.isEndingInterview?this.strings?.endingInterview:this.strings?.endInterview},i("span",null,this.isEndingInterview?this.strings?.ending:this.strings?.endInterview)),this.showWorkspaceHistory&&i("button",{class:"workspace-button history-button",onClick:()=>this.handleHistoryClick()},i("span",null,this.strings?.historyConversations))),this.digitalId&&!this.isTaskCompleted&&i("div",{class:"digital-human-wrapper"},i("pcm-digital-human",{digitalId:this.digitalId,speechText:this.lastCompletedAnswer,isStreaming:!!this.currentStreamingMessage,playbackRate:this.playbackRate,onVideoGenerated:this.handleDigitalHumanVideoGenerated,onVideoEnded:this.handleDigitalHumanVideoEnded,onAvatarDetailLoaded:this.handleAvatarDetailLoaded})))),this.interviewMode==="text"&&a(),this.interviewMode==="video"&&i("div",{class:"video-container"},i("div",{class:"video-area"},this.showRecordingUI?n():i("div",{class:"video-preview placeholder"},r())),i("div",{class:"recording-controls"},this.showRecordingUI?i("button",{class:"stop-recording-button",onClick:()=>this.handleStopRecording()},this.strings?.buttons?.completeAnswer):i("div",{class:"waiting-message"},i("button",{class:"stop-recording-button disabled",disabled:true},this.strings?.buttons?.completeAnswerShort))))))),i("pcm-drawer",{isOpen:this.isDrawerOpen,drawerTitle:this.previewFileName,width:"80%",onClosed:()=>{this.isDrawerOpen=false;this.previewUrl="";this.previewContent=""}},this.previewContentType==="file"&&this.previewUrl&&i("div",{class:"file-preview-container"},i("iframe",{src:this.previewUrl,frameborder:"0",width:"100%",height:"100%",style:{border:"none",height:"calc(100vh - 120px)"}})),this.previewContentType==="markdown"&&this.previewContent&&i("div",{class:"markdown-preview-container markdown-body",innerHTML:k(this.previewContent)}),this.previewContentType==="text"&&this.previewContent&&i("div",{class:"text-preview-container"},i("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word"}},this.previewContent))),i("pcm-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:this.strings?.historyConversations,width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,this.strings.history.loading)):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,this.strings.history.noHistory)):this.historyConversations.map((e=>i("div",{key:e.id,class:{"conversation-item":true,active:e.id===this.conversationId},onClick:()=>this.handleSwitchConversation(e.id)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},e.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},e.timeDisplay),e.message_count>0&&i("span",{class:"message-count"},e.message_count,"条消息"),e.status&&i("span",{class:{"conversation-status":true,completed:e.status==="结束",running:e.status==="进行中"}},e.status))),e.id===this.conversationId&&i("div",{class:"current-indicator"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}))))))))),i("pcm-confirm-modal",{isOpen:this.showConfirmModal,modalTitle:this.strings?.confirmComplete,okText:this.strings?.confirmComplete,cancelText:this.strings?.continueRecording,okType:"danger",onOk:this.handleConfirmModalOk,onCancel:this.handleConfirmModalCancelEvent,onClosed:this.handleConfirmModalCancel},i("div",{style:{marginBottom:"16px"}},i("div",{style:{fontSize:"14px",color:"#1890ff",fontWeight:"500",marginBottom:"16px",textAlign:"center"}},this.strings.recording.currentRecordingTime,(()=>{const e=this.recordingStartTime>0?Math.floor((Date.now()-this.recordingStartTime)/1e3):0;const t=Math.floor(e/60);const o=e%60;return`${t.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`})()),i("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px 16px",background:"#fff7e6",border:"1px solid #ffec99",borderRadius:"6px",color:"#d46b08",fontSize:"14px",marginBottom:"16px"}},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),i("span",null,this.strings.recording.recordingStillInProgress)),i("div",{style:{fontSize:"16px",color:"#595959",lineHeight:"1.5",marginBottom:"16px"}},this.strings.clickConfirmCompleteToEnd),i("label",{style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",padding:"8px 0",userSelect:"none"}},i("input",{type:"checkbox",style:{width:"16px",height:"16px",accentColor:"#1890ff",cursor:"pointer",margin:"0"},checked:this.skipConfirmThisInterview,onChange:this.handleSkipConfirmChange}),i("span",{style:{fontSize:"14px",color:"#595959",cursor:"pointer",lineHeight:"1.4"}},this.strings.confirm.noReminderThisInterview)))),i("pcm-confirm-modal",{isOpen:this.showEndInterviewConfirmModal,modalTitle:this.strings?.confirmEnd,okText:this.strings?.confirmEnd,cancelText:this.strings?.cancel,okType:"danger",onOk:this.handleConfirmEndInterview,onCancel:this.handleCancelEndInterview,onClosed:this.handleCancelEndInterview},i("div",{style:{marginBottom:"16px"}},(()=>{const e=this.getAnsweredQuestionCount();return i("div",null,i("div",{style:{fontSize:"14px",color:"#1890ff",fontWeight:"500",marginBottom:"16px",textAlign:"center"}},this.strings.confirm.currentQuestion.replace("{count}",e.toString())),e<3&&i("div",{style:{display:"flex",alignItems:"flex-start",gap:"8px",padding:"12px 16px",background:"#fff2e8",border:"1px solid #ffbb96",borderRadius:"6px",color:"#d4380d",fontSize:"14px",marginBottom:"16px"}},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor",style:{flexShrink:"0",marginTop:"2px"}},i("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),i("span",null,i("strong",null,this.strings.confirm.fewQuestionsWarning),this.strings.confirm.fewQuestionsWarningText)),i("div",{style:{fontSize:"14px",color:"#595959",lineHeight:"1.6",textAlign:"center"}},this.strings.confirm.endInterviewConfirm))})()))))}static get watchers(){return{token:["handleTokenChange"]}}};Xe.style=Je+(Qe+Ge);const Ye="";const Ke='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const Ze=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const et=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent");this.recordingError=t(this,"recordingError")}modalTitle="模拟面试";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始模拟面试";maxRecordingTime=120;waitingTime=10;fullscreen=false;customInputs={};digitalId;openingIndex=0;enableVirtualHuman=false;showEndInterviewButton=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;recordingError;selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return o(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;virtualChatModalRef=null;handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}async handleIsOpenChange(e){if(!e){if(this.virtualChatModalRef){await this.virtualChatModalRef.setComponentActive(false)}this.resetState()}else{await r(this.token);this.showChatModal=true}}componentWillLoad(){if(this.zIndex){a.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=y.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}resetState(){this.showChatModal=false;this.jobDescription="";this.isSubmitting=false;this.selectedFile=null;this.isUploading=false;this.uploadedFileInfo=null}handleClose=()=>{this.modalClosed.emit()};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,this.enableVirtualHuman?i("pcm-virtual-chat-modal",{ref:e=>this.virtualChatModalRef=e,isOpen:true,fullscreen:this.fullscreen,botId:"137635156700770304",digitalId:this.digitalId,openingIndex:this.openingIndex,conversationId:this.conversationId,defaultQuery:this.defaultQuery,showEndInterviewButton:this.showEndInterviewButton,waitingTime:this.waitingTime,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,interview_type:"1"}}):i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,botId:"137635156700770304",showEndInterviewButton:this.showEndInterviewButton,conversationId:this.conversationId,defaultQuery:this.defaultQuery,maxRecordingTime:this.maxRecordingTime,waitingTime:this.waitingTime,customInputs:{...this.customInputs,file_url:this.uploadedFileInfo?.cos_key,file_name:this.uploadedFileInfo?.file_name},interviewMode:"video"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};et.style=Ye+(Ke+Ze);const tt=":host{display:inline-block}.pcm-button{display:inline-flex;align-items:center;justify-content:center;font-weight:400;white-space:nowrap;text-align:center;background-image:none;border:1px solid transparent;cursor:pointer;transition:all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);user-select:none;touch-action:manipulation;height:32px;padding:0 15px;font-size:14px;border-radius:4px;color:rgba(0, 0, 0, 0.85);background-color:white;border-color:#d9d9d9;outline:none}.pcm-button:hover{border-color:#40a9ff;color:#40a9ff}.pcm-button:active{border-color:#096dd9;color:#096dd9}.pcm-button-default{background-color:white;border-color:#d9d9d9;color:rgba(0, 0, 0, 0.85)}.pcm-button-primary{background-color:#1677FF;border-color:#1677FF;color:white}.pcm-button-primary:hover{background-color:#40a9ff;border-color:#40a9ff;color:white}.pcm-button-primary:active{background-color:#096dd9;border-color:#096dd9;color:white}.pcm-button-dashed{background-color:white;border-color:#d9d9d9;border-style:dashed}.pcm-button-text{background-color:transparent;border-color:transparent;color:rgba(0, 0, 0, 0.85);box-shadow:none}.pcm-button-text:hover{background-color:rgba(0, 0, 0, 0.05);border-color:transparent;color:rgba(0, 0, 0, 0.85)}.pcm-button-link{background-color:transparent;border-color:transparent;color:#1677FF;box-shadow:none}.pcm-button-link:hover{color:#40a9ff;background-color:transparent;border-color:transparent}.pcm-button-large{height:40px;padding:0 20px;font-size:16px}.pcm-button-small{height:24px;padding:0 7px;font-size:12px}.pcm-button-circle{min-width:32px;padding:0;border-radius:50%}.pcm-button-large.pcm-button-circle{min-width:40px}.pcm-button-small.pcm-button-circle{min-width:24px}.pcm-button-round{border-radius:40px}.pcm-button-loading{opacity:0.65;cursor:default}.loading-icon{width:14px;height:14px;margin-right:8px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:loading-spin 1s infinite linear;display:inline-block}@keyframes loading-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.pcm-button-disabled{cursor:not-allowed;opacity:0.65}.pcm-button-disabled:hover,.pcm-button-disabled:active{color:rgba(0, 0, 0, 0.25);background-color:#f5f5f5;border-color:#d9d9d9}.pcm-button-primary.pcm-button-disabled:hover,.pcm-button-primary.pcm-button-disabled:active{background-color:#1677FF;border-color:#1677FF;color:white}.button-icon{margin-right:8px;display:inline-flex;align-items:center}.button-icon img{width:16px;height:16px}.pcm-button-small .button-icon img{width:12px;height:12px}.pcm-button-large .button-icon img{width:18px;height:18px}.pcm-button-block{width:100%;display:flex}";const ot=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const it=class{constructor(t){e(this,t)}type="default";size="middle";loading=false;disabled=false;icon="https://pub.pincaimao.com/static/common/i_pcm_logo.png";shape="default";backgroundColor="";textColor="";borderColor="";borderRadius=null;width="";block=false;borderStyle="solid";render(){const e={"pcm-button":true,[`pcm-button-${this.type}`]:true,[`pcm-button-${this.size}`]:true,[`pcm-button-${this.shape}`]:true,"pcm-button-loading":this.loading,"pcm-button-disabled":this.disabled,"pcm-button-block":this.block};const t={};if(this.backgroundColor){t["backgroundColor"]=this.backgroundColor}if(this.textColor){t["color"]=this.textColor}if(this.borderColor){t["borderColor"]=this.borderColor}if(this.borderRadius!==null){t["borderRadius"]=`${this.borderRadius}px`}if(this.width){t["width"]=this.width}if(this.borderStyle){t["borderStyle"]=this.borderStyle}return i("button",{key:"2c355f8ea8c28589428e4fa820f52afabe653eff",class:Object.keys(e).filter((t=>e[t])).join(" "),style:t,disabled:this.disabled,type:"button"},this.loading&&i("span",{key:"8a92a6c6d098dd72d4d62eabf50f14cec1a32d67",class:"loading-icon"}),this.icon&&!this.loading&&i("span",{key:"2d44a40190b13b4a10adf6f4fc3171e0c7b23b3c",class:"button-icon"},i("img",{key:"8c8e17bf2168b964f556800f2572d2652a3f8c9b",src:this.icon,alt:""})),i("slot",{key:"e3b3712332323d3ab202d209ece9efd496cffbd4"}))}};it.style=tt+ot;const nt=":host{display:block}.loading-container,.error-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:200px;width:100%;color:#86909C;font-size:14px;text-align:center}.loading-spinner{width:32px;height:32px;border:3px solid #f3f3f3;border-top:3px solid #1677FF;border-radius:50%;margin-bottom:12px;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.error-icon{width:32px;height:32px;background-color:#FFF0F0;color:#F53F3F;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:bold;margin-bottom:12px}.error-message{color:#86909C;max-width:80%}.card-container{border-radius:8px;padding:16px;cursor:pointer;transition:all 0.2s ease;display:flex;flex-direction:column;background-color:#ffffff;border:1px solid #E5E6EB;position:relative;height:100%;min-width:300px}.card-container:hover{transform:translateY(-2px);box-shadow:0 4px 16px rgba(0, 21, 41, 0.08)}.card-header{display:flex;width:100%;padding-bottom:16px;gap:12px}.card-icon{width:64px;height:64px;margin-right:12px;flex-shrink:0;overflow:hidden;border-radius:2px;background-color:#f8f9fa}.card-icon img{width:100%;height:100%;object-fit:contain}.card-info{flex:1;display:flex;flex-direction:column;overflow:hidden}.title-row{display:flex;align-items:center}.title-wrapper{flex:1;margin-right:8px;overflow:hidden}.card-title{font-size:18px;font-weight:700;color:#1D2129;line-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%}.chat-tag{display:flex;align-items:center;justify-content:center;height:24px;padding:0 8px;background-color:#F2F7E8;color:#56961F;font-size:12px;border-radius:4px;font-weight:500;flex-shrink:0}.author-row{display:flex;align-items:center;margin-top:8px}.author-avatar{width:16px;height:16px;border-radius:50%;margin-right:4px;background-color:#f8f9fa;overflow:hidden}.author-name{font-size:12px;color:#86909C}.card-description{font-size:12px;color:#86909C;margin-top:8px;line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:pre-line;word-break:break-word}.card-footer{padding-top:16px;display:flex;justify-content:space-between;align-items:center;border-top:1px solid #E5E6EB}.stats-container{display:flex;align-items:center;flex:1}.stat-item{display:flex;align-items:center;margin-right:8px;color:#86909C}.stat-icon{width:16px;height:16px;margin-right:4px;background-repeat:no-repeat;background-position:center;background-size:contain}.user-icon{background-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' focusable='false' aria-hidden='true'%3E%3Cpath d='M12 14c-3.3 0-6-2.7-6-6s2.7-6 6-6 6 2.7 6 6-2.7 6-6 6Zm0-10C9.8 4 8 5.8 8 8s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4Z' fill='currentColor'%3E%3C/path%3E%3Cpath d='M21.9 20.6c-.1-.2-2.3-5.6-9.9-5.6-7.6 0-9.8 5.4-9.9 5.6-.2.5 0 1.1.6 1.3.5.2 1.1 0 1.3-.5 0-.2 1.8-4.4 8-4.4s8 4.2 8.1 4.4c.2.5.8.8 1.3.5.5-.2.7-.8.5-1.3Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.star-icon{background-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' focusable='false' aria-hidden='true'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 5.03 9.57 9.1c-.17.3-.46.5-.8.55l-4.3.79 3 3.46c.22.26.32.6.28.93l-.62 4.46 4.41-1.9c.3-.12.63-.12.92 0l4.4 1.9-.6-4.46c-.05-.34.05-.67.27-.93l3-3.46-4.3-.79a1.17 1.17 0 0 1-.8-.55L12 5.03Zm-1-2.46a1.16 1.16 0 0 1 2 0l3.03 5.07 5.51 1c.89.17 1.26 1.24.68 1.92l-3.8 4.4.77 5.71c.13.9-.78 1.6-1.61 1.23L12 19.5l-5.58 2.4a1.17 1.17 0 0 1-1.61-1.23l.78-5.7-3.8-4.4a1.17 1.17 0 0 1 .67-1.92l5.51-1L11 2.56Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.video-icon{background-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' focusable='false' aria-hidden='true'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 2a2 2 0 0 0-2 2v16c0 1.1.9 2 2 2h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H4Zm0 2h16v16H4V4Zm5.5 3.13A1 1 0 0 0 8 8v8a1 1 0 0 0 1.5.87l7-4a1 1 0 0 0 0-1.74l-7-4ZM13.98 12 10 14.28V9.72L13.98 12Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.stat-value{font-size:12px}.use-button{font-size:12px;color:#86909C;cursor:pointer;white-space:nowrap}.use-button:hover{color:#1677FF}@media screen and (max-width: 768px){.card-container{padding:12px}.card-header{gap:8px;padding-bottom:12px}.card-icon{width:48px;height:48px}.card-title{font-size:16px;line-height:20px}.card-description{font-size:12px;line-height:16px;height:48px}}";const rt=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const at=class{constructor(o){e(this,o);this.tokenInvalid=t(this,"tokenInvalid")}token;cardTitle="";description="";iconUrl="";author="";authorAvatarUrl="";showChatTag=false;customChatTag="";useButtonText="立即使用";botId="";botData=null;loading=false;error="";tokenInvalid;tokenInvalidListener;watchBotIdHandler(e){if(e){this.fetchBotData()}}handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}componentWillLoad(){if(this.token){n.setToken(this.token)}if(this.botId){this.fetchBotData()}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener)}async fetchBotData(){if(!this.botId)return;this.loading=true;this.error="";try{const e=await d({url:`/sdk/v1/agent/${this.botId}/info`,method:"GET"});if(e.success&&e.data){this.botData=e.data}else{throw new Error(e.message||"获取智能体信息失败")}}catch(e){this.error=e.message||"获取智能体信息失败";console.error("获取智能体信息失败:",e)}finally{this.loading=false}}render(){const e=this.cardTitle||(this.botData?.title||"");const t=this.description||(this.botData?.description||"");const o=this.botData?.icon||this.botData?.iconUrl||this.botData?.logo||"";const n=this.iconUrl||o;const r=this.author||(this.botData?.author_name||"");const a=this.authorAvatarUrl||(this.botData?.author_avatar||"");const s=this.customChatTag||(this.botData?.flag||"");const l=this.botData?.use_count||0;const d=this.botData?.follow_count||0;const c=this.botData?.view_count||0;console.log("渲染数据:",{title:e,icon:n,iconFromBot:o,userIconUrl:this.iconUrl,botData:this.botData,authorName:r,authorAvatar:a});return i("div",{key:"217e582f0716e6100138ec880c6b7c88e637e338",class:"card-container"},this.loading?i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("div",null,"加载中...")):this.error?i("div",{class:"error-container"},i("div",{class:"error-icon"},"!"),i("div",{class:"error-message"},this.error)):i("div",null,i("div",{class:"card-header"},n&&i("div",{class:"card-icon"},i("img",{src:n,alt:e})),i("div",{class:"card-info"},i("div",{class:"title-row"},i("div",{class:"title-wrapper"},i("div",{class:"card-title"},e)),this.showChatTag&&s&&i("div",{class:"chat-tag"},s)),r&&i("div",{class:"author-row"},a&&i("img",{class:"author-avatar",src:a,alt:r}),i("div",{class:"author-name"},r)),t&&i("div",{class:"card-description"},t))),i("div",{class:"card-footer"},i("div",{class:"stats-container"},i("div",{class:"stat-item"},i("span",{class:"stat-icon user-icon"}),i("div",{class:"stat-value"},l)),i("div",{class:"stat-item"},i("span",{class:"stat-icon star-icon"}),i("div",{class:"stat-value"},d)),i("div",{class:"stat-item"},i("span",{class:"stat-icon video-icon"}),i("div",{class:"stat-value"},c))),i("div",{class:"use-button"},this.useButtonText||"立即使用"))))}static get watchers(){return{botId:["watchBotIdHandler"],token:["handleTokenChange"]}}};at.style=nt+rt;var st={exports:{}};
2
+ /*!
3
+ * clipboard.js v2.0.11
4
+ * https://clipboardjs.com/
5
+ *
6
+ * Licensed MIT © Zeno Rocha
7
+ */var lt=st.exports;var dt;function ct(){if(dt)return st.exports;dt=1;(function(e,t){(function t(o,i){e.exports=i()})(lt,(function(){return function(){var e={686:function(e,t,o){o.d(t,{default:function(){return M}});var i=o(279);var n=o.n(i);var r=o(370);var a=o.n(r);var s=o(817);var l=o.n(s);function d(e){try{return document.execCommand(e)}catch(e){return false}}var c=function e(t){var o=l()(t);d("cut");return o};var p=c;function h(e){var t=document.documentElement.getAttribute("dir")==="rtl";var o=document.createElement("textarea");o.style.fontSize="12pt";o.style.border="0";o.style.padding="0";o.style.margin="0";o.style.position="absolute";o.style[t?"right":"left"]="-9999px";var i=window.pageYOffset||document.documentElement.scrollTop;o.style.top="".concat(i,"px");o.setAttribute("readonly","");o.value=e;return o}var u=function e(t,o){var i=h(t);o.container.appendChild(i);var n=l()(i);d("copy");i.remove();return n};var m=function e(t){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{container:document.body};var i="";if(typeof t==="string"){i=u(t,o)}else if(t instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(t===null||t===void 0?void 0:t.type)){i=u(t.value,o)}else{i=l()(t);d("copy")}return i};var g=m;function f(e){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){f=function e(t){return typeof t}}else{f=function e(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}}return f(e)}var b=function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var o=t.action,i=o===void 0?"copy":o,n=t.container,r=t.target,a=t.text;if(i!=="copy"&&i!=="cut"){throw new Error('Invalid "action" value, use either "copy" or "cut"')}if(r!==undefined){if(r&&f(r)==="object"&&r.nodeType===1){if(i==="copy"&&r.hasAttribute("disabled")){throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute')}if(i==="cut"&&(r.hasAttribute("readonly")||r.hasAttribute("disabled"))){throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}}else{throw new Error('Invalid "target" value, use a valid Element')}}if(a){return g(a,{container:n})}if(r){return i==="cut"?p(r):g(r,{container:n})}};var x=b;function w(e){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){w=function e(t){return typeof t}}else{w=function e(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}}return w(e)}function y(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function k(e,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}function v(e,t,o){if(t)k(e.prototype,t);if(o)k(e,o);return e}function C(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function")}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:true,configurable:true}});if(t)z(e,t)}function z(e,t){z=Object.setPrototypeOf||function e(t,o){t.__proto__=o;return t};return z(e,t)}function I(e){var t=_();return function o(){var i=T(e),n;if(t){var r=T(this).constructor;n=Reflect.construct(i,arguments,r)}else{n=i.apply(this,arguments)}return S(this,n)}}function S(e,t){if(t&&(w(t)==="object"||typeof t==="function")){return t}return j(e)}function j(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function _(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return true}catch(e){return false}}function T(e){T=Object.setPrototypeOf?Object.getPrototypeOf:function e(t){return t.__proto__||Object.getPrototypeOf(t)};return T(e)}function F(e,t){var o="data-clipboard-".concat(e);if(!t.hasAttribute(o)){return}return t.getAttribute(o)}var E=function(e){C(o,e);var t=I(o);function o(e,i){var n;y(this,o);n=t.call(this);n.resolveOptions(i);n.listenClick(e);return n}v(o,[{key:"resolveOptions",value:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.action=typeof t.action==="function"?t.action:this.defaultAction;this.target=typeof t.target==="function"?t.target:this.defaultTarget;this.text=typeof t.text==="function"?t.text:this.defaultText;this.container=w(t.container)==="object"?t.container:document.body}},{key:"listenClick",value:function e(t){var o=this;this.listener=a()(t,"click",(function(e){return o.onClick(e)}))}},{key:"onClick",value:function e(t){var o=t.delegateTarget||t.currentTarget;var i=this.action(o)||"copy";var n=x({action:i,container:this.container,target:this.target(o),text:this.text(o)});this.emit(n?"success":"error",{action:i,text:n,trigger:o,clearSelection:function e(){if(o){o.focus()}window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function e(t){return F("action",t)}},{key:"defaultTarget",value:function e(t){var o=F("target",t);if(o){return document.querySelector(o)}}},{key:"defaultText",value:function e(t){return F("text",t)}},{key:"destroy",value:function e(){this.listener.destroy()}}],[{key:"copy",value:function e(t){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{container:document.body};return g(t,o)}},{key:"cut",value:function e(t){return p(t)}},{key:"isSupported",value:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:["copy","cut"];var o=typeof t==="string"?[t]:t;var i=!!document.queryCommandSupported;o.forEach((function(e){i=i&&!!document.queryCommandSupported(e)}));return i}}]);return o}(n());var M=E},828:function(e){var t=9;if(typeof Element!=="undefined"&&!Element.prototype.matches){var o=Element.prototype;o.matches=o.matchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector||o.webkitMatchesSelector}function i(e,o){while(e&&e.nodeType!==t){if(typeof e.matches==="function"&&e.matches(o)){return e}e=e.parentNode}}e.exports=i},438:function(e,t,o){var i=o(828);function n(e,t,o,i,n){var r=a.apply(this,arguments);e.addEventListener(o,r,n);return{destroy:function(){e.removeEventListener(o,r,n)}}}function r(e,t,o,i,r){if(typeof e.addEventListener==="function"){return n.apply(null,arguments)}if(typeof o==="function"){return n.bind(null,document).apply(null,arguments)}if(typeof e==="string"){e=document.querySelectorAll(e)}return Array.prototype.map.call(e,(function(e){return n(e,t,o,i,r)}))}function a(e,t,o,n){return function(o){o.delegateTarget=i(o.target,t);if(o.delegateTarget){n.call(e,o)}}}e.exports=r},879:function(e,t){t.node=function(e){return e!==undefined&&e instanceof HTMLElement&&e.nodeType===1};t.nodeList=function(e){var o=Object.prototype.toString.call(e);return e!==undefined&&(o==="[object NodeList]"||o==="[object HTMLCollection]")&&"length"in e&&(e.length===0||t.node(e[0]))};t.string=function(e){return typeof e==="string"||e instanceof String};t.fn=function(e){var t=Object.prototype.toString.call(e);return t==="[object Function]"}},370:function(e,t,o){var i=o(879);var n=o(438);function r(e,t,o){if(!e&&!t&&!o){throw new Error("Missing required arguments")}if(!i.string(t)){throw new TypeError("Second argument must be a String")}if(!i.fn(o)){throw new TypeError("Third argument must be a Function")}if(i.node(e)){return a(e,t,o)}else if(i.nodeList(e)){return s(e,t,o)}else if(i.string(e)){return l(e,t,o)}else{throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}}function a(e,t,o){e.addEventListener(t,o);return{destroy:function(){e.removeEventListener(t,o)}}}function s(e,t,o){Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,o)}));return{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,o)}))}}}function l(e,t,o){return n(document.body,e,t,o)}e.exports=r},817:function(e){function t(e){var t;if(e.nodeName==="SELECT"){e.focus();t=e.value}else if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){var o=e.hasAttribute("readonly");if(!o){e.setAttribute("readonly","")}e.select();e.setSelectionRange(0,e.value.length);if(!o){e.removeAttribute("readonly")}t=e.value}else{if(e.hasAttribute("contenteditable")){e.focus()}var i=window.getSelection();var n=document.createRange();n.selectNodeContents(e);i.removeAllRanges();i.addRange(n);t=i.toString()}return t}e.exports=t},279:function(e){function t(){}t.prototype={on:function(e,t,o){var i=this.e||(this.e={});(i[e]||(i[e]=[])).push({fn:t,ctx:o});return this},once:function(e,t,o){var i=this;function n(){i.off(e,n);t.apply(o,arguments)}n._=t;return this.on(e,n,o)},emit:function(e){var t=[].slice.call(arguments,1);var o=((this.e||(this.e={}))[e]||[]).slice();var i=0;var n=o.length;for(i;i<n;i++){o[i].fn.apply(o[i].ctx,t)}return this},off:function(e,t){var o=this.e||(this.e={});var i=o[e];var n=[];if(i&&t){for(var r=0,a=i.length;r<a;r++){if(i[r].fn!==t&&i[r].fn._!==t)n.push(i[r])}}n.length?o[e]=n:delete o[e];return this}};e.exports=t;e.exports.TinyEmitter=t}};var t={};function o(i){if(t[i]){return t[i].exports}var n=t[i]={exports:{}};e[i](n,n.exports,o);return n.exports}!function(){o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};o.d(t,{a:t});return t}}();!function(){o.d=function(e,t){for(var i in t){if(o.o(t,i)&&!o.o(e,i)){Object.defineProperty(e,i,{enumerable:true,get:t[i]})}}}}();!function(){o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}();return o(686)}().default}))})(st);return st.exports}var pt=ct();var ht=v(pt);const ut="复制";const mt="重试";const gt="保存到职位库";const ft="内容已复制到剪贴板";const bt="保存成功";const xt="保存失败";const wt="解析JSON失败";const yt="正在加载视频...";const kt="请稍等...";const vt="处理中...";const Ct="赞";const zt="踩";const It="附件信息";const St="您的浏览器不支持视频播放。";const jt="职位信息";const _t="评估规则";var Tt={copy:ut,retry:mt,saveToJobLibrary:gt,copySuccess:ft,saveSuccess:bt,saveFailed:xt,parseJsonFailed:wt,loadingVideo:yt,pleaseWait:kt,processing:vt,like:Ct,dislike:zt,attachmentInfo:It,browserNotSupportVideo:St,jobInfo:jt,evaluationRule:_t};const Ft="Copy";const Et="Retry";const Mt="Save to Job Library";const Bt="Content copied to clipboard";const Dt="Saved successfully";const Rt="Save failed";const At="Failed to parse JSON";const Ot="Loading video...";const Lt="Please wait...";const Ht="Processing...";const Ut="Like";const qt="Dislike";const Pt="Attachment Info";const $t="Your browser does not support video playback.";const Nt="Job Information";const Vt="Evaluation Rule";var Wt={copy:Ft,retry:Et,saveToJobLibrary:Mt,copySuccess:Bt,saveSuccess:Dt,saveFailed:Rt,parseJsonFailed:At,loadingVideo:Ot,pleaseWait:Lt,processing:Ht,like:Ut,dislike:qt,attachmentInfo:Pt,browserNotSupportVideo:$t,jobInfo:Nt,evaluationRule:Vt};const Jt='.markdown-body{--base-size-4:4px;--base-size-8:8px;--base-size-16:16px;--base-size-24:24px;--base-size-40:40px;--base-text-weight-normal:400;--base-text-weight-medium:500;--base-text-weight-semibold:600;--fontStack-monospace:ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;--fgColor-accent:Highlight}@media (prefers-color-scheme: dark){.markdown-body,[data-theme="dark"]{color-scheme:dark;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#59636e;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#ffffff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#818b981f;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d1d9e0;--borderColor-muted:#d1d9e0b3;--borderColor-neutral-muted:#d1d9e0b3;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#9a6700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#59636e;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#1f2328;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#59636e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#1f2328;--color-prettylights-syntax-markup-bold:#1f2328;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#d1d9e0;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#818b98}}@media (prefers-color-scheme: light){.markdown-body,[data-theme="light"]{color-scheme:light;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#59636e;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#ffffff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#818b981f;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d1d9e0;--borderColor-muted:#d1d9e0b3;--borderColor-neutral-muted:#d1d9e0b3;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#9a6700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#59636e;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#1f2328;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#59636e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#1f2328;--color-prettylights-syntax-markup-bold:#1f2328;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#d1d9e0;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#818b98}}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;margin:0;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}.markdown-body h1:hover .anchor .octicon-link:before,.markdown-body h2:hover .anchor .octicon-link:before,.markdown-body h3:hover .anchor .octicon-link:before,.markdown-body h4:hover .anchor .octicon-link:before,.markdown-body h5:hover .anchor .octicon-link:before,.markdown-body h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:\' \';display:inline-block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' version=\'1.1\' aria-hidden=\'true\'><path fill-rule=\'evenodd\' d=\'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\'></path></svg>");mask-image:url("data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' version=\'1.1\' aria-hidden=\'true\'><path fill-rule=\'evenodd\' d=\'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\'></path></svg>")}.markdown-body details,.markdown-body figcaption,.markdown-body figure{display:block}.markdown-body summary{display:list-item}.markdown-body [hidden]{display:none !important}.markdown-body a{background-color:transparent;color:var(--fgColor-accent);text-decoration:none}.markdown-body abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.markdown-body b,.markdown-body strong{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dfn{font-style:italic}.markdown-body h1{margin:.67em 0;font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body mark{background-color:var(--bgColor-attention-muted);color:var(--fgColor-default)}.markdown-body small{font-size:90%}.markdown-body sub,.markdown-body sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.markdown-body sub{bottom:-0.25em}.markdown-body sup{top:-0.5em}.markdown-body img{border-style:none;max-width:100%;box-sizing:content-box}.markdown-body code,.markdown-body kbd,.markdown-body pre,.markdown-body samp{font-family:monospace;font-size:1em}.markdown-body figure{margin:1em var(--base-size-40)}.markdown-body hr{box-sizing:content-box;overflow:hidden;background:transparent;border-bottom:1px solid var(--borderColor-muted);height:.25em;padding:0;margin:var(--base-size-24) 0;background-color:var(--borderColor-default);border:0}.markdown-body input{font:inherit;margin:0;overflow:visible;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=button],.markdown-body [type=reset],.markdown-body [type=submit]{-webkit-appearance:button;appearance:button}.markdown-body [type=checkbox],.markdown-body [type=radio]{box-sizing:border-box;padding:0}.markdown-body [type=number]::-webkit-inner-spin-button,.markdown-body [type=number]::-webkit-outer-spin-button{height:auto}.markdown-body [type=search]::-webkit-search-cancel-button,.markdown-body [type=search]::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.markdown-body ::-webkit-input-placeholder{color:inherit;opacity:.54}.markdown-body ::-webkit-file-upload-button{-webkit-appearance:button;appearance:button;font:inherit}.markdown-body a:hover{text-decoration:underline}.markdown-body ::placeholder{color:var(--fgColor-muted);opacity:1}.markdown-body hr::before{display:table;content:""}.markdown-body hr::after{display:table;clear:both;content:""}.markdown-body table{border-spacing:0;border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto;font-variant:tabular-nums}.markdown-body td,.markdown-body th{padding:0}.markdown-body details summary{cursor:pointer}.markdown-body a:focus,.markdown-body [role=button]:focus,.markdown-body input[type=radio]:focus,.markdown-body input[type=checkbox]:focus{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:focus:not(:focus-visible),.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body input[type=radio]:focus:not(:focus-visible),.markdown-body input[type=checkbox]:focus:not(:focus-visible){outline:solid 1px transparent}.markdown-body a:focus-visible,.markdown-body [role=button]:focus-visible,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus-visible{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:not([class]):focus,.markdown-body a:not([class]):focus-visible,.markdown-body input[type=radio]:focus,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus,.markdown-body input[type=checkbox]:focus-visible{outline-offset:0}.markdown-body kbd{display:inline-block;padding:var(--base-size-4);font:11px var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);line-height:10px;color:var(--fgColor-default);vertical-align:middle;background-color:var(--bgColor-muted);border:solid 1px var(--borderColor-neutral-muted);border-bottom-color:var(--borderColor-neutral-muted);border-radius:6px;box-shadow:inset 0 -1px 0 var(--borderColor-neutral-muted)}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:var(--base-size-24);margin-bottom:var(--base-size-16);font-weight:var(--base-text-weight-semibold, 600);line-height:1.25}.markdown-body h2{font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.2em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body h3{font-weight:var(--base-text-weight-semibold, 600);font-size:1.05em}.markdown-body h4{font-weight:var(--base-text-weight-semibold, 600);font-size:0.875em}.markdown-body h5{font-weight:var(--base-text-weight-semibold, 600);font-size:.85em}.markdown-body h6{font-weight:var(--base-text-weight-semibold, 600);font-size:.80em;color:var(--fgColor-muted)}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0;padding:0 1em;color:var(--fgColor-muted);border-left:.25em solid var(--borderColor-default)}.markdown-body ul,.markdown-body ol{margin-top:0;margin-bottom:0;padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ul ul ol,.markdown-body ul ol ol,.markdown-body ol ul ol,.markdown-body ol ol ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body tt,.markdown-body code,.markdown-body samp{font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0;font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px;word-wrap:normal}.markdown-body .octicon{display:inline-block;overflow:visible !important;vertical-align:text-bottom;fill:currentColor}.markdown-body input::-webkit-outer-spin-button,.markdown-body input::-webkit-inner-spin-button{margin:0;appearance:none}.markdown-body .mr-2{margin-right:var(--base-size-8, 8px) !important}.markdown-body::before{display:table;content:""}.markdown-body::after{display:table;clear:both;content:""}.markdown-body>*:first-child{margin-top:0 !important}.markdown-body>*:last-child{margin-bottom:0 !important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:var(--fgColor-danger)}.markdown-body .anchor{float:left;padding-right:var(--base-size-4);margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body p,.markdown-body blockquote,.markdown-body ul,.markdown-body ol,.markdown-body dl,.markdown-body table,.markdown-body pre,.markdown-body details{margin-top:0;margin-bottom:var(--base-size-16);font-size:16px;font-weight:400}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:var(--fgColor-default);vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 tt,.markdown-body h1 code,.markdown-body h2 tt,.markdown-body h2 code,.markdown-body h3 tt,.markdown-body h3 code,.markdown-body h4 tt,.markdown-body h4 code,.markdown-body h5 tt,.markdown-body h5 code,.markdown-body h6 tt,.markdown-body h6 code{padding:0 .2em;font-size:inherit}.markdown-body summary h1,.markdown-body summary h2,.markdown-body summary h3,.markdown-body summary h4,.markdown-body summary h5,.markdown-body summary h6{display:inline-block}.markdown-body summary h1 .anchor,.markdown-body summary h2 .anchor,.markdown-body summary h3 .anchor,.markdown-body summary h4 .anchor,.markdown-body summary h5 .anchor,.markdown-body summary h6 .anchor{margin-left:-40px}.markdown-body summary h1,.markdown-body summary h2{padding-bottom:0;border-bottom:0}.markdown-body ul.no-list,.markdown-body ol.no-list{padding:0;list-style-type:none}.markdown-body ol[type="a s"]{list-style-type:lower-alpha}.markdown-body ol[type="A s"]{list-style-type:upper-alpha}.markdown-body ol[type="i s"]{list-style-type:lower-roman}.markdown-body ol[type="I s"]{list-style-type:upper-roman}.markdown-body ol[type="1"]{list-style-type:decimal}.markdown-body div>ol:not([type]){list-style-type:decimal}.markdown-body ul ul,.markdown-body ul ol,.markdown-body ol ol,.markdown-body ol ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:var(--base-size-16)}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:var(--base-size-16);font-size:1em;font-style:italic;font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dl dd{padding:0 var(--base-size-16);margin-bottom:var(--base-size-16)}.markdown-body table th{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body table th,.markdown-body table td{padding:6px 13px;border:1px solid var(--borderColor-default)}.markdown-body table td>:last-child{margin-bottom:0}.markdown-body table tr{background-color:var(--bgColor-default);border-top:1px solid var(--borderColor-muted)}.markdown-body table tr:nth-child(2n){background-color:var(--bgColor-muted)}.markdown-body table img{background-color:transparent}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid var(--borderColor-default)}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:var(--fgColor-default)}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:.2em .4em;margin:0;font-size:85%;white-space:break-spaces;background-color:var(--bgColor-neutral-muted);border-radius:6px}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body samp{font-size:85%}.markdown-body pre code{font-size:100%}.markdown-body pre>code{padding:0;margin:0;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:var(--base-size-16)}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:var(--base-size-16);overflow:auto;font-size:85%;line-height:1.45;color:var(--fgColor-default);background-color:var(--bgColor-muted);border-radius:6px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px var(--base-size-8) 9px;text-align:right;background:var(--bgColor-default);border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:var(--base-text-weight-semibold, 600);background:var(--bgColor-muted);border-top:0}.markdown-body [data-footnote-ref]::before{content:"["}.markdown-body [data-footnote-ref]::after{content:"]"}.markdown-body .footnotes{font-size:12px;color:var(--fgColor-muted);border-top:1px solid var(--borderColor-default)}.markdown-body .footnotes ol{padding-left:var(--base-size-16)}.markdown-body .footnotes ol ul{display:inline-block;padding-left:var(--base-size-16);margin-top:var(--base-size-16)}.markdown-body .footnotes li{position:relative}.markdown-body .footnotes li:target::before{position:absolute;top:calc(var(--base-size-8)*-1);right:calc(var(--base-size-8)*-1);bottom:calc(var(--base-size-8)*-1);left:calc(var(--base-size-24)*-1);pointer-events:none;content:"";border:2px solid var(--borderColor-accent-emphasis);border-radius:6px}.markdown-body .footnotes li:target{color:var(--fgColor-default)}.markdown-body .footnotes .data-footnote-backref g-emoji{font-family:monospace}.markdown-body body:has(:modal){padding-right:var(--dialog-scrollgutter) !important}.markdown-body .pl-c{color:var(--color-prettylights-syntax-comment)}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:var(--color-prettylights-syntax-constant)}.markdown-body .pl-e,.markdown-body .pl-en{color:var(--color-prettylights-syntax-entity)}.markdown-body .pl-smi,.markdown-body .pl-s .pl-s1{color:var(--color-prettylights-syntax-storage-modifier-import)}.markdown-body .pl-ent{color:var(--color-prettylights-syntax-entity-tag)}.markdown-body .pl-k{color:var(--color-prettylights-syntax-keyword)}.markdown-body .pl-s,.markdown-body .pl-pds,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-sr .pl-sra{color:var(--color-prettylights-syntax-string)}.markdown-body .pl-v,.markdown-body .pl-smw{color:var(--color-prettylights-syntax-variable)}.markdown-body .pl-bu{color:var(--color-prettylights-syntax-brackethighlighter-unmatched)}.markdown-body .pl-ii{color:var(--color-prettylights-syntax-invalid-illegal-text);background-color:var(--color-prettylights-syntax-invalid-illegal-bg)}.markdown-body .pl-c2{color:var(--color-prettylights-syntax-carriage-return-text);background-color:var(--color-prettylights-syntax-carriage-return-bg)}.markdown-body .pl-sr .pl-cce{font-weight:bold;color:var(--color-prettylights-syntax-string-regexp)}.markdown-body .pl-ml{color:var(--color-prettylights-syntax-markup-list)}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{font-weight:bold;color:var(--color-prettylights-syntax-markup-heading)}.markdown-body .pl-mi{font-style:italic;color:var(--color-prettylights-syntax-markup-italic)}.markdown-body .pl-mb{font-weight:bold;color:var(--color-prettylights-syntax-markup-bold)}.markdown-body .pl-md{color:var(--color-prettylights-syntax-markup-deleted-text);background-color:var(--color-prettylights-syntax-markup-deleted-bg)}.markdown-body .pl-mi1{color:var(--color-prettylights-syntax-markup-inserted-text);background-color:var(--color-prettylights-syntax-markup-inserted-bg)}.markdown-body .pl-mc{color:var(--color-prettylights-syntax-markup-changed-text);background-color:var(--color-prettylights-syntax-markup-changed-bg)}.markdown-body .pl-mi2{color:var(--color-prettylights-syntax-markup-ignored-text);background-color:var(--color-prettylights-syntax-markup-ignored-bg)}.markdown-body .pl-mdr{font-weight:bold;color:var(--color-prettylights-syntax-meta-diff-range)}.markdown-body .pl-ba{color:var(--color-prettylights-syntax-brackethighlighter-angle)}.markdown-body .pl-sg{color:var(--color-prettylights-syntax-sublimelinter-gutter-mark)}.markdown-body .pl-corl{text-decoration:underline;color:var(--color-prettylights-syntax-constant-other-reference-link)}.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body [role=tabpanel][tabindex="0"]:focus:not(:focus-visible),.markdown-body button:focus:not(:focus-visible),.markdown-body summary:focus:not(:focus-visible),.markdown-body a:focus:not(:focus-visible){outline:none;box-shadow:none}.markdown-body [tabindex="0"]:focus:not(:focus-visible),.markdown-body details-dialog:focus:not(:focus-visible){outline:none}.markdown-body g-emoji{display:inline-block;min-width:1ch;font-family:"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1em;font-style:normal !important;font-weight:var(--base-text-weight-normal, 400);line-height:1;vertical-align:-0.075em}.markdown-body g-emoji img{width:1em;height:1em}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item label{font-weight:var(--base-text-weight-normal, 400)}.markdown-body .task-list-item.enabled label{cursor:pointer}.markdown-body .task-list-item+.task-list-item{margin-top:var(--base-size-4)}.markdown-body .task-list-item .handle{display:none}.markdown-body .task-list-item-checkbox{margin:0 .2em .25em -1.4em;vertical-align:middle}.markdown-body ul:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body ol:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body .contains-task-list:hover .task-list-item-convert-container,.markdown-body .contains-task-list:focus-within .task-list-item-convert-container{display:block;width:auto;height:24px;overflow:visible;clip:auto}.markdown-body ::-webkit-calendar-picker-indicator{filter:invert(50%)}.markdown-body .markdown-alert{padding:var(--base-size-8) var(--base-size-16);margin-bottom:var(--base-size-16);color:inherit;border-left:.25em solid var(--borderColor-default)}.markdown-body .markdown-alert>:first-child{margin-top:0}.markdown-body .markdown-alert>:last-child{margin-bottom:0}.markdown-body .markdown-alert .markdown-alert-title{display:flex;font-weight:var(--base-text-weight-medium, 500);align-items:center;line-height:1}.markdown-body .markdown-alert.markdown-alert-note{border-left-color:var(--borderColor-accent-emphasis)}.markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title{color:var(--fgColor-accent)}.markdown-body .markdown-alert.markdown-alert-important{border-left-color:var(--borderColor-done-emphasis)}.markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title{color:var(--fgColor-done)}.markdown-body .markdown-alert.markdown-alert-warning{border-left-color:var(--borderColor-attention-emphasis)}.markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title{color:var(--fgColor-attention)}.markdown-body .markdown-alert.markdown-alert-tip{border-left-color:var(--borderColor-success-emphasis)}.markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title{color:var(--fgColor-success)}.markdown-body .markdown-alert.markdown-alert-caution{border-left-color:var(--borderColor-danger-emphasis)}.markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title{color:var(--fgColor-danger)}.markdown-body>*:first-child>.heading-element:first-child{margin-top:0 !important}.markdown-body .highlight pre:has(+.zeroclipboard-container){min-height:52px}';const Qt=":host{display:block;width:100%}.message-round{margin-bottom:16px;width:100%}.user-message-container{display:flex;flex-direction:row-reverse;align-items:flex-start;margin-bottom:15px;position:relative}.assistant-message-container{display:flex;flex-direction:row;align-items:flex-start;margin-bottom:15px;position:relative}.message-bubble{max-width:85%;position:relative}.user-message{padding:5px 10px;background:#f5f7ff;font-size:14px;color:#1F2328;border-radius:6px;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.1)}.assistant-message{padding:15px 10px;background-color:#fff;border-radius:6px;font-size:14px;color:#1F2328;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.05)}.message-time{font-size:12px;color:#999;margin-top:4px}.user-message-container .message-time{color:rgba(255, 255, 255, 0.7)}.loading-dots{display:flex;align-items:center;padding:12px 16px;background-color:#f0f0f0;border-radius:18px;border-top-left-radius:4px}.loading-dots span{width:8px;height:8px;margin:0 3px;background-color:#999;border-radius:50%;display:inline-block;animation:dot-pulse 1.5s infinite ease-in-out}.loading-dots span:nth-child(2){animation-delay:0.2s}.loading-dots span:nth-child(3){animation-delay:0.4s}@keyframes dot-pulse{0%,80%,100%{transform:scale(0.8);opacity:0.5}40%{transform:scale(1.2);opacity:1}}.file-view{margin-top:8px;padding:12px;background-color:#f8f9fa;border:1px solid #e9ecef;border-radius:6px;font-size:14px;word-break:break-all;color:#2c3e50;line-height:1.5;box-shadow:0 1px 2px rgba(0, 0, 0, 0.05)}.input-view{margin-top:8px;margin-bottom:10px;padding-bottom:10px;border:1px solid #e9ecef;border-radius:6px;overflow:hidden;background-color:#ffffff;box-shadow:0 1px 2px rgba(0, 0, 0, 0.05)}.input-label-container{display:flex;align-items:center;margin-bottom:4px;background-color:#f8f9fa;border-bottom:1px solid #e9ecef;padding:8px 12px}.copy-input-button{background:transparent;border:none;cursor:pointer;padding:2px;display:flex;align-items:center;justify-content:center;color:#8c8c8c;opacity:0.7;transition:opacity 0.2s ease;margin-left:5px}.copy-input-button:hover{opacity:1;color:#1677ff}.input-label{font-size:13px;font-weight:600;color:#495057}.input-value{padding:12px 12px 0px;font-size:14px;line-height:1.5;color:#2c3e50;background-color:#ffffff;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.input-metadata{font-size:13px;margin-top:8px}.message-actions{display:flex;align-items:center;gap:8px;transition:opacity 0.2s ease;margin-top:15px}.action-button{display:inline-flex;align-items:center;justify-content:center;border:1px solid #d9d9d9;border-radius:6px;padding:4px 15px;font-size:14px;height:32px;background-color:white;cursor:pointer;color:rgba(0, 0, 0, 0.88);transition:all 0.2s}.action-button:hover{color:#1677ff;border-color:#1677ff}.action-button.primary{color:#1677ff;border-color:#1677ff}.action-button.primary:hover{color:#4096ff;border-color:#4096ff}.action-button.icon-only{padding:4px 8px;margin-right:9px}.button-icon{margin-right:8px;display:flex;align-items:center;justify-content:center}.icon-only .button-icon{margin-right:0}.file-list{display:flex;flex-wrap:wrap;gap:12px;margin-top:8px}.file-item{display:flex;flex-direction:column;align-items:center;width:80px;cursor:pointer;padding:8px;border-radius:4px;transition:background-color 0.3s;margin:5px 10px}.file-item:hover{background-color:rgba(0, 0, 0, 0.04)}.file-icon{margin-bottom:4px}.file-name{font-size:12px;text-align:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8B4513}.action-button.active{color:#1677ff;background-color:rgba(22, 119, 255, 0.1)}.action-button.active .button-icon svg{stroke:#1677ff}.inputs-container{margin-top:8px;display:flex;flex-direction:column;gap:8px}.file-list{display:flex;flex-direction:column;gap:8px}.file-item{display:flex;align-items:center;padding:8px 12px;background-color:#f5f5f5;border-radius:6px;cursor:pointer;transition:background-color 0.2s}.file-item:hover{background-color:#e8e8e8}.file-icon{margin-right:8px}.file-name{font-size:14px;color:#333;word-break:break-word}.input-view{background-color:#f9f9f9;border-radius:8px;padding:12px;border:1px solid #e8e8e8}.input-label-container{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.input-label{font-weight:500;color:#333}.input-value{color:#666;line-height:1.5;word-break:break-word;max-height:200px;overflow-y:auto}.copy-input-button{background:none;border:none;cursor:pointer;color:#1677ff;padding:4px;border-radius:4px;display:flex;align-items:center;justify-content:center}.copy-input-button:hover{background-color:rgba(22, 119, 255, 0.1)}.input-metadata{font-size:14px;color:#666;padding:4px 0}.file-card{display:flex;align-items:center;padding:12px;background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 200px 100px no-repeat, #fff;border-radius:8px;cursor:pointer;transition:background-color 0.2s;border:1px solid #e8e8e8;margin-top:8px}.file-card:hover{background-color:#f0f0f0}.file-card-icon{margin-right:12px;flex-shrink:0;border-radius:12px;background:#0d75fb;width:48px;height:48px;display:flex;align-items:center;justify-content:center}.file-card-icon img{width:40px;height:40px}.file-card-content{display:flex;flex-direction:column;flex:1;min-width:0}.file-card-type{font-size:14px;color:#8c8c8c;margin-bottom:4px}.file-card-name{font-size:16px;font-weight:500;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.copy-card-button{background:none;border:none;cursor:pointer;color:#8c8c8c;padding:8px;border-radius:4px;display:flex;align-items:center;justify-content:center;margin-left:8px;transition:color 0.2s}.copy-card-button:hover{color:#1677ff}.avatar{width:32px;height:32px;border-radius:50%;overflow:hidden;flex-shrink:0}.avatar img{width:100%;height:100%;object-fit:cover}.user-avatar{margin-left:8px}.assistant-avatar{margin-right:8px}.retry-button{background-color:#ff6b35 !important;color:white !important;border:none !important}.retry-button:hover{background-color:#e55a2b !important}.retry-button .button-icon{margin-right:4px}.video-inputs-container{display:flex;flex-direction:column;align-items:end}.video-container{margin-top:0px;border-radius:8px;overflow:hidden;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1);background-color:#000;width:250px;height:auto;max-height:250px;transition:transform 0.2s ease, box-shadow 0.2s ease}.video-container:hover{transform:translateY(-2px);box-shadow:0 4px 16px rgba(0, 0, 0, 0.15)}.video-container video{display:block;width:100%;max-width:500px;height:auto;border-radius:8px}.video-container video:focus{outline:none}.video-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;background-color:#f8f9fa;border-radius:8px;color:#666;font-size:14px}.loading-spinner{width:24px;height:24px;border:2px solid #e9ecef;border-top:2px solid #1677ff;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:12px}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@media (max-width: 768px){.video-container{width:100%;max-width:300px}}";const Gt=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Xt=class{message;showFeedbackButtons=true;botId;locale;get hostElement(){return o(this)}strings;feedbackStatus=null;clipboard=null;videoUrls={};userAvatar;assistantAvatar;showCopyButton=true;filePreviewMode="window";showAssistantMessage=true;showSaveJdButton=false;saveJdButtonText="保存职位";saveJd;filePreviewRequest;retryRequest;constructor(o){e(this,o);this.saveJd=t(this,"saveJd");this.filePreviewRequest=t(this,"filePreviewRequest");this.retryRequest=t(this,"retryRequest");k.use(C);k.setOptions({breaks:true,gfm:true})}async componentWillLoad(){this.strings=this.locale==="en"?Wt:Tt;if(this.message&&this.message.feedback){this.feedbackStatus=this.message.feedback.rating}}componentDidRender(){this.initClipboard()}disconnectedCallback(){if(this.clipboard){this.clipboard.destroy();this.clipboard=null}}initClipboard(){const e=this.hostElement.shadowRoot?.querySelector(".copy-button");if(!e){return}if(this.clipboard){return}this.clipboard=new ht(e,{container:this.hostElement.shadowRoot});this.clipboard.on("success",(e=>{alert(this.strings.copySuccess);e.clearSelection()}));this.clipboard.on("error",(e=>{console.error("复制失败:",e);y.emitError({error:e,message:"复制内容失败"})}))}saveJdLoading=false;async handleSaveJd(e){this.saveJdLoading=true;const t="78798567376007168";const o=await d({url:"/sdk/v1/chat/workflow/block-run",method:"POST",data:{bot_id:t,inputs:{job_info:e}}});if(o.success&&o.data?.data?.outputs?.json_data){try{let e=o.data.data.outputs.json_data.trim();const t=e.match(/```json\s*([\s\S]*?)\s*```/);if(t){e=t[1].trim()}const i=JSON.parse(e);this.saveJd.emit({isOk:true,message:this.strings.saveSuccess,data:i})}catch(e){console.error("解析JSON失败:",e);this.saveJd.emit({isOk:false,message:this.strings.parseJsonFailed})}}else{this.saveJd.emit({isOk:false,message:this.strings.saveFailed})}this.saveJdLoading=false}renderUserMessage(){if(!this.message?.query?.trim())return null;const e=this.message.query?k(this.message.query):"";return i("div",{class:{"user-message-container":true}},this.userAvatar&&i("div",{class:"avatar user-avatar"},i("img",{src:this.userAvatar})),i("div",{class:"message-bubble user-message"},i("div",{innerHTML:e}),this.renderInputs()))}renderAssistantMessage(){if(!this.message.answer&&!this.message.isStreaming)return null;if(!this.showAssistantMessage){return i("div",{class:{"assistant-message-container":true}},this.assistantAvatar&&i("div",{class:"avatar assistant-avatar"},i("img",{src:this.assistantAvatar})),i("div",{class:"message-bubble"},i("div",{class:"assistant-message"},this.strings.pleaseWait)))}const e=this.message.isStreaming&&!this.message.answer;const t=this.message.answer?k(this.message.answer):"";const o=this.showSaveJdButton&&this.botId=="3022316191018873";return i("div",{class:{"assistant-message-container":true}},this.assistantAvatar&&i("div",{class:"avatar assistant-avatar"},i("img",{src:this.assistantAvatar})),i("div",{class:"message-bubble "},i("div",{class:"assistant-message"},i("div",{class:"markdown-content markdown-body",innerHTML:e?this.strings.pleaseWait:t})),!e&&this.message.answer&&!this.message.isStreaming&&i("div",{class:"message-actions"},this.message.showRetryButton&&i("button",{class:"action-button retry-button",onClick:()=>this.handleRetry(),title:this.strings.retry},i("span",{class:"button-icon"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},i("polyline",{points:"23 4 23 10 17 10"}),i("polyline",{points:"1 20 1 14 7 14"}),i("path",{d:"M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"}))),this.strings.retry),this.showCopyButton&&i("button",{class:"action-button copy-button",title:this.strings.copy,"data-clipboard-text":this.message.answer||""},i("span",{class:"button-icon"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},i("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),i("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}))),this.strings.copy),o&&i("button",{class:"action-button",onClick:()=>this.handleSaveJd(this.message.answer),title:this.saveJdButtonText,disabled:this.saveJdLoading},this.saveJdLoading?this.strings.processing:this.saveJdButtonText),this.showFeedbackButtons&&i(i.Fragment,null,i("button",{class:`action-button icon-only ${this.feedbackStatus==="like"?"active":""}`,title:this.strings.like,onClick:()=>this.handleLike()},i("span",{class:"button-icon"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},i("path",{d:"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"})))),i("button",{class:`action-button icon-only ${this.feedbackStatus==="dislike"?"active":""}`,title:this.strings.dislike,onClick:()=>this.handleDislike()},i("span",{class:"button-icon"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},i("path",{d:"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17"}))))))))}getFileName(e){const t=e.split("/");return t[t.length-1]}handleContentClick(e,t,o="text"){this.filePreviewRequest.emit({fileName:e,content:t,contentType:o})}async loadVideoUrl(e){if(this.videoUrls[e]){return}const t=await m(e);if(t){this.videoUrls={...this.videoUrls,[e]:t}}}async handleFileClick(e,t){const o=/^https?:\/\//i.test(e);if(o){window.open(e,"_blank");return}const i=/\.(jpg|jpeg|png|gif|bmp|webp|svg)$/i.test(t);const n=i?await m(e):await g(e);if(n){if(this.filePreviewMode==="drawer"){this.filePreviewRequest.emit({url:n,fileName:t,contentType:"file"})}else{window.open(n,"_blank")}}else{console.error("无法获取预览URL");I.captureError("无法获取预览URL",{action:"handleFileClick",component:"pcm-chat-message",title:"无法获取预览URL"});y.emitError({error:"无法获取预览URL",message:"无法获取预览URL"})}}renderFileItem(e,t,o){return i("div",{key:o,class:"file-card",onClick:()=>this.handleFileClick(t,e)},i("div",{class:"file-card-icon",style:{background:"linear-gradient(45deg, #ff5600, #ff8344)"}},i("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_file.png"})),i("div",{class:"file-card-content"},i("div",{class:"file-card-type"},"[",this.strings.attachmentInfo,"]"),i("div",{class:"file-card-name"},e)))}renderInputs(){if(!this.message.inputs)return null;const e=Object.keys(this.message.inputs).some((e=>{const t=this.message.inputs[e];return t!==null&&t!==undefined&&t!==""&&!e.startsWith("hide_")&&e!=="answer"}));if(!e)return null;return i("div",{class:"inputs-container"},Object.keys(this.message.inputs).map(((e,t)=>{const o=this.message.inputs[e];if(o&&!e.startsWith("hide_")&&e!=="answer"){if(e==="video_url"){const e=o;const n=this.videoUrls[e];if(!n){this.loadVideoUrl(e)}return i("div",{class:"video-inputs-container"},i("div",{key:t,class:"video-container"},n?i("video",{key:e,controls:true,preload:"metadata",onLoadedMetaData:e=>{const t=e.target;t.currentTime=.01},controlsList:"nodownload",style:{width:"250px",height:"auto",maxHeight:"250px",borderRadius:"8px",marginTop:"8px"}},i("source",{src:n,type:"video/webm"}),i("source",{src:n,type:"video/mp4"}),i("source",{src:n,type:"video/ogg"}),this.strings.browserNotSupportVideo):i("div",{class:"video-loading"},i("div",{class:"loading-spinner"}),i("span",null,this.strings.loadingVideo))))}else if(e==="file_url"){const e=this.message.inputs.file_name||this.getFileName(o);return this.renderFileItem(e,o,t)}else if(e==="file_urls"){const e=typeof o==="string"?o.split(","):[o.toString()];const n=this.message.inputs.file_names?typeof this.message.inputs.file_names==="string"?this.message.inputs.file_names.split(","):[this.message.inputs.file_names.toString()]:[];return i("div",{key:t},e.map(((e,t)=>{const o=n[t]||this.getFileName(e);return this.renderFileItem(o,e,t)})))}else if(e==="job_info"||e==="rule"){const n=e==="job_info"?this.strings.jobInfo:this.strings.evaluationRule;const r=typeof o==="string"?o:JSON.stringify(o,null,2);return i("div",{key:t,class:"file-card",onClick:()=>this.handleContentClick(n,r)},i("div",{class:"file-card-icon",style:{background:"#0d75fb"}},i("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_position.png"})),i("div",{class:"file-card-content"},i("div",{class:"file-card-type"},"[",n,"]"),i("div",{class:"file-card-name"},r.length>50?r.substring(0,50)+"...":r)))}else if(e==="input"){return i("div",{key:t,class:"input-metadata"},`${o}`)}}return null})))}async handleLike(){const e=this.feedbackStatus==="like"?null:"like";await this.submitFeedback(e)}async handleDislike(){const e=this.feedbackStatus==="dislike"?null:"dislike";await this.submitFeedback(e)}async submitFeedback(e){if(!this.message.id){console.error("消息ID不存在,无法提交反馈");I.captureError("消息ID不存在,无法提交反馈",{action:"submitFeedback",component:"pcm-chat-message",title:"无法提交反馈"});y.emitError({error:"消息ID不存在,无法提交反馈",message:"消息ID不存在,无法提交反馈"});return}try{const t=await d({url:`/sdk/v1/chat/messages/${this.message.id}/feedbacks`,method:"POST",data:{rating:e,bot_id:this.botId,content:""}});if(t.success){this.feedbackStatus=e;if(this.message&&this.message.feedback){this.message={...this.message,feedback:{...this.message.feedback,rating:e}}}}else{console.error("反馈提交失败:",t.message)}}catch(e){console.error("提交反馈时发生错误:",e);I.captureError(e,{action:"submitFeedback",component:"pcm-chat-message",title:"提交反馈失败"})}}handleRetry(){if(this.message.id){this.retryRequest.emit(this.message.id)}}render(){return i("div",{key:"9f8baedf5fae02e55cadc0455810de9927452a15",class:"message-round"},this.renderUserMessage(),this.renderAssistantMessage())}};Xt.style=Jt+(Qt+Gt);const Yt=":host{display:block}.confirm-modal-container{position:fixed;top:0;left:0;width:0;height:0;overflow:visible}.confirm-modal-mask{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.45);opacity:0;visibility:hidden;transition:opacity 0.3s ease, visibility 0.3s ease}.mask-visible{opacity:1;visibility:visible}.confirm-modal-content{position:fixed;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center;padding:20px;opacity:0;visibility:hidden;transition:opacity 0.3s ease, visibility 0.3s ease}.confirm-modal-content.centered{align-items:center}.modal-content-visible{opacity:1;visibility:visible}.modal-wrapper{background:white;border-radius:8px;width:100%;max-width:400px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;transform:scale(0.9) translateY(-20px);transition:transform 0.3s cubic-bezier(0.23, 1, 0.32, 1)}.modal-content-visible .modal-wrapper{transform:scale(1) translateY(0)}.modal-header{padding:16px 24px;border-bottom:1px solid #f0f0f0;background:#fff}.modal-title{font-size:16px;font-weight:500;color:rgba(0, 0, 0, 0.85);margin:0;line-height:1.5}.modal-body{padding:24px;font-size:14px;line-height:1.5;color:rgba(0, 0, 0, 0.65)}.modal-footer{padding:10px 16px;text-align:right;background:transparent;border-top:1px solid #f0f0f0;border-radius:0 0 8px 8px}.modal-button{line-height:1.5;position:relative;display:inline-block;font-weight:400;white-space:nowrap;text-align:center;border:1px solid transparent;cursor:pointer;transition:all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);user-select:none;touch-action:manipulation;height:32px;padding:4px 15px;font-size:14px;border-radius:6px;outline:0;margin-left:8px}.cancel-button{color:rgba(0, 0, 0, 0.65);border-color:#d9d9d9;background:#fff}.cancel-button:hover{color:#40a9ff;border-color:#40a9ff}.cancel-button:active{color:#096dd9;border-color:#096dd9}.ok-button{color:#fff;background:#1890ff;border-color:#1890ff}.ok-button:hover{background:#40a9ff;border-color:#40a9ff}.ok-button:active{background:#096dd9;border-color:#096dd9}.ok-primary{background:#1890ff;border-color:#1890ff}.ok-primary:hover{background:#40a9ff;border-color:#40a9ff}.ok-primary:active{background:#096dd9;border-color:#096dd9}.ok-danger{background:#ff4d4f;border-color:#ff4d4f}.ok-danger:hover{background:#ff7875;border-color:#ff7875}.ok-danger:active{background:#d9363e;border-color:#d9363e}.ok-default{color:rgba(0, 0, 0, 0.65);background:#fff;border-color:#d9d9d9}.ok-default:hover{color:#40a9ff;border-color:#40a9ff}.ok-default:active{color:#096dd9;border-color:#096dd9}@media screen and (max-width: 768px){.confirm-modal-content{padding:16px}.confirm-modal-content.centered{padding:16px}.modal-wrapper{max-width:none;margin:0 auto}.modal-header{padding:12px 16px}.modal-title{font-size:16px}.modal-body{padding:16px}.modal-footer{padding:8px 12px 12px}.modal-button{height:36px;font-size:16px;margin-left:8px;margin-top:8px}}@media (prefers-reduced-motion: reduce){.confirm-modal-mask,.confirm-modal-content,.modal-wrapper,.modal-button{transition:none}}";const Kt=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Zt=class{constructor(o){e(this,o);this.ok=t(this,"ok");this.cancel=t(this,"cancel");this.closed=t(this,"closed");this.afterOpen=t(this,"afterOpen");this.afterClose=t(this,"afterClose")}isOpen=false;modalTitle="确认";okText="确认";cancelText="取消";okType="primary";maskClosable=true;mask=true;centered=true;ok;cancel;closed;afterOpen;afterClose;get hostElement(){return o(this)}zIndex=2e3;bodyOverflowBeforeOpen="";transitionEndHandler;async open(){this.isOpen=true}async close(){this.isOpen=false}visibleChanged(e){if(e){this.bodyOverflowBeforeOpen=document.body.style.overflow;document.body.style.overflow="hidden";const e=this.hostElement.shadowRoot.querySelector(".modal-wrapper");if(e){this.transitionEndHandler=()=>{this.afterOpen.emit()};e.addEventListener("transitionend",this.transitionEndHandler,{once:true})}}else{document.body.style.overflow=this.bodyOverflowBeforeOpen;const e=this.hostElement.shadowRoot.querySelector(".modal-wrapper");if(e){this.transitionEndHandler=()=>{this.afterClose.emit()};e.addEventListener("transitionend",this.transitionEndHandler,{once:true})}}}componentWillLoad(){const e=a.getItem("modal-zIndex");if(e){this.zIndex=e+1e3}}disconnectedCallback(){if(this.isOpen){document.body.style.overflow=this.bodyOverflowBeforeOpen}const e=this.hostElement.shadowRoot?.querySelector(".modal-wrapper");if(e&&this.transitionEndHandler){e.removeEventListener("transitionend",this.transitionEndHandler)}}handleMaskClick=()=>{if(this.maskClosable){this.handleCancel()}};handleOk=()=>{this.ok.emit()};handleCancel=()=>{this.cancel.emit();this.isOpen=false;this.closed.emit()};render(){const e={zIndex:`${this.zIndex+1}`};const t={zIndex:`${this.zIndex}`};const o={"confirm-modal-container":true,"modal-open":this.isOpen};const n={"confirm-modal-content":true,"modal-content-visible":this.isOpen,centered:this.centered};const r={"modal-button":true,"ok-button":true,[`ok-${this.okType}`]:true};return i("div",{key:"5f47e921e2309fc240ba4aaec6e40dea3c5a758b",class:o},this.mask&&i("div",{key:"e44f8540c2a3d0bb67800b9767b16797ce18df15",class:{"confirm-modal-mask":true,"mask-visible":this.isOpen},style:t,onClick:this.handleMaskClick}),i("div",{key:"64651713adc234eddd12d46b5ac1ba164d917db4",class:n,style:e},i("div",{key:"81786c948e7de6c1e6ac2bba7af880d0a9538c1d",class:"modal-wrapper"},i("div",{key:"8f4d18d71021e7f683414a7b5f38567d7af44e42",class:"modal-header"},i("div",{key:"74afdedecddea40ffa7e2366661ad05caa058c04",class:"modal-title"},this.modalTitle)),i("div",{key:"5b44bbd360065765673c7f07d3e75ccd5d7daa82",class:"modal-body"},i("slot",{key:"204feff27398e62a199a2fc6cf1d603e6433820c"})),i("div",{key:"0ac676d7565716aed2122c4ed90e3afa40797007",class:"modal-footer"},i("button",{key:"0aa9abd4fd10dcf5a04bebfeba8554867b6b8ef4",class:"modal-button cancel-button",onClick:this.handleCancel},this.cancelText),i("button",{key:"081301f3e32b68bd3076b369d812f584724eea09",class:r,onClick:this.handleOk},this.okText)))))}static get watchers(){return{isOpen:["visibleChanged"]}}};Zt.style=Yt+Kt;const eo=".digital-human-container{position:relative;border-radius:8px;overflow:hidden;transition:box-shadow 0.3s;width:100%;height:100%;background:transparent;display:flex;align-items:center;justify-content:center}.digital-human-container video{width:100%;height:100%;display:block;object-fit:cover;background:transparent;border-radius:8px}.generating-indicator{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);background:rgba(0, 0, 0, 0.7);border-radius:50%;width:30px;height:30px;display:flex;align-items:center;justify-content:center}.loading-spinner{width:16px;height:16px;border:2px solid #ffffff;border-top-color:transparent;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@media screen and (max-width: 768px){.digital-human-container{border-radius:6px}.digital-human-container video{border-radius:6px}}";const to=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const oo=class{constructor(o){e(this,o);this.videoEnded=t(this,"videoEnded");this.videoGenerated=t(this,"videoGenerated");this.avatarDetailLoaded=t(this,"avatarDetailLoaded")}digitalId;speechText="";isStreaming=false;playbackRate=1;generatedVideoUrl="";currentVideoUrl="";isPlayingGenerated=false;dynamicDefaultVideoUrl="";dynamicVirtualmanKey="";videoElement;lastCompletedText="";videoEnded;videoGenerated;avatarDetailLoaded;async componentWillLoad(){if(this.digitalId){await this.fetchAvatarDetail()}this.currentVideoUrl=this.dynamicDefaultVideoUrl||""}componentDidLoad(){if(this.videoElement&&this.currentVideoUrl){this.videoElement.src=this.currentVideoUrl;this.videoElement.playbackRate=1}}handleStreamingChange(e,t){if(t===true&&e===false&&this.speechText&&this.speechText!==this.lastCompletedText){this.generateDigitalHumanVideo(this.speechText);this.lastCompletedText=this.speechText}}async fetchAvatarDetail(){if(!this.digitalId)return;try{const e=await d({url:"/sdk/v1/virtual-human/avatar-detail",method:"POST",data:{avatar_id:this.digitalId}});if(!e.success){throw new Error(`获取数字人详情失败: ${e.message}`)}const{placeholder_video_url:t,virtualman_key:o}=e.data;if(t){this.dynamicDefaultVideoUrl=t}if(o){this.dynamicVirtualmanKey=o}this.avatarDetailLoaded.emit({defaultVideoUrl:this.dynamicDefaultVideoUrl,virtualmanKey:this.dynamicVirtualmanKey})}catch(e){console.error("获取数字人详情失败:",e)}}async generateDigitalHumanVideo(e){if(!e.trim())return;if(!this.dynamicVirtualmanKey){console.error("缺少VirtualmanKey,无法生成数字人视频");return}const t=this.dynamicVirtualmanKey;try{const o=await d({url:"/sdk/v1/virtual-human/create-video",method:"POST",data:{VirtualmanKey:t,InputSsml:e,SpeechParam:{Speed:1},VideoParam:{Format:"TransparentWebm"},DriverType:"Text"}});if(!o.success){throw new Error(`创建视频任务失败: ${o.message}`)}const i=o.data.Payload.TaskId;const n=await this.pollVideoProgress(i);if(n){this.generatedVideoUrl=n;this.playGeneratedVideo(n)}}catch(e){console.error("数字人视频生成失败:",e)}}async pollVideoProgress(e){const t=45;const o=2e3;for(let i=0;i<t;i++){try{const t=await d({url:"/sdk/v1/virtual-human/query-progress",method:"POST",data:{TaskId:e}});if(!t.success){throw new Error(`查询进度失败: ${t.message}`)}const i=t.data.Payload;if(i.Status==="SUCCESS"&&i.Progress===100){return i.MediaUrl}else if(i.Status==="FAILED"){throw new Error(`视频生成失败: ${i.FailMessage}`)}await new Promise((e=>setTimeout(e,o)))}catch(e){console.error("轮询视频进度失败:",e);break}}throw new Error("视频生成超时")}async preloadVideo(e){return new Promise(((t,o)=>{const i=document.createElement("video");i.preload="auto";i.src=e;const n=()=>{i.removeEventListener("canplaythrough",n);i.removeEventListener("error",r);t()};const r=()=>{console.error("视频预加载失败:",e);i.removeEventListener("canplaythrough",n);i.removeEventListener("error",r);o(new Error("视频预加载失败"))};i.addEventListener("canplaythrough",n);i.addEventListener("error",r);i.load()}))}async playGeneratedVideo(e){try{await this.preloadVideo(e);this.currentVideoUrl=e;this.isPlayingGenerated=true;this.videoGenerated.emit({videoUrl:e});requestAnimationFrame((()=>{if(this.videoElement){this.videoElement.pause();this.videoElement.src=e;this.videoElement.loop=false;this.videoElement.playbackRate=this.playbackRate;this.videoElement.play().catch((e=>{console.error("播放生成视频失败:",e)}))}}))}catch(t){console.error("预加载视频失败,直接切换:",t);this.currentVideoUrl=e;this.isPlayingGenerated=true;this.videoGenerated.emit({videoUrl:e});requestAnimationFrame((()=>{if(this.videoElement){this.videoElement.pause();this.videoElement.src=e;this.videoElement.loop=false;this.videoElement.playbackRate=this.playbackRate;this.videoElement.play().catch((e=>{console.error("播放生成视频失败:",e)}))}}))}}handleVideoEnded=()=>{if(this.isPlayingGenerated){this.videoEnded.emit({videoUrl:this.currentVideoUrl});const e=this.dynamicDefaultVideoUrl;this.currentVideoUrl=e;this.isPlayingGenerated=false;requestAnimationFrame((()=>{if(this.videoElement){this.videoElement.pause();this.videoElement.src=e;this.videoElement.loop=true;this.videoElement.playbackRate=1;this.videoElement.play().catch((e=>{console.error("播放默认视频失败:",e)}))}}))}};render(){return i("div",{key:"7b38a3fc594fb3524f6e3be381d018d052b91916",class:"digital-human-container"},i("video",{key:"fc778d9668dcf39b9d050a82585a3fbc5ab8172e",autoplay:true,playsinline:true,loop:true,onEnded:this.handleVideoEnded,ref:e=>this.videoElement=e}))}static get watchers(){return{isStreaming:["handleStreamingChange"]}}};oo.style=eo+to;const io=":host{display:block}.drawer-container{position:fixed;top:0;left:0;width:0;height:0;overflow:visible}.drawer-mask{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.45);opacity:0;visibility:hidden;transition:opacity 0.3s ease, visibility 0.3s ease}.mask-visible{opacity:1;visibility:visible}.drawer-content{position:fixed;top:0;right:0;bottom:0;display:flex;flex-direction:column;background-color:#fff;box-shadow:-2px 0 8px rgba(0, 0, 0, 0.15);transform:translateX(100%);transition:transform 0.3s cubic-bezier(0.23, 1, 0.32, 1)}.drawer-content-visible{transform:translateX(0)}.drawer-header{display:flex;align-items:center;justify-content:space-between;padding:16px 24px;color:rgba(0, 0, 0, 0.85);border-bottom:1px solid #f0f0f0}.drawer-title{flex:1;margin:0;font-size:16px;line-height:22px;font-weight:500;color:rgba(0, 0, 0, 0.85);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.drawer-body{flex:1;padding:24px;overflow:auto}@media (max-width: 768px){.drawer-content{width:100% !important}.drawer-header{padding:12px 16px}.drawer-body{padding:16px}}";const no=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const ro=class{constructor(o){e(this,o);this.closed=t(this,"closed");this.afterOpen=t(this,"afterOpen");this.afterClose=t(this,"afterClose")}isOpen=false;drawerTitle="";width="378px";height="378px";closable=true;maskClosable=true;closed;afterOpen;afterClose;get hostElement(){return o(this)}zIndex=1500;bodyOverflowBeforeOpen="";transitionEndHandler;async open(){this.isOpen=true}async close(){this.isOpen=false}visibleChanged(e){if(e){this.bodyOverflowBeforeOpen=document.body.style.overflow;document.body.style.overflow="hidden";const e=this.hostElement.shadowRoot.querySelector(".drawer-content");if(e){this.transitionEndHandler=()=>{this.afterOpen.emit()};e.addEventListener("transitionend",this.transitionEndHandler,{once:true})}}else{document.body.style.overflow=this.bodyOverflowBeforeOpen;const e=this.hostElement.shadowRoot.querySelector(".drawer-content");if(e){this.transitionEndHandler=()=>{this.afterClose.emit()};e.addEventListener("transitionend",this.transitionEndHandler,{once:true})}}}componentWillLoad(){const e=a.getItem("modal-zIndex");if(e){this.zIndex=e+500}}disconnectedCallback(){if(this.isOpen){document.body.style.overflow=this.bodyOverflowBeforeOpen}const e=this.hostElement.shadowRoot?.querySelector(".drawer-content");if(e&&this.transitionEndHandler){e.removeEventListener("transitionend",this.transitionEndHandler)}}handleMaskClick=()=>{if(this.maskClosable){this.handleClose()}};handleClose=()=>{this.isOpen=false;this.closed.emit()};render(){const e={width:this.width,zIndex:`${this.zIndex+1}`};const t={zIndex:`${this.zIndex}`};return i("div",{key:"f38c91be7ea83c8d3a05d1147eb3bfc2f0005716",class:{"drawer-container":true,"drawer-open":this.isOpen}},i("div",{key:"a2fdccc60b8bf1e4321a65d1e153c21cce0e2e14",class:{"drawer-mask":true,"mask-visible":this.isOpen},style:t,onClick:this.handleMaskClick}),i("div",{key:"a45bd43b68ffc00e4e64f104b49cfb60f1af21f9",class:{"drawer-content":true,"drawer-content-visible":this.isOpen},style:e},i("div",{key:"425a77cff512ea47f19a72e0b1b292b6e14df36d",class:"drawer-header"},this.drawerTitle&&i("div",{key:"3062fab8935fa0ba878e4d82e1e2605aadee4052",class:"drawer-title"},this.drawerTitle),this.closable&&i("button",{key:"f8af566e6edacbce32e0c58d2cd99d36ef07e3c4",class:"close-button",onClick:this.handleClose},i("span",{key:"92f12937c3272369b95d9057c4c6c82f3c138cda"},"×"))),i("div",{key:"d371837bdfc53e4a43969a1658afe9d1f1444f3c",class:"drawer-body"},i("slot",{key:"639c27717fa1fddfe032c489947387a3abe8a133"}))))}static get watchers(){return{isOpen:["visibleChanged"]}}};ro.style=io+no;const ao=".modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.45);display:flex;align-items:center;justify-content:center;z-index:1000;backdrop-filter:blur(4px)}.modal-container{background:white;border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);max-width:min(1000px, calc(100vw - 40px));max-height:calc(100vh - 40px);width:100%;display:flex;flex-direction:column;overflow:hidden}.modal-header{padding:16px 24px;border-bottom:1px solid #f0f0f0;display:flex;align-items:center;justify-content:space-between;background:#fafafa}.modal-title{display:flex;align-items:center;gap:16px;font-size:16px;font-weight:600;color:#262626}.modal-close{background:none;border:none;font-size:18px;color:#8c8c8c;cursor:pointer;padding:4px;border-radius:4px;transition:all 0.2s}.modal-close:hover{background-color:#f5f5f5;color:#262626}.modal-body{padding:24px;flex:1;overflow:auto}.btn{border:none;border-radius:6px;cursor:pointer;font-size:14px;font-weight:400;transition:all 0.2s;display:inline-flex;align-items:center;justify-content:center;gap:4px}.btn-small{padding:4px 8px;font-size:12px}.btn-medium{padding:8px 16px}.btn-primary{background-color:#1890ff;color:white;border:1px solid #1890ff}.btn-primary:hover{background-color:#40a9ff;border-color:#40a9ff}.btn-default{background-color:white;color:#595959;border:1px solid #d9d9d9}.btn-default:hover{background-color:#f5f5f5;border-color:#40a9ff;color:#40a9ff}.btn-danger{background-color:#f5222d;color:white;border:1px solid #f5222d}.btn-danger:hover{background-color:#cf1322;border-color:#cf1322}.table-container{border:1px solid #f0f0f0;border-radius:6px;overflow:hidden;margin-bottom:16px}.table{width:100%;border-collapse:collapse;background:white}.table th{background-color:#fafafa;padding:12px 16px;font-weight:600;color:#262626;border-bottom:1px solid #f0f0f0;font-size:14px}.table td{padding:12px 16px;border-bottom:1px solid #f0f0f0;color:#595959;font-size:14px}.table tbody tr:hover{background-color:#f5f5f5}.table tbody tr:last-child td{border-bottom:none}.tag{display:inline-block;padding:2px 8px;border-radius:4px;font-size:12px;font-weight:400;color:white;text-align:center;min-width:60px}.action-buttons{display:flex;gap:8px}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#8c8c8c}.loading-spinner{width:32px;height:32px;border:3px solid #f0f0f0;border-top:3px solid #1890ff;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:16px}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.empty-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#8c8c8c}.empty-icon{font-size:48px;margin-bottom:16px;opacity:0.6}.empty-text{font-size:14px;color:#8c8c8c}.pagination-container{display:flex;align-items:center;justify-content:space-between;padding:16px 0;border-top:1px solid #f0f0f0}.pagination-info{color:#8c8c8c;font-size:14px}.pagination-controls{display:flex;align-items:center;gap:12px}.pagination-btn{padding:6px 12px;border:1px solid #d9d9d9;background:white;color:#595959;border-radius:4px;cursor:pointer;font-size:14px;transition:all 0.2s}.pagination-btn:hover:not(:disabled){border-color:#40a9ff;color:#40a9ff}.pagination-btn:disabled{background-color:#f5f5f5;color:#bfbfbf;cursor:not-allowed;border-color:#f0f0f0}.pagination-current{color:#262626;font-size:14px;font-weight:500;padding:0 8px}.pagination-size-select{padding:6px 8px;border:1px solid #d9d9d9;border-radius:4px;background:white;color:#595959;font-size:14px;cursor:pointer;transition:all 0.2s}.pagination-size-select:hover{border-color:#40a9ff}.pagination-size-select:focus{outline:none;border-color:#40a9ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.message{position:fixed;top:24px;left:50%;transform:translateX(-50%);padding:12px 24px;border-radius:6px;font-size:14px;font-weight:500;z-index:1100;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);animation:messageSlideIn 0.3s ease-out}.message-success{background-color:#f6ffed;color:#52c41a;border:1px solid #b7eb8f}.message-error{background-color:#fff2f0;color:#ff4d4f;border:1px solid #ffccc7}@keyframes messageSlideIn{from{opacity:0;transform:translateX(-50%) translateY(-20px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}@media (max-width: 768px){.modal-container{margin:20px;max-width:calc(100vw - 40px)}.modal-header{padding:12px 16px}.modal-body{padding:16px}.table th,.table td{padding:8px 12px;font-size:13px}.pagination-container{flex-direction:column;gap:12px;align-items:stretch}.pagination-controls{justify-content:center}.modal-title{font-size:14px;gap:8px}}@media (max-width: 480px){.table-container{overflow-x:auto}.table{min-width:600px}.action-buttons{flex-direction:column;gap:4px}}";const so={page:1,size:10};const lo={0:{text:"处理中",color:"#1890ff"},1:{text:"已完成",color:"#52c41a"},"-1":{text:"失败",color:"#ff4d4f"}};const co=class{constructor(o){e(this,o);this.cancel=t(this,"cancel")}botId;sourceId;open=false;cancel;loading=true;pagination=so;data=[];showMessage=false;messageText="";messageType="success";watchOpen(e){if(e){this.fetchData(this.pagination)}}async fetchData(e){this.loading=true;try{const t=await d({url:"/sdk/v1/export_batch/page",method:"GET",params:{page:e.page,size:e.size,bot_id:this.botId,source_id:this.sourceId}});if(t.success&&t.data){const o=t?.data?.records??[];this.data=o;this.pagination={...e,total:t?.data?.total??0}}}catch(e){console.error("Failed to fetch data:",e)}finally{this.loading=false}}async handleDownload(e){try{const t=await m(e.cos_key);const o=e.file_name;if(t){const e=document.createElement("a");e.href=t;e.setAttribute("download",o);document.body.appendChild(e);e.click();e.remove();this.showMessageToast("下载成功","success")}else{this.showMessageToast("获取下载链接失败","error")}}catch(e){this.showMessageToast("下载失败","error")}}async handleDelete(e){try{const t=await d({url:`/sdk/v1/export_batch/delete/${e.id}`,method:"DELETE"});if(t?.success){this.showMessageToast("删除成功","success");setTimeout((()=>{this.fetchData(this.pagination)}),100)}}catch(e){this.showMessageToast(`删除失败: ${e.message}`,"error")}}showMessageToast(e,t){this.messageText=e;this.messageType=t;this.showMessage=true;setTimeout((()=>{this.showMessage=false}),3e3)}handleRefresh=()=>{this.fetchData(this.pagination)};handlePageChange=(e,t)=>{const o={...this.pagination,page:e,size:t};this.fetchData(o)};formatDate(e){const t=new Date(e);return t.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}renderEmpty(){return i("div",{class:"empty-container"},i("div",{class:"empty-icon"},"📄"),i("div",{class:"empty-text"},"暂无任务"))}renderTag(e){const t=lo[e.toString()]||{text:"未知",color:"#d9d9d9"};return i("span",{class:"tag",style:{backgroundColor:t.color}},t.text)}renderButton(e,t,o="default",n="medium"){return i("button",{class:`btn btn-${o} btn-${n}`,onClick:t},e)}renderTable(){if(this.loading){return i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("div",null,"加载中..."))}if(!this.data||this.data.length===0){return this.renderEmpty()}return i("div",{class:"table-container"},i("table",{class:"table"},i("thead",null,i("tr",null,i("th",{style:{width:"300px",textAlign:"center"}},"文件名"),i("th",{style:{width:"100px",textAlign:"center"}},"状态"),i("th",{style:{width:"180px",textAlign:"center"}},"创建时间"),i("th",{style:{width:"100px",textAlign:"left"}},"操作"))),i("tbody",null,this.data.map((e=>i("tr",{key:e.id},i("td",{style:{textAlign:"center"}},e.file_name),i("td",{style:{textAlign:"center"}},this.renderTag(e.status)),i("td",{style:{textAlign:"center"}},this.formatDate(e.created_at)),i("td",{style:{textAlign:"left"}},i("div",{class:"action-buttons"},e.status!==0&&this.renderButton("删除",(()=>this.handleDelete(e)),"danger","small"),e.cos_key&&this.renderButton("下载",(()=>this.handleDownload(e)),"primary","small")))))))))}renderPagination(){if(!this.pagination.total||this.pagination.total===0){return null}const e=Math.ceil(this.pagination.total/this.pagination.size);const t=this.pagination.page;return i("div",{class:"pagination-container"},i("div",{class:"pagination-info"},"共",this.pagination.total,"条"),i("div",{class:"pagination-controls"},i("button",{class:"pagination-btn",disabled:t<=1,onClick:()=>this.handlePageChange(t-1,this.pagination.size)},"上一页"),i("span",{class:"pagination-current"},t," / ",e),i("button",{class:"pagination-btn",disabled:t>=e,onClick:()=>this.handlePageChange(t+1,this.pagination.size)},"下一页"),i("select",{class:"pagination-size-select",onChange:e=>this.handlePageChange(1,parseInt(e.target.value))},i("option",{value:"10",selected:this.pagination.size===10},"10条/页"),i("option",{value:"20",selected:this.pagination.size===20},"20条/页"),i("option",{value:"50",selected:this.pagination.size===50},"50条/页"))))}renderMessage(){if(!this.showMessage)return null;return i("div",{class:`message message-${this.messageType}`},this.messageText)}render(){if(!this.open){return null}return i("div",{class:"modal-overlay",onClick:()=>this.cancel.emit()},i("div",{class:"modal-container",onClick:e=>e.stopPropagation()},i("div",{class:"modal-header"},i("div",{class:"modal-title"},i("span",null,"导出任务列表"),this.renderButton("🔄 刷新",this.handleRefresh,"default","small")),i("button",{class:"modal-close",onClick:()=>this.cancel.emit()},"✕")),i("div",{class:"modal-body"},this.renderTable(),this.renderPagination()),this.renderMessage()))}static get watchers(){return{open:["watchOpen"]}}};co.style=ao;const po=".input-mode-toggle{display:flex;align-items:center;margin-bottom:16px}.input-mode-toggle span{color:#333;margin-right:12px}.toggle-button{display:flex;align-items:center;background:none;border:none;color:#2E6EDF;cursor:pointer;font-size:14px;padding:4px 8px}.toggle-button svg{margin-right:4px}.free-input{width:100%}.textarea-container{margin-bottom:16px}.textarea-container label{display:block;margin-bottom:8px;font-weight:500;color:#333}.textarea-container textarea{border:1px solid #ddd;border-radius:4px;font-size:14px;resize:vertical;background-color:#f9f9f9;min-height:150px;width:100%;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.textarea-container textarea:focus{outline:none;border-color:#2E6EDF;box-shadow:0 0 0 2px rgba(46, 110, 223, 0.2)}.required{color:#f56c6c}.input-guide{background-color:#f5f7fa;border-radius:4px;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.guide-title{font-weight:500;color:#333;margin-bottom:8px}.guide-content{color:#666;font-size:13px;max-width:100%;word-wrap:break-word}.guide-content div{margin-bottom:4px}";const ho='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const uo=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const mo=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent")}modalTitle="劳动合同卫士";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始分析";fullscreen=false;customInputs={};showWorkspaceHistory=false;mobileUploadAble=false;mobileInputAble=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="window";isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return o(this)}isSubmitting=false;inputMode="upload";freeInputText="";tokenInvalidListener;removeErrorListener;pcmUploadRef;handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}componentWillLoad(){if(this.zIndex){a.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}r(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=y.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};handleToggleInput=()=>{this.inputMode=this.inputMode==="upload"?"free":"upload"};handleFreeInputChange=e=>{const t=e.target;this.freeInputText=t.value};handleStartInterview=async()=>{if(this.inputMode==="upload"&&!this.uploadedFileInfo){S.info("请上传合同文件");return}if(this.inputMode==="free"&&!this.freeInputText.trim()){S.info("请输入合同内容");return}if(this.inputMode==="upload"&&await(this.pcmUploadRef?.getIsUploading?.())){S.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};async handleIsOpenChange(e){if(!e){this.showChatModal=false;this.freeInputText="";this.inputMode="upload"}else{if(this.customInputs&&this.customInputs.input){this.inputMode="free";this.freeInputText=this.customInputs.input}await r(this.token);if(this.conversationId){this.showChatModal=true}}}render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&i("div",{class:"input-container"},i("div",{class:"input-mode-toggle"},i("span",null,"合同内容"),i("button",{class:"toggle-button",onClick:this.handleToggleInput},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor"},i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"})),"切换输入")),this.inputMode==="upload"&&i("div",{class:"resume-upload-section"},i("pcm-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:25*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,uploadText:"点击上传合同",acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["other"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),this.inputMode==="free"&&i("div",{class:"free-input"},!!this.mobileInputAble&&i("pcm-mobile-input-btn",{name:"合同内容",onOk:e=>{this.freeInputText=e.detail}}),i("div",{class:"textarea-container"},i("textarea",{id:"free-input-text",placeholder:"请输入合同内容",rows:8,value:this.freeInputText,onInput:this.handleFreeInputChange})),i("div",{class:"input-guide"},i("div",{class:"guide-title"},"输入提示:"),i("div",{class:"guide-content"},i("div",null,"• 请输入完整的劳动合同内容"),i("div",null,"• 包括甲方(公司)、乙方(员工)信息"),i("div",null,"• 合同期限、工作内容、工作地点"),i("div",null,"• 工作时间、休息休假、劳动报酬"),i("div",null,"• 社会保险、劳动保护、劳动条件"),i("div",null,"• 合同变更、解除和终止条件等")))),i("button",{class:"submit-button",disabled:this.inputMode==="upload"&&!this.uploadedFileInfo||this.inputMode==="free"&&!this.freeInputText.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:"3022316191018882",conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.inputMode==="upload"?this.uploadedFileInfo?.cos_key:undefined,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,input:this.inputMode==="free"?this.freeInputText:undefined},interviewMode:"text"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};mo.style=po+(ho+uo);const go="";const fo='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const bo=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const xo=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent")}modalTitle="会议总结助手";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始总结";fullscreen=false;customInputs={};showWorkspaceHistory=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="window";selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return o(this)}isSubmitting=false;tokenInvalidListener;removeErrorListener;handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}async handleIsOpenChange(e){if(!e){this.clearSelectedFile();this.showChatModal=false}else{await r(this.token);if(this.conversationId||this.customInputs?.file_url){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){a.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}r(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=y.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};handleFileChange=e=>{const t=e.target;if(t.files&&t.files.length>0){this.selectedFile=t.files[0]}};handleUploadClick=()=>{const e=this.hostElement.shadowRoot?.querySelector(".file-input");e?.click()};clearSelectedFile=()=>{this.selectedFile=null;this.uploadedFileInfo=null;const e=this.hostElement.shadowRoot?.querySelector(".file-input");if(e){e.value=""}};async uploadFile(){if(!this.selectedFile)return;this.isUploading=true;try{const e=await p(this.selectedFile,{},{tags:["other"]});this.uploadedFileInfo=e;this.uploadSuccess.emit(e)}catch(e){console.error("文件上传错误:",e);this.clearSelectedFile();I.captureError(e,{action:"uploadFile",component:"pcm-hyzj-modal",title:"文件上传失败"});y.emitError({error:e,message:"文件上传失败,请重试"})}finally{this.isUploading=false}}handleStartInterview=async()=>{if(!this.selectedFile){alert("请上传面试内容");return}this.isSubmitting=true;try{if(!this.uploadedFileInfo){await this.uploadFile();if(!this.uploadedFileInfo){this.isSubmitting=false;return}}this.showChatModal=true}catch(e){console.error("开始面试时出错:",e);I.captureError(e,{action:"handleStartInterview",component:"pcm-hyzj-modal",title:"开始面试时出错"});y.emitError({error:e,message:"开始面试时出错,请重试"})}finally{this.isSubmitting=false}};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.file_url);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!r&&i("div",{class:"input-container"},i("div",{class:"resume-upload-section"},i("label",null,"上传会议纪要"),i("div",{class:"upload-area",onClick:this.handleUploadClick},this.selectedFile?i("div",{class:"file-item"},i("div",{class:"file-item-content"},i("span",{class:"file-icon"},"📝"),i("span",{class:"file-name"},this.selectedFile.name)),i("button",{class:"remove-file",onClick:e=>{e.stopPropagation();this.clearSelectedFile()}},"×")):i("div",{class:"upload-placeholder"},i("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_upload.png"}),i("p",{class:"upload-text"},"点击上传会议纪要"),i("p",{class:"upload-hint"},"支持 mp3、markdown、pdf、docx、doc、md 格式")))),i("button",{class:"submit-button",disabled:!this.selectedFile||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003"))),i("input",{type:"file",class:"file-input",onChange:this.handleFileChange})),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:"3022316191018885",conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name},interviewMode:"text"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};xo.style=go+(fo+bo);const wo="职位生成";const yo="职位需求信息";const ko="切换输入";const vo="职位名称";const Co="请输入职位名称";const zo="*";const Io="下一步";const So="上一步";const jo="生成JD";const _o="处理中...";const To="AI 正在分析职位信息";const Fo="请稍候...";const Eo="AI 推荐标签";const Mo="月薪范围";const Bo="福利待遇";const Do="学历要求";const Ro="JD信息";const Ao="请按照下方提示格式输入职位需求信息";const Oo="输入格式参考:";const Lo={jobTitle:"• 职位名称 - 明确定义职位的名称",salary:"• 薪资范围 - 明确该岗位的月薪或年薪",benefits:"• 福利待遇 - 该职位的福利待遇,如:五险一金、年休假、下午茶等",responsibilities:"• 工作职责 - 描述工作内容",qualifications:"• 任职资格 - 包括学历、经验和技术要求",location:"• 工作地点与性质 - 全职/兼职、远程/办公室"};const Ho="所有内容均由AI生成仅供参考";const Uo="中央网信办生成式人工智能服务备案号";const qo="Hunan-PinCaiMao-202412310003";const Po="正在加载对话...";const $o={"3k_5k":"3k-5k","5k_8k":"5k-8k","8k_12k":"8k-12k","12k_15k":"12k-15k","15k_20k":"15k-20k",above_20k:"20k以上"};const No={insurance:"五险一金",bonus:"年终奖",paidLeave:"带薪年假",overtimePay:"加班补贴",mealAllowance:"餐补",transportAllowance:"交通补贴",holidayBenefits:"节日福利",teamBuilding:"团队建设"};const Vo={college:"大专",bachelor:"本科",master:"硕士",doctor:"博士",noLimit:"学历不限"};const Wo={enterJobName:"请输入职位名称",enterJobInfo:"请输入职位需求信息"};const Jo={jobName:"职位名称",salaryRange:"薪资范围",benefits:"福利待遇",education:"学历要求"};var Qo={modalTitle:wo,jobRequirementInfo:yo,toggleInput:ko,jobName:vo,jobNamePlaceholder:Co,required:zo,nextStep:Io,prevStep:So,generateJD:jo,processing:_o,aiAnalyzing:To,pleaseWait:Fo,aiRecommendedTags:Eo,salaryRange:Mo,benefits:Bo,education:Do,jdInfo:Ro,jdInfoPlaceholder:Ao,inputGuideTitle:Oo,inputGuide:Lo,aiDisclaimer:Ho,beianLabel:Uo,beianNumber:qo,loadingConversation:Po,salaryRanges:$o,benefitsList:No,educationList:Vo,alerts:Wo,jobInfoFields:Jo};const Go="Job Description Generator";const Xo="Job Requirement Information";const Yo="Toggle Input";const Ko="Job Title";const Zo="Please enter job title";const ei="*";const ti="Next Step";const oi="Previous Step";const ii="Generate JD";const ni="Processing...";const ri="AI is analyzing job information";const ai="Please wait...";const si="AI Recommended Tags";const li="Monthly Salary Range";const di="Benefits";const ci="Education Requirements";const pi="JD Information";const hi="Please enter job requirement information according to the format below";const ui="Input Format Reference:";const mi={jobTitle:"• Job Title - Clearly define the position name",salary:"• Salary Range - Specify monthly or annual salary for this position",benefits:"• Benefits - Benefits for this position, such as: five insurances and one fund, annual leave, afternoon tea, etc.",responsibilities:"• Job Responsibilities - Describe the work content",qualifications:"• Qualifications - Including education, experience and technical requirements",location:"• Location & Nature - Full-time/Part-time, Remote/Office"};const gi="All content is AI-generated and for reference only";const fi="Cyberspace Administration of China Generative AI Service Registration Number";const bi="Hunan-PinCaiMao-202412310003";const xi="Loading conversation...";const wi={"3k_5k":"3k-5k","5k_8k":"5k-8k","8k_12k":"8k-12k","12k_15k":"12k-15k","15k_20k":"15k-20k",above_20k:"20k+"};const yi={insurance:"Five insurances and one fund",bonus:"Year-end bonus",paidLeave:"Paid annual leave",overtimePay:"Overtime allowance",mealAllowance:"Meal allowance",transportAllowance:"Transport allowance",holidayBenefits:"Holiday benefits",teamBuilding:"Team building"};const ki={college:"College",bachelor:"Bachelor",master:"Master",doctor:"Doctor",noLimit:"No limit"};const vi={enterJobName:"Please enter job title",enterJobInfo:"Please enter job requirement information"};const Ci={jobName:"Job Title",salaryRange:"Salary Range",benefits:"Benefits",education:"Education Requirements"};var zi={modalTitle:Go,jobRequirementInfo:Xo,toggleInput:Yo,jobName:Ko,jobNamePlaceholder:Zo,required:ei,nextStep:ti,prevStep:oi,generateJD:ii,processing:ni,aiAnalyzing:ri,pleaseWait:ai,aiRecommendedTags:si,salaryRange:li,benefits:di,education:ci,jdInfo:pi,jdInfoPlaceholder:hi,inputGuideTitle:ui,inputGuide:mi,aiDisclaimer:gi,beianLabel:fi,beianNumber:bi,loadingConversation:xi,salaryRanges:wi,benefitsList:yi,educationList:ki,alerts:vi,jobInfoFields:Ci};const Ii=".input-mode-toggle{display:flex;align-items:center;margin-bottom:16px}.input-mode-toggle span{color:#333;margin-right:12px}.toggle-button{display:flex;align-items:center;background:none;border:none;color:#2E6EDF;cursor:pointer;font-size:14px;padding:4px 8px}.toggle-button svg{margin-right:4px}.toggle-button:disabled{opacity:0.5;cursor:not-allowed}.structured-input{width:100%}.job-name-input{margin-bottom:20px}.job-name-input label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-name-input input{width:95%;padding:10px 12px;border:1px solid #ddd;border-radius:4px;font-size:14px;background-color:#f9f9f9}.job-name-input input:focus{outline:none;border-color:#2E6EDF;box-shadow:0 0 0 2px rgba(46, 110, 223, 0.2)}.required{color:#f56c6c}.button-container{display:flex;justify-content:center;margin-top:24px;gap:12px;max-width:100%;box-sizing:border-box;flex-wrap:wrap}.next-button{background-color:#2E6EDF;color:white}.next-button:hover{background-color:#2457b8}.next-button:disabled{background-color:#a0c0e8;cursor:not-allowed}.prev-button{background-color:#f0f0f0 !important;color:#333 !important}.prev-button:hover{background-color:#e0e0e0}.tag-selection{width:100%}.tag-selection-content{width:100%}.section-title{font-weight:600;color:#333;margin-bottom:12px;font-size:16px}.ai-tags-section,.basic-tags-section{margin-bottom:24px}.tag-group{margin-bottom:16px}.tag-title{color:#555;margin-bottom:8px;font-weight:500}.tag-container{display:flex;flex-wrap:wrap;gap:8px;max-width:100%;box-sizing:border-box}.tag{display:inline-flex;align-items:center;padding:6px 12px;border-radius:4px;background-color:#f5f5f5;border:1px solid #e0e0e0;color:#333;font-size:13px;cursor:pointer;transition:all 0.2s;max-width:100%;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tag:hover{background-color:#e8e8e8}.tag-selected{background-color:#e6f0ff;border-color:#2E6EDF;color:#2E6EDF}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 0;background-color:#f9f9f9;border-radius:8px;margin:20px 0;max-width:100%;box-sizing:border-box}.loading-spinner{width:40px;height:40px;border:3px solid rgba(46, 110, 223, 0.2);border-radius:50%;border-top-color:#2E6EDF;animation:spin 1s linear infinite;margin-bottom:16px}@keyframes spin{to{transform:rotate(360deg)}}.loading-text{text-align:center;color:#333;font-weight:500}.loading-subtext{color:#888;font-size:14px;margin-top:4px}.free-input{width:100%}.textarea-container{margin-bottom:16px}.textarea-container label{display:block;margin-bottom:8px;font-weight:500;color:#333}.textarea-container textarea{border:1px solid #ddd;border-radius:4px;font-size:14px;resize:vertical;background-color:#f9f9f9;min-height:150px;width:100%;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.textarea-container textarea:focus{outline:none;border-color:#2E6EDF;box-shadow:0 0 0 2px rgba(46, 110, 223, 0.2)}.input-guide{background-color:#f5f7fa;border-radius:4px;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.guide-title{font-weight:500;color:#333;margin-bottom:8px}.guide-content{color:#666;font-size:13px;max-width:100%;word-wrap:break-word}.guide-content div{margin-bottom:4px}@media (max-width: 768px){.tag-container{gap:7px}.tag{padding:4px 8px;font-size:12px}}@media (max-width: 480px){.button-container{flex-direction:column;align-items:center}.next-button,.prev-button,.submit-button{width:100%;margin-bottom:8px}.tag{max-width:calc(50% - 8px)}}.tag-selection,.tag-selection-content,.ai-tags-section,.basic-tags-section,.structured-input,.free-input{max-width:100%;box-sizing:border-box}";const Si='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const ji=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const _i=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent")}modalTitle="职位生成";locale="zh";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请帮我生成职位信息";fullscreen=false;customInputs={};showWorkspaceHistory=false;showSaveJdButton=false;saveJdButtonText="保存职位";streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="window";showChatModal=false;get hostElement(){return o(this)}strings;inputMode="structured";step="input";jobName="";freeInputText="";isLoading=false;isSubmitting=false;tagGroups=[];shuffledTagGroups=[];selectedAITags={};selectedTags={salary:"",benefits:[],education:""};tokenInvalidListener;removeErrorListener;handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}async componentWillLoad(){this.strings=this.locale==="en"?zi:Qo;if(this.zIndex){a.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}r(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=y.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}getSalaryRanges(){return[{text:this.strings.salaryRanges["3k_5k"],value:"3k_5k"},{text:this.strings.salaryRanges["5k_8k"],value:"5k_8k"},{text:this.strings.salaryRanges["8k_12k"],value:"8k_12k"},{text:this.strings.salaryRanges["12k_15k"],value:"12k_15k"},{text:this.strings.salaryRanges["15k_20k"],value:"15k_20k"},{text:this.strings.salaryRanges.above_20k,value:"above_20k"}]}getBenefits(){return[{text:this.strings.benefitsList.insurance,value:"五险一金"},{text:this.strings.benefitsList.bonus,value:"年终奖"},{text:this.strings.benefitsList.paidLeave,value:"带薪年假"},{text:this.strings.benefitsList.overtimePay,value:"加班补贴"},{text:this.strings.benefitsList.mealAllowance,value:"餐补"},{text:this.strings.benefitsList.transportAllowance,value:"交通补贴"},{text:this.strings.benefitsList.holidayBenefits,value:"节日福利"},{text:this.strings.benefitsList.teamBuilding,value:"团队建设"}]}getEducationRequirements(){return[{text:this.strings.educationList.college,value:"大专"},{text:this.strings.educationList.bachelor,value:"本科"},{text:this.strings.educationList.master,value:"硕士"},{text:this.strings.educationList.doctor,value:"博士"},{text:this.strings.educationList.noLimit,value:"学历不限"}]}handleClose=()=>{this.modalClosed.emit()};handleToggleInput=()=>{this.inputMode=this.inputMode==="structured"?"free":"structured"};handleJobNameChange=e=>{const t=e.target;this.jobName=t.value};handleFreeInputChange=e=>{const t=e.target;this.freeInputText=t.value};handleNextStep=async()=>{if(!this.jobName.trim()){alert(this.strings.alerts.enterJobName);return}this.step="review";await this.handlePositionAnalysis(this.jobName)};handlePrevStep=()=>{this.step="input"};async handlePositionAnalysis(e){if(!e.trim())return;this.isLoading=true;try{const t=await d({url:"/sdk/v1/chat/workflow/block-run",method:"POST",data:{inputs:{input_info:e,locale:this.locale},bot_id:"59322522667307008",workflow_code:"generate_jd_tags"}});if(t.success&&t.data?.data.outputs?.text){try{let e=t.data.data.outputs.text.trim();const o=e.match(/```json\s*([\s\S]*?)\s*```/);if(o){e=o[1].trim()}const i=JSON.parse(e);this.tagGroups=i.tagGroup||[];const n={};const r=(i.tagGroup||[]).map((e=>{const t=[...e.defaultTags||[],...e.optionalTags||[]];for(let e=t.length-1;e>0;e--){const o=Math.floor(Math.random()*(e+1));[t[e],t[o]]=[t[o],t[e]]}if(e.defaultTags&&e.defaultTags.length>0){n[e.dimensionName]=[...e.defaultTags]}return{dimensionName:e.dimensionName,tags:t}}));this.shuffledTagGroups=r;this.selectedAITags=n}catch(e){I.captureError(e,{action:"handlePositionAnalysis",component:"pcm-jd-modal",title:"解析前置标签时错误"});y.emitError({error:e,message:"解析前置标签时错误"})}}}catch(e){console.error("工作流运行错误:",e)}finally{this.isLoading=false}}handleTagClick=(e,t)=>{if(e==="benefits"){const e=[...this.selectedTags.benefits];const o=e.includes(t)?e.filter((e=>e!==t)):[...e,t];this.selectedTags={...this.selectedTags,benefits:o}}else{this.selectedTags={...this.selectedTags,[e]:this.selectedTags[e]===t?"":t}}};handleAITagClick=(e,t)=>{const o=this.selectedAITags[e]||[];const i=o.includes(t)?o.filter((e=>e!==t)):[...o,t];this.selectedAITags={...this.selectedAITags,[e]:i}};handleSubmitStructured=async()=>{this.isSubmitting=true;try{let e="";if(this.selectedTags.salary){const t=this.getSalaryRanges().find((e=>e.value===this.selectedTags.salary));if(t){e=t.text}}const t=this.selectedTags.benefits.join("、");let o="";if(this.selectedTags.education){const e=this.getEducationRequirements().find((e=>e.value===this.selectedTags.education));if(e){o=e.text}}let i=`${this.strings.jobInfoFields.jobName}:${this.jobName}\n`;if(e){i+=`${this.strings.jobInfoFields.salaryRange}:${e}\n`}if(t){i+=`${this.strings.jobInfoFields.benefits}:${t}\n`}if(o){i+=`${this.strings.jobInfoFields.education}:${o}\n`}Object.entries(this.selectedAITags).forEach((([e,t])=>{if(t.length>0){i+=`${e}:${t.join("、")}\n`}}));this.showChatModal=true;this.jobDescription=i}catch(e){console.error("提交结构化数据时出错:",e);I.captureError(e,{action:"handleSubmitStructured",component:"pcm-jd-modal",title:"提交数据时出错"});y.emitError({error:e,message:"提交数据时出错,请重试"})}finally{this.isSubmitting=false}};handleSubmitFree=async()=>{if(!this.freeInputText.trim()){alert(this.strings.alerts.enterJobInfo);return}this.isSubmitting=true;try{this.jobDescription=this.freeInputText;this.showChatModal=true}catch(e){console.error("提交自由输入数据时出错:",e);I.captureError(e,{action:"handleSubmitFree",component:"pcm-jd-modal",title:"提交数据时出错"});y.emitError({error:e,message:"提交数据时出错,请重试"})}finally{this.isSubmitting=false}};jobDescription="";getBotId(){const e=this.locale||this.hostElement?.lang||"zh";const t={zh:"3022316191018873",en:"8164748078835713"};return t[e]||t["zh"]}async handleIsOpenChange(e){if(!e){this.showChatModal=false;this.jobDescription="";this.jobName="";this.freeInputText="";this.step="input";this.inputMode="structured";this.tagGroups=[];this.shuffledTagGroups=[];this.selectedAITags={};this.selectedTags={salary:"",benefits:[],education:""}}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info;this.inputMode="free";this.freeInputText=this.customInputs.job_info}await r(this.token);if(this.conversationId){this.showChatModal=true}}}renderTagGroup(e,t,o){return i("div",{class:"tag-group"},i("div",{class:"tag-title"},e),i("div",{class:"tag-container"},t.map((e=>{const t=o==="benefits"?this.selectedTags.benefits.includes(e.value):this.selectedTags[o]===e.value;return i("div",{class:{tag:true,"tag-selected":t},onClick:()=>this.handleTagClick(o,e.value)},e.text)}))))}renderAITagGroups(){return i("div",{class:"ai-tag-groups"},this.shuffledTagGroups.map((e=>i("div",{class:"tag-group"},i("div",{class:"tag-title"},e.dimensionName),i("div",{class:"tag-container"},e.tags.map((t=>{const o=(this.selectedAITags[e.dimensionName]||[]).includes(t);return i("div",{class:{tag:true,"tag-selected":o},onClick:()=>this.handleAITagClick(e.dimensionName,t)},t)})))))))}renderLoadingState(){return i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("div",{class:"loading-text"},i("div",null,this.strings.aiAnalyzing),i("div",{class:"loading-subtext"},this.strings.pleaseWait)))}render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&true&&i("div",{class:"input-container"},i("div",{class:"input-mode-toggle"},i("span",null,this.strings.jobRequirementInfo),i("button",{class:"toggle-button",onClick:this.handleToggleInput,disabled:this.isLoading},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor"},i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"})),this.strings.toggleInput)),this.inputMode==="structured"&&i("div",{class:"structured-input"},this.step==="input"&&i("div",{class:"job-name-input"},i("label",{htmlFor:"job-name"},this.strings.jobName," ",i("span",{class:"required"},this.strings.required)),i("input",{id:"job-name",type:"text",placeholder:this.strings.jobNamePlaceholder,value:this.jobName,onInput:this.handleJobNameChange,disabled:this.isLoading}),i("div",{class:"button-container"},i("button",{class:"submit-button next-button",onClick:this.handleNextStep,disabled:!this.jobName.trim()||this.isLoading},this.strings.nextStep))),this.step==="review"&&i("div",{class:"tag-selection"},this.isLoading?this.renderLoadingState():i("div",{class:"tag-selection-content"},this.tagGroups.length>0&&i("div",{class:"ai-tags-section"},i("div",{class:"section-title"},this.strings.aiRecommendedTags),this.renderAITagGroups()),this.tagGroups.length>0&&i("div",{class:"basic-tags-section"},this.renderTagGroup(this.strings.salaryRange,this.getSalaryRanges(),"salary"),this.renderTagGroup(this.strings.benefits,this.getBenefits(),"benefits"),this.renderTagGroup(this.strings.education,this.getEducationRequirements(),"education")),i("div",{class:"button-container"},i("button",{class:"submit-button prev-button",onClick:this.handlePrevStep},this.strings.prevStep),i("button",{class:"submit-button",onClick:this.handleSubmitStructured,disabled:this.isSubmitting},this.isSubmitting?this.strings.processing:this.strings.generateJD))))),this.inputMode==="free"&&i("div",{class:"free-input"},i("div",{class:"textarea-container"},i("label",{htmlFor:"free-input-text"},this.strings.jdInfo," ",i("span",{class:"required"},this.strings.required)),i("textarea",{id:"free-input-text",placeholder:this.strings.jdInfoPlaceholder,rows:8,value:this.freeInputText,onInput:this.handleFreeInputChange})),i("div",{class:"input-guide"},i("div",{class:"guide-title"},this.strings.inputGuideTitle),i("div",{class:"guide-content"},i("div",null,this.strings.inputGuide.jobTitle),i("div",null,this.strings.inputGuide.salary),i("div",null,this.strings.inputGuide.benefits),i("div",null,this.strings.inputGuide.responsibilities),i("div",null,this.strings.inputGuide.qualifications),i("div",null,this.strings.inputGuide.location))),i("div",{class:"button-container"},i("button",{class:"submit-button",onClick:this.handleSubmitFree,disabled:!this.freeInputText.trim()||this.isSubmitting},this.isSubmitting?this.strings.processing:this.strings.generateJD))),i("div",{class:"ai-disclaimer"},i("p",null,this.strings.aiDisclaimer),i("p",{class:"beian-info"},i("span",null,this.strings.beianLabel),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},this.strings.beianNumber)))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},this.strings.loadingConversation)),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{locale:this.locale,isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:this.getBotId(),conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,job_info:this.customInputs?.job_info||this.jobDescription},interviewMode:"text",showSaveJdButton:this.showSaveJdButton,saveJdButtonText:this.saveJdButtonText}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};_i.style=Ii+(Si+ji);const Ti="";const Fi='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const Ei=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Mi=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent")}modalTitle="简历剖析助手";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始分析";fullscreen=false;customInputs={};showWorkspaceHistory=false;mobileUploadAble=false;mobileJdInputAble=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="window";isUploading=false;uploadedFileInfo=null;showChatModal=false;jobDescription="";isSubmitting=false;get hostElement(){return o(this)}tokenInvalidListener;removeErrorListener;pcmUploadRef;handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}async handleIsOpenChange(e){if(!e){this.showChatModal=false;this.jobDescription=""}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await r(this.token);if(this.conversationId||(this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){a.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}r(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=y.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};handleJobDescriptionChange=e=>{const t=e.target;this.jobDescription=t.value};handleStartAnalysis=async()=>{if(!this.customInputs?.file_url&&!this.customInputs?.resume_content&&!this.uploadedFileInfo){S.info("请上传简历");return}if(!this.customInputs?.job_info&&!this.jobDescription.trim()){S.info("请输入职位描述");return}if(await(this.pcmUploadRef?.getIsUploading?.())){S.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.job_info);const a=Boolean(this.customInputs&&(this.customInputs.file_url||this.customInputs.resume_content));const s=Boolean((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!s&&i("div",{class:"input-container"},!r&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),!!this.mobileJdInputAble&&i("pcm-mobile-input-btn",{name:"职位描述",onOk:e=>{this.jobDescription=e.detail}}),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&i("div",{class:"resume-upload-section"},i("label",null,"上传简历"),i("pcm-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),i("button",{class:"submit-button",disabled:!a&&!this.uploadedFileInfo||!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartAnalysis},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,showWorkspaceHistory:this.showWorkspaceHistory,botId:"3022316191018881",customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription},interviewMode:"text"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Mi.style=Ti+(Fi+Ei);const Bi='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const Di=".pc-layout{max-width:none}.task-layout{width:90%;max-width:1200px;min-width:800px}@media screen and (max-width: 1024px){.task-layout{width:95%;min-width:320px}}.task-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);overflow-y:auto;gap:20px}.upload-area{max-height:300px;overflow-y:auto}.step-header{text-align:center;margin-bottom:24px}.step-header h3{margin:0 0 8px 0;font-size:20px;color:#333}.step-description{margin:0;color:#666;font-size:14px}.step-indicator{background:#e6f7ff;color:#1890ff;padding:4px 8px;border-radius:4px;font-size:12px;margin-left:8px}.criteria-input-section{margin-bottom:20px}.criteria-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.task-info-section{flex-shrink:0}.info-cards{display:grid;grid-template-columns:1fr 1fr;gap:16px}@media screen and (max-width: 768px){.info-cards{grid-template-columns:1fr}}.info-card{border:1px solid #e8e8e8;border-radius:8px;overflow:hidden;background:#fff}.card-header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#fafafa;cursor:pointer;transition:background-color 0.2s}.card-header:hover{background:#f0f0f0}.card-title{font-weight:500;color:#333}.toggle-btn{background:transparent;border:none;color:#1890ff;cursor:pointer;font-size:12px;padding:4px 8px;border-radius:4px;transition:background-color 0.2s}.toggle-btn:hover{background:rgba(24, 144, 255, 0.1)}.card-content{padding:16px;border-top:1px solid #e8e8e8;max-height:120px;overflow-y:auto}.card-content p{margin:0;line-height:1.6;color:#666;font-size:14px}.card-preview{padding:12px 16px;border-top:1px solid #e8e8e8}.preview-text{margin:0;line-height:1.5;color:#666;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer-text-content{line-height:1.6;color:#333;font-size:14px;white-space:pre-wrap;word-wrap:break-word}.upload-section{flex-shrink:0}.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;flex-shrink:0}.section-header-side{display:flex;align-items:center}.export-actions{height:32px;display:flex;border-radius:6px;background-color:white;border:1px solid #1890ff;overflow:hidden;margin-right:16px;color:#1890ff;font-size:14px;font-weight:bold}.export-btn{width:128px;height:100%;display:flex;align-items:center;justify-content:center}.export-btn:hover{background-color:#f5f5f5;cursor:pointer}.export-divide{width:1px;height:100%;background-color:#1890ff}.section-header h4{margin:0;font-size:16px;color:#333}.count-badge{background:#1890ff;color:white;padding:2px 8px;border-radius:12px;font-size:12px;font-weight:500}.analyze-btn{padding:8px 16px;background:#52c41a;color:white;border:none;border-radius:4px;cursor:pointer;transition:background-color 0.2s;font-size:14px}.analyze-btn:hover{background:#73d13d}.analyze-btn:disabled{background:#d9d9d9;cursor:not-allowed}.resume-table-section{flex:1;display:flex;flex-direction:column;min-height:0}.table-container{flex:1;border:1px solid #e8e8e8;border-radius:8px;background:white;overflow-x:auto;min-height:400px}.resume-table{width:100%;border-collapse:collapse;font-size:14px}.resume-table th{background:#fafafa;padding:12px 16px;text-align:left;font-weight:500;color:#333;border-bottom:1px solid #e8e8e8}.resume-table td{padding:12px 16px;vertical-align:middle;height:60px}.resume-table tr{border-bottom:1px solid #f0f0f0;height:60px}.resume-table tr:hover{background:#f9f9f9}.filename-cell{max-width:200px;height:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filename-cell span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.talent-info-cell{max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.score-badge{display:inline-block;padding:4px 8px;border-radius:4px;font-weight:500;font-size:12px}.score-badge.excellent{background:#f6ffed;color:#52c41a;border:1px solid #b7eb8f}.score-badge.good{background:#e6f7ff;color:#1890ff;border:1px solid #91d5ff}.score-badge.average{background:#fff7e6;color:#fa8c16;border:1px solid #ffd591}.score-badge.below-average{background:#fff1f0;color:#f5222d;border:1px solid #ffa39e}.score-badge.poor{background:#f5f5f5;color:#8c8c8c;border:1px solid #d9d9d9}.status-badge{display:inline-block;padding:4px 8px;border-radius:4px;font-weight:500;font-size:12px}.status-badge.status-pending{background:#f0f0f0;color:#8c8c8c;border:1px solid #d9d9d9}.status-badge.status-analyzing{background:#e6f7ff;color:#1890ff;border:1px solid #91d5ff}.status-badge.status-completed{background:#f6ffed;color:#52c41a;border:1px solid #b7eb8f}.status-badge.status-failed{background:#fff1f0;color:#f5222d;border:1px solid #ffa39e}.detail-cell{max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.detail-content{cursor:pointer;transition:color 0.2s}.detail-content:hover{color:#40a9ff}.action-cell{display:flex;gap:8px;position:relative;align-items:center;justify-content:center;height:100%}.action-dropdown{position:relative;display:inline-block}.dropdown-trigger{display:flex;align-items:center;gap:4px;padding:6px 12px;background:#f0f0f0;border:1px solid #d9d9d9;border-radius:4px;cursor:pointer;font-size:12px;color:#595959;transition:all 0.2s;min-width:60px;justify-content:center}.dropdown-trigger:hover{background:#e6e6e6;border-color:#bfbfbf;color:#333}.dropdown-trigger svg{transition:transform 0.2s;margin-left:4px}.dropdown-menu{position:absolute;top:100%;right:0;z-index:9999;min-width:120px;background:white;border:1px solid #e8e8e8;border-radius:6px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;margin-top:4px}.dropdown-item{display:flex;align-items:center;gap:8px;padding:10px 12px;font-size:14px;color:#333;cursor:pointer;transition:background-color 0.2s;border-bottom:1px solid #f5f5f5;white-space:nowrap}.dropdown-item:last-child{border-bottom:none}.dropdown-item:hover{background:#f5f5f5}.dropdown-item.danger{color:#f5222d}.dropdown-item.danger:hover{background:#fff1f0;color:#cf1322}.dropdown-item svg{flex-shrink:0}.view-btn{background:#e6f7ff;color:#1890ff}.view-btn:hover{background:#bae7ff}.delete-btn{background:#fff1f0;color:#f5222d}.delete-btn:hover{background:#ffccc7}.empty-row{text-align:center;padding:40px 20px !important;border-bottom:none !important}.empty-state{display:flex;flex-direction:column;align-items:center;gap:8px;color:#999}.empty-state p{margin:0}.empty-hint{font-size:12px}@media screen and (max-width: 768px){.task-container{padding:16px;gap:16px}.resume-table{font-size:12px}.resume-table th,.resume-table td{padding:8px 12px}.filename-cell,.talent-info-cell,.detail-cell{max-width:120px}.action-cell{flex-direction:column;gap:4px;align-items:center;justify-content:center;min-width:80px;height:100%}.dropdown-trigger{min-width:50px;padding:4px 8px;font-size:11px}}.criteria-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.criteria-header label{margin:0;font-weight:500;color:#333}.criteria-actions{display:flex;align-items:center;gap:12px}.total-weight{font-size:14px;color:#52c41a;font-weight:500}.total-weight.invalid{color:#f5222d}.add-criteria-btn{padding:6px 12px;background:#1890ff;color:white;border:none;border-radius:4px;cursor:pointer;font-size:12px;transition:background-color 0.2s}.add-criteria-btn:hover{background:#40a9ff}.criteria-table-container{border:1px solid #e8e8e8;border-radius:6px;overflow:hidden;background:white;margin-bottom:12px}.criteria-table{width:100%;border-collapse:separate;border-spacing:0;font-size:14px}.criteria-table th{background:#fafafa;padding:12px 16px;text-align:left;font-weight:500;color:#333;border-bottom:1px solid #e8e8e8;border-right:1px solid #e8e8e8;font-size:13px;vertical-align:middle}.criteria-table th:last-child{border-right:none}.criteria-table td{padding:12px 16px;border-bottom:1px solid #f0f0f0;border-right:1px solid #f0f0f0;vertical-align:middle}.criteria-table td:last-child{border-right:none}.criteria-table tr:last-child td{border-bottom:none}.criteria-name-input{width:100%;padding:8px 12px;border:1px solid #d9d9d9;border-radius:4px;font-size:14px;outline:none;transition:border-color 0.2s;box-sizing:border-box}.criteria-name-input:focus{border-color:#40a9ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.criteria-value-input{width:100%;padding:8px 12px;border:1px solid #d9d9d9;border-radius:4px;font-size:14px;outline:none;transition:border-color 0.2s;text-align:center;box-sizing:border-box}.criteria-value-input:focus{border-color:#40a9ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.criteria-description-input{width:100%;padding:8px 12px;border:1px solid #d9d9d9;border-radius:4px;font-size:14px;outline:none;resize:vertical;min-height:80px;line-height:1.5;transition:border-color 0.2s;box-sizing:border-box}.criteria-description-input:focus{border-color:#40a9ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.remove-criteria-btn{width:28px;height:28px;background:#fff1f0;color:#f5222d;border:1px solid #ffa39e;border-radius:4px;cursor:pointer;font-size:16px;font-weight:bold;display:flex;align-items:center;justify-content:center;transition:all 0.2s;margin:0 auto}.remove-criteria-btn:hover:not(:disabled){background:#ffccc7;border-color:#ff7875}.remove-criteria-btn:disabled{background:#f5f5f5;color:#bfbfbf;border-color:#d9d9d9;cursor:not-allowed}.criteria-warning{color:#fa8c16;font-size:13px;margin:8px 0 0 0;padding:8px 12px;background:#fff7e6;border:1px solid #ffd591;border-radius:4px;display:flex;align-items:center;gap:6px}@media screen and (max-width: 768px){.criteria-header{flex-direction:column;align-items:flex-start;gap:8px}.criteria-actions{width:100%;justify-content:space-between}.criteria-table th,.criteria-table td{padding:10px 8px;font-size:12px;vertical-align:middle}.criteria-table th:nth-child(1){width:20%}.criteria-table th:nth-child(2){width:15%}.criteria-table th:nth-child(3){width:55%}.criteria-table th:nth-child(4){width:10%}.criteria-name-input,.criteria-value-input,.criteria-description-input{font-size:12px;padding:6px 8px}.criteria-description-input{min-height:60px}.remove-criteria-btn{width:24px;height:24px;font-size:14px}}.sortable-header{cursor:pointer !important;user-select:none;transition:background-color 0.2s}.sortable-header:hover{background:#f0f0f0 !important}.sortable-header.active{background:#e6f7ff !important;color:#1890ff}.header-content{display:flex;align-items:center;justify-content:space-between;width:100%}.sort-icons{display:flex;flex-direction:column;gap:1px;margin-left:8px;opacity:0.6}.sortable-header:hover .sort-icons{opacity:1}.sort-icon{transition:color 0.2s;color:#bfbfbf}.sort-icon.active{color:#1890ff}.pagination{display:flex;justify-content:center;align-items:center;gap:16px;padding:20px 0;margin-top:16px;border-top:1px solid #f0f0f0}.page-btn{padding:8px 16px;background:#fff;border:1px solid #d9d9d9;border-radius:6px;cursor:pointer;font-size:14px;color:#333;transition:all 0.2s;min-width:80px;display:flex;align-items:center;justify-content:center;height:36px}.page-btn:hover:not(:disabled){border-color:#40a9ff;color:#40a9ff;background:#f6f8ff}.page-btn:disabled{background:#f5f5f5;border-color:#d9d9d9;color:#bfbfbf;cursor:not-allowed}.page-info{font-size:14px;color:#666;padding:0 16px;display:flex;align-items:center;height:36px;white-space:nowrap}@media screen and (max-width: 768px){.pagination{gap:12px;padding:16px 0;flex-wrap:wrap}.page-btn{min-width:70px;padding:6px 12px;font-size:13px;height:32px}.page-info{font-size:13px;padding:0 8px;height:32px;order:3;width:100%;justify-content:center;margin-top:8px}}.step-indicator.clickable{cursor:pointer;transition:all 0.2s ease}.step-indicator.clickable:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.task-history-drawer-content{display:flex;flex-direction:column;height:100%}.task-list{flex:1;overflow-y:auto;padding:16px 0}.loading-tasks,.empty-tasks{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#666}.loading-spinner-small{width:24px;height:24px;border:2px solid #f0f0f0;border-top:2px solid #1890ff;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:12px}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.task-item{display:flex;align-items:center;justify-content:space-between;padding:16px;margin-bottom:8px;border:1px solid #e8e8e8;border-radius:8px;cursor:pointer;transition:all 0.2s ease;background:#fff}.task-item:hover{border-color:#1890ff;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1)}.task-item.active{border-color:#1890ff;background:#f6ffed;box-shadow:0 2px 8px rgba(24, 144, 255, 0.15)}.task-info{flex:1;min-width:0}.task-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.task-id{font-weight:600;color:#333;font-size:14px}.task-time{font-size:12px;color:#666}.task-job-info{font-size:14px;color:#333;margin-bottom:8px;line-height:1.4;word-break:break-word}.task-meta{display:flex;align-items:center;gap:12px}.resume-count{font-size:12px;color:#666;background:#f5f5f5;padding:2px 6px;border-radius:4px}.current-task-indicator{flex-shrink:0;margin-left:12px;color:#52c41a}.current-task-indicator svg{width:16px;height:16px}.task-pagination{display:flex;align-items:center;justify-content:center;gap:16px;padding:16px;border-top:1px solid #e8e8e8;background:#fafafa;flex-shrink:0}.task-pagination .page-btn{background:#fff;border:1px solid #d9d9d9;color:#333;padding:6px 12px;border-radius:4px;cursor:pointer;font-size:14px;transition:all 0.2s ease}.task-pagination .page-btn:hover:not(:disabled){border-color:#1890ff;color:#1890ff}.task-pagination .page-btn:disabled{background:#f5f5f5;color:#bfbfbf;cursor:not-allowed;border-color:#e8e8e8}.task-pagination .page-info{font-size:14px;color:#666}@media screen and (max-width: 768px){.task-item{padding:12px}.task-header{flex-direction:column;align-items:flex-start;gap:4px}.task-job-info{font-size:13px;margin-bottom:6px}.task-pagination{padding:12px;gap:12px}.task-pagination .page-btn{padding:8px 12px;font-size:13px}.task-pagination .page-info{font-size:13px}}.pcm-jlsx-card{margin-bottom:20px;background-color:#ffffff;border-radius:8px;border:1px solid #e9ecef}.pcm-jlsx-card-header{padding:12px 20px;font-size:16px;font-weight:500;color:#333;border-bottom:1px solid #e9ecef}.pcm-jlsx-card-body{padding:20px;font-size:14px;color:#333;line-height:1.6;white-space:pre-wrap;word-wrap:break-word}.out-important-conditions{margin-top:8px;color:#666;font-size:12px}";const Ri='.markdown-body{--base-size-4:4px;--base-size-8:8px;--base-size-16:16px;--base-size-24:24px;--base-size-40:40px;--base-text-weight-normal:400;--base-text-weight-medium:500;--base-text-weight-semibold:600;--fontStack-monospace:ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;--fgColor-accent:Highlight}@media (prefers-color-scheme: dark){.markdown-body,[data-theme="dark"]{color-scheme:dark;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#59636e;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#ffffff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#818b981f;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d1d9e0;--borderColor-muted:#d1d9e0b3;--borderColor-neutral-muted:#d1d9e0b3;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#9a6700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#59636e;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#1f2328;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#59636e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#1f2328;--color-prettylights-syntax-markup-bold:#1f2328;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#d1d9e0;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#818b98}}@media (prefers-color-scheme: light){.markdown-body,[data-theme="light"]{color-scheme:light;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#59636e;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#ffffff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#818b981f;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d1d9e0;--borderColor-muted:#d1d9e0b3;--borderColor-neutral-muted:#d1d9e0b3;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#9a6700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#59636e;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#1f2328;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#59636e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#1f2328;--color-prettylights-syntax-markup-bold:#1f2328;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#d1d9e0;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#818b98}}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;margin:0;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}.markdown-body h1:hover .anchor .octicon-link:before,.markdown-body h2:hover .anchor .octicon-link:before,.markdown-body h3:hover .anchor .octicon-link:before,.markdown-body h4:hover .anchor .octicon-link:before,.markdown-body h5:hover .anchor .octicon-link:before,.markdown-body h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:\' \';display:inline-block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' version=\'1.1\' aria-hidden=\'true\'><path fill-rule=\'evenodd\' d=\'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\'></path></svg>");mask-image:url("data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' version=\'1.1\' aria-hidden=\'true\'><path fill-rule=\'evenodd\' d=\'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\'></path></svg>")}.markdown-body details,.markdown-body figcaption,.markdown-body figure{display:block}.markdown-body summary{display:list-item}.markdown-body [hidden]{display:none !important}.markdown-body a{background-color:transparent;color:var(--fgColor-accent);text-decoration:none}.markdown-body abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.markdown-body b,.markdown-body strong{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dfn{font-style:italic}.markdown-body h1{margin:.67em 0;font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body mark{background-color:var(--bgColor-attention-muted);color:var(--fgColor-default)}.markdown-body small{font-size:90%}.markdown-body sub,.markdown-body sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.markdown-body sub{bottom:-0.25em}.markdown-body sup{top:-0.5em}.markdown-body img{border-style:none;max-width:100%;box-sizing:content-box}.markdown-body code,.markdown-body kbd,.markdown-body pre,.markdown-body samp{font-family:monospace;font-size:1em}.markdown-body figure{margin:1em var(--base-size-40)}.markdown-body hr{box-sizing:content-box;overflow:hidden;background:transparent;border-bottom:1px solid var(--borderColor-muted);height:.25em;padding:0;margin:var(--base-size-24) 0;background-color:var(--borderColor-default);border:0}.markdown-body input{font:inherit;margin:0;overflow:visible;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=button],.markdown-body [type=reset],.markdown-body [type=submit]{-webkit-appearance:button;appearance:button}.markdown-body [type=checkbox],.markdown-body [type=radio]{box-sizing:border-box;padding:0}.markdown-body [type=number]::-webkit-inner-spin-button,.markdown-body [type=number]::-webkit-outer-spin-button{height:auto}.markdown-body [type=search]::-webkit-search-cancel-button,.markdown-body [type=search]::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.markdown-body ::-webkit-input-placeholder{color:inherit;opacity:.54}.markdown-body ::-webkit-file-upload-button{-webkit-appearance:button;appearance:button;font:inherit}.markdown-body a:hover{text-decoration:underline}.markdown-body ::placeholder{color:var(--fgColor-muted);opacity:1}.markdown-body hr::before{display:table;content:""}.markdown-body hr::after{display:table;clear:both;content:""}.markdown-body table{border-spacing:0;border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto;font-variant:tabular-nums}.markdown-body td,.markdown-body th{padding:0}.markdown-body details summary{cursor:pointer}.markdown-body a:focus,.markdown-body [role=button]:focus,.markdown-body input[type=radio]:focus,.markdown-body input[type=checkbox]:focus{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:focus:not(:focus-visible),.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body input[type=radio]:focus:not(:focus-visible),.markdown-body input[type=checkbox]:focus:not(:focus-visible){outline:solid 1px transparent}.markdown-body a:focus-visible,.markdown-body [role=button]:focus-visible,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus-visible{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:not([class]):focus,.markdown-body a:not([class]):focus-visible,.markdown-body input[type=radio]:focus,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus,.markdown-body input[type=checkbox]:focus-visible{outline-offset:0}.markdown-body kbd{display:inline-block;padding:var(--base-size-4);font:11px var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);line-height:10px;color:var(--fgColor-default);vertical-align:middle;background-color:var(--bgColor-muted);border:solid 1px var(--borderColor-neutral-muted);border-bottom-color:var(--borderColor-neutral-muted);border-radius:6px;box-shadow:inset 0 -1px 0 var(--borderColor-neutral-muted)}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:var(--base-size-24);margin-bottom:var(--base-size-16);font-weight:var(--base-text-weight-semibold, 600);line-height:1.25}.markdown-body h2{font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.2em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body h3{font-weight:var(--base-text-weight-semibold, 600);font-size:1.05em}.markdown-body h4{font-weight:var(--base-text-weight-semibold, 600);font-size:0.875em}.markdown-body h5{font-weight:var(--base-text-weight-semibold, 600);font-size:.85em}.markdown-body h6{font-weight:var(--base-text-weight-semibold, 600);font-size:.80em;color:var(--fgColor-muted)}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0;padding:0 1em;color:var(--fgColor-muted);border-left:.25em solid var(--borderColor-default)}.markdown-body ul,.markdown-body ol{margin-top:0;margin-bottom:0;padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ul ul ol,.markdown-body ul ol ol,.markdown-body ol ul ol,.markdown-body ol ol ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body tt,.markdown-body code,.markdown-body samp{font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0;font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px;word-wrap:normal}.markdown-body .octicon{display:inline-block;overflow:visible !important;vertical-align:text-bottom;fill:currentColor}.markdown-body input::-webkit-outer-spin-button,.markdown-body input::-webkit-inner-spin-button{margin:0;appearance:none}.markdown-body .mr-2{margin-right:var(--base-size-8, 8px) !important}.markdown-body::before{display:table;content:""}.markdown-body::after{display:table;clear:both;content:""}.markdown-body>*:first-child{margin-top:0 !important}.markdown-body>*:last-child{margin-bottom:0 !important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:var(--fgColor-danger)}.markdown-body .anchor{float:left;padding-right:var(--base-size-4);margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body p,.markdown-body blockquote,.markdown-body ul,.markdown-body ol,.markdown-body dl,.markdown-body table,.markdown-body pre,.markdown-body details{margin-top:0;margin-bottom:var(--base-size-16);font-size:16px;font-weight:400}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:var(--fgColor-default);vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 tt,.markdown-body h1 code,.markdown-body h2 tt,.markdown-body h2 code,.markdown-body h3 tt,.markdown-body h3 code,.markdown-body h4 tt,.markdown-body h4 code,.markdown-body h5 tt,.markdown-body h5 code,.markdown-body h6 tt,.markdown-body h6 code{padding:0 .2em;font-size:inherit}.markdown-body summary h1,.markdown-body summary h2,.markdown-body summary h3,.markdown-body summary h4,.markdown-body summary h5,.markdown-body summary h6{display:inline-block}.markdown-body summary h1 .anchor,.markdown-body summary h2 .anchor,.markdown-body summary h3 .anchor,.markdown-body summary h4 .anchor,.markdown-body summary h5 .anchor,.markdown-body summary h6 .anchor{margin-left:-40px}.markdown-body summary h1,.markdown-body summary h2{padding-bottom:0;border-bottom:0}.markdown-body ul.no-list,.markdown-body ol.no-list{padding:0;list-style-type:none}.markdown-body ol[type="a s"]{list-style-type:lower-alpha}.markdown-body ol[type="A s"]{list-style-type:upper-alpha}.markdown-body ol[type="i s"]{list-style-type:lower-roman}.markdown-body ol[type="I s"]{list-style-type:upper-roman}.markdown-body ol[type="1"]{list-style-type:decimal}.markdown-body div>ol:not([type]){list-style-type:decimal}.markdown-body ul ul,.markdown-body ul ol,.markdown-body ol ol,.markdown-body ol ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:var(--base-size-16)}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:var(--base-size-16);font-size:1em;font-style:italic;font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dl dd{padding:0 var(--base-size-16);margin-bottom:var(--base-size-16)}.markdown-body table th{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body table th,.markdown-body table td{padding:6px 13px;border:1px solid var(--borderColor-default)}.markdown-body table td>:last-child{margin-bottom:0}.markdown-body table tr{background-color:var(--bgColor-default);border-top:1px solid var(--borderColor-muted)}.markdown-body table tr:nth-child(2n){background-color:var(--bgColor-muted)}.markdown-body table img{background-color:transparent}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid var(--borderColor-default)}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:var(--fgColor-default)}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:.2em .4em;margin:0;font-size:85%;white-space:break-spaces;background-color:var(--bgColor-neutral-muted);border-radius:6px}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body samp{font-size:85%}.markdown-body pre code{font-size:100%}.markdown-body pre>code{padding:0;margin:0;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:var(--base-size-16)}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:var(--base-size-16);overflow:auto;font-size:85%;line-height:1.45;color:var(--fgColor-default);background-color:var(--bgColor-muted);border-radius:6px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px var(--base-size-8) 9px;text-align:right;background:var(--bgColor-default);border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:var(--base-text-weight-semibold, 600);background:var(--bgColor-muted);border-top:0}.markdown-body [data-footnote-ref]::before{content:"["}.markdown-body [data-footnote-ref]::after{content:"]"}.markdown-body .footnotes{font-size:12px;color:var(--fgColor-muted);border-top:1px solid var(--borderColor-default)}.markdown-body .footnotes ol{padding-left:var(--base-size-16)}.markdown-body .footnotes ol ul{display:inline-block;padding-left:var(--base-size-16);margin-top:var(--base-size-16)}.markdown-body .footnotes li{position:relative}.markdown-body .footnotes li:target::before{position:absolute;top:calc(var(--base-size-8)*-1);right:calc(var(--base-size-8)*-1);bottom:calc(var(--base-size-8)*-1);left:calc(var(--base-size-24)*-1);pointer-events:none;content:"";border:2px solid var(--borderColor-accent-emphasis);border-radius:6px}.markdown-body .footnotes li:target{color:var(--fgColor-default)}.markdown-body .footnotes .data-footnote-backref g-emoji{font-family:monospace}.markdown-body body:has(:modal){padding-right:var(--dialog-scrollgutter) !important}.markdown-body .pl-c{color:var(--color-prettylights-syntax-comment)}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:var(--color-prettylights-syntax-constant)}.markdown-body .pl-e,.markdown-body .pl-en{color:var(--color-prettylights-syntax-entity)}.markdown-body .pl-smi,.markdown-body .pl-s .pl-s1{color:var(--color-prettylights-syntax-storage-modifier-import)}.markdown-body .pl-ent{color:var(--color-prettylights-syntax-entity-tag)}.markdown-body .pl-k{color:var(--color-prettylights-syntax-keyword)}.markdown-body .pl-s,.markdown-body .pl-pds,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-sr .pl-sra{color:var(--color-prettylights-syntax-string)}.markdown-body .pl-v,.markdown-body .pl-smw{color:var(--color-prettylights-syntax-variable)}.markdown-body .pl-bu{color:var(--color-prettylights-syntax-brackethighlighter-unmatched)}.markdown-body .pl-ii{color:var(--color-prettylights-syntax-invalid-illegal-text);background-color:var(--color-prettylights-syntax-invalid-illegal-bg)}.markdown-body .pl-c2{color:var(--color-prettylights-syntax-carriage-return-text);background-color:var(--color-prettylights-syntax-carriage-return-bg)}.markdown-body .pl-sr .pl-cce{font-weight:bold;color:var(--color-prettylights-syntax-string-regexp)}.markdown-body .pl-ml{color:var(--color-prettylights-syntax-markup-list)}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{font-weight:bold;color:var(--color-prettylights-syntax-markup-heading)}.markdown-body .pl-mi{font-style:italic;color:var(--color-prettylights-syntax-markup-italic)}.markdown-body .pl-mb{font-weight:bold;color:var(--color-prettylights-syntax-markup-bold)}.markdown-body .pl-md{color:var(--color-prettylights-syntax-markup-deleted-text);background-color:var(--color-prettylights-syntax-markup-deleted-bg)}.markdown-body .pl-mi1{color:var(--color-prettylights-syntax-markup-inserted-text);background-color:var(--color-prettylights-syntax-markup-inserted-bg)}.markdown-body .pl-mc{color:var(--color-prettylights-syntax-markup-changed-text);background-color:var(--color-prettylights-syntax-markup-changed-bg)}.markdown-body .pl-mi2{color:var(--color-prettylights-syntax-markup-ignored-text);background-color:var(--color-prettylights-syntax-markup-ignored-bg)}.markdown-body .pl-mdr{font-weight:bold;color:var(--color-prettylights-syntax-meta-diff-range)}.markdown-body .pl-ba{color:var(--color-prettylights-syntax-brackethighlighter-angle)}.markdown-body .pl-sg{color:var(--color-prettylights-syntax-sublimelinter-gutter-mark)}.markdown-body .pl-corl{text-decoration:underline;color:var(--color-prettylights-syntax-constant-other-reference-link)}.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body [role=tabpanel][tabindex="0"]:focus:not(:focus-visible),.markdown-body button:focus:not(:focus-visible),.markdown-body summary:focus:not(:focus-visible),.markdown-body a:focus:not(:focus-visible){outline:none;box-shadow:none}.markdown-body [tabindex="0"]:focus:not(:focus-visible),.markdown-body details-dialog:focus:not(:focus-visible){outline:none}.markdown-body g-emoji{display:inline-block;min-width:1ch;font-family:"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1em;font-style:normal !important;font-weight:var(--base-text-weight-normal, 400);line-height:1;vertical-align:-0.075em}.markdown-body g-emoji img{width:1em;height:1em}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item label{font-weight:var(--base-text-weight-normal, 400)}.markdown-body .task-list-item.enabled label{cursor:pointer}.markdown-body .task-list-item+.task-list-item{margin-top:var(--base-size-4)}.markdown-body .task-list-item .handle{display:none}.markdown-body .task-list-item-checkbox{margin:0 .2em .25em -1.4em;vertical-align:middle}.markdown-body ul:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body ol:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body .contains-task-list:hover .task-list-item-convert-container,.markdown-body .contains-task-list:focus-within .task-list-item-convert-container{display:block;width:auto;height:24px;overflow:visible;clip:auto}.markdown-body ::-webkit-calendar-picker-indicator{filter:invert(50%)}.markdown-body .markdown-alert{padding:var(--base-size-8) var(--base-size-16);margin-bottom:var(--base-size-16);color:inherit;border-left:.25em solid var(--borderColor-default)}.markdown-body .markdown-alert>:first-child{margin-top:0}.markdown-body .markdown-alert>:last-child{margin-bottom:0}.markdown-body .markdown-alert .markdown-alert-title{display:flex;font-weight:var(--base-text-weight-medium, 500);align-items:center;line-height:1}.markdown-body .markdown-alert.markdown-alert-note{border-left-color:var(--borderColor-accent-emphasis)}.markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title{color:var(--fgColor-accent)}.markdown-body .markdown-alert.markdown-alert-important{border-left-color:var(--borderColor-done-emphasis)}.markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title{color:var(--fgColor-done)}.markdown-body .markdown-alert.markdown-alert-warning{border-left-color:var(--borderColor-attention-emphasis)}.markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title{color:var(--fgColor-attention)}.markdown-body .markdown-alert.markdown-alert-tip{border-left-color:var(--borderColor-success-emphasis)}.markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title{color:var(--fgColor-success)}.markdown-body .markdown-alert.markdown-alert-caution{border-left-color:var(--borderColor-danger-emphasis)}.markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title{color:var(--fgColor-danger)}.markdown-body>*:first-child>.heading-element:first-child{margin-top:0 !important}.markdown-body .highlight pre:has(+.zeroclipboard-container){min-height:52px}';const Ai=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Oi=class{modalTitle="简历筛选精灵";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;fullscreen=false;customInputs={};mobileUploadAble=false;mobileJdInputAble=false;showBatchExport=false;uploadSuccess;tokenInvalid;someErrorEvent;taskCreated;resumeAnalysisStart;resumeAnalysisComplete;taskSwitch;resumeDeleted;currentStep="input";jobDescription="";jobTitle="";evaluationCriteria=[{name:"基础信息",value:10,description:"评估简历中姓名、联系方式、性别、年龄等基础信息是否完整且准确。完整准确的基础信息有助于招聘方快速识别和联系求职者,是简历的基本要素。若基础信息缺失或有误,可能影响后续沟通与评估流程。"},{name:"教育背景",value:20,description:"主要考察毕业院校、专业、入学及毕业时间、学历层次等内容。毕业院校的知名度与专业的匹配度,一定程度上反映求职者在知识储备基础和专业素养。学历层次及相关课程成绩,能辅助判断求职者在专业领域的学习深度与能力水平。"},{name:"职业履历",value:30,description:"重点评估过往工作经历的连贯性、职位晋升轨迹、工作内容与目标岗位的相关性。丰富且相关的职业履历,展现出求职者在实际工作场景中的实践经验与解决问题能力,连贯的工作经历能体现其稳定性与忠诚度。"},{name:"专业技能",value:20,description:"评估求职者所掌握的专业技能,包括软件操作能力、语言能力、专业资质证书等。这些技能直接反映求职者在特定领域的专业程度,是能否胜任目标岗位的关键因素之一,与目标岗位匹配的专业技能越多、水平越高,竞争力越强。"},{name:"项目成果",value:15,description:"考量求职者参与项目的数量、在项目中承担的角色及取得的成果。通过项目成果可了解其在团队协作、项目管理、创新思维等方面的能力,突出的项目成果能直观展示求职者在实际工作中的价值创造能力。"},{name:"求职动机",value:5,description:"判断求职者对目标岗位的兴趣和热情,以及其职业规划与公司及岗位的契合度。清晰合理的求职动机表明求职者对自身职业发展有明确认知,且对目标岗位做了充分了解,入职后更有可能长期稳定发展并积极投入工作。"}];importantConditions="";isSubmitting=false;isUploading=false;uploadedResumeRecords=[];filteredResumeRecords=[];selectedFiles=[];showJdDrawer=false;showCriteriaDrawer=false;currentTask=null;currentPage=1;pageSize=10;totalRecords=0;isAnalyzing=false;showPreviewDrawer=false;previewContent="";previewTitle="";previewType="markdown";previewUrl="";activeDropdownId=null;deletingRecordId=null;sortOrder="none";isTaskHistoryDrawerOpen=false;historyTasks=[];isLoadingHistoryTasks=false;taskHistoryCurrentPage=1;taskHistoryPageSize=10;taskHistoryTotal=0;isLoadingResumeList=false;isExportRecordsModalOpen=false;get hostElement(){return o(this)}tokenInvalidListener;removeErrorListener;botId="3022316191018874";pcmUploadRef;get resumeRecords(){return[...this.uploadedResumeRecords,...this.filteredResumeRecords]}constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent");this.taskCreated=t(this,"taskCreated");this.resumeAnalysisStart=t(this,"resumeAnalysisStart");this.resumeAnalysisComplete=t(this,"resumeAnalysisComplete");this.taskSwitch=t(this,"taskSwitch");this.resumeDeleted=t(this,"resumeDeleted");k.use(C);k.setOptions({breaks:true,gfm:true});document.addEventListener("click",this.handleDocumentClick)}handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}async handleIsOpenChange(e){if(!e){this.resetStates()}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await r(this.token)}}componentWillLoad(){if(this.zIndex){a.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}r(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=y.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}document.removeEventListener("click",this.handleDocumentClick)}resetStates=()=>{this.currentStep="input";this.jobDescription="";this.evaluationCriteria=[{name:"基础信息",value:10,description:"评估简历中姓名、联系方式、性别、年龄等基础信息是否完整且准确。完整准确的基础信息有助于招聘方快速识别和联系求职者,是简历的基本要素。若基础信息缺失或有误,可能影响后续沟通与评估流程。"},{name:"教育背景",value:20,description:"主要考察毕业院校、专业、入学及毕业时间、学历层次等内容。毕业院校的知名度与专业的匹配度,一定程度上反映求职者在知识储备基础和专业素养。学历层次及相关课程成绩,能辅助判断求职者在专业领域的学习深度与能力水平。"},{name:"职业履历",value:30,description:"重点评估过往工作经历的连贯性、职位晋升轨迹、工作内容与目标岗位的相关性。丰富且相关的职业履历,展现出求职者在实际工作场景中的实践经验与解决问题能力,连贯的工作经历能体现其稳定性与忠诚度。"},{name:"专业技能",value:20,description:"评估求职者所掌握的专业技能,包括软件操作能力、语言能力、专业资质证书等。这些技能直接反映求职者在特定领域的专业程度,是能否胜任目标岗位的关键因素之一,与目标岗位匹配的专业技能越多、水平越高,竞争力越强。"},{name:"项目成果",value:15,description:"考量求职者参与项目的数量、在项目中承担的角色及取得的成果。通过项目成果可了解其在团队协作、项目管理、创新思维等方面的能力,突出的项目成果能直观展示求职者在实际工作中的价值创造能力。"},{name:"求职动机",value:5,description:"判断求职者对目标岗位的兴趣和热情,以及其职业规划与公司及岗位的契合度。清晰合理的求职动机表明求职者对自身职业发展有明确认知,且对目标岗位做了充分了解,入职后更有可能长期稳定发展并积极投入工作。"}];this.isSubmitting=false;this.isUploading=false;this.uploadedResumeRecords=[];this.filteredResumeRecords=[];this.selectedFiles=[];this.showJdDrawer=false;this.showCriteriaDrawer=false;this.currentTask=null;this.currentPage=1;this.pageSize=10;this.totalRecords=0;this.isAnalyzing=false;this.showPreviewDrawer=false;this.previewContent="";this.previewTitle="";this.previewType="markdown";this.previewUrl="";this.activeDropdownId=null;this.deletingRecordId=null;this.sortOrder="none";this.isTaskHistoryDrawerOpen=false;this.historyTasks=[];this.isLoadingHistoryTasks=false;this.taskHistoryCurrentPage=1;this.taskHistoryPageSize=10;this.taskHistoryTotal=0;this.isLoadingResumeList=false;this.isExportRecordsModalOpen=false};handleClose=()=>{this.modalClosed.emit()};handleJobDescriptionChange=e=>{const t=e.target;this.jobDescription=t.value};handleImportantConditionsChange=e=>{const t=e.target;this.importantConditions=t.value};handleCreateTask=async()=>{if(!this.jobDescription.trim()){z("请输入职位描述","warning");return}if(this.evaluationCriteria.length===0){z("请输入评分标准","warning");return}this.isSubmitting=true;try{const e=await d({url:"/sdk/v1/agent/app_filter_task/create",method:"POST",data:{job_info:this.jobDescription,extra:JSON.stringify(this.evaluationCriteria),important_conditions:this.importantConditions}});if(e.success&&e.data){this.currentTask=e.data;this.currentStep="task";this.taskCreated.emit({task_id:e.data.id,job_description:this.jobDescription,evaluation_criteria:this.evaluationCriteria,create_time:(new Date).toISOString()})}else{throw new Error(e.message||"创建任务失败")}}catch(e){console.error("创建任务时出错:",e);I.captureError(e,{action:"handleCreateTask",component:"pcm-jlsx-modal",title:"创建任务时出错"});y.emitError({error:e,message:"创建任务时出错,请重试"})}finally{this.isSubmitting=false}};toggleJdDetail=()=>{this.showJdDrawer=true};toggleCriteriaDetail=()=>{this.showCriteriaDrawer=true};closeJdDrawer=()=>{this.showJdDrawer=false};closeCriteriaDrawer=()=>{this.showCriteriaDrawer=false};showPreview=(e,t,o="markdown",i)=>{this.previewTitle=e;this.previewContent=t||"";this.previewType=o;this.previewUrl=i||"";this.showPreviewDrawer=true;this.activeDropdownId=null};closePreviewDrawer=()=>{this.showPreviewDrawer=false;this.previewContent="";this.previewTitle="";this.previewType="markdown";this.previewUrl=""};toggleDropdown=e=>{const t=this.activeDropdownId===e?null:e;this.activeDropdownId=t};handleViewEvaluate=e=>{const t=`${f}/exportFile?id=${e.id}&title=${this.jobTitle||""}&token=${n.getToken()}&referrer=sdk`;this.showPreview(`${e.fileName} - 评估详情`,"","file",t)};exportAllPdfLoading=false;exportAllPDF=async()=>{this.exportAllPdfLoading=true;const e=await d({url:`/sdk/v1/agent/app_filter_task/export_all`,method:"GET",params:{task_id:this.currentTask?.id}});this.exportAllPdfLoading=false;if(e.success){z("导出任务已创建!","success");this.handleExportRecordsClick()}};handleViewResume=async e=>{if(e.file_url||e.resume_file_url){const t=e.file_url||e.resume_file_url;try{const o=await g(t);if(o){this.showPreview(`${e.fileName} - 简历详情`,"","file",o)}else{z("无法获取简历预览,请稍后重试","error")}}catch(e){console.error("获取简历预览失败:",e);I.captureError(e,{action:"handleViewResume",component:"pcm-jlsx-modal",title:"获取简历预览失败"});y.emitError({error:e,message:"获取简历预览失败,请稍后重试"})}}else{z("简历文件不存在","error")}};handleDeleteRecord=async e=>{this.activeDropdownId=null;const t=this.filteredResumeRecords.find((t=>t.id===e));if(t){this.deletingRecordId=e;try{const o=await d({url:`/sdk/v1/agent/app_filter_resume/delete/${e}`,method:"DELETE"});if(o.success){this.filteredResumeRecords=this.filteredResumeRecords.filter((t=>t.id!==e));z("删除成功","success");this.resumeDeleted.emit({task_id:this.currentTask.id,resume_id:e,resume_name:t.fileName,delete_time:(new Date).toISOString()});await this.loadResumeList()}else{throw new Error(o.message||"删除失败")}}catch(t){console.error("删除记录失败:",t);I.captureError(t,{action:"handleDeleteRecord",component:"pcm-jlsx-modal",title:"删除记录失败",recordId:e});z("删除失败,请重试","error")}finally{this.deletingRecordId=null}}else{this.uploadedResumeRecords=this.uploadedResumeRecords.filter((t=>t.id!==e));z("删除成功","success")}};handleEvaluationCriteriaNameChange=(e,t)=>{const o=[...this.evaluationCriteria];o[e].name=t;this.evaluationCriteria=o};handleEvaluationCriteriaValueChange=(e,t)=>{const o=[...this.evaluationCriteria];const i=parseInt(t)||0;o[e].value=Math.max(0,Math.min(100,i));this.evaluationCriteria=o};handleEvaluationCriteriaDescriptionChange=(e,t)=>{const o=[...this.evaluationCriteria];o[e].description=t;this.evaluationCriteria=o};addEvaluationCriteria=()=>{const e=[...this.evaluationCriteria];e.push({name:"",value:0,description:""});this.evaluationCriteria=e};removeEvaluationCriteria=e=>{if(this.evaluationCriteria.length<=1){z("至少需要保留一个评分标准","warning");return}const t=this.evaluationCriteria.filter(((t,o)=>o!==e));this.evaluationCriteria=t};getTotalWeight=()=>this.evaluationCriteria.reduce(((e,t)=>e+t.value),0);renderInputStep(){return i("div",{class:"input-container"},i("div",{class:"step-header"},i("h3",null,"创建简历筛选任务"),i("p",{class:"step-description"},"请输入职位描述和评分标准")),i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"职位描述 (JD)"),!!this.mobileJdInputAble&&i("pcm-mobile-input-btn",{name:"职位描述",onOk:e=>{this.jobDescription=e.detail}}),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),i("div",{class:"criteria-input-section"},i("div",{class:"criteria-header"},i("label",{htmlFor:"evaluation-criteria"},"评分标准"),i("div",{class:"criteria-actions"},i("span",{class:`total-weight ${this.getTotalWeight()!==100?"invalid":""}`},"总权重: ",this.getTotalWeight(),"%"),i("button",{type:"button",class:"add-criteria-btn",onClick:this.addEvaluationCriteria},"+ 添加标准"))),i("div",{class:"criteria-table-container"},i("table",{class:"criteria-table"},i("thead",null,i("tr",null,i("th",{style:{width:"25%"}},"标准名称"),i("th",{style:{width:"15%"}},"权重(%)"),i("th",{style:{width:"50%"}},"描述"),i("th",{style:{width:"10%"}},"操作"))),i("tbody",null,this.evaluationCriteria.map(((e,t)=>i("tr",{key:t},i("td",null,i("input",{type:"text",class:"criteria-name-input",placeholder:"请输入标准名称",value:e.name,onInput:e=>this.handleEvaluationCriteriaNameChange(t,e.target.value)})),i("td",null,i("input",{type:"number",class:"criteria-value-input",placeholder:"0",min:"0",max:"100",value:e.value,onInput:e=>this.handleEvaluationCriteriaValueChange(t,e.target.value)})),i("td",null,i("textarea",{class:"criteria-description-input",placeholder:"请输入评分标准描述",rows:2,value:e.description,onInput:e=>this.handleEvaluationCriteriaDescriptionChange(t,e.target.value)})),i("td",null,i("button",{type:"button",class:"remove-criteria-btn",disabled:this.evaluationCriteria.length<=1,onClick:()=>this.removeEvaluationCriteria(t),title:this.evaluationCriteria.length<=1?"至少需要保留一个评分标准":"删除此标准"},"×")))))))),this.getTotalWeight()!==100&&i("p",{class:"criteria-warning"},"⚠️ 权重总和应为100%,当前为",this.getTotalWeight(),"%")),i("div",{class:"criteria-input-section"},i("div",{class:"criteria-header"},i("label",{htmlFor:"evaluation-criteria"},"重要条件(选填)"),i("div",null)),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"在此栏填写的条件为硬性要求,不符合条件的简历,其最终匹配度将直接判定为0分。",rows:6,value:this.importantConditions,onInput:this.handleImportantConditionsChange})),i("button",{class:"submit-button",disabled:!this.jobDescription.trim()||this.evaluationCriteria.length===0||this.getTotalWeight()!==100||this.isSubmitting,onClick:this.handleCreateTask},this.isSubmitting?"创建中...":"创建任务"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003"))))}renderTaskStep(){return i("div",{class:"task-container"},i("div",{class:"task-info-section"},i("div",{class:"info-cards"},i("div",{class:"info-card"},i("div",{class:"card-header",onClick:this.toggleJdDetail},i("span",{class:"card-title"},"职位描述"),i("button",{class:"toggle-btn"},"查看")),i("div",{class:"card-preview"},i("p",{class:"preview-text"},this.jobDescription))),i("div",{class:"info-card"},i("div",{class:"card-header",onClick:this.toggleCriteriaDetail},i("span",{class:"card-title"},"评分标准、重要条件"),i("button",{class:"toggle-btn"},"查看")),i("div",{class:"card-preview"},i("p",{class:"preview-text"},this.getEvaluationCriteriaText()))))),i("div",{class:"upload-section"},i("div",{class:"section-header"},i("h4",null,"上传简历")),i("pcm-upload",{ref:e=>this.pcmUploadRef=e,multiple:true,maxFileSize:15*1024*1024,acceptFileSuffixList:[".pdf",".doc",".docx",".txt",".md",".ppt",".pptx",".jpg",".jpeg",".png"],mobileUploadAble:this.mobileUploadAble,uploadParams:{tags:["resume"]},onUploadChange:this.handleUploadChange}),i("div",{class:"upload-actions"},this.uploadedResumeRecords.some((e=>e.evaluate_status!==1&&e.evaluate_status!==0))&&i("button",{class:"analyze-btn",onClick:this.handleStartAnalysis},`开始分析 (${this.uploadedResumeRecords.filter((e=>e.evaluate_status!==1&&e.evaluate_status!==0)).length} 个待分析)`))),i("div",{class:"resume-table-section"},i("div",{class:"section-header"},i("h4",null,"简历列表"),i("div",{class:"section-header-side"},this.showBatchExport&&!!this.resumeRecords?.find((e=>e.evaluate_status==1))&&i("div",{class:"export-actions"},i("div",{class:"export-btn",onClick:this.exportAllPDF},i("span",null,"批量导出报告")),i("div",{class:"export-divide"}),i("div",{class:"export-btn",onClick:this.handleExportRecordsClick},"导出记录")),i("button",{class:"refresh-btn",onClick:this.handleRefreshTable,disabled:this.isLoadingResumeList,title:"刷新表格"},i("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",class:this.isLoadingResumeList?"rotating":""},i("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}))),i("span",{class:"record-count"},"已筛选 ",this.totalRecords," 条记录"))),i("div",{class:"table-container"},i("table",{class:"resume-table"},i("thead",null,i("tr",null,i("th",null,"简历文件名"),i("th",null,"人才信息"),i("th",{class:`sortable-header ${this.sortOrder!=="none"?"active":""}`,onClick:this.handleSortByScore},i("span",{class:"header-content"},"评估分数",i("span",{class:"sort-icons"},i("svg",{class:`sort-icon ${this.sortOrder==="asc"?"active":""}`,width:"12",height:"12",viewBox:"0 0 12 12"},i("path",{d:"M6 3l4 4H2z",fill:"currentColor"})),i("svg",{class:`sort-icon ${this.sortOrder==="desc"?"active":""}`,width:"12",height:"12",viewBox:"0 0 12 12"},i("path",{d:"M6 9L2 5h8z",fill:"currentColor"}))))),i("th",null,"评估详情"),i("th",null,"状态"),i("th",null,"操作"))),i("tbody",null,this.isLoadingResumeList?i("tr",null,i("td",{colSpan:6,class:"empty-row"},i("div",{class:"empty-state"},i("div",{class:"loading-spinner-small"}),i("p",null,"正在加载简历数据...")))):this.resumeRecords.length===0?i("tr",null,i("td",{colSpan:6,class:"empty-row"},i("div",{class:"empty-state"},i("p",null,"暂无简历数据"),i("p",{class:"empty-hint"},"请上传简历开始筛选")))):this.resumeRecords.map((e=>i("tr",{key:e.id},i("td",{class:"filename-cell"},i("span",{class:"file-icon"},"📝"),i("span",{title:e.fileName},e.fileName)),i("td",{class:"talent-info-cell",title:e.talentInfo},e.talentInfo),i("td",{class:"score-cell"},i("div",{class:`score-badge ${this.getScoreClass(e.score)}`},typeof e.score==="number"?e.score:"--"),e.out_important_conditions===1&&i("div",{class:"out-important-conditions"},"不满足重要条件")),i("td",{class:"detail-cell",title:e.scoreDetail},i("span",{class:"detail-content",onClick:()=>this.handleViewEvaluate(e)},e.scoreDetail)),i("td",{class:"status-cell"},i("span",{class:`status-badge status-${this.getEvaluateStatusClass(e.evaluate_status)}`},this.getEvaluateStatusText(e.evaluate_status))),i("td",{class:"action-cell"},i("div",{class:"action-dropdown"},i("button",{class:"action-btn dropdown-trigger",onClick:t=>{t.stopPropagation();this.toggleDropdown(e.id)}},"操作",i("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor"},i("path",{d:"M7 10l5 5 5-5z"}))),this.activeDropdownId===e.id&&i("div",{class:"dropdown-menu"},i("div",{class:"dropdown-item",onClick:t=>{t.stopPropagation();this.handleViewEvaluate(e)}},i("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},i("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2a1 1 0 0 0-2 0v2H8V2a1 1 0 0 0-2 0v2H5a3 3 0 0 0-3 3v11a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3zM4 18V9h16v9a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1z"})),"评估详情"),i("div",{class:"dropdown-item",onClick:t=>{t.stopPropagation();this.handleViewResume(e)}},i("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},i("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"})),"简历详情"),i("div",{class:`dropdown-item danger ${this.deletingRecordId===e.id?"disabled":""}`,onClick:t=>{t.stopPropagation();if(this.deletingRecordId!==e.id){this.handleDeleteRecord(e.id)}}},this.deletingRecordId===e.id?i("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",class:"loading-spinner"},i("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16z",opacity:"0.25"}),i("path",{d:"M12 2C17.523 2 22 6.477 22 12h-2a8 8 0 0 0-8-8V2z"})):i("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},i("path",{d:"M19 7l-.867 12.142A2 2 0 0 1 16.138 21H7.862a2 2 0 0 1-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v3M4 7h16"})),this.deletingRecordId===e.id?"删除中...":"删除")))))))))),this.totalRecords>this.pageSize&&i("div",{class:"pagination"},i("button",{class:"page-btn",disabled:this.currentPage===1,onClick:()=>this.changePage(this.currentPage-1)},"上一页"),i("span",{class:"page-info"},"第 ",this.currentPage," 页,共 ",Math.ceil(this.totalRecords/this.pageSize)," 页"),i("button",{class:"page-btn",disabled:this.currentPage>=Math.ceil(this.totalRecords/this.pageSize),onClick:()=>this.changePage(this.currentPage+1)},"下一页")),i("div",{style:{height:"100px",width:"100%"}})))}getScoreClass(e){if(e>=90)return"excellent";if(e>=80)return"good";if(e>=70)return"average";if(e>=60)return"below-average";return"poor"}getEvaluationCriteriaText(){return this.evaluationCriteria.map((e=>`${e.name}(${e.value}%):${e.description}`)).join("\n\n")}getEvaluateStatusText(e){const t={0:"筛选中",1:"筛选完成",[-1]:"筛选失败"};return t[e]||"待分析"}getEvaluateStatusClass(e){const t={0:"analyzing",1:"completed",[-1]:"failed"};return t[e]||"pending"}changePage=async e=>{this.currentPage=e;await this.loadResumeList()};handleSortByScore=()=>{if(this.sortOrder==="none"){this.sortOrder="desc"}else if(this.sortOrder==="desc"){this.sortOrder="asc"}else{this.sortOrder="none"}this.currentPage=1;this.loadResumeList()};handleRefreshTable=async()=>{await this.loadResumeList();z("刷新成功","success")};async loadResumeList(){if(!this.currentTask)return;this.isLoadingResumeList=true;this.filteredResumeRecords=[];this.uploadedResumeRecords=this.uploadedResumeRecords.filter((e=>e.evaluate_status===undefined));try{const e={task_id:this.currentTask.id,page:this.currentPage,size:this.pageSize};if(this.sortOrder==="desc"){e.order_by="score_desc"}else if(this.sortOrder==="asc"){e.order_by="score_asc"}const t=await d({url:"/sdk/v1/agent/app_filter_resume/page",method:"GET",data:e});if(t.success&&t.data){const e=t.data.records.map((e=>{let t="等待分析...";if(e.resume_data){try{const o=JSON.parse(e.resume_data);const i=o.result;if(i){const e=i.phone||i.email||"未知";const o=i.degree||"未知";const n=i.college||"未知";const r=i.work_year||"0";const a=i.work_position||"未知职位";t=`${e} | ${o} | ${n} | ${r}年经验 | ${a}`}}catch(e){console.warn("解析简历数据失败:",e)}}return{...e,id:e.id?.toString()||"",fileName:e.resume_file_name||"未知文件",talentInfo:t,scoreDetail:e.evaluate||"等待分析...",uploadTime:e.create_at?new Date(e.create_at):new Date,file_url:e.resume_file_url}}));this.filteredResumeRecords=e;this.totalRecords=t.data.total||0}}catch(e){console.error("加载简历列表失败:",e)}finally{this.isLoadingResumeList=false}}startAnalysis=async()=>{if(!this.currentTask){z("任务信息不存在","error");return}const e=this.uploadedResumeRecords.filter((e=>e.evaluate_status!==1&&e.evaluate_status!==0));if(e.length===0){z("没有需要分析的简历","warning");return}this.isAnalyzing=true;try{e.forEach((e=>{e.evaluate_status=0}));this.uploadedResumeRecords=[...this.uploadedResumeRecords];const t=e.map((e=>e.file_url||e.fileInfo?.cos_key)).filter((e=>e));if(t.length===0){z("简历文件URL获取失败","error");return}const o=await d({url:"/sdk/v1/agent/app_filter_resume/clear_repeated_resumes",method:"POST",data:{task_id:this.currentTask.id,resume_file_urls:t}});if(!o.success){throw new Error(o.message||"简历校验失败")}const i=o.data||[];if(i.length===0){z("已清除重复上传的简历,没有新的简历需要分析","info");this.uploadedResumeRecords=[];return}else{this.uploadedResumeRecords=this.uploadedResumeRecords.filter((e=>{const t=e.file_url||e.fileInfo?.cos_key;return i.includes(t)||e.evaluate_status===0}))}const n=this.evaluationCriteria.map((e=>`- ${e.name}(占比${e.value}%):${e.description}`)).join(" \n");this.resumeAnalysisStart.emit({task_id:this.currentTask.id,resume_count:i.length,resume_files:e.map((e=>({file_name:e.fileName,file_url:e.file_url||e.fileInfo?.cos_key||""}))).filter((e=>i.includes(e.file_url)))});if(this.pcmUploadRef?.clearSelectedFiles){this.pcmUploadRef.clearSelectedFiles()}await l({url:"/sdk/v1/chat/chat-messages",method:"POST",data:{bot_id:"3022316191018874",response_mode:"blocking",query:"简历筛选",inputs:{job_info:this.jobDescription,jd_id:this.currentTask.jd_id,task_id:this.currentTask.id,file_urls:i.join(","),rule:n}},onMessage:t=>{if(t.event==="error"){const o=t.data?.message||t.message||"分析失败";e.forEach((e=>{e.evaluate_status=-1}));this.uploadedResumeRecords=[...this.uploadedResumeRecords];y.emitError({error:t.data,message:o});return}},onComplete:async()=>{this.uploadedResumeRecords=this.uploadedResumeRecords.filter((e=>e.evaluate_status!==0));await this.loadResumeList();this.emitAnalysisCompleteEvent()},onError:t=>{console.error("简历分析失败:",t);e.forEach((e=>{e.evaluate_status=-1}));this.uploadedResumeRecords=[...this.uploadedResumeRecords];I.captureError(t,{action:"startAnalysis",component:"pcm-jlsx-modal",title:"开始分析失败"});y.emitError({error:t,message:"开始分析失败,请重试"})}})}catch(t){console.error("开始分析失败:",t);e.forEach((e=>{e.evaluate_status=-1}));this.uploadedResumeRecords=[...this.uploadedResumeRecords];I.captureError(t,{action:"startAnalysis",component:"pcm-jlsx-modal",title:"开始分析失败"});y.emitError({error:t,message:"开始分析失败,请重试"})}finally{this.isAnalyzing=false}};handleTaskHistoryClick=()=>{this.isTaskHistoryDrawerOpen=true;this.loadHistoryTasks()};async loadHistoryTasks(){this.isLoadingHistoryTasks=true;try{const e=await d({url:"/sdk/v1/agent/app_filter_task/page",method:"GET",data:{page:this.taskHistoryCurrentPage,size:this.taskHistoryPageSize}});if(e.success&&e.data){this.historyTasks=e.data.records.map((e=>{let t;let o="未知时间";try{t=new Date(e.create_at);if(isNaN(t.getTime())){console.warn("无效的日期对象:",e.create_at);t=new Date}const i=new Date;const n=i.getTime()-t.getTime();const r=Math.floor(n/(1e3*60*60*24));if(r===0){o=`今天 ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else if(r===1){o=`昨天 ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else if(r>0&&r<7){const e=["周日","周一","周二","周三","周四","周五","周六"];o=`${e[t.getDay()]} ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else if(r<0){o=`${(t.getMonth()+1).toString().padStart(2,"0")}-${t.getDate().toString().padStart(2,"0")} ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else{o=`${(t.getMonth()+1).toString().padStart(2,"0")}-${t.getDate().toString().padStart(2,"0")} ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}}catch(t){console.error("时间格式化错误:",t,e.create_at);o="时间解析失败"}return{...e,timeDisplay:o}}));this.taskHistoryTotal=e.data.total||0}}catch(e){console.error("获取历史任务失败:",e);I.captureError(e,{action:"loadHistoryTasks",component:"pcm-jlsx-modal",title:"获取历史任务失败"});y.emitError({error:e,message:"获取历史任务失败"})}finally{this.isLoadingHistoryTasks=false}}handleSwitchTask=async e=>{if(e.id===this.currentTask?.id){this.isTaskHistoryDrawerOpen=false;return}try{const t=await d({url:`/sdk/v1/agent/app_filter_task/query/${e.id}`,method:"GET"});if(!t.success||!t.data){throw new Error(t.message||"获取任务详情失败")}const o=t.data;let i=[];if(o.extra){try{i=JSON.parse(o.extra)}catch(e){console.warn("解析评分标准失败:",e)}}this.currentTask={id:o.id,jd_id:o.jd_id,user_id:o.user_id,extra:o.extra,important_conditions:o.important_conditions||"",create_at:o.create_at,update_at:o.update_at};this.jobDescription=o.jd_info.description||"";this.jobTitle=o.jd_info.title||"";this.evaluationCriteria=i.length>0?i:this.evaluationCriteria;this.importantConditions=o.important_conditions||"";this.currentStep="task";this.uploadedResumeRecords=[];this.filteredResumeRecords=[];this.currentPage=1;this.totalRecords=0;this.isTaskHistoryDrawerOpen=false;await this.loadResumeList();this.taskSwitch.emit({previous_task_id:this.currentTask?this.currentTask.id:undefined,current_task_id:o.id,task_title:`任务 #${o.id}`,switch_time:(new Date).toISOString()});z("切换任务成功","success")}catch(e){console.error("切换任务失败:",e);I.captureError(e,{action:"handleSwitchTask",component:"pcm-jlsx-modal",title:"切换任务失败"});y.emitError({error:e,message:"切换任务失败"})}};handleTaskHistoryPageChange=async e=>{this.taskHistoryCurrentPage=e;await this.loadHistoryTasks()};handleExportRecordsClick=()=>{this.isExportRecordsModalOpen=true};handleExportRecordsModalClose=()=>{this.isExportRecordsModalOpen=false};handleDocumentClick=e=>{const t=e.target;const o=t.closest(".action-dropdown");if(!o&&this.activeDropdownId){this.activeDropdownId=null}};emitAnalysisCompleteEvent=()=>{if(!this.currentTask)return;const e=this.resumeRecords;const t=e.filter((e=>e.evaluate_status===1&&typeof e.score==="number"));const o=e.filter((e=>e.evaluate_status===-1));const i=t.map((e=>e.score)).filter((e=>typeof e==="number"));const n=i.length>0?i.reduce(((e,t)=>e+t),0)/i.length:0;const r=i.length>0?Math.max(...i):0;this.resumeAnalysisComplete.emit({task_id:this.currentTask.id,total_resumes:e.length,analyzed_resumes:t.length,failed_resumes:o.length,average_score:Math.round(n*100)/100,highest_score:r})};handleUploadChange=e=>{if(!this.currentTask){z("请先创建任务","warning");return}const t=e.detail||[];const o=this.uploadedResumeRecords.map((e=>e.file_url||e.fileInfo?.cos_key)).filter((e=>e));const i=t.filter((e=>!o.includes(e.cos_key)));const n=t.map((e=>e.cos_key));const r=o.filter((e=>!n.includes(e)));if(i.length>0){const e=i.map((e=>{const t={id:Date.now()+Math.random().toString(),fileName:e.file_name||"未知文件",talentInfo:"等待分析...",score:undefined,scoreDetail:"等待分析...",uploadTime:new Date,fileInfo:e,task_id:this.currentTask.id,file_url:e.cos_key,evaluate_status:undefined};return t}));this.uploadedResumeRecords=[...this.uploadedResumeRecords,...e];e.forEach((e=>{this.uploadSuccess.emit(e.fileInfo)}));z(`成功上传 ${e.length} 个简历文件!`,"success")}if(r.length>0){this.uploadedResumeRecords=this.uploadedResumeRecords.filter((e=>{const t=e.file_url||e.fileInfo?.cos_key;return!r.includes(t)}))}};handleStartAnalysis=async()=>{if(await(this.pcmUploadRef?.getIsUploading?.())){z("文件上传中,请稍后","info");return}await this.startAnalysis()};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":this.currentStep==="input","task-layout":this.currentStep==="task"};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),i("span",{class:"step-indicator clickable",onClick:this.handleTaskHistoryClick,title:"点击查看任务管理"},"任务管理")),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.currentStep==="input"?this.renderInputStep():this.renderTaskStep()),i("pcm-drawer",{isOpen:this.showJdDrawer,drawerTitle:"职位描述",width:"500px",onClosed:this.closeJdDrawer},i("div",{class:"drawer-content"},i("div",{class:"drawer-text-content"},this.jobDescription))),i("pcm-drawer",{isOpen:this.showCriteriaDrawer,drawerTitle:"评分标准、重要条件",width:"500px",onClosed:this.closeCriteriaDrawer},i("div",{class:"drawer-content"},i("div",{class:"pcm-jlsx-card"},i("div",{class:"pcm-jlsx-card-header"},"评分标准"),i("div",{class:"pcm-jlsx-card-body"},this.getEvaluationCriteriaText())),i("div",{class:"pcm-jlsx-card"},i("div",{class:"pcm-jlsx-card-header"},"重要条件"),i("div",{class:"pcm-jlsx-card-body"},this.importantConditions)))),i("pcm-drawer",{isOpen:this.showPreviewDrawer,drawerTitle:this.previewTitle,width:"600px",onClosed:this.closePreviewDrawer},i("div",{class:"drawer-content"},this.previewType==="markdown"?i("div",{class:"markdown-content markdown-body",innerHTML:k(this.previewContent)}):i("div",{class:"file-preview"},i("iframe",{src:this.previewUrl,frameborder:"0",width:"100%",height:"100%",style:{border:"none",height:"calc(100vh - 120px)"}})))),i("pcm-drawer",{isOpen:this.isTaskHistoryDrawerOpen,drawerTitle:"任务管理",width:"500px",onClosed:()=>{this.isTaskHistoryDrawerOpen=false}},i("div",{class:"task-history-drawer-content"},i("div",{class:"task-list"},this.isLoadingHistoryTasks?i("div",{class:"loading-tasks"},i("div",{class:"loading-spinner-small"}),i("p",null,"加载中...")):this.historyTasks.length===0?i("div",{class:"empty-tasks"},i("p",null,"暂无历史任务")):this.historyTasks.map((e=>i("div",{key:e.id,class:{"task-item":true,active:e.id===this.currentTask?.id},onClick:()=>this.handleSwitchTask(e)},i("div",{class:"task-info"},i("div",{class:"task-header"},i("div",{class:"task-id"},e.title||`任务 #${e.id}`),i("div",{class:"task-time"},e.timeDisplay))),e.id===this.currentTask?.id&&i("div",{class:"current-task-indicator"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}))))))),this.taskHistoryTotal>this.taskHistoryPageSize&&i("div",{class:"task-pagination"},i("button",{class:"page-btn",disabled:this.taskHistoryCurrentPage===1,onClick:()=>this.handleTaskHistoryPageChange(this.taskHistoryCurrentPage-1)},"上一页"),i("span",{class:"page-info"},"第 ",this.taskHistoryCurrentPage," 页,共 ",Math.ceil(this.taskHistoryTotal/this.taskHistoryPageSize)," 页"),i("button",{class:"page-btn",disabled:this.taskHistoryCurrentPage>=Math.ceil(this.taskHistoryTotal/this.taskHistoryPageSize),onClick:()=>this.handleTaskHistoryPageChange(this.taskHistoryCurrentPage+1)},"下一页")))),i("pcm-export-records-modal",{open:this.isExportRecordsModalOpen,botId:this.botId,sourceId:this.currentTask?.id?.toString(),onCancel:this.handleExportRecordsModalClose}))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Oi.style=Bi+(Di+(Ri+Ai));const Li=".resume-type-container{display:flex;flex-direction:row;gap:32px;margin-bottom:16px;border-bottom:2px solid #f0f0f0;padding-left:4px}.resume-type-item{cursor:pointer;font-size:16px;color:#333;padding:0 0 8px 0;position:relative;background:none;border:none;outline:none;font-weight:400;transition:color 0.2s}.resume-type-item.selected{color:#2563eb;font-weight:600}.resume-type-item.selected::after{content:'';display:block;position:absolute;left:0;bottom:-2px;width:100%;height:2px;background:#2563eb;border-radius:2px}.chat-content{background-color:#f7f9fc;border:1px solid #e0e6f1;border-radius:8px;padding:16px;display:flex;align-items:center;gap:16px}.chat-content-icon{font-size:24px;flex-shrink:0}.chat-content-text{font-size:14px;color:#595959;line-height:1.6}.resume-type-item:not(.selected):hover{color:#2563eb}.iframe-container{width:100%;height:85vh}.iframe-container iframe{width:100%;height:100%}.optimizing-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.35);z-index:2000;display:flex;align-items:center;justify-content:center}.optimizing-modal-content{background:#fff;border-radius:8px;padding:32px 40px;box-shadow:0 4px 24px rgba(0, 0, 0, 0.12);display:flex;flex-direction:column;align-items:center}.optimizing-modal-content .loading-spinner{width:40px;height:40px;border:4px solid #e0e0e0;border-top:4px solid #2563eb;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:16px}.converstation-list{height:600px;overflow:auto}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-item.active{background:#e6f7ff;border-color:#1890ff}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.optimizing-modal-content .loading-text{font-size:18px;color:#222;font-weight:500;margin:0}";const Hi='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const Ui=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const qi=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent");this.getResumeData=t(this,"getResumeData")}modalTitle="简历制作";token;isOpen=false;isSuccess=false;hideExportButton=false;exportButtonText="导出简历json数据";modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="根据对话生成简历";fullscreen=false;customInputs={};uploadSuccess;streamComplete;conversationStart;tokenInvalid;someErrorEvent;getResumeData;filePreviewMode="window";mobileUploadAble=false;initialResumeText;type;introduction_prompt;showHistory=true;isUploading=false;uploadedFileInfo=null;showChatModal=false;resumeType="chat";resumeText="";get hostElement(){return o(this)}isSubmitting=false;showIframe=false;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;tokenInvalidListener;removeErrorListener;pcmUploadRef;_iframeEl;handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}async handleIsOpenChange(e){if(!e){this.showChatModal=false;this.showIframe=false;this.isSuccess=false;this.conversationId=undefined;this.resumeType="chat";this.resumeText=""}else{await r(this.token);if(this.type==="chat"){this.resumeType="chat";setTimeout((()=>{this.handleStartInterview()}),100)}else if(this.type==="file"||this.type==="upload"){this.resumeType="upload"}else if(this.type==="paste"){this.resumeType="paste"}if(this.initialResumeText&&this.initialResumeText.trim()){this.resumeType="paste";this.resumeText=this.initialResumeText;setTimeout((()=>{this.handleStartInterview()}),100)}}}handleIsSuccessChange(e){if(e&&this.resumeType!=="chat"){this.showIframe=true}}handleStreamComplete=e=>{this.conversationId=e.detail.conversation_id;if(this.resumeType!=="chat"){this.showIframe=true;this.isSuccess=true}};componentWillLoad(){if(this.zIndex){a.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}r(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=y.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}componentDidLoad(){window.addEventListener("message",this.handleIframeMessage)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}window.removeEventListener("message",this.handleIframeMessage)}handleIframeLoad=()=>{};handleIframeMessage=e=>{const t=["http://localhost:3000",f];if(!t.includes(e.origin))return;const{type:o,value:i}=e.data||{};if(o==="callParentMethod"){this.exampleMethodFromIframe(i)}if(o==="iframeReady"&&this._iframeEl?.contentWindow){const e=new URL(this._iframeEl.src).origin;this._iframeEl.contentWindow.postMessage({type:"parentReady",origin:window.location.origin},e);this._iframeEl.contentWindow.postMessage({type:"setToken",token:this.token},e);this._iframeEl.contentWindow.postMessage({type:"buttonConfig",config:{hideExportButton:this.hideExportButton,exportButtonText:this.exportButtonText}},e)}};exampleMethodFromIframe(e){this.getResumeData.emit(JSON.parse(e))}handleClose=()=>{this.modalClosed.emit()};changeType=e=>{this.resumeType=e};handleResumeTextChange=e=>{const t=e.target;this.resumeText=t.value};async loadHistoryConversations(){this.isLoadingConversations=true;try{const e=await d({url:"/sdk/v1/chat/conversations",method:"GET",data:{bot_id:"39284520284983296",limit:50,page:1}});if(e.success&&e.data){const t=e.data.data||[];this.historyConversations=t.map((e=>{let t;let o="未知时间";try{const i=typeof e.created_at==="string"?parseInt(e.created_at):e.created_at;if(isNaN(i)||i<=0){console.warn("无效的时间戳:",e.created_at);t=new Date}else{t=new Date(i*1e3)}if(isNaN(t.getTime())){console.warn("无效的日期对象:",e.created_at);t=new Date}const n=new Date;const r=n.getTime()-t.getTime();const a=Math.floor(r/(1e3*60*60*24));if(a===0){o=`今天 ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else if(a===1){o=`昨天 ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else if(a>0&&a<7){const e=["周日","周一","周二","周三","周四","周五","周六"];o=`${e[t.getDay()]} ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else if(a<0){o=`${(t.getMonth()+1).toString().padStart(2,"0")}-${t.getDate().toString().padStart(2,"0")} ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else{o=`${(t.getMonth()+1).toString().padStart(2,"0")}-${t.getDate().toString().padStart(2,"0")} ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}}catch(t){console.error("时间格式化错误:",t,e.created_at);o="时间解析失败"}return{id:e.id,name:e.name||"新会话",created_at:e.created_at,updated_at:e.updated_at,status:e.status,message_count:e.message_count||0,timeDisplay:o}}))}}catch(e){console.error("获取历史会话失败:",e);I.captureError(e,{action:"loadHistoryConversations",component:"pcm-app-chat-modal",title:"获取历史会话失败"});y.emitError({error:e,message:"获取历史会话失败"})}finally{this.isLoadingConversations=false}}handleStartInterview=async()=>{if(this.resumeType==="upload"&&!this.uploadedFileInfo){S.info("请上传简历");return}if(this.resumeType==="paste"&&!this.resumeText.trim()){S.info("请粘贴简历文本");return}if(this.resumeType==="upload"&&await(this.pcmUploadRef?.getIsUploading?.())){S.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};closeResumeChat=()=>{this.isSuccess=false;this.resumeType="upload"};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":!this.isSuccess};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=Boolean(this.customInputs&&this.customInputs.file_url);const r=Boolean(this.customInputs?.file_url&&this.customInputs?.job_info);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&!this.showChatModal&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!r&&!this.showIframe&&i("div",{class:"input-container"},i("div",{class:"resume-type-container"},i("div",{class:{"resume-type-item":true,selected:this.resumeType==="chat"},onClick:()=>this.changeType("chat")},"直接开始"),i("div",{class:{"resume-type-item":true,selected:this.resumeType==="upload"},onClick:()=>this.changeType("upload")},"上传简历"),i("div",{class:{"resume-type-item":true,selected:this.resumeType==="paste"},onClick:()=>this.changeType("paste")},"粘贴简历"),this.showHistory&&i("div",{class:{"resume-type-item":true,selected:this.resumeType==="history"},onClick:()=>{this.changeType("history");this.loadHistoryConversations()}},"历史对话")),!n&&this.resumeType==="upload"&&i("div",{class:"resume-upload-section"},i("label",null,"上传简历"),i("pcm-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),this.resumeType==="paste"&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"请粘贴简历文本"),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请粘贴简历文本...",rows:6,value:this.resumeText,onInput:this.handleResumeTextChange})),this.resumeType==="chat"&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"从头开始创建"),i("div",{class:"chat-content"},i("div",{class:"chat-content-text"},"🤖无需复杂操作,只需回答AI的几个简单问题,系统会根据你的回答自动生成内容完整、格式专业的个人简历"))),this.resumeType==="history"?i("div",{class:"converstation-list"},this.historyConversations.map((e=>i("div",{key:e.id,class:{"conversation-item":true,active:e.id===this.conversationId},onClick:()=>{this.conversationId=e.id;this.isSuccess=true;this.showChatModal=true;this.showIframe=true}},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},e.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},e.timeDisplay),e.message_count>0&&i("span",{class:"message-count"},e.message_count,"条消息"),e.status&&i("span",{class:{"conversation-status":true,completed:e.status==="结束",running:e.status==="进行中"}},e.status))),e.id===this.conversationId&&i("div",{class:"current-indicator"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}))))))):i("button",{class:"submit-button",disabled:this.resumeType==="upload"&&!n&&!this.uploadedFileInfo||this.resumeType==="paste"&&!this.resumeText.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":["upload","paste"].includes(this.resumeType)?"开始制作":"开始对话"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),this.showChatModal&&i(i.Fragment,null,i("div",{style:{display:this.resumeType==="chat"?"block":"none"}},i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:false,botId:"39284520284983296",conversationId:this.conversationId,defaultQuery:this.resumeType==="paste"?this.resumeText:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.resumeType==="upload"?this.customInputs.file_url||this.uploadedFileInfo?.cos_key:"",mode_type:this.resumeType==="chat"?1:0,introduction_prompt:this.introduction_prompt},interviewMode:"text",closeResume:this.closeResumeChat,onStreamComplete:this.handleStreamComplete})),this.resumeType!=="chat"&&!this.showIframe&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"AI正在优化您的简历...")),this.showIframe&&i(i.Fragment,null,i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),i("div",{class:"iframe-container"},i("iframe",{ref:e=>this._iframeEl=e,src:`${f}/myresume?conversation_id=${this.conversationId}&isSdk=true`,frameborder:"0",onLoad:this.handleIframeLoad}))))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"],isSuccess:["handleIsSuccessChange"]}}};qi.style=Li+(Hi+Ui);const Pi=".pcm-message{position:fixed;top:20px;left:50%;transform:translateX(-50%) translateY(-100%);background-color:#fff;padding:10px 16px;border-radius:4px;box-shadow:0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);pointer-events:all;z-index:1010;opacity:0;transition:all 0.3s}.pcm-message-visible{transform:translateX(-50%) translateY(0);opacity:1}.pcm-message-content{display:flex;align-items:center}.pcm-message-icon{margin-right:8px;font-size:16px;line-height:1}.pcm-message-success .pcm-message-icon{color:#52c41a}.pcm-message-error .pcm-message-icon{color:#ff4d4f}.pcm-message-warning .pcm-message-icon{color:#faad14}.pcm-message-info .pcm-message-icon{color:#1890ff}.pcm-message-text{font-size:14px;line-height:1.5}.pcm-message-container{position:fixed;top:20px;left:0;width:100%;display:flex;flex-direction:column;align-items:center;pointer-events:none;z-index:1010}";const $i=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Ni=class{constructor(t){e(this,t)}get el(){return o(this)}content="";type="info";duration=3e3;visible=false;timer;componentWillLoad(){if(this.content){this.visible=true}}componentDidLoad(){if(this.visible&&this.duration>0){this.timer=window.setTimeout((()=>{this.close()}),this.duration)}}disconnectedCallback(){if(this.timer){clearTimeout(this.timer)}}async show(){this.visible=true;if(this.duration>0){this.timer=window.setTimeout((()=>{this.close()}),this.duration)}}async close(){this.visible=false;setTimeout((()=>{if(this.el&&this.el.parentNode){this.el.parentNode.removeChild(this.el)}}),300)}render(){return i("div",{key:"6dae832a791465cb5b965f9d5b984a45a6af0dc3",class:{"pcm-message":true,"pcm-message-visible":this.visible,[`pcm-message-${this.type}`]:true}},i("div",{key:"30717a23797ea0c287bbffc37b4a126e40639264",class:"pcm-message-content"},i("span",{key:"bcc4fa1987a4709cec74175434627f3c482f6de1",class:"pcm-message-icon"},this.renderIcon()),i("span",{key:"42021e8bcdb80173e1ad1845ef6e64233bc6749c",class:"pcm-message-text"},this.content)))}renderIcon(){switch(this.type){case"success":return i("svg",{viewBox:"64 64 896 896",width:"16px",height:"16px",fill:"currentColor"},i("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}));case"error":return i("svg",{viewBox:"64 64 896 896",width:"16px",height:"16px",fill:"currentColor"},i("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}));case"warning":return i("svg",{viewBox:"64 64 896 896",width:"16px",height:"16px",fill:"currentColor"},i("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}));default:return i("svg",{viewBox:"64 64 896 896",width:"16px",height:"16px",fill:"currentColor"},i("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 664c-30.9 0-56-25.1-56-56 0-30.9 25.1-56 56-56s56 25.1 56 56c0 30.9-25.1 56-56 56zm32-296c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V248c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184z"}))}}};Ni.style=Pi+$i;const Vi="面试出题大师";const Wi="请输入职位描述 (JD)";const Ji="请输入职位描述,包括职责、要求等信息...";const Qi="上传简历";const Gi="点击上传简历";const Xi="支持 txt、markdown、pdf、docx、doc、md 格式";const Yi="面试题数量:";const Ki="题";const Zi="是否需要参考答案:";const en="开启";const tn="关闭";const on="开始分析";const nn="上传中...";const rn="处理中...";const an="所有内容均由AI生成仅供参考";const sn="中央网信办生成式人工智能服务备案号";const ln="Hunan-PinCaiMao-202412310003";const dn="正在加载对话...";const cn={uploadResume:"请上传简历",enterJobDescription:"请输入职位描述"};const pn={uploadFailed:"文件上传失败,请重试",startInterviewFailed:"开始面试时出错,请重试"};var hn={modalTitle:Vi,jobDescriptionLabel:Wi,jobDescriptionPlaceholder:Ji,resumeUploadLabel:Qi,uploadPlaceholder:Gi,uploadHint:Xi,questionNumberLabel:Yi,questionUnit:Ki,analysisToggleLabel:Zi,toggleOn:en,toggleOff:tn,startAnalysis:on,uploading:nn,processing:rn,aiDisclaimer:an,beianLabel:sn,beianNumber:ln,loadingConversation:dn,alerts:cn,errors:pn};const un="Interview Question Master";const mn="Please enter job description (JD)";const gn="Please enter job description, including responsibilities, requirements, etc...";const fn="Upload Resume";const bn="Click to upload resume";const xn="Supports txt, markdown, pdf, docx, doc, md formats";const wn="Number of Interview Questions:";const yn="questions";const kn="Reference answers required:";const vn="On";const Cn="Off";const zn="Start Analysis";const In="Uploading...";const Sn="Processing...";const jn="All content is AI-generated and for reference only";const _n="Cyberspace Administration of China Generative AI Service Registration Number";const Tn="Hunan-PinCaiMao-202412310003";const Fn="Loading conversation...";const En={uploadResume:"Please upload resume",enterJobDescription:"Please enter job description"};const Mn={uploadFailed:"File upload failed, please try again",startInterviewFailed:"Failed to start interview, please try again"};var Bn={modalTitle:un,jobDescriptionLabel:mn,jobDescriptionPlaceholder:gn,resumeUploadLabel:fn,uploadPlaceholder:bn,uploadHint:xn,questionNumberLabel:wn,questionUnit:yn,analysisToggleLabel:kn,toggleOn:vn,toggleOff:Cn,startAnalysis:zn,uploading:In,processing:Sn,aiDisclaimer:jn,beianLabel:_n,beianNumber:Tn,loadingConversation:Fn,alerts:En,errors:Mn};const Dn="";const Rn='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const An=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const On=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent")}modalTitle="面试出题大师";locale="zh";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始出题";fullscreen=false;customInputs={};showWorkspaceHistory=false;questionNumber=6;canOutputAnalysis=true;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="window";selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return o(this)}strings;jobDescription="";isSubmitting=false;getBotId(){const e=this.locale||this.hostElement?.lang||"zh";const t={zh:"3022316191018876",en:"8164755731671041"};return t[e]||t["zh"]}tokenInvalidListener;removeErrorListener;handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}async handleIsOpenChange(e){if(!e){this.clearSelectedFile();this.showChatModal=false;this.jobDescription=""}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await r(this.token);if(this.conversationId||this.customInputs?.file_url&&this.customInputs?.job_info){this.showChatModal=true}}}async componentWillLoad(){this.strings=this.locale==="en"?Bn:hn;if(this.zIndex){a.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}r(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=y.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};handleFileChange=e=>{const t=e.target;if(t.files&&t.files.length>0){this.selectedFile=t.files[0]}};handleUploadClick=()=>{const e=this.hostElement.shadowRoot?.querySelector(".file-input");e?.click()};clearSelectedFile=()=>{this.selectedFile=null;this.uploadedFileInfo=null;const e=this.hostElement.shadowRoot?.querySelector(".file-input");if(e){e.value=""}};async uploadFile(){if(!this.selectedFile)return;this.isUploading=true;try{const e=await p(this.selectedFile,{},{tags:["resume"]});this.uploadedFileInfo=e;this.uploadSuccess.emit(e)}catch(e){console.error("文件上传错误:",e);this.clearSelectedFile();I.captureError(e,{action:"uploadFile",component:"pcm-mnct-modal",title:"文件上传失败"});y.emitError({error:e,message:this.strings.errors.uploadFailed})}finally{this.isUploading=false}}handleJobDescriptionChange=e=>{const t=e.target;this.jobDescription=t.value};handleQuestionNumberChange=e=>{const t=e.target;const o=parseInt(t.value);this.questionNumber=o>=3&&o<=20?o:6};handleAnalysisToggle=e=>{const t=e.target;this.canOutputAnalysis=t.checked};handleStartInterview=async()=>{if(!this.selectedFile){alert(this.strings.alerts.uploadResume);return}if(!this.customInputs?.job_info&&!this.jobDescription.trim()){alert(this.strings.alerts.enterJobDescription);return}this.isSubmitting=true;try{if(!this.uploadedFileInfo){await this.uploadFile();if(!this.uploadedFileInfo){this.isSubmitting=false;return}}this.showChatModal=true}catch(e){console.error("开始面试时出错:",e);I.captureError(e,{action:"handleStartInterview",component:"pcm-mnct-modal",title:"开始面试时出错"});y.emitError({error:e,message:this.strings.errors.startInterviewFailed})}finally{this.isSubmitting=false}};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.job_info);const a=Boolean(this.customInputs&&this.customInputs.file_url);const s=Boolean(this.customInputs?.file_url&&this.customInputs?.job_info);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!s&&i("div",{class:"input-container"},!r&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},this.strings.jobDescriptionLabel),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:this.strings.jobDescriptionPlaceholder,rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&i("div",{class:"resume-upload-section"},i("label",null,this.strings.resumeUploadLabel),i("div",{class:"upload-area",onClick:this.handleUploadClick},this.selectedFile?i("div",{class:"file-item"},i("div",{class:"file-item-content"},i("span",{class:"file-icon"},"📝"),i("span",{class:"file-name"},this.selectedFile.name)),i("button",{class:"remove-file",onClick:e=>{e.stopPropagation();this.clearSelectedFile()}},"×")):i("div",{class:"upload-placeholder"},i("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_upload.png"}),i("p",{class:"upload-text"},this.strings.uploadPlaceholder),i("p",{class:"upload-hint"},this.strings.uploadHint)))),i("div",{class:"interview-settings-section"},i("div",{class:"settings-row"},i("div",{class:"question-number-section"},i("label",{class:"settings-label"},this.strings.questionNumberLabel),i("div",{class:"slider-container"},i("input",{type:"range",min:"3",max:"20",value:this.questionNumber,class:"question-slider",onInput:this.handleQuestionNumberChange}),i("div",{class:"slider-value"},this.questionNumber,this.strings.questionUnit)))),i("div",{class:"settings-row"},i("div",{class:"analysis-toggle-section"},i("label",{class:"settings-label"},this.strings.analysisToggleLabel),i("div",{class:"toggle-container"},i("label",{class:"toggle-switch"},i("input",{type:"checkbox",checked:this.canOutputAnalysis,onChange:this.handleAnalysisToggle}),i("span",{class:"toggle-slider"})),i("span",{class:"toggle-text"},this.canOutputAnalysis?this.strings.toggleOn:this.strings.toggleOff))))),i("button",{class:"submit-button",disabled:!a&&!this.selectedFile||!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?this.strings.uploading:this.isSubmitting?this.strings.processing:this.strings.startAnalysis),i("div",{class:"ai-disclaimer"},i("p",null,this.strings.aiDisclaimer),i("p",{class:"beian-info"},i("span",null,this.strings.beianLabel),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},this.strings.beianNumber))),i("input",{type:"file",class:"file-input",onChange:this.handleFileChange})),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},this.strings.loadingConversation)),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{locale:this.locale,isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:this.getBotId(),conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,question_number:this.questionNumber,can_outputAnalysis:this.canOutputAnalysis?"true":"false"},interviewMode:"text"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};On.style=Dn+(Rn+An);const Ln="";const Hn='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const Un=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const qn=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent");this.recordingError=t(this,"recordingError")}modalTitle="模拟面试";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始模拟面试";maxRecordingTime=120;waitingTime=10;fullscreen=false;customInputs={};showWorkspaceHistory=false;mobileJdInputAble=false;mobileUploadAble=false;digitalId;openingIndex=0;enableVirtualHuman=false;showEndInterviewButton=false;playbackRate=1;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;interviewMode="text";recordingError;showCopyButton=true;showFeedbackButtons=true;selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return o(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;virtualChatModalRef=null;handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}async handleIsOpenChange(e){if(!e){if(this.virtualChatModalRef){await this.virtualChatModalRef.setComponentActive(false)}this.resetState()}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await r(this.token);if((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info||this.conversationId){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){a.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}r(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=y.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}resetState(){this.showChatModal=false;this.jobDescription="";this.isSubmitting=false;this.selectedFile=null;this.isUploading=false;this.uploadedFileInfo=null}handleClose=()=>{this.modalClosed.emit()};handleJobDescriptionChange=e=>{const t=e.target;this.jobDescription=t.value};handleStartInterview=async()=>{if(!this.customInputs?.job_info&&!this.jobDescription.trim()){alert("请输入职位描述");return}if(await(this.pcmUploadRef?.getIsUploading?.())){S.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true};pcmUploadRef;render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.job_info);const a=Boolean(this.customInputs&&(this.customInputs.file_url||this.customInputs.resume_content));const s=Boolean((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!s&&i("div",{class:"input-container"},!r&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),!!this.mobileJdInputAble&&i("pcm-mobile-input-btn",{name:"职位描述",onOk:e=>{this.jobDescription=e.detail}}),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&i("div",{class:"jd-input-section"},i("label",null,"上传简历(选填)"),i("pcm-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),i("button",{class:"submit-button",disabled:!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始面试"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,this.enableVirtualHuman&&this.digitalId?i("pcm-virtual-chat-modal",{ref:e=>this.virtualChatModalRef=e,isOpen:true,fullscreen:this.fullscreen,botId:"3022316191018884",digitalId:this.digitalId,openingIndex:this.openingIndex,conversationId:this.conversationId,defaultQuery:this.defaultQuery,waitingTime:this.waitingTime,playbackRate:this.playbackRate,showEndInterviewButton:this.showEndInterviewButton,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,question_number:this.customInputs?.question_number||5,ai_interview_type:this.digitalId}}):i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isShowHeader,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:"3022316191018884",digitalId:this.digitalId,conversationId:this.conversationId,defaultQuery:this.defaultQuery,maxRecordingTime:this.maxRecordingTime,waitingTime:this.waitingTime,playbackRate:this.playbackRate,showCopyButton:this.showCopyButton,showFeedbackButtons:this.showFeedbackButtons,showEndInterviewButton:this.showEndInterviewButton,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,question_number:this.customInputs?.question_number||5},interviewMode:this.interviewMode}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};qn.style=Ln+(Hn+Un);const Pn="";const $n='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const Nn=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Vn=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent");this.recordingError=t(this,"recordingError")}modalTitle="模拟面试";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始模拟面试";maxRecordingTime=120;waitingTime=10;fullscreen=false;customInputs={};showWorkspaceHistory=false;mobileJdInputAble=false;mobileUploadAble=false;digitalId;openingIndex=0;enableVirtualHuman=false;showEndInterviewButton=false;playbackRate=1;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;interviewMode="text";recordingError;showCopyButton=true;showFeedbackButtons=true;selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return o(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;virtualChatModalRef=null;handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}async handleIsOpenChange(e){if(!e){if(this.virtualChatModalRef){await this.virtualChatModalRef.setComponentActive(false)}this.resetState()}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await r(this.token);if((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info||this.conversationId){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){a.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}r(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=y.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}resetState(){this.showChatModal=false;this.jobDescription="";this.isSubmitting=false;this.selectedFile=null;this.isUploading=false;this.uploadedFileInfo=null}handleClose=()=>{this.modalClosed.emit()};handleJobDescriptionChange=e=>{const t=e.target;this.jobDescription=t.value};handleStartInterview=async()=>{if(!this.customInputs?.job_info&&!this.jobDescription.trim()){alert("请输入职位描述");return}if(await(this.pcmUploadRef?.getIsUploading?.())){S.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true};pcmUploadRef;render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.job_info);const a=Boolean(this.customInputs&&(this.customInputs.file_url||this.customInputs.resume_content));const s=Boolean((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!s&&i("div",{class:"input-container"},!r&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),!!this.mobileJdInputAble&&i("pcm-mobile-input-btn",{name:"职位描述",onOk:e=>{this.jobDescription=e.detail}}),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&i("div",{class:"jd-input-section"},i("label",null,"上传简历(选填)"),i("pcm-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),i("button",{class:"submit-button",disabled:!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始面试"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,this.enableVirtualHuman&&this.digitalId?i("pcm-virtual-chat-modal",{ref:e=>this.virtualChatModalRef=e,isOpen:true,fullscreen:this.fullscreen,botId:"3022316191018907",digitalId:this.digitalId,openingIndex:this.openingIndex,conversationId:this.conversationId,defaultQuery:this.defaultQuery,waitingTime:this.waitingTime,playbackRate:this.playbackRate,showEndInterviewButton:this.showEndInterviewButton,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,question_number:this.customInputs?.question_number||5,ai_interview_type:this.digitalId}}):i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isShowHeader,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:"3022316191018907",digitalId:this.digitalId,conversationId:this.conversationId,defaultQuery:this.defaultQuery,maxRecordingTime:this.maxRecordingTime,waitingTime:this.waitingTime,playbackRate:this.playbackRate,showCopyButton:this.showCopyButton,showFeedbackButtons:this.showFeedbackButtons,showEndInterviewButton:this.showEndInterviewButton,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,question_number:this.customInputs?.question_number||5},interviewMode:this.interviewMode}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Vn.style=Pn+($n+Nn);
8
+ /**
9
+ * @module QRCode
10
+ * @package @nuintun/qrcode
11
+ * @license MIT
12
+ * @version 5.0.2
13
+ * @author nuintun <nuintun@qq.com>
14
+ * @description A pure JavaScript QRCode encode and decode library.
15
+ * @see https://github.com/nuintun/qrcode#readme
16
+ */const Wn=new Map;class Jn{#e;#t;static CP437=new Jn("cp437",2,0);static ISO_8859_1=new Jn("iso-8859-1",3,1);static ISO_8859_2=new Jn("iso-8859-2",4);static ISO_8859_3=new Jn("iso-8859-3",5);static ISO_8859_4=new Jn("iso-8859-4",6);static ISO_8859_5=new Jn("iso-8859-5",7);static ISO_8859_6=new Jn("iso-8859-6",8);static ISO_8859_7=new Jn("iso-8859-7",9);static ISO_8859_8=new Jn("iso-8859-8",10);static ISO_8859_9=new Jn("iso-8859-9",11);static ISO_8859_10=new Jn("iso-8859-10",12);static ISO_8859_11=new Jn("iso-8859-11",13);static ISO_8859_13=new Jn("iso-8859-13",15);static ISO_8859_14=new Jn("iso-8859-14",16);static ISO_8859_15=new Jn("iso-8859-15",17);static ISO_8859_16=new Jn("iso-8859-16",18);static SHIFT_JIS=new Jn("shift-jis",20);static CP1250=new Jn("cp1250",21);static CP1251=new Jn("cp1251",22);static CP1252=new Jn("cp1252",23);static CP1256=new Jn("cp1256",24);static UTF_16BE=new Jn("utf-16be",25);static UTF_8=new Jn("utf-8",26);static ASCII=new Jn("ascii",27);static BIG5=new Jn("big5",28);static GB2312=new Jn("gb2312",29);static EUC_KR=new Jn("euc-kr",30);static GBK=new Jn("gbk",31);static GB18030=new Jn("gb18030",32);static UTF_16LE=new Jn("utf-16le",33);static UTF_32BE=new Jn("utf-32be",34);static UTF_32LE=new Jn("utf-32le",35);static ISO_646_INV=new Jn("iso-646-inv",170);static BINARY=new Jn("binary",899);constructor(e,...t){this.#e=e;this.#t=Object.freeze(t);for(const e of t){if(e>=0&&e<=999999&&Number.isInteger(e)){Wn.set(e,this)}else{throw new Error("illegal extended channel interpretation value")}}}get label(){return this.#e}get values(){return this.#t}}
17
+ /**
18
+ * @module QRCode
19
+ * @package @nuintun/qrcode
20
+ * @license MIT
21
+ * @version 5.0.2
22
+ * @author nuintun <nuintun@qq.com>
23
+ * @description A pure JavaScript QRCode encode and decode library.
24
+ * @see https://github.com/nuintun/qrcode#readme
25
+ */function Qn(e){return e&1}function Gn(e){return e|0}function Xn(e){return 1<<Yn(e)}function Yn(e){return e&31}function Kn(e){return 32-Math.clz32(e)}function Zn(e,t){const o=Kn(t);e<<=o-1;while(Kn(e)>=o){e^=t<<Kn(e)-o}return e}
26
+ /**
27
+ * @module QRCode
28
+ * @package @nuintun/qrcode
29
+ * @license MIT
30
+ * @version 5.0.2
31
+ * @author nuintun <nuintun@qq.com>
32
+ * @description A pure JavaScript QRCode encode and decode library.
33
+ * @see https://github.com/nuintun/qrcode#readme
34
+ */const er=new Map;class tr{#o;#i;static TERMINATOR=new tr([0,0,0],0);static NUMERIC=new tr([10,12,14],1);static ALPHANUMERIC=new tr([9,11,13],2);static STRUCTURED_APPEND=new tr([0,0,0],3);static BYTE=new tr([8,16,16],4);static ECI=new tr([0,0,0],7);static KANJI=new tr([8,10,12],8);static FNC1_FIRST_POSITION=new tr([0,0,0],5);static FNC1_SECOND_POSITION=new tr([0,0,0],9);static HANZI=new tr([8,10,12],13);constructor(e,t){this.#o=t;this.#i=new Int32Array(e);er.set(t,this)}get bits(){return this.#o}getCharacterCountBits({version:e}){let t;if(e<=9){t=0}else if(e<=26){t=1}else{t=2}return this.#i[t]}}
35
+ /**
36
+ * @module QRCode
37
+ * @package @nuintun/qrcode
38
+ * @license MIT
39
+ * @version 5.0.2
40
+ * @author nuintun <nuintun@qq.com>
41
+ * @description A pure JavaScript QRCode encode and decode library.
42
+ * @see https://github.com/nuintun/qrcode#readme
43
+ */const or=3;const ir=3;const nr=40;const rr=10;function ar(e,t,o){return e.get(t,o)===1}function sr(e,t){let o=0;const{size:i}=e;for(let n=0;n<i;n++){let r=-1;let a=0;for(let s=0;s<i;s++){const i=t?e.get(n,s):e.get(s,n);if(i===r){a++}else{if(a>=5){o+=or+(a-5)}r=i;a=1}}if(a>=5){o+=or+(a-5)}}return o}function lr(e){return sr(e)+sr(e,true)}function dr(e){let t=0;const o=e.size-1;for(let i=0;i<o;i++){for(let n=0;n<o;n++){const o=e.get(n,i);if(o===e.get(n+1,i)&&o===e.get(n,i+1)&&o===e.get(n+1,i+1)){t+=ir}}}return t}function cr(e,t,o,i,n){if(o<0||i>e.size){return false}for(let r=o;r<i;r++){if(n?ar(e,t,r):ar(e,r,t)){return false}}return true}function pr(e){let t=0;const{size:o}=e;for(let i=0;i<o;i++){for(let n=0;n<o;n++){if(n+6<o&&ar(e,n,i)&&!ar(e,n+1,i)&&ar(e,n+2,i)&&ar(e,n+3,i)&&ar(e,n+4,i)&&!ar(e,n+5,i)&&ar(e,n+6,i)&&(cr(e,i,n-4,n)||cr(e,i,n+7,n+11))){t++}if(i+6<o&&ar(e,n,i)&&!ar(e,n,i+1)&&ar(e,n,i+2)&&ar(e,n,i+3)&&ar(e,n,i+4)&&!ar(e,n,i+5)&&ar(e,n,i+6)&&(cr(e,n,i-4,i,true)||cr(e,n,i+7,i+11,true))){t++}}}return t*nr}function hr(e){let t=0;const{size:o}=e;for(let i=0;i<o;i++){for(let n=0;n<o;n++){if(ar(e,n,i)){t++}}}const i=o*o;const n=Gn(Math.abs(t*2-i)*10/i);return n*rr}function ur(e){return lr(e)+dr(e)+pr(e)+hr(e)}function mr(e,t,o){let i;let n;switch(e){case 0:n=o+t&1;break;case 1:n=o&1;break;case 2:n=t%3;break;case 3:n=(o+t)%3;break;case 4:n=Gn(o/2)+Gn(t/3)&1;break;case 5:i=o*t;n=(i&1)+i%3;break;case 6:i=o*t;n=(i&1)+i%3&1;break;case 7:n=o*t%3+(o+t&1)&1;break;default:throw new Error(`illegal mask: ${e}`)}return n===0}
44
+ /**
45
+ * @module QRCode
46
+ * @package @nuintun/qrcode
47
+ * @license MIT
48
+ * @version 5.0.2
49
+ * @author nuintun <nuintun@qq.com>
50
+ * @description A pure JavaScript QRCode encode and decode library.
51
+ * @see https://github.com/nuintun/qrcode#readme
52
+ */const gr=new Map;class fr{#n;#o;#r;static L=new fr("L",0,1);static M=new fr("M",1,0);static Q=new fr("Q",2,3);static H=new fr("H",3,2);constructor(e,t,o){this.#o=o;this.#n=e;this.#r=t;gr.set(o,this)}get bits(){return this.#o}get name(){return this.#n}get level(){return this.#r}}
53
+ /**
54
+ * @module QRCode
55
+ * @package @nuintun/qrcode
56
+ * @license MIT
57
+ * @version 5.0.2
58
+ * @author nuintun <nuintun@qq.com>
59
+ * @description A pure JavaScript QRCode encode and decode library.
60
+ * @see https://github.com/nuintun/qrcode#readme
61
+ */class br{#a;#s;constructor(e,t){this.#a=e;this.#s=t}get count(){return this.#a}get numDataCodewords(){return this.#s}}
62
+ /**
63
+ * @module QRCode
64
+ * @package @nuintun/qrcode
65
+ * @license MIT
66
+ * @version 5.0.2
67
+ * @author nuintun <nuintun@qq.com>
68
+ * @description A pure JavaScript QRCode encode and decode library.
69
+ * @see https://github.com/nuintun/qrcode#readme
70
+ */class xr{#l;#d;#c;#p;#h;constructor(e,...t){let o=0;let i=0;for(const{count:e,numDataCodewords:n}of t){o+=e;i+=n*e}const n=e*o;this.#l=t;this.#c=n;this.#p=i;this.#h=e;this.#d=i+n}get ecBlocks(){return this.#l}get numTotalCodewords(){return this.#d}get numTotalECCodewords(){return this.#c}get numTotalDataCodewords(){return this.#p}get numECCodewordsPerBlock(){return this.#h}}
71
+ /**
72
+ * @module QRCode
73
+ * @package @nuintun/qrcode
74
+ * @license MIT
75
+ * @version 5.0.2
76
+ * @author nuintun <nuintun@qq.com>
77
+ * @description A pure JavaScript QRCode encode and decode library.
78
+ * @see https://github.com/nuintun/qrcode#readme
79
+ */class wr{#u;#m;#l;#g;constructor(e,t,...o){this.#m=e;this.#l=o;this.#u=17+4*e;this.#g=t}get size(){return this.#u}get version(){return this.#m}get alignmentPatterns(){return this.#g}getECBlocks({level:e}){return this.#l[e]}}const yr=[new wr(1,[],new xr(7,new br(1,19)),new xr(10,new br(1,16)),new xr(13,new br(1,13)),new xr(17,new br(1,9))),new wr(2,[6,18],new xr(10,new br(1,34)),new xr(16,new br(1,28)),new xr(22,new br(1,22)),new xr(28,new br(1,16))),new wr(3,[6,22],new xr(15,new br(1,55)),new xr(26,new br(1,44)),new xr(18,new br(2,17)),new xr(22,new br(2,13))),new wr(4,[6,26],new xr(20,new br(1,80)),new xr(18,new br(2,32)),new xr(26,new br(2,24)),new xr(16,new br(4,9))),new wr(5,[6,30],new xr(26,new br(1,108)),new xr(24,new br(2,43)),new xr(18,new br(2,15),new br(2,16)),new xr(22,new br(2,11),new br(2,12))),new wr(6,[6,34],new xr(18,new br(2,68)),new xr(16,new br(4,27)),new xr(24,new br(4,19)),new xr(28,new br(4,15))),new wr(7,[6,22,38],new xr(20,new br(2,78)),new xr(18,new br(4,31)),new xr(18,new br(2,14),new br(4,15)),new xr(26,new br(4,13),new br(1,14))),new wr(8,[6,24,42],new xr(24,new br(2,97)),new xr(22,new br(2,38),new br(2,39)),new xr(22,new br(4,18),new br(2,19)),new xr(26,new br(4,14),new br(2,15))),new wr(9,[6,26,46],new xr(30,new br(2,116)),new xr(22,new br(3,36),new br(2,37)),new xr(20,new br(4,16),new br(4,17)),new xr(24,new br(4,12),new br(4,13))),new wr(10,[6,28,50],new xr(18,new br(2,68),new br(2,69)),new xr(26,new br(4,43),new br(1,44)),new xr(24,new br(6,19),new br(2,20)),new xr(28,new br(6,15),new br(2,16))),new wr(11,[6,30,54],new xr(20,new br(4,81)),new xr(30,new br(1,50),new br(4,51)),new xr(28,new br(4,22),new br(4,23)),new xr(24,new br(3,12),new br(8,13))),new wr(12,[6,32,58],new xr(24,new br(2,92),new br(2,93)),new xr(22,new br(6,36),new br(2,37)),new xr(26,new br(4,20),new br(6,21)),new xr(28,new br(7,14),new br(4,15))),new wr(13,[6,34,62],new xr(26,new br(4,107)),new xr(22,new br(8,37),new br(1,38)),new xr(24,new br(8,20),new br(4,21)),new xr(22,new br(12,11),new br(4,12))),new wr(14,[6,26,46,66],new xr(30,new br(3,115),new br(1,116)),new xr(24,new br(4,40),new br(5,41)),new xr(20,new br(11,16),new br(5,17)),new xr(24,new br(11,12),new br(5,13))),new wr(15,[6,26,48,70],new xr(22,new br(5,87),new br(1,88)),new xr(24,new br(5,41),new br(5,42)),new xr(30,new br(5,24),new br(7,25)),new xr(24,new br(11,12),new br(7,13))),new wr(16,[6,26,50,74],new xr(24,new br(5,98),new br(1,99)),new xr(28,new br(7,45),new br(3,46)),new xr(24,new br(15,19),new br(2,20)),new xr(30,new br(3,15),new br(13,16))),new wr(17,[6,30,54,78],new xr(28,new br(1,107),new br(5,108)),new xr(28,new br(10,46),new br(1,47)),new xr(28,new br(1,22),new br(15,23)),new xr(28,new br(2,14),new br(17,15))),new wr(18,[6,30,56,82],new xr(30,new br(5,120),new br(1,121)),new xr(26,new br(9,43),new br(4,44)),new xr(28,new br(17,22),new br(1,23)),new xr(28,new br(2,14),new br(19,15))),new wr(19,[6,30,58,86],new xr(28,new br(3,113),new br(4,114)),new xr(26,new br(3,44),new br(11,45)),new xr(26,new br(17,21),new br(4,22)),new xr(26,new br(9,13),new br(16,14))),new wr(20,[6,34,62,90],new xr(28,new br(3,107),new br(5,108)),new xr(26,new br(3,41),new br(13,42)),new xr(30,new br(15,24),new br(5,25)),new xr(28,new br(15,15),new br(10,16))),new wr(21,[6,28,50,72,94],new xr(28,new br(4,116),new br(4,117)),new xr(26,new br(17,42)),new xr(28,new br(17,22),new br(6,23)),new xr(30,new br(19,16),new br(6,17))),new wr(22,[6,26,50,74,98],new xr(28,new br(2,111),new br(7,112)),new xr(28,new br(17,46)),new xr(30,new br(7,24),new br(16,25)),new xr(24,new br(34,13))),new wr(23,[6,30,54,78,102],new xr(30,new br(4,121),new br(5,122)),new xr(28,new br(4,47),new br(14,48)),new xr(30,new br(11,24),new br(14,25)),new xr(30,new br(16,15),new br(14,16))),new wr(24,[6,28,54,80,106],new xr(30,new br(6,117),new br(4,118)),new xr(28,new br(6,45),new br(14,46)),new xr(30,new br(11,24),new br(16,25)),new xr(30,new br(30,16),new br(2,17))),new wr(25,[6,32,58,84,110],new xr(26,new br(8,106),new br(4,107)),new xr(28,new br(8,47),new br(13,48)),new xr(30,new br(7,24),new br(22,25)),new xr(30,new br(22,15),new br(13,16))),new wr(26,[6,30,58,86,114],new xr(28,new br(10,114),new br(2,115)),new xr(28,new br(19,46),new br(4,47)),new xr(28,new br(28,22),new br(6,23)),new xr(30,new br(33,16),new br(4,17))),new wr(27,[6,34,62,90,118],new xr(30,new br(8,122),new br(4,123)),new xr(28,new br(22,45),new br(3,46)),new xr(30,new br(8,23),new br(26,24)),new xr(30,new br(12,15),new br(28,16))),new wr(28,[6,26,50,74,98,122],new xr(30,new br(3,117),new br(10,118)),new xr(28,new br(3,45),new br(23,46)),new xr(30,new br(4,24),new br(31,25)),new xr(30,new br(11,15),new br(31,16))),new wr(29,[6,30,54,78,102,126],new xr(30,new br(7,116),new br(7,117)),new xr(28,new br(21,45),new br(7,46)),new xr(30,new br(1,23),new br(37,24)),new xr(30,new br(19,15),new br(26,16))),new wr(30,[6,26,52,78,104,130],new xr(30,new br(5,115),new br(10,116)),new xr(28,new br(19,47),new br(10,48)),new xr(30,new br(15,24),new br(25,25)),new xr(30,new br(23,15),new br(25,16))),new wr(31,[6,30,56,82,108,134],new xr(30,new br(13,115),new br(3,116)),new xr(28,new br(2,46),new br(29,47)),new xr(30,new br(42,24),new br(1,25)),new xr(30,new br(23,15),new br(28,16))),new wr(32,[6,34,60,86,112,138],new xr(30,new br(17,115)),new xr(28,new br(10,46),new br(23,47)),new xr(30,new br(10,24),new br(35,25)),new xr(30,new br(19,15),new br(35,16))),new wr(33,[6,30,58,86,114,142],new xr(30,new br(17,115),new br(1,116)),new xr(28,new br(14,46),new br(21,47)),new xr(30,new br(29,24),new br(19,25)),new xr(30,new br(11,15),new br(46,16))),new wr(34,[6,34,62,90,118,146],new xr(30,new br(13,115),new br(6,116)),new xr(28,new br(14,46),new br(23,47)),new xr(30,new br(44,24),new br(7,25)),new xr(30,new br(59,16),new br(1,17))),new wr(35,[6,30,54,78,102,126,150],new xr(30,new br(12,121),new br(7,122)),new xr(28,new br(12,47),new br(26,48)),new xr(30,new br(39,24),new br(14,25)),new xr(30,new br(22,15),new br(41,16))),new wr(36,[6,24,50,76,102,128,154],new xr(30,new br(6,121),new br(14,122)),new xr(28,new br(6,47),new br(34,48)),new xr(30,new br(46,24),new br(10,25)),new xr(30,new br(2,15),new br(64,16))),new wr(37,[6,28,54,80,106,132,158],new xr(30,new br(17,122),new br(4,123)),new xr(28,new br(29,46),new br(14,47)),new xr(30,new br(49,24),new br(10,25)),new xr(30,new br(24,15),new br(46,16))),new wr(38,[6,32,58,84,110,136,162],new xr(30,new br(4,122),new br(18,123)),new xr(28,new br(13,46),new br(32,47)),new xr(30,new br(48,24),new br(14,25)),new xr(30,new br(42,15),new br(32,16))),new wr(39,[6,26,54,82,110,138,166],new xr(30,new br(20,117),new br(4,118)),new xr(28,new br(40,47),new br(7,48)),new xr(30,new br(43,24),new br(22,25)),new xr(30,new br(10,15),new br(67,16))),new wr(40,[6,30,58,86,114,142,170],new xr(30,new br(19,118),new br(6,119)),new xr(28,new br(18,47),new br(31,48)),new xr(30,new br(34,24),new br(34,25)),new xr(30,new br(20,15),new br(61,16)))];
80
+ /**
81
+ * @module QRCode
82
+ * @package @nuintun/qrcode
83
+ * @license MIT
84
+ * @version 5.0.2
85
+ * @author nuintun <nuintun@qq.com>
86
+ * @description A pure JavaScript QRCode encode and decode library.
87
+ * @see https://github.com/nuintun/qrcode#readme
88
+ */class kr{#f;#b;constructor(e,t){const{length:o}=t;if(o<=0){throw new Error("polynomial coefficients cannot empty")}this.#f=e;if(o>1&&t[0]===0){let e=1;while(e<o&&t[e]===0){e++}if(e===o){this.#b=new Int32Array([0])}else{const i=new Int32Array(o-e);i.set(t.subarray(e));this.#b=i}}else{this.#b=t}}get coefficients(){return this.#b}isZero(){return this.#b[0]===0}getDegree(){return this.#b.length-1}getCoefficient(e){const t=this.#b;return t[t.length-1-e]}evaluate(e){if(e===0){return this.getCoefficient(0)}let t;const o=this.#b;if(e===1){t=0;for(const e of o){t^=e}return t}[t]=o;const i=this.#f;const{length:n}=o;for(let r=1;r<n;r++){t=i.multiply(e,t)^o[r]}return t}multiply(e){const t=this.#f;const o=this.#b;const{length:i}=o;if(e instanceof kr){if(this.isZero()||e.isZero()){return t.zero}const n=e.#b;const r=n.length;const a=new Int32Array(i+r-1);for(let e=0;e<i;e++){const i=o[e];for(let o=0;o<r;o++){a[e+o]^=t.multiply(i,n[o])}}return new kr(t,a)}if(e===0){return t.zero}if(e===1){return this}const n=new Int32Array(i);for(let r=0;r<i;r++){n[r]=t.multiply(o[r],e)}return new kr(t,n)}multiplyByMonomial(e,t){const o=this.#f;if(t===0){return o.zero}const i=this.#b;const{length:n}=i;const r=new Int32Array(n+e);for(let e=0;e<n;e++){r[e]=o.multiply(i[e],t)}return new kr(o,r)}addOrSubtract(e){if(this.isZero()){return e}if(e.isZero()){return this}let t=e.#b;let o=t.length;let i=this.#b;let n=i.length;if(o<n){[o,n]=[n,o];[t,i]=[i,t]}const r=o-n;const a=new Int32Array(o);a.set(t.subarray(0,r));for(let e=r;e<o;e++){a[e]=i[e-r]^t[e]}return new kr(this.#f,a)}divide(e){const t=this.#f;let o=t.zero;let i=this;const n=e.getCoefficient(e.getDegree());const r=t.invert(n);while(i.getDegree()>=e.getDegree()&&!i.isZero()){const n=i.getDegree();const a=n-e.getDegree();const s=t.multiply(i.getCoefficient(n),r);const l=e.multiplyByMonomial(a,s);const d=t.buildPolynomial(a,s);o=o.addOrSubtract(d);i=i.addOrSubtract(l)}return[o,i]}}
89
+ /**
90
+ * @module QRCode
91
+ * @package @nuintun/qrcode
92
+ * @license MIT
93
+ * @version 5.0.2
94
+ * @author nuintun <nuintun@qq.com>
95
+ * @description A pure JavaScript QRCode encode and decode library.
96
+ * @see https://github.com/nuintun/qrcode#readme
97
+ */class vr{#u;#x;#w;#y;#k;#v;constructor(e,t,o){let i=1;const n=new Int32Array(t);for(let o=0;o<t;o++){n[o]=i;i*=2;if(i>=t){i^=e;i&=t-1}}const r=new Int32Array(t);for(let e=0,o=t-1;e<o;e++){r[n[e]]=e}this.#u=t;this.#k=n;this.#v=r;this.#y=o;this.#x=new kr(this,new Int32Array([1]));this.#w=new kr(this,new Int32Array([0]))}get size(){return this.#u}get one(){return this.#x}get zero(){return this.#w}get generator(){return this.#y}exp(e){return this.#k[e]}log(e){return this.#v[e]}invert(e){return this.#k[this.#u-this.#v[e]-1]}multiply(e,t){if(e===0||t===0){return 0}const o=this.#v;return this.#k[(o[e]+o[t])%(this.#u-1)]}buildPolynomial(e,t){if(t===0){return this.#w}const o=new Int32Array(e+1);o[0]=t;return new kr(this,o)}}const Cr=new vr(285,256,0);
98
+ /**
99
+ * @module QRCode
100
+ * @package @nuintun/qrcode
101
+ * @license MIT
102
+ * @version 5.0.2
103
+ * @author nuintun <nuintun@qq.com>
104
+ * @description A pure JavaScript QRCode encode and decode library.
105
+ * @see https://github.com/nuintun/qrcode#readme
106
+ */function zr(e,t){const o=[];for(const i of e){const e=i.codePointAt(0);o.push(e==null||e>t?63:e)}return new Uint8Array(o)}function Ir(e,t){switch(t){case Jn.ASCII:return zr(e,127);case Jn.ISO_8859_1:return zr(e,255);case Jn.UTF_8:return(new TextEncoder).encode(e);default:throw Error(`built-in encode not support charset: ${t.label}`)}}
107
+ /**
108
+ * @module QRCode
109
+ * @package @nuintun/qrcode
110
+ * @license MIT
111
+ * @version 5.0.2
112
+ * @author nuintun <nuintun@qq.com>
113
+ * @description A pure JavaScript QRCode encode and decode library.
114
+ * @see https://github.com/nuintun/qrcode#readme
115
+ */const Sr=.75;function jr(e){return Gn(e/32)}function _r(e){return new Int32Array(Math.ceil(e/32))}class Tr{#C;#o;constructor(e=0){this.#C=e;this.#o=_r(e)}#z(e){const t=this.#o;if(e>t.length*32){const o=_r(Math.ceil(e/Sr));o.set(t);this.#o=o}this.#C=e}get length(){return this.#C}get byteLength(){return Math.ceil(this.#C/8)}set(e){this.#o[jr(e)]|=Xn(e)}get(e){return Qn(this.#o[jr(e)]>>>Yn(e))}xor(e){const t=this.#o;const o=e.#o;const i=Math.min(this.#C,e.#C);for(let e=0;e<i;e++){t[e]^=o[e]}}append(e,t=1){let o=this.#C;if(e instanceof Tr){t=e.#C;this.#z(o+t);for(let i=0;i<t;i++){if(e.get(i)!==0){this.set(o)}o++}}else{this.#z(o+t);for(let i=t-1;i>=0;i--){if(Qn(e>>>i)!==0){this.set(o)}o++}}}writeToUint8Array(e,t,o,i){for(let n=0;n<i;n++){let i=0;for(let t=0;t<8;t++){if(this.get(e++)!==0){i|=1<<7-t}}t[o+n]=i}}clear(){this.#o.fill(0)}}
116
+ /**
117
+ * @module QRCode
118
+ * @package @nuintun/qrcode
119
+ * @license MIT
120
+ * @version 5.0.2
121
+ * @author nuintun <nuintun@qq.com>
122
+ * @description A pure JavaScript QRCode encode and decode library.
123
+ * @see https://github.com/nuintun/qrcode#readme
124
+ */class Fr{#u;#I;constructor(e){this.#u=e;this.#I=new Int8Array(e*e)}get size(){return this.#u}set(e,t,o){this.#I[t*this.#u+e]=o}get(e,t){return this.#I[t*this.#u+e]}clear(e){this.#I.fill(e)}}
125
+ /**
126
+ * @module QRCode
127
+ * @package @nuintun/qrcode
128
+ * @license MIT
129
+ * @version 5.0.2
130
+ * @author nuintun <nuintun@qq.com>
131
+ * @description A pure JavaScript QRCode encode and decode library.
132
+ * @see https://github.com/nuintun/qrcode#readme
133
+ */const Er=1335;const Mr=21522;const Br=7973;const Dr=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,1,1,1,0,1],[1,0,1,1,1,0,1],[1,0,1,1,1,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]];const Rr=[[1,1,1,1,1],[1,0,0,0,1],[1,0,1,0,1],[1,0,0,0,1],[1,1,1,1,1]];const Ar=[[8,0],[8,1],[8,2],[8,3],[8,4],[8,5],[8,7],[8,8],[7,8],[5,8],[4,8],[3,8],[2,8],[1,8],[0,8]];function Or(e,t,o){return e.get(t,o)===-1}function Lr(e,t,o){for(let i=0;i<7;i++){const n=Dr[i];for(let r=0;r<7;r++){e.set(t+r,o+i,n[r])}}}function Hr(e,t,o){for(let i=0;i<8;i++){e.set(t+i,o,0)}}function Ur(e,t,o){for(let i=0;i<7;i++){e.set(t,o+i,0)}}function qr(e){const t=7;const o=8;const i=7;const{size:n}=e;Lr(e,0,0);Lr(e,n-t,0);Lr(e,0,n-t);Hr(e,0,o-1);Hr(e,n-o,o-1);Hr(e,0,n-o);Ur(e,i,0);Ur(e,n-i-1,0);Ur(e,i,n-i)}function Pr(e){const t=e.size-8;for(let o=8;o<t;o++){const t=o+1&1;if(Or(e,o,6)){e.set(o,6,t)}}for(let o=8;o<t;o++){const t=o+1&1;if(Or(e,6,o)){e.set(6,o,t)}}}function $r(e,t,o){for(let i=0;i<5;i++){const n=Rr[i];for(let r=0;r<5;r++){e.set(t+r,o+i,n[r])}}}function Nr(e,{version:t}){if(t>=2){const{alignmentPatterns:o}=yr[t-1];const{length:i}=o;for(let t=0;t<i;t++){const n=o[t];for(let t=0;t<i;t++){const i=o[t];if(Or(e,i,n)){$r(e,i-2,n-2)}}}}}function Vr(e){e.set(8,e.size-8,1)}function Wr(e,t,o){const i=t.bits<<3|o;e.append(i,5);const n=Zn(i,Er);e.append(n,10);const r=new Tr;r.append(Mr,15);e.xor(r)}function Jr(e,t,o){const i=new Tr;Wr(i,t,o);const{size:n}=e;const{length:r}=i;for(let t=0;t<r;t++){const[o,a]=Ar[t];const s=i.get(r-1-t);e.set(o,a,s);if(t<8){e.set(n-t-1,8,s)}else{e.set(8,n-7+(t-8),s)}}Vr(e)}function Qr(e,t){e.append(t,6);const o=Zn(t,Br);e.append(o,12)}function Gr(e,{version:t}){if(t>=7){const o=new Tr;Qr(o,t);let i=6*3-1;const{size:n}=e;for(let t=0;t<6;t++){for(let r=0;r<3;r++){const a=o.get(i--);e.set(t,n-11+r,a);e.set(n-11+r,t,a)}}}}function Xr(e,t,o){let i=0;const{size:n}=e;const{length:r}=t;for(let a=n-1;a>=1;a-=2){if(a===6){a=5}for(let s=0;s<n;s++){for(let l=0;l<2;l++){const d=a-l;const c=(a+1&2)===0;const p=c?n-1-s:s;if(Or(e,d,p)){let n=0;if(i<r){n=t.get(i++)}if(mr(o,d,p)){n^=1}e.set(d,p,n)}}}}}function Yr(e,t){qr(e);Nr(e,t);Pr(e)}function Kr(e,t,o,i,n){Jr(e,i,n);Gr(e,o);Xr(e,t,n)}function Zr(e,t,o,i){const n=new Fr(t.size);n.clear(-1);Yr(n,t);Kr(n,e,t,o,i);return n}
134
+ /**
135
+ * @module QRCode
136
+ * @package @nuintun/qrcode
137
+ * @license MIT
138
+ * @version 5.0.2
139
+ * @author nuintun <nuintun@qq.com>
140
+ * @description A pure JavaScript QRCode encode and decode library.
141
+ * @see https://github.com/nuintun/qrcode#readme
142
+ */class ea{#S;#j;constructor(e,t){this.#S=t;this.#j=e}get ecCodewords(){return this.#S}get dataCodewords(){return this.#j}}
143
+ /**
144
+ * @module QRCode
145
+ * @package @nuintun/qrcode
146
+ * @license MIT
147
+ * @version 5.0.2
148
+ * @author nuintun <nuintun@qq.com>
149
+ * @description A pure JavaScript QRCode encode and decode library.
150
+ * @see https://github.com/nuintun/qrcode#readme
151
+ */function ta(e,t,o){const{length:i}=t;if(o>=i){const{generator:n}=e;let r=t[i-1];for(let a=i;a<=o;a++){const o=new Int32Array([1,e.exp(a-1+n)]);const i=r.multiply(new kr(e,o));t.push(i);r=i}}return t[o]}let oa=class e{#f;#_;constructor(e=Cr){this.#f=e;this.#_=[new kr(e,new Int32Array([1]))]}encode(e,t){const o=e.length-t;const i=new Int32Array(o);const n=ta(this.#f,this.#_,t);i.set(e.subarray(0,o));const r=new kr(this.#f,i);const a=r.multiplyByMonomial(t,1);const[,s]=a.divide(n);const{coefficients:l}=s;const d=t-l.length;const c=o+d;e.fill(0,o,c);e.set(l,c)}};
152
+ /**
153
+ * @module QRCode
154
+ * @package @nuintun/qrcode
155
+ * @license MIT
156
+ * @version 5.0.2
157
+ * @author nuintun <nuintun@qq.com>
158
+ * @description A pure JavaScript QRCode encode and decode library.
159
+ * @see https://github.com/nuintun/qrcode#readme
160
+ */function ia(e,t){const o=e.length;const i=new Int32Array(o+t);i.set(e);(new oa).encode(i,t);return new Uint8Array(i.subarray(o))}function na(e,{ecBlocks:t,numECCodewordsPerBlock:o}){let i=0;let n=0;let r=0;const a=[];for(const{count:s,numDataCodewords:l}of t){for(let t=0;t<s;t++){const t=new Uint8Array(l);e.writeToUint8Array(r*8,t,0,l);const s=ia(t,o);a.push(new ea(t,s));r+=l;i=Math.max(i,s.length);n=Math.max(n,l)}}const s=new Tr;for(let e=0;e<n;e++){for(const{dataCodewords:t}of a){if(e<t.length){s.append(t[e],8)}}}for(let e=0;e<i;e++){for(const{ecCodewords:t}of a){if(e<t.length){s.append(t[e],8)}}}return s}function ra(e,t){const o=t*8;for(let t=0;t<4&&e.length<o;t++){e.append(0)}const i=e.length&7;if(i>0){for(let t=i;t<8;t++){e.append(0)}}const n=t-e.byteLength;for(let t=0;t<n;t++){e.append(t&1?17:236,8)}}function aa(e){return e.mode===tr.BYTE}function sa(e){return e.mode===tr.HANZI}function la(e,t){e.append(t.bits,4)}function da(e,t,o){if(aa(t)){const[i]=t.charset.values;if(i!==o){e.append(tr.ECI.bits,4);if(i<=127){e.append(i,8)}else if(i<=16383){e.append(32768|i,16)}else{e.append(12582912|i,24)}return i}}return o}function ca(e,t){const[o,i]=t;switch(o){case"GS1":la(e,tr.FNC1_FIRST_POSITION);break;case"AIM":la(e,tr.FNC1_SECOND_POSITION);e.append(i,8);break}}function pa(e,t){if(aa(e)){return t.byteLength}return e.content.length}function ha(e,t,o,i){e.append(i,t.getCharacterCountBits(o))}function ua(e,t,o){const i=t.getECBlocks(o);const n=Math.ceil(e/8);return i.numTotalDataCodewords>=n}function ma(e,t){for(const o of yr){if(ua(e,o,t)){return o}}throw new Error("data too big for all versions")}function ga(e,t){let o=0;for(const{mode:i,head:n,body:r}of e){o+=n.length+i.getCharacterCountBits(t)+r.length}return o}function fa(e,t){const o=ga(e,yr[0]);const i=ma(o,t);const n=ga(e,i);return ma(n,t)}function ba(e,t,o){let i=0;let n=Zr(e,t,o,i);let r=ur(n);for(let a=1;a<8;a++){const s=Zr(e,t,o,a);const l=ur(s);if(l<r){i=a;n=s;r=l}}return[i,n]}
161
+ /**
162
+ * @module QRCode
163
+ * @package @nuintun/qrcode
164
+ * @license MIT
165
+ * @version 5.0.2
166
+ * @author nuintun <nuintun@qq.com>
167
+ * @description A pure JavaScript QRCode encode and decode library.
168
+ * @see https://github.com/nuintun/qrcode#readme
169
+ */const xa=(1<<12)-1;class wa{#T;#F;#o;#E;#u;#M;#B;constructor(e){const t=1<<e;const o=t+1;this.#T=t;this.#F=o;this.#E=e;this.reset()}get bof(){return this.#T}get eof(){return this.#F}get bits(){return this.#o}get depth(){return this.#E}reset(){const e=this.#E+1;this.#o=e;this.#u=1<<e;this.#B=new Map;this.#M=this.#F+1}add(e,t){let o=this.#M;if(o>xa){return false}this.#B.set(e<<8|t,o++);let i=this.#o;let n=this.#u;if(o>n){n=1<<++i}this.#o=i;this.#u=n;this.#M=o;return true}get(e,t){return this.#B.get(e<<8|t)}}
170
+ /**
171
+ * @module QRCode
172
+ * @package @nuintun/qrcode
173
+ * @license MIT
174
+ * @version 5.0.2
175
+ * @author nuintun <nuintun@qq.com>
176
+ * @description A pure JavaScript QRCode encode and decode library.
177
+ * @see https://github.com/nuintun/qrcode#readme
178
+ */class ya{#o=0;#D;#R=0;#I=[];constructor(e){this.#D=e}write(e){let t=this.#o;let o=this.#R|e<<t;t+=this.#D.bits;const i=this.#I;while(t>=8){i.push(o&255);o>>=8;t-=8}this.#o=t;this.#R=o}pipe(e){const t=this.#I;if(this.#o>0){t.push(this.#R)}e.writeByte(this.#D.depth);const{length:o}=t;for(let i=0;i<o;){const n=o-i;if(n>=255){e.writeByte(255);e.writeBytes(t,i,255);i+=255}else{e.writeByte(n);e.writeBytes(t,i,n);i=o}}e.writeByte(0)}}
179
+ /**
180
+ * @module QRCode
181
+ * @package @nuintun/qrcode
182
+ * @license MIT
183
+ * @version 5.0.2
184
+ * @author nuintun <nuintun@qq.com>
185
+ * @description A pure JavaScript QRCode encode and decode library.
186
+ * @see https://github.com/nuintun/qrcode#readme
187
+ */function ka(e,t,o){const i=new wa(t);const n=new ya(i);n.write(i.bof);if(e.length>0){let t=e[0];const{length:o}=e;for(let r=1;r<o;r++){const o=e[r];const a=i.get(t,o);if(a!=null){t=a}else{n.write(t);if(!i.add(t,o)){n.write(i.bof);i.reset()}t=o}}n.write(t)}n.write(i.eof);n.pipe(o)}
188
+ /**
189
+ * @module QRCode
190
+ * @package @nuintun/qrcode
191
+ * @license MIT
192
+ * @version 5.0.2
193
+ * @author nuintun <nuintun@qq.com>
194
+ * @description A pure JavaScript QRCode encode and decode library.
195
+ * @see https://github.com/nuintun/qrcode#readme
196
+ */class va{#I=[];get bytes(){return this.#I}writeByte(e){this.#I.push(e&255)}writeInt16(e){this.#I.push(e&255,e>>8&255)}writeBytes(e,t=0,o=e.length){const i=this.#I;for(let n=0;n<o;n++){i.push(e[t+n]&255)}}}
197
+ /**
198
+ * @module QRCode
199
+ * @package @nuintun/qrcode
200
+ * @license MIT
201
+ * @version 5.0.2
202
+ * @author nuintun <nuintun@qq.com>
203
+ * @description A pure JavaScript QRCode encode and decode library.
204
+ * @see https://github.com/nuintun/qrcode#readme
205
+ */const{fromCharCode:Ca}=String;function za(e){e&=63;if(e>=0){if(e<26){return 65+e}else if(e<52){return 97+(e-26)}else if(e<62){return 48+(e-52)}else if(e===62){return 43}else if(e===63){return 47}}throw new Error(`illegal char: ${Ca(e)}`)}class Ia{#o=0;#R=0;#C=0;#A=new va;get bytes(){return this.#A.bytes}write(e){let t=this.#o+8;const o=this.#A;const i=this.#R<<8|e&255;while(t>=6){o.writeByte(za(i>>>t-6));t-=6}this.#C++;this.#o=t;this.#R=i}close(){const e=this.#o;const t=this.#A;if(e>0){t.writeByte(za(this.#R<<6-e));this.#o=0;this.#R=0}const o=this.#C;if(o%3!=0){const e=3-o%3;for(let o=0;o<e;o++){t.writeByte(61)}}}}
206
+ /**
207
+ * @module QRCode
208
+ * @package @nuintun/qrcode
209
+ * @license MIT
210
+ * @version 5.0.2
211
+ * @author nuintun <nuintun@qq.com>
212
+ * @description A pure JavaScript QRCode encode and decode library.
213
+ * @see https://github.com/nuintun/qrcode#readme
214
+ */class Sa{#O;#L;#H;#U;#q=[];constructor(e,t,{foreground:o=[0,0,0],background:i=[255,255,255]}={}){this.#O=e;this.#L=t;this.#H=o;this.#U=i}#P(){const e=this.#O;const t=this.#L;const o=new va;const i=this.#U;const n=this.#H;o.writeBytes([71,73,70,56,57,97]);o.writeInt16(e);o.writeInt16(t);o.writeBytes([128,0,0]);o.writeBytes([i[0],i[1],i[2]]);o.writeBytes([n[0],n[1],n[2]]);o.writeByte(44);o.writeInt16(0);o.writeInt16(0);o.writeInt16(e);o.writeInt16(t);o.writeByte(0);ka(this.#q,2,o);o.writeByte(59);return o.bytes}set(e,t,o){this.#q[t*this.#O+e]=o}toDataURL(){const e=this.#P();const t=new Ia;for(const o of e){t.write(o)}t.close();const o=t.bytes;let i="data:image/gif;base64,";for(const e of o){i+=Ca(e)}return i}}
215
+ /**
216
+ * @module QRCode
217
+ * @package @nuintun/qrcode
218
+ * @license MIT
219
+ * @version 5.0.2
220
+ * @author nuintun <nuintun@qq.com>
221
+ * @description A pure JavaScript QRCode encode and decode library.
222
+ * @see https://github.com/nuintun/qrcode#readme
223
+ */class ja{#$;#r;#m;#N;constructor(e,t,o,i){this.#$=i;this.#r=o;this.#N=e;this.#m=t}get size(){return this.#N.size}get mask(){return this.#$}get level(){return this.#r.name}get version(){return this.#m.version}get(e,t){const{size:o}=this.#N;if(e<0||t<0||e>=o||t>=o){throw new Error(`illegal coordinate: [${e}, ${t}]`)}return this.#N.get(e,t)}toDataURL(e=2,{margin:t=e*4,...o}={}){e=Math.max(1,e>>0);t=Math.max(0,t>>0);const i=this.#N;const n=i.size;const r=e*n+t*2;const a=new Sa(r,r,o);const s=r-t;for(let o=0;o<r;o++){for(let n=0;n<r;n++){if(n>=t&&n<s&&o>=t&&o<s){const r=Gn((n-t)/e);const s=Gn((o-t)/e);a.set(n,o,i.get(r,s))}else{a.set(n,o,0)}}}return a.toDataURL()}}
224
+ /**
225
+ * @module QRCode
226
+ * @package @nuintun/qrcode
227
+ * @license MIT
228
+ * @version 5.0.2
229
+ * @author nuintun <nuintun@qq.com>
230
+ * @description A pure JavaScript QRCode encode and decode library.
231
+ * @see https://github.com/nuintun/qrcode#readme
232
+ */function _a(e){if(e===""){throw new Error("segment content should be at least 1 character")}}function Ta(e){if(!(e instanceof Jn)){throw new Error("illegal charset")}}function Fa(e){const{fnc1:t}=e;if(t!=null){const[e]=t;if(e!=="GS1"&&e!=="AIM"){throw new Error("illegal fn1 hint")}if(e==="AIM"){const[,e]=t;if(e<0||e>255||!Number.isInteger(e)){throw new Error("illegal fn1 application indicator")}}}}function Ea(e){if(["L","M","Q","H"].indexOf(e)<0){throw new Error("illegal error correction level")}}function Ma(e){if(e!=="Auto"){if(e<1||e>40||!Number.isInteger(e)){throw new Error("illegal version")}}}
233
+ /**
234
+ * @module QRCode
235
+ * @package @nuintun/qrcode
236
+ * @license MIT
237
+ * @version 5.0.2
238
+ * @author nuintun <nuintun@qq.com>
239
+ * @description A pure JavaScript QRCode encode and decode library.
240
+ * @see https://github.com/nuintun/qrcode#readme
241
+ */class Ba{#V;#r;#P;#m;constructor({hints:e={},level:t="L",version:o="Auto",encode:i=Ir}={}){Fa(e);Ea(t);Ma(o);this.#V=e;this.#P=i;this.#m=o;this.#r=fr[t]}encode(...e){const t=this.#r;const o=this.#P;const{fnc1:i}=this.#V;const n=this.#m;const r=[];let a=false;let[s]=Jn.ISO_8859_1.values;for(const t of e){const{mode:e}=t;const n=new Tr;const l=t.encode(o);const d=pa(t,l);s=da(n,t,s);if(i!=null&&!a){a=true;ca(n,i)}la(n,e);if(sa(t)){n.append(1,4)}r.push({mode:e,head:n,body:l,length:d})}let l;if(n==="Auto"){l=fa(r,t)}else{l=yr[n-1];const e=ga(r,l);if(!ua(e,l,t)){throw new Error("data too big for requested version")}}const d=new Tr;for(const{mode:e,head:t,body:o,length:i}of r){d.append(t);ha(d,e,l,i);d.append(o)}const c=l.getECBlocks(t);ra(d,c.numTotalDataCodewords);const p=na(d,c);const[h,u]=ba(p,l,t);return new ja(u,l,t,h)}}
242
+ /**
243
+ * @module QRCode
244
+ * @package @nuintun/qrcode
245
+ * @license MIT
246
+ * @version 5.0.2
247
+ * @author nuintun <nuintun@qq.com>
248
+ * @description A pure JavaScript QRCode encode and decode library.
249
+ * @see https://github.com/nuintun/qrcode#readme
250
+ */class Da{#W;#J;constructor(e,t=Jn.ISO_8859_1){_a(e);Ta(t);this.#W=e;this.#J=t}get mode(){return tr.BYTE}get content(){return this.#W}get charset(){return this.#J}encode(e){const t=new Tr;const o=e(this.#W,this.#J);for(const e of o){t.append(e,8)}return t}}const Ra={number:"",isWorking:false,close:async function(e){const{onOk:t,onError:o}=e??{};const{number:i}=this;if(i){const e=await d({url:`/resource/update_id/${i}`,method:"delete"});if(e.success){this.number="";t?.()}else{o?.()}}}};const Aa=".mobile-upload{display:flex;justify-content:flex-end;margin-bottom:4px}.btn{position:relative;padding:4px 8px;border-radius:4px;cursor:pointer;overflow:hidden;display:flex;justify-content:center;align-items:center;white-space:nowrap}.btn::after{content:'';position:absolute;top:0;left:0;width:100%;height:100%}.btn:hover::after{background-color:rgba(0,0,0,0.04)}.btn-link{color:#0D75FB}.btn-default{background-color:#ffffff;color:#0D75FB;border:1px solid #0D75FB}.btn-primary{background-color:#0D75FB;color:#ffffff}.loading{font-size:12px;color:#999999}.mask{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,0.5);display:flex;justify-content:center;align-items:center;z-index:10000}.mask .upload-wrapper{width:540px;max-width:80%;max-height:80%;background-color:#ffffff;padding:32px 24px;border-radius:16px;overflow-y:auto}.mask .upload-wrapper .upload-box{display:flex;flex-direction:column;align-items:center}.time-expire{margin:8px 0;text-align:center;font-size:12px;color:#555555}.time-count-down{margin-left:8px;color:#0D75FB}.alert-tip{margin-top:8px;text-align:center;font-size:12px;color:#999999}.qrcode-wrapper{width:160px;height:160px;display:flex;justify-content:center;align-items:center;border:1px solid #e5e5e5;border-radius:4px;padding:1px}.qrcode-wrapper .qrcode{width:100%;height:100%}.modal-footer{margin-top:32px;display:flex;justify-content:center;align-items:center;gap:8px}.modal-footer .btn{min-width:100px}.qrcode-textarea{width:calc(100% - 16px);min-height:120px;border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}";const Oa='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const La=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Ha=class o{constructor(o){e(this,o);this.ok=t(this,"ok")}name="";rows=8;maxLength=undefined;uploadHeaders;uploadParams;QR_CODE_VALID_TIME=0;open=false;mobileUrl="";setStartMobileUpload=false;startMobileUploadLoading=false;qrcodeStatus="loading";value="";expireTime="";ok;setStartMobileUploadWrapper=e=>{Ra.isWorking=e;this.setStartMobileUpload=e};qrcodeUrl="";setMobileUrlWrapper=e=>{this.mobileUrl=e;if(e){const t=new Ba;const o=t.encode(new Da(e));this.qrcodeUrl=o.toDataURL()}else{this.qrcodeUrl=""}};pollingQueryNumberInfo=async e=>{const t=await d({url:`/sdk/v1/update_id/${e}/status`,method:"get"});if(t?.success){const e=t.data??{};const{custom_data:o}=e;this.value=o??""}if(Ra.isWorking){setTimeout((()=>{this.pollingQueryNumberInfo(e)}),3e3)}};handleStartMobileUpload=async()=>{const e=this;this.qrcodeStatus="loading";this.startMobileUploadLoading=true;const t=this.uploadParams??{};const o={cfg:{fromUserName:"",fromUserId:"",upload:e.uploadParams,name:e.name,rows:e.rows,maxLength:e.maxLength,params:t}};const i=await d({url:`/sdk/v1/update_id`,method:"post",data:o});if(i?.success){const e=i.data??{};Ra.number=e.update_id;const t=new Date(Date.now()+3600*1e3);this.expireTime=`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`;const o=`${f}/agents/inputByCode?num=${Ra.number}`;this.setMobileUrlWrapper(o);this.setStartMobileUploadWrapper(true);this.qrcodeStatus="active";this.pollingQueryNumberInfo(Ra.number)}this.startMobileUploadLoading=false};cancelLoading=false;cancelMobileUpload=async()=>{this.cancelLoading=true;await Ra.close({onError(){S.info("取消失败")}});this.cancelLoading=false;this.QR_CODE_VALID_TIME=0;this.expireTime="";this.setStartMobileUploadWrapper(false);this.setMobileUrlWrapper("");this.qrcodeStatus="expired";this.value="";this.open=false};render(){const e=b();if(e){return null}else{return i("div",null,i("div",{class:"mobile-upload"},i("div",{class:"btn btn-link",onClick:()=>{this.open=true;this.handleStartMobileUpload()}},"扫码填写")),this.open&&i("div",{class:"mask"},i("div",{class:"upload-wrapper"},this.setStartMobileUpload?i("div",{class:"upload-box"},i("div",{class:"qrcode-wrapper"},this.qrcodeStatus==="active"&&i("img",{class:"qrcode",src:this.qrcodeUrl}),this.qrcodeStatus==="loading"&&i("span",{class:"loading"},"加载中..."),this.qrcodeStatus==="expired"&&i("div",{class:"btn btn-link",onClick:this.handleStartMobileUpload},"重新获取")),i("div",{class:"time-expire"},"二维码有效期至 ",this.expireTime),i("div",{class:"alert-tip"},"填写过程中请不要关闭此弹窗"),this.qrcodeStatus==="active"&&i("div",{style:{marginTop:"12px",fontSize:"12px"},class:"btn btn-link",onClick:()=>{navigator.clipboard.writeText(this.mobileUrl).then((()=>{S.success("已复制到剪贴板")})).catch((()=>{S.error("复制失败")}))}},"复制二维码地址")):this.startMobileUploadLoading&&i("span",{class:"loading"},"加载中..."),i("div",{style:{marginTop:"12px"}},!!this.value?.length&&i("textarea",{readOnly:true,class:"qrcode-textarea",value:this.value,onChange:e=>{this.value=e.target.value}})),i("div",{class:"modal-footer"},i("div",{class:"btn btn-default",onClick:this.cancelMobileUpload},"取消"),i("div",{class:"btn btn-primary",onClick:()=>{if(!this.value){S.info(`请输入内容`);return}if(this.value.length>this.maxLength){S.info(`输入内容不能超过${this.maxLength}个字符`);return}this.ok.emit(this.value);this.cancelMobileUpload()}},"完成")))))}}};Ha.style=Aa+(Oa+La);const Ua={number:"",isWorking:false,close:async function(e){const{onOk:t,onError:o}=e??{};const{number:i}=this;if(i){const e=await d({url:`/resource/update_id/${i}`,method:"delete"});if(e.success){this.number="";t?.()}else{o?.()}}}};const qa=".mobile-upload{display:flex;justify-content:flex-end;margin-bottom:4px}.btn{position:relative;padding:4px 8px;border-radius:4px;cursor:pointer;overflow:hidden;display:flex;justify-content:center;align-items:center;white-space:nowrap}.btn::after{content:'';position:absolute;top:0;left:0;width:100%;height:100%}.btn:hover::after{background-color:rgba(0,0,0,0.04)}.btn-link{color:#0D75FB}.btn-default{background-color:#ffffff;color:#0D75FB;border:1px solid #0D75FB}.btn-primary{background-color:#0D75FB;color:#ffffff}.loading{font-size:12px;color:#999999}.mask{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,0.5);display:flex;justify-content:center;align-items:center;z-index:10000}.mask .upload-wrapper{width:540px;max-width:80%;max-height:80%;background-color:#ffffff;padding:32px 24px;border-radius:16px;overflow-y:auto}.mask .upload-wrapper .upload-box{display:flex;flex-direction:column;align-items:center}.time-expire{margin:8px 0;text-align:center;font-size:12px;color:#555555}.time-count-down{margin-left:8px;color:#0D75FB}.alert-tip{margin-top:8px;text-align:center;font-size:12px;color:#999999}.qrcode-wrapper{width:160px;height:160px;display:flex;justify-content:center;align-items:center;border:1px solid #e5e5e5;border-radius:4px;padding:1px}.qrcode-wrapper .qrcode{width:100%;height:100%}.modal-footer{margin-top:32px;display:flex;justify-content:center;align-items:center;gap:8px}.modal-footer .btn{min-width:100px}";const Pa='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const $a=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Na=class{constructor(o){e(this,o);this.ok=t(this,"ok")}multiple=false;acceptFileSuffixList=[];maxFileCount=Infinity;maxFileSize=Infinity;uploadHeaders;uploadParams;QR_CODE_VALID_TIME=0;open=false;mobileUrl="";setStartMobileUpload=false;startMobileUploadLoading=false;qrcodeStatus="loading";value=[];expireTime="";ok;setStartMobileUploadWrapper=e=>{Ua.isWorking=e;this.setStartMobileUpload=e};qrcodeUrl="";setMobileUrlWrapper=e=>{this.mobileUrl=e;if(e){const t=new Ba;const o=t.encode(new Da(e));this.qrcodeUrl=o.toDataURL()}else{this.qrcodeUrl=""}};pollingQueryNumberInfo=async e=>{const t=await d({url:`/sdk/v1/update_id/${e}/status`,method:"get"});if(t?.success){const e=t.data??{};const{file_list:o}=e;this.value=o??[]}if(Ua.isWorking){setTimeout((()=>{this.pollingQueryNumberInfo(e)}),3e3)}};handleStartMobileUpload=async()=>{const e=this;this.qrcodeStatus="loading";this.startMobileUploadLoading=true;const t=this.uploadParams??{};const o={is_knowledge_doc:false,tags:t.tags,cfg:{maxSize:e.maxFileSize,maxCount:e.multiple?e.maxFileCount:1,fromUserName:"",fromUserId:"",customAccept:e.acceptFileSuffixList.join(","),upload:e.uploadParams}};const i=await d({url:`/sdk/v1/update_id`,method:"post",data:o});if(i?.success){const e=i.data??{};Ua.number=e.update_id;const t=new Date(Date.now()+3600*1e3);this.expireTime=`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`;const o=`${f}/agents/uploadFileByCode?num=${Ua.number}`;this.setMobileUrlWrapper(o);this.setStartMobileUploadWrapper(true);this.qrcodeStatus="active";this.pollingQueryNumberInfo(Ua.number)}this.startMobileUploadLoading=false};cancelLoading=false;cancelMobileUpload=async()=>{this.cancelLoading=true;await Ua.close({onError(){S.info("取消失败")}});this.cancelLoading=false;this.QR_CODE_VALID_TIME=0;this.expireTime="";this.setStartMobileUploadWrapper(false);this.setMobileUrlWrapper("");this.qrcodeStatus="expired";this.value=[];this.open=false};handleDelete=async e=>{const t=await d({url:`/sdk/v1/update_id/${Ua.number}/file`,method:"delete",params:{update_id:Ua.number,cos_key:e}});if(t?.success){this.value=this.value.filter((t=>t.cos_key!==e))}};render(){const e=b();if(e){return null}else{return i("div",null,i("div",{class:"mobile-upload"},i("div",{class:"btn btn-link",onClick:()=>{if(this.maxFileCount<1){S.info("文件数量已达到上限!");return}this.open=true;this.handleStartMobileUpload()}},"扫码上传")),this.open&&i("div",{class:"mask"},i("div",{class:"upload-wrapper"},this.setStartMobileUpload?i("div",{class:"upload-box"},i("div",{class:"qrcode-wrapper"},this.qrcodeStatus==="active"&&i("img",{class:"qrcode",src:this.qrcodeUrl}),this.qrcodeStatus==="loading"&&i("span",{class:"loading"},"加载中..."),this.qrcodeStatus==="expired"&&i("div",{class:"btn btn-link",onClick:this.handleStartMobileUpload},"重新获取")),i("div",{class:"time-expire"},"二维码有效期至 ",this.expireTime),i("div",{class:"alert-tip"},"上传过程中请不要关闭此弹窗"),this.qrcodeStatus==="active"&&i("div",{style:{marginTop:"12px",fontSize:"12px"},class:"btn btn-link",onClick:()=>{navigator.clipboard.writeText(this.mobileUrl).then((()=>{S.success("已复制到剪贴板")})).catch((()=>{S.error("复制失败")}))}},"复制二维码地址")):this.startMobileUploadLoading&&i("span",{class:"loading"},"加载中..."),i("div",{style:{marginTop:"12px"}},this.value?.map?.(((e,t)=>i("div",{class:"file-item",key:t},i("div",{class:"file-item-content"},i("span",{class:"file-icon"},"📝"),i("span",{class:"file-name"},e?.file_name)),i("button",{class:"remove-file",onClick:t=>{t.stopPropagation();this.handleDelete(e.cos_key)}},"×"))))),i("div",{class:"modal-footer"},i("div",{class:"btn btn-default",onClick:this.cancelMobileUpload},"取消"),i("div",{class:"btn btn-primary",onClick:()=>{if(this.value.length>this.maxFileCount){S.info(`最多只能选择${this.maxFileCount}个文件,请删除多余文件!`);return}this.ok.emit(this.value);this.cancelMobileUpload()}},"完成")))))}}};Na.style=qa+(Pa+$a);const Va="";const Wa='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const Ja=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Qa=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent")}modalTitle="面试报告";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始分析";fullscreen=false;customInputs={};showWorkspaceHistory=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="window";selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return o(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}async handleIsOpenChange(e){if(!e){this.clearSelectedFile();this.showChatModal=false;this.jobDescription=""}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await r(this.token);if(this.conversationId||this.customInputs?.file_urls&&this.customInputs?.job_info){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){a.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}r(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=y.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};handleFileChange=e=>{const t=e.target;if(t.files&&t.files.length>0){this.selectedFile=t.files[0]}};handleUploadClick=()=>{const e=this.hostElement.shadowRoot?.querySelector(".file-input");e?.click()};clearSelectedFile=()=>{this.selectedFile=null;this.uploadedFileInfo=null;const e=this.hostElement.shadowRoot?.querySelector(".file-input");if(e){e.value=""}};async uploadFile(){if(!this.selectedFile)return;this.isUploading=true;try{const e=await p(this.selectedFile,{},{tags:["other"]});this.uploadedFileInfo=e;this.uploadSuccess.emit(e)}catch(e){console.error("文件上传错误:",e);this.clearSelectedFile();I.captureError(e,{action:"uploadFile",component:"pcm-msbg-modal",title:"文件上传失败"});y.emitError({error:e,message:"文件上传失败,请重试"})}finally{this.isUploading=false}}handleJobDescriptionChange=e=>{const t=e.target;this.jobDescription=t.value};handleStartInterview=async()=>{if(!this.selectedFile){alert("请上传面试内容");return}if(!this.customInputs?.job_info&&!this.jobDescription.trim()){alert("请输入职位描述");return}this.isSubmitting=true;try{if(!this.uploadedFileInfo){await this.uploadFile();if(!this.uploadedFileInfo){this.isSubmitting=false;return}}this.showChatModal=true}catch(e){console.error("开始面试时出错:",e);I.captureError(e,{action:"handleStartInterview",component:"pcm-msbg-modal",title:"开始面试时出错"});y.emitError({error:e,message:"开始面试时出错,请重试"})}finally{this.isSubmitting=false}};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.job_info);const a=Boolean(this.customInputs&&this.customInputs.file_urls);const s=Boolean(this.customInputs?.file_urls&&this.customInputs?.job_info);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!s&&i("div",{class:"input-container"},!r&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&i("div",{class:"resume-upload-section"},i("label",null,"上传面试内容"),i("div",{class:"upload-area",onClick:this.handleUploadClick},this.selectedFile?i("div",{class:"file-item"},i("div",{class:"file-item-content"},i("span",{class:"file-icon"},"📝"),i("span",{class:"file-name"},this.selectedFile.name)),i("button",{class:"remove-file",onClick:e=>{e.stopPropagation();this.clearSelectedFile()}},"×")):i("div",{class:"upload-placeholder"},i("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_upload.png"}),i("p",{class:"upload-text"},"点击上传面试内容"),i("p",{class:"upload-hint"},"支持 mp3、markdown、pdf、docx、doc、md 格式")))),i("button",{class:"submit-button",disabled:!a&&!this.selectedFile||!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003"))),i("input",{type:"file",class:"file-input",onChange:this.handleFileChange})),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:"3022316191018877",conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_urls:this.customInputs?.file_urls||this.uploadedFileInfo?.cos_key,file_names:this.customInputs?.file_names||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription},interviewMode:"text"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Qa.style=Va+(Wa+Ja);const Ga=".iframe-container{width:100%;height:85vh}.iframe-container iframe{width:100%;height:100%}";const Xa='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const Ya=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Ka=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.getResumeData=t(this,"getResumeData");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent")}modalTitle="千岗千简历";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请帮我优化简历";getResumeData;hideExportButton=false;exportButtonText="导出简历json数据";fullscreen=false;customInputs={};showWorkspaceHistory=false;mobileUploadAble=false;mobileJdInputAble=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="window";isUploading=false;uploadedFileInfo=null;showChatModal=false;showIframe=false;_internalConversationId;get hostElement(){return o(this)}jobDescription="";isSubmitting=false;_iframeEl;tokenInvalidListener;removeErrorListener;pcmUploadRef;handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}async handleIsOpenChange(e){if(!e){this.showChatModal=false;this.showIframe=false;this.jobDescription="";this.uploadedFileInfo=null;this.isUploading=false;this.isSubmitting=false;this._internalConversationId=undefined}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await r(this.token);if(this.currentConversationId||(this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info){this.showChatModal=true;this.showIframe=false}}}get currentConversationId(){return this.conversationId||this._internalConversationId}componentWillLoad(){if(this.zIndex){a.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}r(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=y.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}handleStreamComplete=e=>{this._internalConversationId=e.detail.conversation_id};componentDidLoad(){window.addEventListener("message",this.handleIframeMessage)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}window.removeEventListener("message",this.handleIframeMessage)}handleClose=()=>{this.modalClosed.emit()};closeResumeChat=()=>{this.showIframe=true;this.showChatModal=false};handleIframeLoad=()=>{};handleIframeMessage=e=>{const t=["http://localhost:3000",f];if(!t.includes(e.origin))return;const{type:o,value:i}=e.data||{};if(o==="callParentMethod"){this.exampleMethodFromIframe(i)}if(o==="iframeReady"&&this._iframeEl?.contentWindow){const e=new URL(this._iframeEl.src).origin;this._iframeEl.contentWindow.postMessage({type:"parentReady",origin:window.location.origin},e);this._iframeEl.contentWindow.postMessage({type:"setToken",token:this.token},e);this._iframeEl.contentWindow.postMessage({type:"buttonConfig",config:{hideExportButton:this.hideExportButton,exportButtonText:this.exportButtonText}},e)}};exampleMethodFromIframe(e){this.getResumeData.emit(JSON.parse(e))}handleJobDescriptionChange=e=>{const t=e.target;this.jobDescription=t.value};handleStartInterview=async()=>{if(!this.customInputs?.file_url&&!this.customInputs?.resume_content&&!this.uploadedFileInfo){S.info("请上传简历");return}if(await(this.pcmUploadRef?.getIsUploading?.())){S.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":!this.showIframe};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.currentConversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.job_info);const a=Boolean(this.customInputs&&(this.customInputs.file_url||this.customInputs.resume_content));const s=Boolean((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.currentConversationId&&!s&&i("div",{class:"input-container"},!r&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),!!this.mobileJdInputAble&&i("pcm-mobile-input-btn",{name:"职位描述",onOk:e=>{this.jobDescription=e.detail}}),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&i("div",{class:"resume-upload-section"},i("label",null,"上传简历"),i("pcm-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),i("button",{class:"submit-button",disabled:!a&&!this.uploadedFileInfo||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&!this.showIframe&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isShowHeader,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:"45444431062634496",conversationId:this.currentConversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,closeResume:this.closeResumeChat,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription},interviewMode:"text",onStreamComplete:this.handleStreamComplete})),this.showIframe&&i(i.Fragment,null,i("div",{class:"iframe-container"},i("iframe",{ref:e=>this._iframeEl=e,src:`${f}/myresume?conversation_id=${this.currentConversationId}&isSdk=true`,frameborder:"0",onLoad:this.handleIframeLoad})))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Ka.style=Ga+(Xa+Ya);const Za=".upload-area{max-height:300px;overflow-y:auto}.upload-actions{display:flex;gap:12px;margin-top:12px;width:100%}";const es='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const ts=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const os=class{constructor(o){e(this,o);this.uploadFailed=t(this,"uploadFailed");this.uploadChange=t(this,"uploadChange")}multiple=false;mobileUploadAble=false;acceptFileSuffixList=[];maxFileCount=Infinity;maxFileSize=Infinity;uploadHeaders;uploadParams;uploadText="点击上传简历";defaultFileList;disabled=false;uploadFailed;uploadChange;get hostElement(){return o(this)}selectedFiles=null;componentWillLoad(){if(this.defaultFileList&&this.defaultFileList.length>0){this.selectedFiles=this.defaultFileList.map((e=>({...e,state:x.Success})))}}async getIsUploading(){return!!this.selectedFiles?.some((e=>e.state===x.Uploading))}async clearSelectedFiles(){this.selectedFiles=null;this.clearSelectedFile()}handleUploadClick=()=>{if(this.disabled)return;const e=this.hostElement.shadowRoot?.querySelector(".file-input");e?.click()};clearSelectedFile=()=>{const e=this.hostElement.shadowRoot?.querySelector(".file-input");if(e){e.value=""}};async uploadFile(e){try{const t=await p(e,this.uploadHeaders||{},this.uploadParams||{});return{...t,file:e,file_name:e.name,file_size:e.size,state:x.Success}}catch(t){this.clearSelectedFile();I.captureError(t,{action:"uploadFile",component:"pcm-mnms-modal",title:"文件上传失败"});this.uploadFailed.emit({error:t,message:"文件上传失败,请重试"});return{file:e,error:t,state:x.Failed}}}handleFileChange=async e=>{const t=e.target;if(this.multiple){const e=Array.from(t.files||[]);if(e.length===0)return;const o=this.selectedFiles?.length||0;const i=this.maxFileCount-o;if(e.length>i){S.info(`最多只能上传 ${this.maxFileCount} 个文件,当前已选择 ${o} 个`);return}const n=[];const r=[];e.forEach((e=>{if(this.acceptFileSuffixList?.length){const t="."+e.name.split(".").pop()?.toLowerCase();if(!this.acceptFileSuffixList.includes(t)){r.push(`${e.name}(格式不支持)`);return}}if(this.maxFileSize<e.size){r.push(`${e.name}(文件过大)`);return}n.push(e)}));if(r.length>0){const e=this.acceptFileSuffixList?.length?this.acceptFileSuffixList.join("、"):"";const t=this.maxFileSize!==Infinity?w(this.maxFileSize):"";S.info(`以下文件无法上传:${r.join("、")}。${e?`支持格式:${e}。`:""}${t?`最大文件大小:${t}。`:""}`)}if(n.length===0){this.clearSelectedFile();return}const a=n.map((e=>({file:e,file_name:e.name,file_size:e.size,state:x.Uploading,cos_key:"",error:undefined})));this.selectedFiles=[...this.selectedFiles||[],...a];for(let e=0;e<n.length;e++){const t=n[e];const o=await this.uploadFile(t);if(this.selectedFiles){const t=this.selectedFiles.length;const i=t-n.length+e;if(i>=0&&i<this.selectedFiles.length){this.selectedFiles[i]=o;this.selectedFiles=[...this.selectedFiles]}}}this.clearSelectedFile();this.emitUploadChange()}else{const e=t.files?.[0];if(!e)return;if(this.acceptFileSuffixList?.length){const t="."+e.name.split(".").pop()?.toLowerCase();if(!this.acceptFileSuffixList.includes(t)){S.info(`请上传 ${this.acceptFileSuffixList.join("、")} 格式的文件`);return}}if(this.maxFileSize<e.size){S.info(`文件大小不能超过 ${w(this.maxFileSize)??"-"}`);return}this.selectedFiles=[{file:e,file_name:e.name,file_size:e.size,state:x.Uploading,cos_key:"",error:undefined}];const o=await this.uploadFile(e);this.selectedFiles=[o];this.clearSelectedFile();this.emitUploadChange()}};emitUploadChange=()=>{this.uploadChange.emit(this.selectedFiles?.filter((e=>e.state===x.Success)).map?.((e=>({cos_key:e.cos_key,file_name:e.file_name,file_size:e.file_size,ext:e.ext}))))};uploadBtn(){return i("div",{style:{width:"100%"}},!!this.mobileUploadAble&&i("pcm-mobile-upload-btn",{multiple:this.multiple,acceptFileSuffixList:this.acceptFileSuffixList,maxFileCount:this.maxFileCount,maxFileSize:this.maxFileSize,uploadHeaders:this.uploadHeaders,uploadParams:this.uploadParams,onOk:e=>{this.selectedFiles=[...this.selectedFiles??[],...(e.detail??[]).map((e=>({...e,state:x.Success})))];this.emitUploadChange()}}),i("div",{class:"upload-placeholder",onClick:this.handleUploadClick},i("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_upload.png"}),i("p",{class:"upload-text"},this.uploadText),!!this.acceptFileSuffixList?.length&&i("p",{class:"upload-hint"},"支持 ",this.acceptFileSuffixList.join("、")," 格式。"),!!this.maxFileSize&&this.maxFileSize!==Infinity&&i("p",{class:"upload-hint"},"文件大小不能超过 ",w(this.maxFileSize)??"","。"),!!this.maxFileCount&&this.maxFileCount!==Infinity&&i("p",{class:"upload-hint"},"最多上传 ",this.maxFileCount," 个文件。")))}render(){return i("div",{key:"2474772f77ba61b33fad367a806979bf741810b4"},i("div",{key:"93c3e98c7b9cf8254316fdf31c27db45b095df2b",class:"resume-upload-section"},i("div",{key:"ba2792c378583f43a5810b0f15ae0842f01d6edc",class:"upload-area"},i("div",{key:"cbdc8adc18ef54fff5227fd7cf3729d34f790081"},this.selectedFiles?.map?.(((e,t)=>i("div",{class:"file-item"},i("div",{class:"file-item-content"},i("span",{class:"file-icon"},"📝"),i("span",{class:"file-name",style:e.state===x.Failed?{color:"red",textDecoration:"line-through"}:undefined},e?.file_name),e.state===x.Failed&&i("span",{style:{color:"red",marginLeft:"4px"}},"(",e.error?.message??"上传失败",")")),!this.disabled&&i("button",{class:"remove-file",onClick:e=>{e.stopPropagation();this.selectedFiles=this.selectedFiles?.filter(((e,o)=>t!==o));this.emitUploadChange()}},"×")))))),!this.disabled&&(this.multiple?i("div",{class:"upload-actions"},(this.selectedFiles?.length??0)<this.maxFileCount&&this.uploadBtn()):i("div",{class:"upload-actions"},!this.selectedFiles?.length&&this.uploadBtn()))),i("input",{key:"79d0eac29a56efcf85d8663ef0a0f84df81d866d",type:"file",class:"file-input",multiple:this.multiple,onChange:this.handleFileChange}))}};os.style=Za+(es+ts);const is=":host{display:block;font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;overflow:hidden;padding:0;z-index:1000}.fullscreen-overlay{padding:0;position:absolute;width:100%;height:100%}.modal-container{background:#fff;border-radius:0;width:100%;height:100%;display:flex;flex-direction:column;position:relative;margin:0;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.digital-human-background{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;overflow:hidden;display:flex;justify-content:center}.digital-human-background-video{width:100%;height:100%;object-fit:cover;object-position:center;max-width:1200px}.modal-container:not(.digital-human-mode){background:white;border-radius:8px;width:100%;max-width:900px;height:90vh;max-height:800px}.modal-content-layer{position:relative;z-index:10;height:100%;display:flex;flex-direction:column;background:linear-gradient(\r\n 180deg,\r\n rgba(0, 0, 0, 0.3) 0%,\r\n rgba(0, 0, 0, 0.1) 20%,\r\n rgba(0, 0, 0, 0.1) 80%,\r\n rgba(0, 0, 0, 0.4) 100%\r\n )}.main-content{display:flex;flex-direction:column;align-items:center;overflow:hidden;padding:24px 24px 40px 24px;position:absolute;bottom:0px;width:-webkit-fill-available}.chat-history-section{width:100%;max-width:800px;text-align:center;color:white}.ai-message-item{padding:12px 20px;border-radius:12px;margin-bottom:12px;animation:fadeIn 0.5s ease-in-out}.recording-preview-top-right{position:absolute;top:20px;right:20px;width:180px;height:120px;border-radius:12px;overflow:hidden;border:2px solid rgba(255, 255, 255, 0.5);box-shadow:0 4px 12px rgba(0, 0, 0, 0.3);background-color:#000;z-index:10}.user-video-preview{width:100%;height:100%;object-fit:cover}.recording-status-bar{display:flex;align-items:center;justify-content:space-between;background-color:white;padding:8px 12px;border-radius:999px;margin-top:4px;width:100%;max-width:400px;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1);animation:slideInUp 0.5s ease-out;line-height:40px}.audio-waveform{display:flex;align-items:center;height:24px}.waveform-bar{width:4px;margin:0 2px;background-color:#16a34a;border-radius:2px;height:6px;animation:waveform-animation 1.2s infinite ease-in-out}.waveform-bar:nth-child(1){animation-delay:0.1s}.waveform-bar:nth-child(2){animation-delay:0.3s}.waveform-bar:nth-child(3){animation-delay:0.5s}.waveform-bar:nth-child(4){animation-delay:0.2s}.waveform-bar:nth-child(5){animation-delay:0.4s}.waveform-bar:nth-child(6){animation-delay:0.1s}.waveform-bar:nth-child(7){animation-delay:0.3s}.waveform-bar:nth-child(8){animation-delay:0.5s}@keyframes waveform-animation{0%,100%{height:6px}50%{height:35px}}.recording-timer{font-size:14px;color:#595959;font-family:'Courier New', Courier, monospace}.finish-recording-btn{background-color:#16a34a;border:none;border-radius:50%;width:32px;height:32px;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);transition:background-color 0.3s,\r\n transform 0.2s}.finish-recording-btn:hover{background-color:#148a3f}.finish-recording-btn:active{transform:scale(0.95)}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes slideInUp{from{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}.status-indicator-text{display:flex;align-items:center;gap:8px;font-size:14px;color:#595959;width:100%;justify-content:center}.status-indicator-text.loading .loading-spinner-small{width:16px;height:16px;border:2px solid rgba(0, 0, 0, 0.1);border-top-color:#595959;border-radius:50%;animation:spin 0.8s linear infinite}.status-indicator-text.error{color:#ff4d4f}.status-indicator-text.ready{color:#16a34a}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.loading-spinner-small{width:20px;height:20px;border:2px solid #e5e7eb;border-top-color:#6b7280;border-radius:50%;animation:spin 0.8s linear infinite}.upload-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;color:#666;border-radius:4px;transition:background-color 0.2s}.upload-button:hover{background-color:rgba(0, 0, 0, 0.04)}.upload-button svg{width:20px;height:20px}.file-input{display:none}.selected-file{font-size:12px;color:#666;margin-left:8px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.input-wrapper{flex:1;display:flex;align-items:center;border:1px solid #ddd;border-radius:4px;padding:0 4px;background:white}.input-wrapper input{border:none;flex:1;padding:8px;outline:none}.input-wrapper:focus-within{border-color:#bbb}.file-preview{padding:8px 16px;border-top:1px solid #eee;background-color:#f9f9f9}.recording-section{border-top:1px solid #eee;display:flex;flex-direction:column;align-items:center;padding:10px 20px 0px 20px;border-radius:14px 14px 0 0;flex:0 0 auto}.recording-section .video-preview{width:100%;height:200px;max-width:400px;position:relative;margin-bottom:10px;border:1px solid #ddd;border-radius:12px;overflow:hidden}.recording-section video{width:100%;height:100%;object-fit:cover}.recording-status{position:absolute;top:10px;left:10px;background-color:rgba(0, 0, 0, 0.6);color:white;padding:4px 8px;border-radius:4px;display:flex;align-items:center;gap:5px;font-size:14px;z-index:0}.recording-status .recording-dot{display:inline-block;width:10px;height:10px;background-color:red;border-radius:50%;margin-right:5px;animation:blink 1s infinite}.recording-status.warning{color:#ff4d4f;animation:blink 1s infinite}@keyframes blink{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}.recording-section .stop-recording-button{background-color:#f44336;color:white;border:none;cursor:pointer;font-weight:bold}.recording-section .stop-recording-button:hover{background-color:#d32f2f}.fullscreen{width:100vw;border-radius:0;height:100vh;display:flex;flex-direction:column;overflow-y:auto}.recording-controls{margin-top:10px;height:53px;width:100%;max-width:400px;display:flex;justify-content:center}.recording-controls .waiting-message{text-align:center;color:white;font-size:16px;background-color:#0d75fb;border-radius:6px;width:95%;display:flex;justify-content:center;align-items:center;cursor:pointer}.recording-controls .waiting-message.loading{background:#faad14}.recording-controls .waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-controls .stop-recording-button{background-color:#dc3545;color:white;border:none;cursor:pointer;font-size:16px}.recording-controls .stop-recording-button:hover{background-color:#c82333}.recording-controls .stop-recording-button.disabled{background:#ccc;cursor:not-allowed}.recording-controls .stop-recording-button.disabled:hover{background:#ccc}.progress-container{display:flex;justify-content:space-between;align-items:center;width:100%;max-width:400px;margin-top:10px;padding:0 5px}.progress-bar-container{height:4px;background-color:#e5e5e5;border-radius:2px;overflow:hidden;margin-right:10px;width:75px}.progress-bar{height:100%;background-image:linear-gradient(111deg, #4a9fff 0%, #1058ff 100%);border-radius:2px;transition:width 0.3s ease}.progress-text{font-size:14px;color:#666;white-space:nowrap}.text-input-area{display:flex;flex-direction:column;width:100%;height:100%;padding:0px 16px 16px 16px;border-radius:8px;border:none;}.text-answer-input{flex:1;min-height:80px;padding:12px 12px 0px 12px;border:1px solid #ddd;border-radius:8px 8px 0 0;resize:none;font-size:16px;background-color:#fff;border-bottom:none;outline:none;}.input-toolbar{display:flex;justify-content:end;align-items:center;padding:8px 12px;background-color:#fff;border:1px solid #ddd;border-top:none;border-radius:0 0 8px 8px}.text-answer-input:focus{border-color:rgb(74, 144, 226);border-bottom:none}.text-answer-input:focus+.input-toolbar{border-color:rgb(74, 144, 226);border-top:none}.toolbar-actions{width:32px;height:32px;display:flex;justify-content:center;align-items:center;margin-right:10px;border:1px solid #d9d9d9;border-radius:6px}.toolbar-actions:hover{background-color:#f0f0f0}.toolbar-button{background:transparent;border:none;color:#666;cursor:pointer;padding:0;margin:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.toolbar-button>div,.toolbar-button>svg{display:flex;justify-content:center;align-items:center}.submit-text-button{padding:6px 16px;background-color:#4a90e2;color:white;border:none;border-radius:4px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color 0.2s}.submit-text-button:hover:not(.disabled){background-color:#3a7bc8}.submit-text-button.disabled{background-color:#b3b3b3;cursor:not-allowed}.toolbar-button.recording{background-color:rgba(255, 0, 0, 0.1);color:#ff3b30;animation:pulse 1.5s infinite}.toolbar-button.converting{background-color:rgba(0, 122, 255, 0.1);color:#007aff}.toolbar-button .recording-time{font-size:12px;margin-left:4px}.converting-indicator{display:flex;justify-content:center;align-items:center}.converting-indicator svg{animation:spin 1.5s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0.4)}70%{box-shadow:0 0 0 6px rgba(255, 0, 0, 0)}100%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0)}}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:0}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.workspace-section{width:100%;padding:0px 16px 16px}.workspace-toolbar{display:flex;justify-content:space-between;align-items:end;gap:12px;position:relative}.workspace-button{display:flex;align-items:center;gap:6px;padding:8px 16px;border:1px solid #d9d9d9;border-radius:6px;background:white;color:#666;font-size:14px;cursor:pointer;transition:all 0.2s ease;box-shadow:0 1px 2px rgba(0, 0, 0, 0.05)}.workspace-button:hover{border-color:#4096ff;color:#4096ff;box-shadow:0 2px 4px rgba(64, 150, 255, 0.1)}.workspace-button svg{flex-shrink:0}.digital-human-wrapper{display:flex;align-items:center;justify-content:center;width:120px;height:80px;border:1px solid #d9d9d9;border-radius:8px;background:#fafafa;overflow:hidden;position:absolute;right:0px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-item.active{background:#e6f7ff;border-color:#1890ff}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.current-indicator{flex-shrink:0;color:#1890ff;margin-left:8px}.ai-message-item{margin-bottom:0;animation:messageSlideIn 0.3s ease-out;width:100%;padding:20px}.ai-message-item.streaming{position:relative}@keyframes messageSlideIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.ai-message-content{color:#fff;padding:20px 24px;border-radius:16px;font-size:16px;line-height:1.6;word-wrap:break-word;backdrop-filter:blur(100px);border:1px solid rgba(255, 255, 255, 0.2);box-shadow:0 4px 20px rgba(0, 0, 0, 0.2);margin-bottom:8px;max-width:100%;text-align:left}.typing-indicator{display:flex;align-items:center;gap:4px;padding:8px 24px;margin-top:-8px}.typing-indicator span{width:8px;height:8px;border-radius:50%;background:#4facfe;animation:typingPulse 1.4s ease-in-out infinite;opacity:0.6}.typing-indicator span:nth-child(1){animation-delay:0s}.typing-indicator span:nth-child(2){animation-delay:0.2s}.typing-indicator span:nth-child(3){animation-delay:0.4s}@keyframes typingPulse{0%,60%,100%{transform:scale(1);opacity:0.4}30%{transform:scale(1.3);opacity:1}}@media screen and (max-width: 768px){.ai-message-content{padding:14px 18px;font-size:15px}}@media screen and (max-width: 480px){.ai-message-content{padding:12px 16px;font-size:14px;line-height:1.4}.typing-indicator{padding:6px 16px}.typing-indicator span{width:6px;height:6px}}@media screen and (max-width: 768px){.ai-message-item{padding:15px}.ai-message-content{padding:16px 20px;font-size:15px}.typing-indicator{padding:6px 20px}}@media screen and (max-width: 480px){.ai-message-item{padding:0px}.ai-message-content{padding:14px 18px;font-size:14px;line-height:1.5}.typing-indicator{padding:5px 18px}.typing-indicator span{width:6px;height:6px}}.waveform-bar{width:3px;background:#4facfe;border-radius:2px;min-height:2px;animation:waveformAnimation 1.2s ease-in-out infinite alternate;transform-origin:bottom}@keyframes waveformAnimation{0%{transform:scaleY(0.2)}100%{transform:scaleY(1)}}.recording-timer{font-size:14px;color:#666;white-space:nowrap}.close-button{position:absolute;top:16px;left:16px;z-index:20;background:rgba(255, 255, 255, 0.9);backdrop-filter:blur(4px);border:1px solid rgba(0, 0, 0, 0.1);border-radius:8px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.2s ease;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1)}.close-button:hover{background:rgba(255, 255, 255, 1);border-color:rgba(0, 0, 0, 0.15);box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);transform:translateY(-1px)}.close-button:active{transform:translateY(0);box-shadow:0 2px 6px rgba(0, 0, 0, 0.1)}.close-button svg{color:#666;transition:color 0.2s ease}.close-button:hover svg{color:#333}.end-interview-button-container{display:flex;align-items:center;justify-content:flex-start;width:100%;max-width:400px;margin-bottom:4px;padding-left:0}.end-interview-button{padding:5px 10px;background-color:#ff4d4f;color:white;border:none;border-radius:20px;font-size:14px;font-weight:500;cursor:pointer;transition:all 0.3s ease;box-shadow:0 2px 8px rgba(255, 77, 79, 0.3);white-space:nowrap}.end-interview-button:hover{background-color:#ff7875;box-shadow:0 4px 12px rgba(255, 77, 79, 0.4);transform:translateY(-1px)}.end-interview-button:active{transform:translateY(0);box-shadow:0 2px 8px rgba(255, 77, 79, 0.3)}.end-interview-button:disabled{background-color:#f0f0f0;color:#bfbfbf;cursor:not-allowed;box-shadow:none;transform:none}";const ns=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const rs=class{constructor(o){e(this,o);this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.recordingError=t(this,"recordingError");this.recordingStatusChange=t(this,"recordingStatusChange");this.tokenInvalid=t(this,"tokenInvalid");this.modalClosed=t(this,"modalClosed")}token;isOpen=false;messages=[];zIndex;conversationId;isLoading=false;currentStreamingMessage=null;isLoadingHistory=false;get hostElement(){return o(this)}streamComplete;conversationStart;defaultQuery="你好!聘才猫";maxRecordingTime=120;countdownWarningTime=30;isRecording=false;recordingStream=null;recordedBlob=null;mediaRecorder=null;recordingTimeLeft=0;showRecordingUI=false;recordingTimer=null;recordingStartTime=0;waitingToRecord=false;waitingTimer=null;_visibilityChangeHandler=null;waitingTimeLeft=10;videoRef=null;currentQuestionNumber=0;interviewComplete;showCountdownWarning=false;fullscreen=false;isUploadingVideo=false;digitalHumanVideoUrl="";digitalHumanDefaultVideoUrl="";virtualmanKey="";isPlayingDigitalHumanVideo=false;digitalHumanVideoReady=false;digitalHumanOpeningContents=[];isPlayingWelcomeVideo=false;isGeneratingDigitalHumanVideo=false;pendingGeneratedVideoUrl="";preloadedVideos=new Set;preloadingVideos=new Map;waitingForDigitalHuman=false;digitalId;openingIndex=0;waitingTime=10;playbackRate=1;showEndInterviewButton=false;recordingError;recordingStatusChange;tokenInvalid;modalClosed;customInputs={};botId;agentLogo="";isTaskCompleted=false;tokenInvalidListener;deviceError=null;showConfirmModal=false;skipConfirmThisInterview=false;showCloseConfirmModal=false;showEndInterviewConfirmModal=false;isEndingInterview=false;isComponentActive=true;handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}async setComponentActive(e){this.isComponentActive=e}componentWillLoad(){if(this.zIndex){a.setItem("modal-zIndex",this.zIndex)}else{const e=a.getItem("modal-zIndex");if(e){this.zIndex=e}else{this.zIndex=1e3;a.setItem("modal-zIndex",1e3)}}if(this.token){n.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};document.addEventListener("pcm-token-invalid",this.tokenInvalidListener);this._visibilityChangeHandler=()=>{if(document.visibilityState==="visible"){this.handlePageResume()}};document.addEventListener("visibilitychange",this._visibilityChangeHandler);if(!this.customInputs){this.customInputs={}}if(this.botId){this.fetchAgentLogo()}console.log("componentWillLoad - 数字人相关状态:",{digitalId:this.digitalId,isOpen:this.isOpen,conversationId:this.conversationId,virtualmanKey:this.virtualmanKey});if(this.isOpen){if(this.conversationId){setTimeout((()=>this.loadHistoryMessages()),0)}else{if(this.digitalId){this.initializeDigitalHuman()}setTimeout((()=>{this.sendMessageToAPI(this.defaultQuery)}),0)}}}async fetchAgentLogo(){if(!this.botId)return;try{const e=await s(this.botId);if(e&&e.logo){this.agentLogo=e.logo}}catch(e){I.captureError(e,{action:"fetchAgentLogo",component:"pcm-virtual-chat-modal",title:"获取智能体信息失败"});y.emitError({error:e,message:"获取智能体信息失败"})}}async sendMessageToAPI(e,t){if(this.isTaskCompleted&&!this.isEndingInterview){return}this.waitingForDigitalHuman=false;this.digitalHumanVideoReady=false;this.isLoading=true;let o="";let i="";const n=new Date;const r=`${n.getHours()}:${n.getMinutes().toString().padStart(2,"0")}`;const a=e.trim()||"请开始";if(t){this.customInputs={...this.customInputs,video_url:t}}if(!this.customInputs.url_callback){this.customInputs={...this.customInputs,url_callback:"https://tagents.ylzhaopin.com/agents/api/test/callback"}}const s={id:`temp-${Date.now()}`,conversation_id:this.conversationId,inputs:this.customInputs||{},query:a,answer:"",message_files:[],feedback:{},retriever_resources:[],created_at:Math.floor(Date.now()/1e3).toString(),agent_thoughts:[],status:"normal",error:null,time:r,isStreaming:true};this.currentStreamingMessage=s;const d={response_mode:"streaming",conversation_id:this.conversationId,query:a,bot_id:this.botId};d.inputs={...this.customInputs};await l({url:"/sdk/v1/chat/chat-messages",method:"POST",data:d,onMessage:e=>{if(e.conversation_id&&!this.conversationId){this.conversationId=e.conversation_id;this.conversationStart.emit({conversation_id:e.conversation_id,event:e.event,message_id:e.message_id,id:e.id})}if(e.event==="node_finished"&&e.data.inputs&&e.data.inputs.LLMText){i=e.data.inputs.LLMText}if(e.event==="node_finished"&&e.data.title&&e.data.title.includes("聘才猫任务结束")){this.isTaskCompleted=true;const e=i||o||this.currentStreamingMessage?.answer||"";this.interviewComplete.emit({conversation_id:this.conversationId,current_question_number:this.currentQuestionNumber,ai_response:e})}if(e.event==="node_finished"&&e.data.title&&e.data.title.includes("聘才猫数字人题目")){const t=JSON.parse(e.data.process_data.digital_human_list);this.precreateDigitalHumanVideos(t)}if(e.event==="error"){const t=e.data?.message||e.message||"请求失败";this.messages=[...this.messages,{...s,answer:t,error:e.data,isStreaming:false}];this.currentStreamingMessage=null;this.isLoading=false;y.emitError({error:e.data,message:t});return}if(e.event==="message"){if(e.event==="agent_message"||e.event==="message"){if(e.answer){o+=e.answer;const t={...this.currentStreamingMessage,answer:o,id:e.message_id||this.currentStreamingMessage.id,isStreaming:true,retriever_resources:e.retriever_resources||this.currentStreamingMessage.retriever_resources,agent_thoughts:e.agent_thoughts||this.currentStreamingMessage.agent_thoughts};this.currentStreamingMessage=t}}}if(e.event==="message_end"){this.streamComplete.emit({conversation_id:e.conversation_id||"",event:e.event,message_id:e.message_id,id:e.id})}},onError:e=>{console.error("发生错误:",e);y.emitError({error:e,message:"消息发送失败,请稍后再试"});I.captureError(e,{action:"sendMessageToAPI",component:"pcm-virtual-chat-modal",title:"消息发送失败"});this.messages=[...this.messages,{...s,answer:"消息发送失败,请检查网络。",error:e,isStreaming:false}];this.currentStreamingMessage=null;this.isLoading=false},onComplete:async()=>{this.isLoading=false;if(this.currentQuestionNumber===0){setTimeout((()=>{if(this.customInputs){delete this.customInputs.job_info;delete this.customInputs.file_url;delete this.customInputs.file_name}}),1e3)}const e=this.currentStreamingMessage;e.isStreaming=false;if(this.digitalId&&e&&e.answer){this.generateDigitalHumanVideo(e.answer)}this.currentStreamingMessage=null;this.messages=[...this.messages,e];this.currentQuestionNumber++;if(this.isTaskCompleted||this.isEndingInterview){return}if(this.digitalId){this.waitingForDigitalHuman=true}}})}async loadHistoryMessages(){if(!this.conversationId)return;this.isLoadingHistory=true;let e=false;this.digitalHumanVideoReady=true;try{const t=await d({url:`/sdk/v1/chat/conversation`,method:"GET",data:{conversation_id:this.conversationId}});if(t.success&&t.data&&t.data.run_status=="结束"){e=true}const o=await d({url:"/sdk/v1/chat/messages",method:"GET",data:{conversation_id:this.conversationId,bot_id:this.botId,limit:20}});if(o.success&&o.data){const e=o.data.data||[];const t=e.map((e=>{const t=new Date(parseInt(e.created_at)*1e3);const o=t.getHours().toString().padStart(2,"0");const i=t.getMinutes().toString().padStart(2,"0");const n=`${o}:${i}`;return{id:e.id,conversation_id:e.conversation_id,inputs:e.inputs||{},query:e.query||"",answer:e.answer||"",message_files:e.message_files||[],feedback:e.feedback||{},retriever_resources:e.retriever_resources||[],created_at:e.created_at,agent_thoughts:e.agent_thoughts||[],status:e.status||"normal",error:e.error,time:n,isStreaming:false}}));this.messages=t;this.currentQuestionNumber=t.length||0}}catch(e){console.error("加载历史消息或会话状态失败:",e);I.captureError(e,{action:"loadHistoryMessages",component:"pcm-virtual-chat-modal",title:"加载历史消息失败"});y.emitError({error:e,message:"加载历史消息失败,请刷新重试"})}finally{this.isLoadingHistory=false;if(this.conversationId&&this.messages.length>0&&!e&&!this.isEndingInterview){this.isPlayingDigitalHumanVideo=false;this.isPlayingWelcomeVideo=false;this.digitalHumanVideoReady=true;this.initializeDigitalHuman().then((()=>{if(this.digitalHumanDefaultVideoUrl){this.digitalHumanVideoUrl=this.digitalHumanDefaultVideoUrl}}));setTimeout((()=>{this.startWaitingToRecord()}),200)}else if(e){this.isTaskCompleted=true;if(this.digitalId){this.isPlayingDigitalHumanVideo=false;this.isPlayingWelcomeVideo=false;this.digitalHumanVideoReady=true;this.initializeDigitalHuman().then((()=>{if(this.digitalHumanDefaultVideoUrl){this.digitalHumanVideoUrl=this.digitalHumanDefaultVideoUrl}}))}}}}startWaitingToRecord(){if(this.isTaskCompleted||this.isEndingInterview){return}if(this.waitingTimer){clearInterval(this.waitingTimer)}if(this.recordingTimer){clearInterval(this.recordingTimer)}this.waitingToRecord=true;this.waitingTimeLeft=this.waitingTime;this.waitingTimer=setInterval((()=>{this.waitingTimeLeft--;if(this.waitingTimeLeft<=0){clearInterval(this.waitingTimer);this.waitingTimer=null;this.waitingToRecord=false;this.startRecording()}}),1e3)}async startRecording(){if(this.isTaskCompleted||this.isEndingInterview){return}try{const e=await navigator.mediaDevices.getUserMedia({audio:true,video:{width:{ideal:1280},height:{ideal:720},frameRate:{ideal:30}}});this.deviceError=null;this.recordingStream=e;this.showRecordingUI=true;this.showCountdownWarning=false;this.videoRef=null;this.setupVideoPreview(e);const t=c();let o;try{o=new MediaRecorder(e,{mimeType:t,videoBitsPerSecond:8e5,audioBitsPerSecond:64e3})}catch(t){console.warn("指定的MIME类型不受支持,使用默认设置:",t);try{o=new MediaRecorder(e,{videoBitsPerSecond:8e5,audioBitsPerSecond:64e3})}catch(t){try{o=new MediaRecorder(e)}catch(e){this.recordingError.emit({type:"recorder_creation_failed",message:"无法创建媒体录制器,您的浏览器可能不支持此功能",details:e});this.showRecordingUI=false;return}}}this.mediaRecorder=o;const i=[];o.ondataavailable=e=>{if(e.data.size>0){i.push(e.data)}};o.onerror=e=>{this.recordingError.emit({type:"recording_error",message:"录制过程中发生错误",details:e});this.stopRecording()};o.onstop=()=>{try{const e=t||"video/mp4";const o=new Blob(i,{type:e});if(o.size===0){this.recordingError.emit({type:"empty_recording",message:"录制的视频为空"});this.showRecordingUI=false;return}this.recordedBlob=o;this.recordingStatusChange.emit({status:"stopped",details:{duration:Math.floor((Date.now()-this.recordingStartTime)/1e3),size:o.size,type:o.type}});this.uploadRecordedVideo()}catch(e){this.recordingError.emit({type:"processing_error",message:"处理录制视频时出错",details:e});this.showRecordingUI=false;I.captureError(e,{action:"uploadRecordedVideo",component:"pcm-hr-chat-modal",title:"处理录制视频时出错"})}};try{o.start();this.isRecording=true;this.recordingStartTime=Date.now();this.recordingTimeLeft=this.maxRecordingTime;this.recordingStatusChange.emit({status:"started",details:{maxDuration:this.maxRecordingTime,mimeType:o.mimeType}})}catch(e){this.recordingError.emit({type:"start_failed",message:"开始录制失败,请检查您的设备权限",details:e});this.showRecordingUI=false;I.captureError(e,{action:"startRecording",component:"pcm-hr-chat-modal",title:"开始录制失败"});return}this.recordingTimer=setInterval((()=>{const e=Math.floor((Date.now()-this.recordingStartTime)/1e3);this.recordingTimeLeft=Math.max(0,this.maxRecordingTime-e);if(this.recordingTimeLeft<=this.countdownWarningTime&&!this.showCountdownWarning){this.showCountdownWarning=true}if(this.recordingTimeLeft<=0){this.stopRecording()}}),1e3)}catch(e){console.error("无法访问摄像头或麦克风:",e);let t="设备访问失败";if(e.name==="NotAllowedError"){t="请允许访问摄像头和麦克风权限"}else if(e.name==="NotFoundError"){t="未检测到摄像头或麦克风设备"}else if(e.name==="NotReadableError"){t="您的浏览器不支持视频录制,请切换到微信或Chrome、Edge使用"}else if(e.name==="OverconstrainedError"){t="摄像头不支持指定的配置"}else{t="无法访问摄像头或麦克风,请检查设备连接"}this.deviceError=t;this.showRecordingUI=false;y.emitError({error:e,message:t});I.captureError(e,{action:"startRecording",component:"pcm-virtual-chat-modal",title:t})}}setupVideoPreview(e){setTimeout((()=>{const t=this.hostElement.shadowRoot?.querySelector(".user-video-preview");if(t&&e){try{t.srcObject=e;t.play().catch((e=>{console.error("视频播放失败:",e);I.captureError(e,{action:"setupVideoPreview",component:"pcm-virtual-chat-modal",title:"视频播放失败"});y.emitError({error:e,message:"视频播放失败"})}))}catch(o){console.warn("设置srcObject失败,尝试替代方法:",o);try{const o=URL.createObjectURL(e);t.src=o;t.onended=()=>{URL.revokeObjectURL(o)}}catch(e){console.error("创建对象URL失败:",e);I.captureError(e,{action:"setupVideoPreview",component:"pcm-virtual-chat-modal",title:"创建对象URL失败"});y.emitError({error:e,message:"创建对象URL失败"})}}}else{console.warn("未找到视频元素或媒体流无效")}}),100)}stopRecording(){if(this.mediaRecorder&&this.isRecording){this.mediaRecorder.stop();this.isRecording=false;if(this.recordingTimer){clearInterval(this.recordingTimer);this.recordingTimer=null}if(this.recordingStream){this.recordingStream.getTracks().forEach((e=>e.stop()));this.recordingStream=null}this.videoRef=null}this.pendingGeneratedVideoUrl=""}handleStopRecording=()=>{if(this.skipConfirmThisInterview){this.stopRecording();return}this.showConfirmModal=true};handleSkipConfirmChange=e=>{const t=e.target;this.skipConfirmThisInterview=t.checked};handleConfirmModalCancel=()=>{this.showConfirmModal=false};handleConfirmModalOk=()=>{this.showConfirmModal=false;this.stopRecording()};handleConfirmModalCancelEvent=()=>{this.showConfirmModal=false};async uploadRecordedVideo(){if(!this.recordedBlob)return;try{this.isUploadingVideo=true;this.showRecordingUI=false;const e=this.recordedBlob.type.includes("webm")?"webm":"mp4";const t=`answer.${e}`;const o=new File([this.recordedBlob],t,{type:this.recordedBlob.type});const i=await p(o,{},{tags:["other"]});const n=await h(i.cos_key);if(this.isEndingInterview){await this.sendEndInterviewMessage()}else{this.sendMessageToAPI(n||"下一题",i.cos_key)}}catch(e){console.error("视频上传或处理错误:",e);this.isEndingInterview=false;I.captureError(e,{action:"uploadRecordedVideo",component:"pcm-virtual-chat-modal",title:"视频上传或处理失败"});y.emitError({error:e,message:"视频上传或处理失败"})}finally{this.isUploadingVideo=false;this.showRecordingUI=false;this.recordedBlob=null}}handleCloseClick=()=>{this.showCloseConfirmModal=true};handleCloseConfirmOk=()=>{this.showCloseConfirmModal=false;this.stopRecording();this.modalClosed.emit()};handleCloseConfirmCancel=()=>{this.showCloseConfirmModal=false};disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this._visibilityChangeHandler){document.removeEventListener("visibilitychange",this._visibilityChangeHandler);this._visibilityChangeHandler=null}if(this.waitingTimer){clearInterval(this.waitingTimer);this.waitingTimer=null}if(this.recordingTimer){clearInterval(this.recordingTimer);this.recordingTimer=null}this.stopRecording();this.preloadedVideos.clear();this.preloadingVideos.clear();this.pendingGeneratedVideoUrl=""}async precreateDigitalHumanVideos(e){if(!this.virtualmanKey){console.warn("VirtualmanKey尚未加载,无法预创建视频。");return}for(const t of e){if(!t||!t.trim())continue;try{await d({url:"/sdk/v1/virtual-human/create-video",method:"POST",data:{VirtualmanKey:this.virtualmanKey,InputSsml:t,SpeechParam:{Speed:1},VideoParam:{Format:"TransparentWebm"},DriverType:"Text"}})}catch(e){console.error(`为文本 "${t}" 创建视频任务失败:`,e);I.captureError(e,{action:"precreateDigitalHumanVideos",component:"pcm-virtual-chat-modal",title:`为文本 "${t}" 创建视频任务失败`})}}}async initializeDigitalHuman(){if(!this.digitalId)return;try{const e=await d({url:"/sdk/v1/virtual-human/avatar-detail",method:"POST",data:{avatar_id:this.digitalId}});if(e.success){const{placeholder_video_url:t,virtualman_key:o,opening_contents:i}=e.data;if(t){this.digitalHumanDefaultVideoUrl=t;this.digitalHumanVideoUrl=t}if(o){this.virtualmanKey=o}if(i&&Array.isArray(i)&&i.length>0){this.digitalHumanOpeningContents=i;const e=Math.max(0,Math.min(2,this.openingIndex||0));const o=this.digitalHumanOpeningContents[e]||this.digitalHumanOpeningContents[0];const n=[];if(o.video_url){n.push(o.video_url)}if(t&&t!==o.video_url){n.push(t)}this.handleVideoUrlReceivedSequential(n,"数字人初始化(顺序)");if(o.video_url&&!this.digitalHumanVideoReady){this.playDigitalHumanVideo(o.video_url,true)}}else{if(t){this.handleVideoUrlReceivedSequential([t],"数字人初始化(仅默认视频)")}}}}catch(e){console.error("初始化数字人失败:",e);I.captureError(e,{action:"initializeDigitalHuman",component:"pcm-virtual-chat-modal",title:"数字人初始化失败"})}}async generateDigitalHumanVideo(e){if(!this.isComponentActive){console.warn("组件已停用,跳过数字人视频生成");return}if(!e.trim()||!this.virtualmanKey){if(this.waitingForDigitalHuman&&!this.isTaskCompleted){this.waitingForDigitalHuman=false;this.startWaitingToRecord()}return}this.isGeneratingDigitalHumanVideo=true;try{const t=await d({url:"/sdk/v1/virtual-human/create-video",method:"POST",data:{VirtualmanKey:this.virtualmanKey,InputSsml:e,SpeechParam:{Speed:1},VideoParam:{Format:"TransparentWebm"},DriverType:"Text"}});if(!t.success){z(t.message,"error");throw new Error(`创建视频任务失败: ${t.message}`)}const o=t.data.Payload.TaskId;const i=await this.pollVideoProgress(o);if(!this.isComponentActive){console.warn("组件已停用,跳过视频播放");return}if(i){await this.preloadVideo(i);if(!this.isComponentActive){console.warn("组件已停用,跳过视频播放");return}if(this.isPlayingWelcomeVideo){this.pendingGeneratedVideoUrl=i}else{await this.playDigitalHumanVideo(i)}}else{throw new Error("未能获取到数字人视频URL")}}catch(e){console.error("数字人视频生成失败:",e);I.captureError(e,{action:"generateDigitalHumanVideo",component:"pcm-virtual-chat-modal",title:"数字人视频生成失败"});if(this.waitingForDigitalHuman&&!this.isTaskCompleted){this.waitingForDigitalHuman=false;this.startWaitingToRecord()}}finally{this.isGeneratingDigitalHumanVideo=false}}async pollVideoProgress(e){const t=45;const o=2e3;for(let i=0;i<t;i++){try{const t=await d({url:"/sdk/v1/virtual-human/query-progress",method:"POST",data:{TaskId:e}});if(!t.success){throw new Error(`查询进度失败: ${t.message}`)}const i=t.data.Payload;if(i.Status==="SUCCESS"&&i.Progress===100){return i.MediaUrl}else if(i.Status==="FAILED"){throw new Error(`视频生成失败: ${i.FailMessage}`)}await new Promise((e=>setTimeout(e,o)))}catch(e){console.error("轮询视频进度失败:",e);break}}throw new Error("视频生成超时")}async playDigitalHumanVideo(e,t=false){try{await this.preloadVideo(e);this.digitalHumanVideoUrl=e;this.isPlayingDigitalHumanVideo=true;this.digitalHumanVideoReady=true;this.isPlayingWelcomeVideo=t}catch(e){console.error("播放数字人视频失败:",e);if(this.waitingForDigitalHuman&&!this.isTaskCompleted){this.waitingForDigitalHuman=false;this.startWaitingToRecord()}}}async preloadVideo(e){if(!e||!e.trim()){return Promise.resolve()}const t=e.trim();const o=t.split("/").pop()||t;if(this.preloadedVideos.has(t)){return Promise.resolve()}if(this.preloadingVideos.has(t)){return this.preloadingVideos.get(t)}const i=this.executeVideoPreload(t);this.preloadingVideos.set(t,i);try{await i;this.preloadedVideos.add(t)}catch(e){console.error(`💥 视频预加载失败: ${o.substring(0,30)}${o.length>30?"...":""}`,e)}finally{this.preloadingVideos.delete(t)}}async executeVideoPreload(e){return new Promise(((t,o)=>{const i=document.createElement("video");i.preload="auto";i.src=e;i.muted=true;i.crossOrigin="anonymous";let n=false;const r=()=>{if(n)return;n=true;s();t()};const a=t=>{if(n)return;n=true;s();console.error("视频预加载失败:",e,t);o(new Error("视频预加载失败"))};const s=()=>{i.removeEventListener("canplaythrough",r);i.removeEventListener("loadeddata",r);i.removeEventListener("error",a);i.removeEventListener("abort",a);i.src=""};i.addEventListener("canplaythrough",r);i.addEventListener("loadeddata",r);i.addEventListener("error",a);i.addEventListener("abort",a);setTimeout((()=>{if(!n){console.warn("视频预加载超时:",e);a("timeout")}}),15e3);i.load()}))}async sequentialPreloadVideos(e){if(!e||e.length===0){return}const t=e.filter((e=>e&&e.trim()));if(t.length===0){return}t.forEach(((e,t)=>{e.split("/").pop()||e}));for(let e=0;e<t.length;e++){const o=t[e];const i=o.split("/").pop()||o;try{await this.preloadVideo(o)}catch(o){console.warn(`❌ [${e+1}/${t.length}] 预加载失败: ${i.substring(0,50)}${i.length>50?"...":""}`,o)}}}handleVideoUrlReceivedSequential(e,t=""){if(!e||e.length===0)return;const o=e.filter((e=>e&&e.trim()));if(o.length===0)return;this.sequentialPreloadVideos(o).catch((e=>{console.warn(`⚠️ 顺序预加载视频失败 (${t}):`,e)}))}handlePageResume(){if(this.isTaskCompleted||!this.isOpen||this.isEndingInterview){return}console.log("页面恢复可见,检查流程状态:",{waitingForDigitalHuman:this.waitingForDigitalHuman,isPlayingDigitalHumanVideo:this.isPlayingDigitalHumanVideo,waitingToRecord:this.waitingToRecord,isRecording:this.isRecording,showRecordingUI:this.showRecordingUI});if(this.isPlayingDigitalHumanVideo){const e=this.hostElement.shadowRoot?.querySelector(".digital-human-background-video");if(e){const t=e.play();if(t){t.catch((()=>{console.warn("恢复数字人视频播放失败,跳过视频");this.skipDigitalHumanVideo()}))}setTimeout((()=>{if(this.isPlayingDigitalHumanVideo){console.warn("数字人视频恢复后3秒仍未结束,强制跳过");this.skipDigitalHumanVideo()}}),3e3)}else{this.skipDigitalHumanVideo()}return}if(this.waitingForDigitalHuman&&!this.isPlayingDigitalHumanVideo){console.warn("检测到waitingForDigitalHuman卡住(视频未在播放),直接开始录制流程");this.waitingForDigitalHuman=false;this.startWaitingToRecord();return}if(this.isRecording&&this.recordingStream){const e=this.recordingStream.getTracks();const t=e.length>0&&e.every((e=>e.readyState==="ended"));if(t){console.warn("检测到录制的MediaStream已被系统回收,停止录制");this.deviceError="设备被系统中断,请重新录制";this.stopRecording()}}}skipDigitalHumanVideo(){this.digitalHumanVideoUrl=this.digitalHumanDefaultVideoUrl;this.isPlayingDigitalHumanVideo=false;this.isPlayingWelcomeVideo=false;if(this.waitingForDigitalHuman&&!this.isTaskCompleted&&!this.isEndingInterview){this.waitingForDigitalHuman=false;this.startWaitingToRecord()}}handleVideoElementEnded=async()=>{if(this.isPlayingDigitalHumanVideo){this.digitalHumanVideoUrl=this.digitalHumanDefaultVideoUrl;this.isPlayingDigitalHumanVideo=false;const e=this.isPlayingWelcomeVideo;this.isPlayingWelcomeVideo=false;if(e&&this.pendingGeneratedVideoUrl){const e=this.pendingGeneratedVideoUrl;this.pendingGeneratedVideoUrl="";await this.playDigitalHumanVideo(e);return}if(this.waitingForDigitalHuman&&!this.isTaskCompleted&&!this.isEndingInterview&&!e){this.waitingForDigitalHuman=false;this.startWaitingToRecord()}}};handleInterviewEnd=()=>{if(this.isEndingInterview||this.isTaskCompleted){return}this.showEndInterviewConfirmModal=true};handleConfirmEndInterview=async()=>{try{this.showEndInterviewConfirmModal=false;this.isEndingInterview=true;if(this.waitingTimer){clearInterval(this.waitingTimer);this.waitingTimer=null}this.waitingToRecord=false;this.waitingForDigitalHuman=false;if(this.isRecording){this.stopRecording()}else{await this.sendEndInterviewMessage()}}catch(e){console.error("点击结束发送消息失败:",e);this.isEndingInterview=false;I.captureError(e,{action:"handleConfirmEndInterview",component:"pcm-virtual-chat-modal",title:"点击结束发送消息失败"});y.emitError({error:e,message:"点击结束发送消息失败"})}};sendEndInterviewMessage=async()=>{try{const e="请结束面试";console.log("面试结束消息已发送:",{conversation_id:this.conversationId,message:e});await this.sendMessageToAPI(e);this.isEndingInterview=false}catch(e){console.error("发送结束面试消息失败:",e);this.isEndingInterview=false;throw e}};handleCancelEndInterview=()=>{this.showEndInterviewConfirmModal=false};getAnsweredQuestionCount=()=>this.messages.filter((e=>e.answer&&e.answer.trim())).length;renderChatHistory(){if(this.isPlayingWelcomeVideo){const e=Math.max(0,Math.min(2,this.openingIndex||0));const t=this.digitalHumanOpeningContents[e]||this.digitalHumanOpeningContents[0];const o=t.text;return i("div",{class:"ai-message-item"},i("div",{class:"ai-message-content"},o))}if(this.isGeneratingDigitalHumanVideo||this.isLoading){return i("div",{class:"ai-message-item"},i("div",{class:"ai-message-content"},"请稍等,我查看一下本次面试的信息..."))}if(this.currentStreamingMessage&&this.currentStreamingMessage.answer){return i("div",{class:"ai-message-item streaming"},i("div",{class:"ai-message-content",innerHTML:this.currentStreamingMessage.answer}),this.currentStreamingMessage.isStreaming&&i("div",{class:"typing-indicator"},i("span",null),i("span",null),i("span",null)))}const e=[...this.messages].reverse().find((e=>e.answer&&e.answer.trim()));if(e){return i("div",{class:"ai-message-item"},i("div",{class:"ai-message-content",innerHTML:e.answer}))}return i("div",{class:"ai-message-item"},i("div",{class:"ai-message-content"},"请稍等,我查看一下本次面试的信息..."))}render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"digital-human-mode":!!this.digitalId};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};return i("div",{class:o,style:e},i("div",{class:t},i("button",{class:"close-button",onClick:this.handleCloseClick},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}))),this.digitalId&&this.digitalHumanVideoUrl&&i("div",{class:"digital-human-background"},i("video",{autoplay:true,playsinline:true,loop:!this.isPlayingDigitalHumanVideo,muted:!this.isPlayingDigitalHumanVideo,src:this.digitalHumanVideoUrl,class:"digital-human-background-video",onEnded:this.handleVideoElementEnded,ref:e=>{if(e){const t=this.digitalHumanVideoUrl===this.digitalHumanDefaultVideoUrl;e.playbackRate=t?1:this.playbackRate;if(e.src&&e.readyState===0){e.load()}}}})),this.renderVideoPreview(),i("div",{class:"modal-content-layer"},i("div",{class:"main-content"},i("div",{class:"chat-history-section"},this.renderChatHistory()),this.showEndInterviewButton&&!this.isTaskCompleted&&this.conversationId&&i("div",{class:"end-interview-button-container"},i("button",{class:"end-interview-button",onClick:this.handleInterviewEnd,disabled:this.isEndingInterview||!this.isRecording,title:this.isEndingInterview?"正在结束面试...":!this.isRecording?"请在录制时点击":"结束面试"},this.isEndingInterview?"正在结束...":"结束面试")),this.renderRecordingStatusBar())),i("div",{style:{position:"relative",zIndex:"100"}},i("pcm-confirm-modal",{isOpen:this.showConfirmModal,modalTitle:"确认完成回答?",okText:"确认完成",cancelText:"继续录制",okType:"danger",onOk:this.handleConfirmModalOk,onCancel:this.handleConfirmModalCancelEvent,onClosed:this.handleConfirmModalCancel},i("div",{style:{marginBottom:"16px"}},i("div",{style:{fontSize:"14px",color:"#1890ff",fontWeight:"500",marginBottom:"16px",textAlign:"center"}},"当前录制时长:",(()=>{const e=this.recordingStartTime>0?Math.floor((Date.now()-this.recordingStartTime)/1e3):0;const t=Math.floor(e/60);const o=e%60;return`${t.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`})()),i("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px 16px",background:"#fff7e6",border:"1px solid #ffec99",borderRadius:"6px",color:"#d46b08",fontSize:"14px",marginBottom:"16px"}},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),i("span",null,"注意:录制仍在进行中")),i("div",{style:{fontSize:"16px",color:"#595959",lineHeight:"1.5",marginBottom:"16px"}},'点击"确认完成"将结束本题回答'),i("label",{style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",padding:"8px 0",userSelect:"none"}},i("input",{type:"checkbox",style:{width:"16px",height:"16px",accentColor:"#1890ff",cursor:"pointer",margin:"0"},checked:this.skipConfirmThisInterview,onChange:this.handleSkipConfirmChange}),i("span",{style:{fontSize:"14px",color:"#595959",cursor:"pointer",lineHeight:"1.4"}},"本次面试不再提醒"))))),i("div",{style:{position:"relative",zIndex:"100"}},i("pcm-confirm-modal",{isOpen:this.showCloseConfirmModal,modalTitle:"确认关闭?",okText:"确认关闭",cancelText:"取消",okType:"danger",onOk:this.handleCloseConfirmOk,onCancel:this.handleCloseConfirmCancel,onClosed:this.handleCloseConfirmCancel},i("div",{style:{marginBottom:"16px"}},i("div",{style:{fontSize:"16px",color:"#595959",lineHeight:"1.5",marginBottom:"16px"}},this.isTaskCompleted?"面试已结束,确认要关闭吗?":"您的面试未完成,确认要关闭吗?")))),i("div",{style:{position:"relative",zIndex:"100"}},i("pcm-confirm-modal",{isOpen:this.showEndInterviewConfirmModal,modalTitle:"确认结束面试?",okText:"确认结束",cancelText:"取消",okType:"danger",onOk:this.handleConfirmEndInterview,onCancel:this.handleCancelEndInterview,onClosed:this.handleCancelEndInterview},i("div",{style:{marginBottom:"16px"}},(()=>{const e=this.getAnsweredQuestionCount();return i("div",null,i("div",{style:{fontSize:"14px",color:"#1890ff",fontWeight:"500",marginBottom:"16px",textAlign:"center"}},"当前第 ",e," 题"),e<3&&i("div",{style:{display:"flex",alignItems:"flex-start",gap:"8px",padding:"12px 16px",background:"#fff2e8",border:"1px solid #ffbb96",borderRadius:"6px",color:"#d4380d",fontSize:"14px",marginBottom:"16px"}},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor",style:{flexShrink:"0",marginTop:"2px"}},i("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),i("span",null,i("strong",null,"警告:"),"当前已回答题数小于 3 题,结束面试可能无法正常完成面试流程,建议继续完成更多题目后再结束面试。")),i("div",{style:{fontSize:"14px",color:"#595959",lineHeight:"1.6",textAlign:"center"}},"确认要结束面试吗?结束后将生成面试报告。"))})())))))}renderVideoPreview(){if(!this.showRecordingUI){return null}return i("div",{class:"recording-preview-top-right"},i("video",{class:"user-video-preview",autoPlay:true,playsInline:true,muted:true,style:{transform:"scaleX(-1)"},ref:e=>{if(e&&this.recordingStream&&!this.videoRef){this.videoRef=e}}}))}renderRecordingStatusBar(){if(this.showRecordingUI){const e=Math.floor(this.recordingTimeLeft/60).toString().padStart(2,"0");const t=(this.recordingTimeLeft%60).toString().padStart(2,"0");return i("div",{class:"recording-status-bar"},i("div",{class:"audio-waveform"},i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"})),i("span",{class:"recording-timer"},e,":",t),i("button",{class:"finish-recording-btn",onClick:()=>this.handleStopRecording()},i("img",{src:"https://pcm-resource-1312611446.cos.ap-guangzhou.myqcloud.com/sdk/icon/gou.png",width:"16",height:"16",alt:"完成",style:{filter:"brightness(0) invert(1)"}})))}return i("div",{class:"recording-status-bar"},this.renderStatusIndicator())}renderStatusIndicator(){if(this.deviceError){return i("div",{class:"status-indicator-text error"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),i("span",null,this.deviceError))}if(this.isTaskCompleted){return i("div",{class:"status-indicator-text"},i("span",null,"面试已完成"))}if(this.waitingForDigitalHuman&&this.digitalId){return i("div",{class:"status-indicator-text loading"},i("div",{class:"loading-spinner-small"}),i("span",null,"面试官思考中..."))}if(this.isUploadingVideo){return i("div",{class:"status-indicator-text loading"},i("div",{class:"loading-spinner-small"}),i("span",null,"正在提交回答..."))}if(this.isLoading||this.currentStreamingMessage){return i("div",{class:"status-indicator-text loading"},i("div",{class:"loading-spinner-small"}),i("span",null,"题目生成中..."))}if(this.waitingToRecord){return i("div",{class:"status-indicator-text"},i("span",null,this.waitingTimeLeft," 秒后开始您的回答"))}return i("div",{class:"status-indicator-text ready"},i("img",{src:"https://pcm-resource-1312611446.cos.ap-guangzhou.myqcloud.com/sdk/icon/gou.png",width:"16",height:"16",alt:"准备就绪"}),i("span",null,"准备就绪"))}static get watchers(){return{token:["handleTokenChange"]}}};rs.style=is+ns;const as=":host{display:block;font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto;-webkit-overflow-scrolling:touch;}.fullscreen-overlay{padding:0;position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background:white;border-radius:8px;width:100%;max-width:900px;display:flex;flex-direction:column;position:relative;margin:auto}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.modal-container.fullscreen>div:not(.modal-header):not(.initial-upload){display:flex;flex-direction:column;flex:1;overflow:hidden;height:100%}.pc-layout{width:80%;max-width:800px;min-width:320px;min-height:400px}.video-preview.placeholder{display:flex;justify-content:center;align-items:center;background:#EAEAEA}.placeholder-status{color:#00000066}.waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-container{width:100%;display:flex;flex-direction:column;align-items:center}.video-area{width:100%;display:flex;flex-direction:column;align-items:center}.stop-recording-button{width:100%;height:100%;font-size:16px;background:#f44336;border-radius:6px;color:white;border:none;cursor:pointer}.stop-recording-button:hover{background:#d32f2f}.play-audio-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0;}.header-left{display:flex;align-items:center;gap:8px}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.chat-container{background-image:url(https://pub.pincaimao.com/static/web/images/login/bg_login_m.png);background-size:100%;height:100%;border-radius:0px 0px 8px 8px}.chat-history{position:relative;flex:1;overflow-y:auto;padding:20px;scroll-behavior:smooth;height:400px}.fullscreen .chat-history{height:auto;flex:1 1 auto}.message-input{padding:16px;border-top:1px solid #eee;display:flex;gap:8px;align-items:center}.message-input input{flex:1;padding:8px 12px;border:1px solid #ddd;border-radius:4px;outline:none;transition:border-color 0.2s ease}.message-input input:focus{border-color:#bbb}.message{margin-bottom:16px;opacity:1;transition:opacity 0.3s ease}.message-content{max-width:70%;padding:8px 12px;border-radius:8px;word-break:break-word}.message-content p{margin:0;word-break:break-word}.user-message{display:flex;justify-content:flex-end}.agent-message{display:flex;justify-content:flex-start}.user-message .message-content{background-color:#007bff;color:white}.agent-message .message-content{background-color:#f1f1f1}.message-time{font-size:12px;color:#999;margin-top:4px;display:block}.send-button{width:38px;height:38px;border-radius:16px;background:#0d75fb;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color 0.2s ease}.send-button img{width:24px;height:24px}.send-button:hover{background:#0a62d6}.send-button.disabled{background:#d9d9d9;cursor:not-allowed}.empty-state{display:flex;justify-content:center;align-items:center;height:100%;color:#999;text-align:center}.loading-container{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:rgba(255, 255, 255, 0.98);z-index:1;opacity:1;transition:opacity 0.3s ease}.loading-container p{margin-top:16px;color:#666;font-size:14px}.loading-spinner{width:40px;height:40px;border:3px solid #f3f3f3;border-top:3px solid #1890ff;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.messages-wrapper{width:100%;min-height:100%;display:flex;flex-direction:column;justify-content:flex-end}.messages-wrapper.has-overflow{justify-content:flex-start}.suggested-questions{display:flex;flex-direction:column;gap:8px;padding:16px}.suggested-question{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background-color:#f3f4f6;border-radius:4px;cursor:pointer;font-size:14px;color:#374151;transition:background-color 0.2s}.suggested-question:hover{background-color:#e5e7eb}.arrow-right{margin-left:8px}.loading-suggestions{display:flex;justify-content:center;padding:16px}.loading-spinner-small{width:20px;height:20px;border:2px solid #e5e7eb;border-top-color:#6b7280;border-radius:50%;animation:spin 1s linear infinite}.upload-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;color:#666;border-radius:4px;transition:background-color 0.2s}.upload-button:hover{background-color:rgba(0, 0, 0, 0.04)}.upload-button svg{width:20px;height:20px}.file-input{display:none}.selected-file{font-size:12px;color:#666;margin-left:8px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.input-wrapper{flex:1;display:flex;align-items:center;border:1px solid #ddd;border-radius:4px;padding:0 4px;background:white}.input-wrapper input{border:none;flex:1;padding:8px;outline:none}.input-wrapper:focus-within{border-color:#bbb}.file-preview{padding:8px 16px;border-top:1px solid #eee;background-color:#f9f9f9}.recording-section{border-top:1px solid #eee;display:flex;flex-direction:column;align-items:center;padding:10px 20px 0px 20px;border-radius:14px 14px 0 0;flex:0 0 auto}.recording-section .video-preview{width:100%;height:200px;max-width:400px;position:relative;margin-bottom:10px;border:1px solid #ddd;border-radius:12px;overflow:hidden}.recording-section video{width:100%;height:100%;object-fit:cover}.recording-status{position:absolute;top:10px;left:10px;background-color:rgba(0, 0, 0, 0.6);color:white;padding:4px 8px;border-radius:4px;display:flex;align-items:center;gap:5px;font-size:14px;z-index:2}.recording-status .recording-dot{display:inline-block;width:10px;height:10px;background-color:red;border-radius:50%;margin-right:5px;animation:blink 1s infinite}.recording-status.warning{color:#ff4d4f;animation:blink 1s infinite}@keyframes blink{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}.recording-section .stop-recording-button{background-color:#f44336;color:white;border:none;cursor:pointer;font-weight:bold}.recording-section .stop-recording-button:hover{background-color:#d32f2f}.fullscreen{width:100vw;border-radius:0;height:100vh;display:flex;flex-direction:column;overflow-y:auto}.recording-controls{margin-top:10px;height:53px;width:100%;max-width:400px;display:flex;justify-content:center}.recording-controls .waiting-message{text-align:center;color:white;font-size:16px;background-image:linear-gradient(100deg, #4A9FFF 0%, #1058FF 100%);border-radius:6px;box-shadow:0 2px 8px rgba(0, 0, 0, 0.15);width:95%;display:flex;justify-content:center;align-items:center;cursor:pointer}.recording-controls .waiting-message.loading{background:#faad14}.recording-controls .waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-controls .stop-recording-button{background-color:#dc3545;color:white;border:none;cursor:pointer;font-size:16px}.recording-controls .stop-recording-button:hover{background-color:#c82333}.recording-controls .stop-recording-button.disabled{background:#ccc;cursor:not-allowed}.recording-controls .stop-recording-button.disabled:hover{background:#ccc}.progress-container{display:flex;justify-content:space-between;align-items:center;width:100%;max-width:400px;margin-top:10px;padding:0 5px}.progress-bar-container{height:4px;background-color:#E5E5E5;border-radius:2px;overflow:hidden;margin-right:10px;width:75px}.progress-bar{height:100%;background-image:linear-gradient(111deg, #4A9FFF 0%, #1058FF 100%);border-radius:2px;transition:width 0.3s ease}.progress-text{font-size:14px;color:#666;white-space:nowrap}.text-input-area{display:flex;flex-direction:column;width:100%;height:100%;padding:0px 16px 16px 16px;border-radius:8px;border:none;}.text-answer-input{flex:1;min-height:80px;padding:12px 12px 0px 12px;border:1px solid #ddd;border-radius:8px 8px 0 0;resize:none;font-size:16px;background-color:#fff;border-bottom:none;outline:none;}.input-toolbar{display:flex;justify-content:end;align-items:center;padding:8px 12px;background-color:#fff;border:1px solid #ddd;border-top:none;border-radius:0 0 8px 8px}.text-answer-input:focus{border-color:rgb(74, 144, 226);border-bottom:none}.text-answer-input:focus+.input-toolbar{border-color:rgb(74, 144, 226);border-top:none}.toolbar-actions{width:32px;height:32px;display:flex;justify-content:center;align-items:center;margin-right:10px;border:1px solid #d9d9d9;border-radius:6px}.toolbar-actions:hover{background-color:#f0f0f0}.toolbar-button{background:transparent;border:none;color:#666;cursor:pointer;padding:0;margin:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.toolbar-button>div,.toolbar-button>svg{display:flex;justify-content:center;align-items:center}.toolbar-button img{width:16px;height:16px}.submit-text-button{padding:6px 16px;background-color:#4a90e2;color:white;border:none;border-radius:4px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color 0.2s}.submit-text-button:hover:not(.disabled){background-color:#3a7bc8}.submit-text-button.disabled{background-color:#b3b3b3;cursor:not-allowed}.toolbar-button.recording{background-color:rgba(255, 0, 0, 0.1);color:#ff3b30;animation:pulse 1.5s infinite}.toolbar-button.converting{background-color:rgba(0, 122, 255, 0.1);color:#007aff}.toolbar-button .recording-time{font-size:12px;margin-left:4px}.converting-indicator{display:flex;justify-content:center;align-items:center}.converting-indicator svg{animation:spin 1.5s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0.4)}70%{box-shadow:0 0 0 6px rgba(255, 0, 0, 0)}100%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0)}}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.references-section{margin-top:30px;padding:12px;background-color:#f9f9f9;border-radius:8px;border:1px solid #e8e8e8}.references-title{font-size:14px;color:#666;margin:0 0 8px 0;font-weight:500}.references-list{display:flex;flex-direction:column;gap:8px}.reference-item{background-color:#fff;border:1px solid #e8e8e8;border-radius:6px;padding:10px;cursor:pointer;transition:background-color 0.2s, box-shadow 0.2s}.reference-item:hover{background-color:#f5f5f5;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1)}.reference-header{display:flex;align-items:center;gap:6px;position:relative}.reference-icon{color:#1890ff;display:flex;align-items:center}.reference-name{font-size:13px;font-weight:500;color:#333;flex:1}.download-icon{color:#1890ff;display:flex;align-items:center}.reference-content{display:none}.suggested-questions{margin-top:20px;padding:12px;background-color:#f0f7ff;border-radius:8px;border:1px solid #d6e8ff}.suggested-title{font-size:14px;color:#1890ff;margin:0 0 8px 0;font-weight:500}.suggested-question{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background-color:#fff;border:1px solid #e6f7ff;border-radius:6px;cursor:pointer;font-size:14px;color:#1890ff;transition:all 0.3s;margin-bottom:8px}.suggested-question:last-child{margin-bottom:0}.suggested-question:hover{background-color:#e6f7ff;border-color:#91d5ff}.arrow-right{color:#1890ff;display:flex;align-items:center}.loading-suggestions{display:flex;justify-content:center;padding:16px}.loading-spinner-small{width:20px;height:20px;border:2px solid #e6f7ff;border-top-color:#1890ff;border-radius:50%;animation:spin 1s linear infinite}";const ss=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const ls=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.tokenInvalid=t(this,"tokenInvalid");this.clearConversation=t(this,"clearConversation")}modalTitle;token;isOpen=false;messages=[];modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;currentAssistantMessage="";isLoading=false;currentStreamingMessage=null;shouldAutoScroll=true;isLoadingHistory=false;get hostElement(){return o(this)}streamComplete;conversationStart;tokenInvalid;SCROLL_THRESHOLD=20;fullscreen=false;textAnswer="";isSubmittingText=false;customInputs={show_suggested_questions:"false"};suggestedQuestions=[];suggestedQuestionsLoading=false;currentRefs=[];showReferences=false;employeeId;isRecordingAudio=false;audioRecorder=null;audioChunks=[];isConvertingAudio=false;audioRecordingTimeLeft=60;audioRecordingTimer=null;audioRecordingStartTime=0;maxAudioRecordingTime=60;employeeDetails=null;isLoadingEmployeeDetails=false;quickQuestions=[];tokenInvalidListener;clearConversation;shouldHideReferences=false;isUserScrolling=false;handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}async handleIsOpenChange(e){if(e){if(!this.employeeId){console.error("未提供数字员工ID (employeeId)");setTimeout((()=>alert("请提供有效的数字员工ID")),0);return}await r(this.token);await this.fetchEmployeeDetails()}}componentWillLoad(){if(this.zIndex){a.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.audioRecordingTimer){clearInterval(this.audioRecordingTimer);this.audioRecordingTimer=null}this.stopAudioRecording()}handleClose=()=>{this.modalClosed.emit()};async sendMessageToAPI(e){if(!this.employeeId){alert("请提供有效的数字员工ID");return}this.isLoading=true;let t="";const o=new Date;const i=`${o.getHours()}:${o.getMinutes().toString().padStart(2,"0")}`;const n=e.trim()||"请开始";this.suggestedQuestions=[];this.currentRefs=[];this.shouldHideReferences=false;const r={id:`temp-${Date.now()}`,conversation_id:this.conversationId,inputs:this.customInputs||{},query:n,answer:"",message_files:[],feedback:{},retriever_resources:[],created_at:Math.floor(Date.now()/1e3).toString(),agent_thoughts:[],status:"normal",error:null,time:i,isStreaming:true};this.currentStreamingMessage=r;this.shouldAutoScroll=true;this.scrollToBottom();const a={response_mode:"streaming",conversation_id:this.conversationId,query:n,employee_id:this.employeeId};a.inputs={...this.customInputs};await l({url:`/sdk/v1/knowledge/chat/chat-messages`,method:"POST",data:a,onMessage:e=>{if(e.conversation_id&&!this.conversationId){this.conversationId=e.conversation_id;this.conversationStart.emit({conversation_id:e.conversation_id,event:e.event,message_id:e.message_id,id:e.id})}if(e.event==="node_started"&&e.data.title.includes("聘才猫推荐开始")){this.suggestedQuestionsLoading=true}if(e.event==="node_started"&&e.data.title.includes("不显示引用")){this.shouldHideReferences=true}if(e.event==="node_finished"&&e.data.title.includes("聘才猫推荐结束")){let t=[];try{let o=e.data.outputs.text;if(typeof o==="string"){o=o.replace(/```json\n/,"").replace(/```/,"").trim();const e=JSON.parse(o);if(e.status==="success"&&Array.isArray(e.items)){t=e.items.map((e=>e.question))}}else{const e=o;if(e.status==="success"&&Array.isArray(e.items)){t=e.items.map((e=>e.question))}}}catch(e){console.warn("解析问题建议失败:",e)}this.suggestedQuestions=t;this.suggestedQuestionsLoading=false}if(e.event==="node_finished"&&e.data?.inputs?.documents){const t=[];e.data.inputs.documents.forEach((e=>{if(e.result_list&&Array.isArray(e.result_list)){e.result_list.forEach((e=>{if(e.doc_info&&e.content){t.push({doc_info:{doc_name:e.doc_info.doc_name,doc_id:e.doc_info.doc_id},content:e.content})}}))}}));const o=new Map;t.forEach((e=>{if(e.doc_info&&e.doc_info.doc_id){o.set(e.doc_info.doc_id,e)}}));this.currentRefs=Array.from(o.values())}if(e.event==="message"){if(e.event==="agent_message"||e.event==="message"){if(e.answer){t+=e.answer;const o={...this.currentStreamingMessage,answer:t,id:e.message_id||this.currentStreamingMessage.id,isStreaming:true,retriever_resources:e.retriever_resources||this.currentStreamingMessage.retriever_resources,agent_thoughts:e.agent_thoughts||this.currentStreamingMessage.agent_thoughts};this.currentStreamingMessage=o;this.scrollToBottom()}}}if(e.event==="error"){const t=e.data?.message||e.message||"请求失败";this.messages=[...this.messages,{...r,answer:t,error:e.data,isStreaming:false}];this.currentStreamingMessage=null;this.isLoading=false;y.emitError({error:e.data,message:t});return}if(e.event==="message_end"){this.streamComplete.emit({conversation_id:e.conversation_id||"",event:e.event,message_id:e.message_id,id:e.id})}},onError:e=>{console.error("发生错误:",e);alert(e instanceof Error?e.message:"消息发送失败,请稍后再试");this.messages=[...this.messages,{...r,answer:"消息发送失败,请检查网络。",error:e,isStreaming:false}];this.currentStreamingMessage=null;this.isLoading=false},onComplete:async()=>{this.isLoading=false;const e=this.currentStreamingMessage;e.isStreaming=false;this.messages=[...this.messages,e];this.currentStreamingMessage=null}})}handleScroll=()=>{if(this.isUserScrolling){const e=this.hostElement.shadowRoot?.querySelector(".chat-history");if(!e)return;const{scrollTop:t,scrollHeight:o,clientHeight:i}=e;const n=o-t-i;this.shouldAutoScroll=n<=this.SCROLL_THRESHOLD}};handleTouchStart=()=>{this.isUserScrolling=true};handleTouchEnd=()=>{setTimeout((()=>{this.isUserScrolling=false}),100)};_wheelTimer=null;handleWheel=()=>{this.isUserScrolling=true;if(this._wheelTimer){clearTimeout(this._wheelTimer)}this._wheelTimer=setTimeout((()=>{this.isUserScrolling=false}),150)};scrollToBottom(){if(!this.shouldAutoScroll)return;const e=this.hostElement.shadowRoot?.querySelector(".chat-history");if(e&&this.isOpen){e.scrollTop=e.scrollHeight}}componentDidRender(){if(this.isLoadingHistory||this.shouldAutoScroll&&this.isOpen){const e=this.hostElement.shadowRoot?.querySelector(".chat-history");if(e){e.scrollTop=e.scrollHeight}}}async loadHistoryMessages(){if(!this.conversationId)return;if(this.currentStreamingMessage||this.isLoading)return;this.isLoadingHistory=true;try{const e=await d({url:"/sdk/v1/knowledge/chat/conversation-history",method:"GET",data:{conversation_id:this.conversationId}});if(e.success&&e.data){const t=e.data.data||[];const o=t.map((e=>{const t=new Date(parseInt(e.created_at)*1e3);const o=t.getHours().toString().padStart(2,"0");const i=t.getMinutes().toString().padStart(2,"0");const n=`${o}:${i}`;return{id:e.id,conversation_id:e.conversation_id,inputs:e.inputs||{},query:e.query||"",answer:e.answer||"",message_files:e.message_files||[],feedback:e.feedback||{},retriever_resources:e.retriever_resources||[],created_at:e.created_at,agent_thoughts:e.agent_thoughts||[],status:e.status||"normal",error:e.error,time:n,isStreaming:false}}));this.messages=o}}catch(e){console.error("加载历史消息失败:",e);alert(e instanceof Error?e.message:"加载历史消息失败,请刷新重试")}finally{this.isLoadingHistory=false;setTimeout((()=>{this.shouldAutoScroll=true;this.scrollToBottom()}),200)}}async convertAudioToText(e){try{const t=await d({url:"/sdk/v1/tts/audio_to_text",method:"POST",data:{cos_key:e}});if(t.success&&t.data&&t.data.text){return t.data.text}else{console.warn("音频转文字返回结果格式不正确");return null}}catch(e){console.error("音频转文字错误:",e);return null}}async fetchEmployeeDetails(){if(!this.employeeId||!this.token)return;this.isLoadingEmployeeDetails=true;try{const e=await d({url:`/sdk/v1/knowledge/chat/employee/${this.employeeId}`,method:"GET"});if(e.success&&e.data){this.employeeDetails=e.data;if(this.employeeDetails.show_quote_doc!==undefined){this.showReferences=this.employeeDetails.show_quote_doc}if(this.employeeDetails.quick_questions){this.quickQuestions=this.employeeDetails.quick_questions.split(",").map((e=>e.trim())).filter((e=>e))}if(this.conversationId){await this.loadHistoryMessages()}}else{alert("获取智能体详情失败,请检查token和employeeId是否正确")}}catch(e){console.error("获取智能体详情失败:",e)}finally{this.isLoadingEmployeeDetails=false}}handleTextInputChange=e=>{const t=e.target;this.textAnswer=t.value};handleKeyDown=e=>{if(e.isComposing){return}if(e.key==="Enter"){if(e.ctrlKey){return}else{e.preventDefault();if(this.textAnswer.trim()&&!this.isSubmittingText&&!this.isLoading&&!this.currentStreamingMessage){this.submitTextAnswer()}}}};submitTextAnswer=async()=>{if(!this.textAnswer.trim()||this.isSubmittingText){return}this.isSubmittingText=true;try{const e=this.textAnswer;this.textAnswer="";await this.sendMessageToAPI(e)}catch(e){console.error("提交文本回答失败:",e);alert("提交回答失败,请重试")}finally{this.isSubmittingText=false}};handleVoiceInputClick=()=>{if(this.isRecordingAudio){this.stopAudioRecording()}else{navigator.mediaDevices.getUserMedia({audio:true}).then((e=>{this.startRecordingWithStream(e)})).catch((e=>{console.error("麦克风权限请求失败:",e);if(e.name==="NotAllowedError"||e.name==="PermissionDeniedError"){alert("麦克风访问被拒绝。\n\n在Mac上,请前往系统偏好设置 > 安全性与隐私 > 隐私 > 麦克风,确保您的浏览器已被允许访问麦克风。")}else{alert("无法访问麦克风,请确保已授予权限并且麦克风设备正常工作。")}}))}};startRecordingWithStream(e){try{const t=u();let o;try{o=new MediaRecorder(e,{mimeType:t})}catch(t){console.warn("指定的音频MIME类型不受支持,使用默认设置:",t);try{o=new MediaRecorder(e)}catch(t){e.getTracks().forEach((e=>e.stop()));console.error("无法创建音频录制器:",t);alert("您的浏览器不支持音频录制功能");return}}this.audioRecorder=o;this.audioChunks=[];this.isRecordingAudio=true;this.audioRecordingStartTime=Date.now();this.audioRecordingTimeLeft=this.maxAudioRecordingTime;o.ondataavailable=e=>{if(e.data.size>0){this.audioChunks.push(e.data)}};o.onstop=()=>{e.getTracks().forEach((e=>e.stop()));this.processAudioRecording()};o.start(100);this.audioRecordingTimer=setInterval((()=>{const e=Math.floor((Date.now()-this.audioRecordingStartTime)/1e3);this.audioRecordingTimeLeft=Math.max(0,this.maxAudioRecordingTime-e);if(this.audioRecordingTimeLeft<=0){this.stopAudioRecording()}}),1e3)}catch(t){e.getTracks().forEach((e=>e.stop()));console.error("开始录音失败:",t);alert("开始录音失败,请确保麦克风设备正常工作")}}async processAudioRecording(){if(this.audioChunks.length===0){console.warn("没有录制到音频数据");return}try{this.isConvertingAudio=true;const e=u()||"audio/webm";const t=new Blob(this.audioChunks,{type:e});if(t.size===0){console.warn("录制的音频为空");this.isConvertingAudio=false;return}const o=e.includes("webm")?"webm":"mp3";const i=`audio_input.${o}`;const n=new File([t],i,{type:e});const r=await p(n,{},{tags:["audio"]});const a=await this.convertAudioToText(r.cos_key);if(a){const e=this.hostElement.shadowRoot?.querySelector(".text-answer-input");const t=e?.selectionStart||this.textAnswer.length;const o=this.textAnswer.substring(0,t);const i=this.textAnswer.substring(t);const n=o.length>0&&!o.endsWith(" ")?" ":"";this.textAnswer=o+n+a+i;setTimeout((()=>{if(e){const o=t+n.length+a.length;e.focus();e.setSelectionRange(o,o)}}),0)}else{console.warn("未能识别语音内容");alert("未能识别语音内容,请重试或直接输入文字")}}catch(e){console.error("处理音频录制失败:",e);alert("语音识别失败,请重试")}finally{this.isConvertingAudio=false;this.audioChunks=[]}}stopAudioRecording(){if(this.audioRecorder&&this.isRecordingAudio){this.audioRecorder.stop();this.isRecordingAudio=false;if(this.audioRecordingTimer){clearInterval(this.audioRecordingTimer);this.audioRecordingTimer=null}}}handleSuggestedQuestionClick=e=>{if(this.isLoading||this.currentStreamingMessage)return;this.textAnswer=e;this.submitTextAnswer()};async handleDocumentDownload(e){try{const t=e.doc_info.doc_id.match(/docID_(\d+)/);if(!t||!t[1]){alert("无法解析文档ID");return}const o=t[1];const i=await d({url:`/sdk/v1/files/${o}/info`,method:"GET"});if(i.success&&i.data?.file_url){const e=i.data.file_url;const t=`${e}${e.includes("?")?"&":"?"}ci-process=doc-preview&copyable=1&dstType=html`;window.open(t,"_blank")}else{alert("获取文档链接失败")}}catch(e){console.error("下载文档失败:",e);alert("下载文档失败,请稍后再试")}}handleClearConversation=()=>{if(this.isLoading||this.currentStreamingMessage)return;this.clearConversation.emit(this.conversationId);this.messages=[];this.currentStreamingMessage=null;this.conversationId=undefined;this.currentRefs=[];this.suggestedQuestions=[]};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.icon||(this.employeeDetails?.avatar||"");const r=this.modalTitle||(this.employeeDetails?.name||"在线客服");const a=()=>{if(!this.showReferences||this.currentRefs.length===0||this.currentStreamingMessage||this.shouldHideReferences)return null;return i("div",{class:"references-section"},i("h3",{class:"references-title"},"引用文档"),i("div",{class:"references-list"},this.currentRefs.map(((e,t)=>i("div",{class:"reference-item",key:`ref-${t}`,onClick:()=>this.handleDocumentDownload(e)},i("div",{class:"reference-header"},i("span",{class:"reference-icon"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))),i("span",{class:"reference-name"},e.doc_info.doc_name),i("span",{class:"download-icon"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})))))))))};const s=()=>{if(!this.customInputs.show_suggested_questions&&!this.currentStreamingMessage){return null}if(this.suggestedQuestionsLoading){return i("div",{class:"loading-suggestions"},i("div",{class:"loading-spinner-small"}))}if(this.suggestedQuestions.length===0)return null;return i("div",{class:"suggested-questions"},i("h3",{class:"suggested-title"},"推荐问题"),this.suggestedQuestions.map(((e,t)=>i("div",{class:"suggested-question",key:`question-${t}`,onClick:()=>this.handleSuggestedQuestionClick(e)},i("span",null,e),i("span",{class:"arrow-right"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})))))))};const l=()=>{if(this.conversationId||this.quickQuestions.length===0||this.currentStreamingMessage)return null;return i("div",{class:"suggested-questions"},i("h3",{class:"suggested-title"},"常见问题"),this.quickQuestions.map(((e,t)=>i("div",{class:"suggested-question",key:`preset-question-${t}`,onClick:()=>this.handleSuggestedQuestionClick(e)},i("span",null,e),i("span",{class:"arrow-right"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})))))))};const d=()=>i("div",{class:"text-input-area"},i("textarea",{class:"text-answer-input",placeholder:"发消息",value:this.textAnswer,onInput:this.handleTextInputChange,onKeyDown:this.handleKeyDown,disabled:this.isRecordingAudio||this.isConvertingAudio}),i("div",{class:"input-toolbar"},i("div",{class:"toolbar-actions"},i("button",{class:"toolbar-button",title:"清除对话记录",onClick:this.handleClearConversation,disabled:this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.messages.length===0},i("img",{src:"https://pcm-pub-1351162788.cos.ap-guangzhou.myqcloud.com/sdk/image/brush-alt-svgrepo-com.png",alt:"清除对话记录"}))),i("div",{class:"toolbar-actions"},i("button",{class:{"toolbar-button":true,recording:this.isRecordingAudio,converting:this.isConvertingAudio},title:this.isRecordingAudio?"点击停止录音":this.isConvertingAudio?"正在识别语音...":"语音输入",onClick:this.handleVoiceInputClick,disabled:this.isConvertingAudio||this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage},this.isRecordingAudio?i("div",null,i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),i("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}),i("circle",{cx:"12",cy:"11",r:"4",fill:"red"}))):this.isConvertingAudio?i("div",{class:"converting-indicator"},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}))):i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),i("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"})))),i("div",{class:{"send-button":true,disabled:!this.textAnswer.trim()||this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.isRecordingAudio||this.isConvertingAudio},onClick:()=>{if(!this.textAnswer.trim()||this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.isRecordingAudio||this.isConvertingAudio){return}this.submitTextAnswer()}},i("img",{src:"https://pcm-pub-1351162788.cos.ap-guangzhou.myqcloud.com/sdk/image/i_send.png",alt:"发送"}))));return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},n&&i("img",{src:n,class:"header-icon",alt:"应用图标"}),i("div",null,r)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),i("div",{class:"chat-container"},i("div",{class:"chat-history",onScroll:this.handleScroll,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onWheel:this.handleWheel},this.isLoadingHistory?i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",null,"加载历史消息中...")):i("div",null,this.messages.map((e=>i("div",{id:`message_${e.id}`,key:e.id},i("pcm-chat-message",{message:e,showFeedbackButtons:false})))),this.currentStreamingMessage&&i("div",{id:`message_${this.currentStreamingMessage.id}`},i("pcm-chat-message",{message:this.currentStreamingMessage,showFeedbackButtons:false})),this.messages.length===0&&!this.currentStreamingMessage&&i("div",{class:"empty-state"},this.isLoadingEmployeeDetails?i("p",null,"加载中..."):this.employeeDetails?.default_greeting?i("p",null,this.employeeDetails.default_greeting):i("p",null,"请输入...")),a(),s(),l())),i("div",{class:"recording-section"},i("div",{class:"recording-container"},d())))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};ls.style=as+ss;const ds='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const cs=".plan-type-section{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}.plan-type-section label{font-weight:600;color:#333;margin-bottom:8px}.plan-type-options{display:flex;gap:15px;flex-wrap:wrap}.plan-type-option{flex:1;min-width:120px;border:1px solid #e8e8e8;border-radius:8px;padding:15px;cursor:pointer;display:flex;flex-direction:column;align-items:center;transition:all 0.3s}.plan-type-option:hover{border-color:#1890ff;background-color:#f0f7ff}.plan-type-option.selected{border-color:#1890ff;background-color:#e6f7ff;box-shadow:0 2px 8px rgba(24, 144, 255, 0.2)}.option-icon{font-size:24px;margin-bottom:8px}.option-label{font-size:14px;font-weight:500;color:#333}.resume-upload-section{display:flex;flex-direction:column;gap:8px}.resume-upload-section label{font-weight:600;color:#333;margin-bottom:8px}";const ps=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const hs=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.planningComplete=t(this,"planningComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent")}modalTitle="职业规划助手";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始规划";fullscreen=false;customInputs={};showWorkspaceHistory=false;mobileUploadAble=false;uploadSuccess;streamComplete;conversationStart;planningComplete;tokenInvalid;someErrorEvent;filePreviewMode="window";isUploading=false;uploadedFileInfo=null;showChatModal=false;isSubmitting=false;selectedPlanType="长期规划";get hostElement(){return o(this)}tokenInvalidListener;removeErrorListener;pcmUploadRef;handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}async handleIsOpenChange(e){if(!e){this.showChatModal=false}else{if(this.customInputs&&this.customInputs.type){const e=this.customInputs.type;if(e==="长期规划"||e==="转行建议"||e==="晋升路径"){this.selectedPlanType=e}}await r(this.token);if(this.conversationId||this.customInputs?.file_url&&this.customInputs?.type){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){a.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}r(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=y.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};handlePlanTypeChange=e=>{this.selectedPlanType=e};handleStartPlanning=async()=>{if(!this.customInputs?.file_url&&!this.uploadedFileInfo){S.info("请上传简历");return}if(await(this.pcmUploadRef?.getIsUploading?.())){S.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};handlePlanningComplete=e=>{this.planningComplete.emit({...e.detail,type:this.selectedPlanType})};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.file_url);const a=Boolean(this.customInputs?.file_url&&this.customInputs?.type);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!a&&i("div",{class:"input-container"},i("div",{class:"plan-type-section"},i("label",null,"选择规划类型"),i("div",{class:"plan-type-options"},i("div",{class:`plan-type-option ${this.selectedPlanType==="长期规划"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("长期规划")},i("div",{class:"option-icon"},"📈"),i("div",{class:"option-label"},"长期规划")),i("div",{class:`plan-type-option ${this.selectedPlanType==="转行建议"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("转行建议")},i("div",{class:"option-icon"},"🔄"),i("div",{class:"option-label"},"转行建议")),i("div",{class:`plan-type-option ${this.selectedPlanType==="晋升路径"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("晋升路径")},i("div",{class:"option-icon"},"🚀"),i("div",{class:"option-label"},"晋升路径")))),!r&&i("div",{class:"resume-upload-section"},i("label",null,"上传简历"),i("pcm-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),i("button",{class:"submit-button",disabled:!this.customInputs?.file_url&&!this.uploadedFileInfo||this.isUploading||this.isSubmitting,onClick:this.handleStartPlanning},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始规划"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,showWorkspaceHistory:this.showWorkspaceHistory,botId:"3022316191018898",fullscreen:this.fullscreen,conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,type:this.selectedPlanType},interviewMode:"text",onInterviewComplete:this.handlePlanningComplete}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};hs.style=ds+(cs+ps);const us='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const ms=".plan-type-section{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}.plan-type-section label{font-weight:600;color:#333;margin-bottom:8px}.plan-type-options{display:flex;gap:15px;flex-wrap:wrap}.plan-type-option{flex:1;min-width:120px;border:1px solid #e8e8e8;border-radius:8px;padding:15px;cursor:pointer;display:flex;flex-direction:column;align-items:center;transition:all 0.3s}.plan-type-option:hover{border-color:#1890ff;background-color:#f0f7ff}.plan-type-option.selected{border-color:#1890ff;background-color:#e6f7ff;box-shadow:0 2px 8px rgba(24, 144, 255, 0.2)}.option-icon{font-size:24px;margin-bottom:8px}.option-label{font-size:14px;font-weight:500;color:#333}.resume-upload-section{display:flex;flex-direction:column;gap:8px}.resume-upload-section label{font-weight:600;color:#333;margin-bottom:8px}.dynamic-form-section{margin-top:20px;margin-bottom:20px}.form-fields{display:flex;flex-direction:column;gap:16px}.form-field{display:flex;flex-direction:column;gap:8px}.form-field label{font-weight:600;color:#333;font-size:14px}.form-input{padding:10px 12px;border:1px solid #d9d9d9;border-radius:4px;font-size:14px;transition:all 0.3s;outline:none}.form-input:hover{border-color:#40a9ff}.form-input:focus{border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.1)}.form-input::placeholder{color:#bfbfbf}.form-hint{font-size:12px;color:#8c8c8c;line-height:1.5;margin-top:-8px;padding:8px 12px;background-color:#f5f5f5;border-radius:4px;border-left:3px solid #1890ff}";const gs=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const fs=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.planningComplete=t(this,"planningComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent")}modalTitle="职业规划助手";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始规划";fullscreen=false;customInputs={};showWorkspaceHistory=false;mobileUploadAble=false;uploadSuccess;streamComplete;conversationStart;planningComplete;tokenInvalid;someErrorEvent;filePreviewMode="window";isUploading=false;uploadedFileInfo=null;showChatModal=false;isSubmitting=false;selectedPlanType="初入职场";targetPosition="";industryName="";jobPosition="";timePeriod="";get hostElement(){return o(this)}tokenInvalidListener;removeErrorListener;pcmUploadRef;handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}async handleIsOpenChange(e){if(!e){this.showChatModal=false}else{if(this.customInputs&&this.customInputs.type){const e=this.customInputs.type;if(e==="转型建议"||e==="晋升路径"||e==="初入职场"){this.selectedPlanType=e}}await r(this.token);if(this.conversationId||this.customInputs?.file_url&&this.customInputs?.type){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){a.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}r(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=y.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};handlePlanTypeChange=e=>{this.selectedPlanType=e;this.targetPosition="";this.industryName="";this.jobPosition="";this.timePeriod=""};handleStartPlanning=async()=>{if(!this.customInputs?.file_url&&!this.uploadedFileInfo){S.info("请上传简历");return}if(await(this.pcmUploadRef?.getIsUploading?.())){S.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};handlePlanningComplete=e=>{this.planningComplete.emit({...e.detail,type:this.selectedPlanType})};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.file_url);const a=Boolean(this.customInputs?.file_url&&this.customInputs?.type);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!a&&i("div",{class:"input-container"},i("div",{class:"plan-type-section"},i("label",null,"选择建议类型"),i("div",{class:"plan-type-options"},i("div",{class:`plan-type-option ${this.selectedPlanType==="初入职场"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("初入职场")},i("div",{class:"option-icon"},"👶"),i("div",{class:"option-label"},"初入职场")),i("div",{class:`plan-type-option ${this.selectedPlanType==="晋升路径"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("晋升路径")},i("div",{class:"option-icon"},"🚀"),i("div",{class:"option-label"},"晋升路径")),i("div",{class:`plan-type-option ${this.selectedPlanType==="转型建议"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("转型建议")},i("div",{class:"option-icon"},"🔄"),i("div",{class:"option-label"},"转型建议")))),i("div",{class:"dynamic-form-section"},this.selectedPlanType==="初入职场"&&i("div",{class:"form-fields"},i("div",{class:"form-field"},i("label",null,"感兴趣的行业"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的行业",value:this.industryName,onInput:e=>this.industryName=e.target.value})),i("div",{class:"form-field"},i("label",null,"感兴趣的职位"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的职位",value:this.jobPosition,onInput:e=>this.jobPosition=e.target.value})),i("div",{class:"form-hint"},"为确保职业规划报告的准确性,推荐您至少填写其中一项")),this.selectedPlanType==="转型建议"&&i("div",{class:"form-fields"},i("div",{class:"form-field"},i("label",null,"感兴趣的行业"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的行业",value:this.industryName,onInput:e=>this.industryName=e.target.value})),i("div",{class:"form-field"},i("label",null,"感兴趣的职位"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的职位",value:this.jobPosition,onInput:e=>this.jobPosition=e.target.value})),i("div",{class:"form-hint"},"为确保职业规划报告的准确性,推荐您至少填写其中一项"),i("div",{class:"form-field"},i("label",null,"期望转型时间"),i("input",{type:"text",class:"form-input",placeholder:"请输入您期望的转型时间",value:this.timePeriod,onInput:e=>this.timePeriod=e.target.value}))),this.selectedPlanType==="晋升路径"&&i("div",{class:"form-fields"},i("div",{class:"form-field"},i("label",null,"晋升目标岗位"),i("input",{type:"text",class:"form-input",placeholder:"请输入您的晋升目标岗位",value:this.targetPosition,onInput:e=>this.targetPosition=e.target.value})),i("div",{class:"form-hint"},"为确保职业规划报告的准确性,建议您填写晋升目标岗位名称"))),!r&&i("div",{class:"resume-upload-section"},i("label",null,"上传简历"),i("pcm-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),i("button",{class:"submit-button",disabled:!this.customInputs?.file_url&&!this.uploadedFileInfo||this.isUploading||this.isSubmitting,onClick:this.handleStartPlanning},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始规划"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,showWorkspaceHistory:this.showWorkspaceHistory,botId:"121182005294690304",fullscreen:this.fullscreen,conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,type:this.selectedPlanType,...this.industryName?{industry_name:this.industryName}:{},...this.targetPosition||this.jobPosition?{target_position:this.targetPosition||this.jobPosition}:{},...this.timePeriod?{time_period:this.timePeriod}:{}},interviewMode:"text",onInterviewComplete:this.handlePlanningComplete}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};fs.style=us+(ms+gs);export{F as pcm_1zhanshi_mnms_modal,Xe as pcm_app_chat_modal,et as pcm_ats_mnms_modal,it as pcm_button,at as pcm_card,Xt as pcm_chat_message,Zt as pcm_confirm_modal,oo as pcm_digital_human,ro as pcm_drawer,co as pcm_export_records_modal,mo as pcm_htws_modal,xo as pcm_hyzj_modal,_i as pcm_jd_modal,Mi as pcm_jlpp_modal,Oi as pcm_jlsx_modal,qi as pcm_jlzz_modal,Ni as pcm_message,On as pcm_mnct_modal,qn as pcm_mnms_modal,Vn as pcm_mnms_zp_modal,Ha as pcm_mobile_input_btn,Na as pcm_mobile_upload_btn,Qa as pcm_msbg_modal,Ka as pcm_qgqjl_modal,os as pcm_upload,rs as pcm_virtual_chat_modal,ls as pcm_zsk_chat_modal,hs as pcm_zygh_modal,fs as pcm_zygh_v2_modal};
251
+ //# sourceMappingURL=p-8452f80b.entry.js.map