pcm-agents 1.0.0 → 1.0.2

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 (164) hide show
  1. package/dist/cjs/components-chat-message_33.cjs.entry.js +28 -7
  2. package/dist/cjs/components-chat-message_33.cjs.entry.js.map +1 -1
  3. package/dist/cjs/{conversation-utils-BfkOMf_-.js → conversation-utils-B4jUfmtU.js} +4 -4
  4. package/dist/cjs/{conversation-utils-BfkOMf_-.js.map → conversation-utils-B4jUfmtU.js.map} +1 -1
  5. package/dist/cjs/{index-BnRvF-cO.js → index-Dghp_NL6.js} +3 -3
  6. package/dist/cjs/{index-BnRvF-cO.js.map → index-Dghp_NL6.js.map} +1 -1
  7. package/dist/cjs/index.cjs.js +1 -1
  8. package/dist/cjs/oem-htws-modal.cjs.entry.js +1 -1
  9. package/dist/cjs/oem-jd-modal.cjs.entry.js +2 -2
  10. package/dist/cjs/oem-jlpp-modal.cjs.entry.js +1 -1
  11. package/dist/cjs/oem-jlzz-modal.cjs.entry.js +23 -2
  12. package/dist/cjs/oem-jlzz-modal.cjs.entry.js.map +1 -1
  13. package/dist/cjs/oem-jlzz-modal.entry.cjs.js.map +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 +3 -3
  17. package/dist/cjs/pcm-hr-chat-modal.cjs.entry.js +2 -2
  18. package/dist/cjs/pcm-jlsx-modal.cjs.entry.js +174 -6
  19. package/dist/cjs/pcm-jlsx-modal.cjs.entry.js.map +1 -1
  20. package/dist/cjs/pcm-jlsx-modal.entry.cjs.js.map +1 -1
  21. package/dist/cjs/{sentry-reporter-CAeLEFLc.js → sentry-reporter-CgJowDyu.js} +3 -3
  22. package/dist/cjs/{sentry-reporter-CAeLEFLc.js.map → sentry-reporter-CgJowDyu.js.map} +1 -1
  23. package/dist/collection/components/oem-jlzz-modal/oem-jlzz-modal.css +8 -2
  24. package/dist/collection/components/oem-jlzz-modal/oem-jlzz-modal.js +35 -0
  25. package/dist/collection/components/oem-jlzz-modal/oem-jlzz-modal.js.map +1 -1
  26. package/dist/collection/components/pcm-app-chat-modal/pcm-app-chat-modal.css +1 -1
  27. package/dist/collection/components/pcm-jlsx-modal/pcm-jlsx-modal.css +14 -0
  28. package/dist/collection/components/pcm-jlsx-modal/pcm-jlsx-modal.js +173 -5
  29. package/dist/collection/components/pcm-jlsx-modal/pcm-jlsx-modal.js.map +1 -1
  30. package/dist/collection/components/pcm-jlzz-modal/pcm-jlzz-modal.css +8 -2
  31. package/dist/collection/components/pcm-jlzz-modal/pcm-jlzz-modal.js +35 -0
  32. package/dist/collection/components/pcm-jlzz-modal/pcm-jlzz-modal.js.map +1 -1
  33. package/dist/collection/components/pcm-virtual-chat-modal/pcm-virtual-chat-modal.css +1 -1
  34. package/dist/collection/components/pcm-zsk-chat-modal/pcm-zsk-chat-modal.css +1 -1
  35. package/dist/components/components-chat-message.js +1 -1
  36. package/dist/components/components-digital-human.js +1 -1
  37. package/dist/components/components-export-records-modal.js +1 -1
  38. package/dist/components/components-mobile-input-btn.js +1 -1
  39. package/dist/components/components-mobile-upload-btn.js +1 -1
  40. package/dist/components/components-position-selector.js +1 -1
  41. package/dist/components/components-thousand-resume-wrapper.js +1 -1
  42. package/dist/components/components-upload.js +1 -1
  43. package/dist/components/components-voice-input-btn.js +1 -1
  44. package/dist/components/index.js +1 -1
  45. package/dist/components/oem-htws-modal.js +5 -5
  46. package/dist/components/oem-jd-modal.js +5 -5
  47. package/dist/components/oem-jlpp-modal.js +7 -7
  48. package/dist/components/oem-jlsx-modal.js +5 -5
  49. package/dist/components/oem-jlzz-modal.js +27 -6
  50. package/dist/components/oem-jlzz-modal.js.map +1 -1
  51. package/dist/components/oem-mnct-modal.js +7 -7
  52. package/dist/components/oem-mnms-modal.js +8 -8
  53. package/dist/components/oem-qgqjl-modal.js +9 -9
  54. package/dist/components/oem-zygh-modal.js +5 -5
  55. package/dist/components/{p-Bab9bYff.js → p-BDEiyYVl.js} +4 -4
  56. package/dist/components/{p-Bab9bYff.js.map → p-BDEiyYVl.js.map} +1 -1
  57. package/dist/components/{p-DkJ7RM7j.js → p-Bg0KKnpU.js} +3 -3
  58. package/dist/components/{p-DkJ7RM7j.js.map → p-Bg0KKnpU.js.map} +1 -1
  59. package/dist/components/{p-CR7hzwAG.js → p-BhdGTSLg.js} +6 -6
  60. package/dist/components/p-BhdGTSLg.js.map +1 -0
  61. package/dist/components/{p-CUpl5cwz.js → p-C-lvK9NX.js} +3 -3
  62. package/dist/components/{p-CUpl5cwz.js.map → p-C-lvK9NX.js.map} +1 -1
  63. package/dist/components/{p-Bn48g_o5.js → p-C7ubjB1x.js} +3 -3
  64. package/dist/components/{p-Bn48g_o5.js.map → p-C7ubjB1x.js.map} +1 -1
  65. package/dist/components/{p-Cp6_0jsj.js → p-CB7myOe_.js} +3 -3
  66. package/dist/components/{p-Cp6_0jsj.js.map → p-CB7myOe_.js.map} +1 -1
  67. package/dist/components/{p-DNPkGKCS.js → p-CEu-bFot.js} +3 -3
  68. package/dist/components/{p-DNPkGKCS.js.map → p-CEu-bFot.js.map} +1 -1
  69. package/dist/components/{p-BH3zMcBy.js → p-CPq5-i_-.js} +4 -4
  70. package/dist/components/{p-BH3zMcBy.js.map → p-CPq5-i_-.js.map} +1 -1
  71. package/dist/components/{p-Cy_hQiQs.js → p-CzFKth7J.js} +3 -3
  72. package/dist/components/{p-Cy_hQiQs.js.map → p-CzFKth7J.js.map} +1 -1
  73. package/dist/components/{p-CCTgkbh7.js → p-D4RnNrxx.js} +3 -3
  74. package/dist/components/{p-CCTgkbh7.js.map → p-D4RnNrxx.js.map} +1 -1
  75. package/dist/components/{p-DrIjQbpV.js → p-DJDJfWq9.js} +3 -3
  76. package/dist/components/{p-DrIjQbpV.js.map → p-DJDJfWq9.js.map} +1 -1
  77. package/dist/components/{p-DuRuN7gY.js → p-i4wY2JnB.js} +3 -3
  78. package/dist/components/{p-DuRuN7gY.js.map → p-i4wY2JnB.js.map} +1 -1
  79. package/dist/components/{p-BBxWf8DW.js → p-oVAdweom.js} +3 -3
  80. package/dist/components/{p-BBxWf8DW.js.map → p-oVAdweom.js.map} +1 -1
  81. package/dist/components/pcm-1zhanshi-mnms-modal.js +5 -5
  82. package/dist/components/pcm-app-chat-modal.js +1 -1
  83. package/dist/components/pcm-ats-mnms-modal.js +5 -5
  84. package/dist/components/pcm-card.js +1 -1
  85. package/dist/components/pcm-hr-chat-modal.js +2 -2
  86. package/dist/components/pcm-htws-modal.js +8 -8
  87. package/dist/components/pcm-hyzj-modal.js +5 -5
  88. package/dist/components/pcm-jd-modal.js +6 -6
  89. package/dist/components/pcm-jlpp-modal.js +8 -8
  90. package/dist/components/pcm-jlsx-modal.js +177 -9
  91. package/dist/components/pcm-jlsx-modal.js.map +1 -1
  92. package/dist/components/pcm-jlzz-modal.js +28 -7
  93. package/dist/components/pcm-jlzz-modal.js.map +1 -1
  94. package/dist/components/pcm-mnct-modal.js +7 -7
  95. package/dist/components/pcm-mnms-modal.js +8 -8
  96. package/dist/components/pcm-mnms-zp-modal.js +8 -8
  97. package/dist/components/pcm-msbg-modal.js +5 -5
  98. package/dist/components/pcm-qgqjl-modal.js +9 -9
  99. package/dist/components/pcm-virtual-chat-modal.js +1 -1
  100. package/dist/components/pcm-zsk-chat-modal.js +3 -3
  101. package/dist/components/pcm-zsk-chat-modal.js.map +1 -1
  102. package/dist/components/pcm-zygh-modal.js +7 -7
  103. package/dist/components/pcm-zygh-v2-modal.js +7 -7
  104. package/dist/esm/components-chat-message_33.entry.js +28 -7
  105. package/dist/esm/components-chat-message_33.entry.js.map +1 -1
  106. package/dist/esm/{conversation-utils-Ck8snHlu.js → conversation-utils-CLO35DHR.js} +4 -4
  107. package/dist/esm/{conversation-utils-Ck8snHlu.js.map → conversation-utils-CLO35DHR.js.map} +1 -1
  108. package/dist/esm/{index-BR_BEmyI.js → index-KVnu9w-h.js} +4 -4
  109. package/dist/esm/{index-BR_BEmyI.js.map → index-KVnu9w-h.js.map} +1 -1
  110. package/dist/esm/index.js +1 -1
  111. package/dist/esm/oem-htws-modal.entry.js +1 -1
  112. package/dist/esm/oem-jd-modal.entry.js +2 -2
  113. package/dist/esm/oem-jlpp-modal.entry.js +1 -1
  114. package/dist/esm/oem-jlzz-modal.entry.js +23 -2
  115. package/dist/esm/oem-jlzz-modal.entry.js.map +1 -1
  116. package/dist/esm/oem-mnct-modal.entry.js +1 -1
  117. package/dist/esm/oem-mnms-modal.entry.js +1 -1
  118. package/dist/esm/oem-qgqjl-modal.entry.js +3 -3
  119. package/dist/esm/pcm-hr-chat-modal.entry.js +2 -2
  120. package/dist/esm/pcm-jlsx-modal.entry.js +174 -6
  121. package/dist/esm/pcm-jlsx-modal.entry.js.map +1 -1
  122. package/dist/esm/{sentry-reporter-BZPRD4nE.js → sentry-reporter-B4aHQq-A.js} +3 -3
  123. package/dist/esm/{sentry-reporter-BZPRD4nE.js.map → sentry-reporter-B4aHQq-A.js.map} +1 -1
  124. package/dist/pcm-agents/index.esm.js +1 -1
  125. package/dist/pcm-agents/oem-jlzz-modal.entry.esm.js.map +1 -1
  126. package/dist/pcm-agents/{p-4427d0b4.entry.js → p-4d7511e0.entry.js} +2 -2
  127. package/dist/pcm-agents/{p-66459556.entry.js → p-7e8bdfa6.entry.js} +2 -2
  128. package/dist/pcm-agents/{p-7000140e.entry.js → p-8144f0d4.entry.js} +2 -2
  129. package/dist/pcm-agents/{p-4f35fe24.entry.js → p-8256890d.entry.js} +2 -2
  130. package/dist/pcm-agents/p-B4ClCdh9.js +2 -0
  131. package/dist/pcm-agents/{p-CDLRm6tb.js.map → p-B4ClCdh9.js.map} +1 -1
  132. package/dist/pcm-agents/{p-C5UfA3VN.js → p-Bktjt_YJ.js} +2 -2
  133. package/dist/pcm-agents/{p-C5UfA3VN.js.map → p-Bktjt_YJ.js.map} +1 -1
  134. package/dist/pcm-agents/{p-CC_AWE7Q.js → p-CMfzTNOk.js} +2 -2
  135. package/dist/pcm-agents/{p-CC_AWE7Q.js.map → p-CMfzTNOk.js.map} +1 -1
  136. package/dist/pcm-agents/p-aa606968.entry.js +2 -0
  137. package/dist/pcm-agents/p-aa606968.entry.js.map +1 -0
  138. package/dist/pcm-agents/p-dd6362f0.entry.js +2 -0
  139. package/dist/pcm-agents/p-dd6362f0.entry.js.map +1 -0
  140. package/dist/pcm-agents/{p-174577d5.entry.js → p-e2b9a9f2.entry.js} +2 -2
  141. package/dist/pcm-agents/{p-6419b0bb.entry.js → p-eb9b355e.entry.js} +2 -2
  142. package/dist/pcm-agents/{p-8b6019b7.entry.js → p-efb4e819.entry.js} +2 -2
  143. package/dist/pcm-agents/{p-4a767489.entry.js → p-f6683f29.entry.js} +3 -3
  144. package/dist/pcm-agents/{p-4a767489.entry.js.map → p-f6683f29.entry.js.map} +1 -1
  145. package/dist/pcm-agents/pcm-agents.esm.js +1 -1
  146. package/dist/pcm-agents/pcm-jlsx-modal.entry.esm.js.map +1 -1
  147. package/dist/types/components/oem-jlzz-modal/oem-jlzz-modal.d.ts +11 -0
  148. package/dist/types/components/pcm-jlsx-modal/pcm-jlsx-modal.d.ts +7 -2
  149. package/dist/types/components/pcm-jlzz-modal/pcm-jlzz-modal.d.ts +11 -0
  150. package/dist/types/components.d.ts +24 -2
  151. package/package.json +1 -1
  152. package/dist/components/p-CR7hzwAG.js.map +0 -1
  153. package/dist/pcm-agents/p-0abb8e18.entry.js +0 -2
  154. package/dist/pcm-agents/p-0abb8e18.entry.js.map +0 -1
  155. package/dist/pcm-agents/p-99bf652c.entry.js +0 -2
  156. package/dist/pcm-agents/p-99bf652c.entry.js.map +0 -1
  157. package/dist/pcm-agents/p-CDLRm6tb.js +0 -2
  158. /package/dist/pcm-agents/{p-4427d0b4.entry.js.map → p-4d7511e0.entry.js.map} +0 -0
  159. /package/dist/pcm-agents/{p-66459556.entry.js.map → p-7e8bdfa6.entry.js.map} +0 -0
  160. /package/dist/pcm-agents/{p-7000140e.entry.js.map → p-8144f0d4.entry.js.map} +0 -0
  161. /package/dist/pcm-agents/{p-4f35fe24.entry.js.map → p-8256890d.entry.js.map} +0 -0
  162. /package/dist/pcm-agents/{p-174577d5.entry.js.map → p-e2b9a9f2.entry.js.map} +0 -0
  163. /package/dist/pcm-agents/{p-6419b0bb.entry.js.map → p-eb9b355e.entry.js.map} +0 -0
  164. /package/dist/pcm-agents/{p-8b6019b7.entry.js.map → p-efb4e819.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"p-CDLRm6tb.js","sources":["src/utils/sentry-reporter.ts"],"sourcesContent":["import * as Sentry from \"@sentry/browser\";\r\nimport { configStore } from \"../../store/config.store\";\r\n\r\n/**\r\n * Sentry事件上报工具类\r\n * 提供统一的错误上报接口,自动添加用户认证信息\r\n */\r\nexport class SentryReporter {\r\n\r\n /**\r\n * 捕获并上报错误\r\n * @param error 错误对象\r\n * @param context 错误上下文\r\n */\r\n static captureError(error: any, context?: Record<string, any> & { title?: string }): void {\r\n try {\r\n // 添加认证信息\r\n const CUser = configStore.getItem('pcm-sdk-CUser');\r\n if (CUser) {\r\n Sentry.setUser({ id: String(CUser) });\r\n }\r\n \r\n let finalError = error;\r\n \r\n // 如果提供了自定义标题,创建新的错误对象\r\n if (context?.title) {\r\n finalError = new Error(context.title);\r\n if (error?.stack) {\r\n finalError.stack = error.stack;\r\n }\r\n finalError.cause = error;\r\n }\r\n \r\n // 添加上下文\r\n if (context) {\r\n const { title, ...otherContext } = context;\r\n Sentry.setContext('error_context', otherContext);\r\n }\r\n \r\n // 上报错误\r\n Sentry.captureException(finalError);\r\n } catch (e) {\r\n console.error('Sentry 上报错误失败:', e);\r\n }\r\n }\r\n\r\n /**\r\n * 捕获并上报消息\r\n * @param message 消息内容\r\n * @param context 消息上下文\r\n */\r\n static captureMessage(message: string, context?: Record<string, any>): void {\r\n try {\r\n // 添加认证信息\r\n const CUser = configStore.getItem('pcm-sdk-CUser');\r\n if (CUser) {\r\n Sentry.setUser({ id: String(CUser) });\r\n }\r\n \r\n // 添加上下文\r\n if (context) {\r\n Sentry.setContext('message_context', context);\r\n }\r\n \r\n // 上报消息\r\n Sentry.captureMessage(message);\r\n } catch (e) {\r\n console.error('Sentry 上报消息失败:', e);\r\n }\r\n }\r\n\r\n}"],"names":["Sentry.setUser","Sentry.setContext","Sentry.captureException","Sentry.captureMessage"],"mappings":";;;AAGA;;;AAGG;MACU,cAAc,CAAA;AAEzB;;;;AAIG;AACH,IAAA,OAAO,YAAY,CAAC,KAAU,EAAE,OAAkD,EAAA;AAChF,QAAA,IAAI;;YAEF,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,eAAe,CAAC;YAClD,IAAI,KAAK,EAAE;AACT,gBAAAA,OAAc,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;;YAGvC,IAAI,UAAU,GAAG,KAAK;;AAGtB,YAAA,IAAI,OAAO,EAAE,KAAK,EAAE;gBAClB,UAAU,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;AACrC,gBAAA,IAAI,KAAK,EAAE,KAAK,EAAE;AAChB,oBAAA,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK;;AAEhC,gBAAA,UAAU,CAAC,KAAK,GAAG,KAAK;;;YAI1B,IAAI,OAAO,EAAE;gBACX,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO;AAC1C,gBAAAC,UAAiB,CAAC,eAAe,EAAE,YAAY,CAAC;;;AAIlD,YAAAC,gBAAuB,CAAC,UAAU,CAAC;;QACnC,OAAO,CAAC,EAAE;AACV,YAAA,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;;;AAItC;;;;AAIG;AACH,IAAA,OAAO,cAAc,CAAC,OAAe,EAAE,OAA6B,EAAA;AAClE,QAAA,IAAI;;YAEF,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,eAAe,CAAC;YAClD,IAAI,KAAK,EAAE;AACT,gBAAAF,OAAc,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;;;YAIvC,IAAI,OAAO,EAAE;AACX,gBAAAC,UAAiB,CAAC,iBAAiB,EAAE,OAAO,CAAC;;;AAI/C,YAAAE,cAAqB,CAAC,OAAO,CAAC;;QAC9B,OAAO,CAAC,EAAE;AACV,YAAA,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;;;AAIvC;;;;"}
1
+ {"version":3,"file":"p-B4ClCdh9.js","sources":["src/utils/sentry-reporter.ts"],"sourcesContent":["import * as Sentry from \"@sentry/browser\";\r\nimport { configStore } from \"../../store/config.store\";\r\n\r\n/**\r\n * Sentry事件上报工具类\r\n * 提供统一的错误上报接口,自动添加用户认证信息\r\n */\r\nexport class SentryReporter {\r\n\r\n /**\r\n * 捕获并上报错误\r\n * @param error 错误对象\r\n * @param context 错误上下文\r\n */\r\n static captureError(error: any, context?: Record<string, any> & { title?: string }): void {\r\n try {\r\n // 添加认证信息\r\n const CUser = configStore.getItem('pcm-sdk-CUser');\r\n if (CUser) {\r\n Sentry.setUser({ id: String(CUser) });\r\n }\r\n \r\n let finalError = error;\r\n \r\n // 如果提供了自定义标题,创建新的错误对象\r\n if (context?.title) {\r\n finalError = new Error(context.title);\r\n if (error?.stack) {\r\n finalError.stack = error.stack;\r\n }\r\n finalError.cause = error;\r\n }\r\n \r\n // 添加上下文\r\n if (context) {\r\n const { title, ...otherContext } = context;\r\n Sentry.setContext('error_context', otherContext);\r\n }\r\n \r\n // 上报错误\r\n Sentry.captureException(finalError);\r\n } catch (e) {\r\n console.error('Sentry 上报错误失败:', e);\r\n }\r\n }\r\n\r\n /**\r\n * 捕获并上报消息\r\n * @param message 消息内容\r\n * @param context 消息上下文\r\n */\r\n static captureMessage(message: string, context?: Record<string, any>): void {\r\n try {\r\n // 添加认证信息\r\n const CUser = configStore.getItem('pcm-sdk-CUser');\r\n if (CUser) {\r\n Sentry.setUser({ id: String(CUser) });\r\n }\r\n \r\n // 添加上下文\r\n if (context) {\r\n Sentry.setContext('message_context', context);\r\n }\r\n \r\n // 上报消息\r\n Sentry.captureMessage(message);\r\n } catch (e) {\r\n console.error('Sentry 上报消息失败:', e);\r\n }\r\n }\r\n\r\n}"],"names":["Sentry.setUser","Sentry.setContext","Sentry.captureException","Sentry.captureMessage"],"mappings":";;;AAGA;;;AAGG;MACU,cAAc,CAAA;AAEzB;;;;AAIG;AACH,IAAA,OAAO,YAAY,CAAC,KAAU,EAAE,OAAkD,EAAA;AAChF,QAAA,IAAI;;YAEF,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,eAAe,CAAC;YAClD,IAAI,KAAK,EAAE;AACT,gBAAAA,OAAc,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;;YAGvC,IAAI,UAAU,GAAG,KAAK;;AAGtB,YAAA,IAAI,OAAO,EAAE,KAAK,EAAE;gBAClB,UAAU,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;AACrC,gBAAA,IAAI,KAAK,EAAE,KAAK,EAAE;AAChB,oBAAA,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK;;AAEhC,gBAAA,UAAU,CAAC,KAAK,GAAG,KAAK;;;YAI1B,IAAI,OAAO,EAAE;gBACX,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO;AAC1C,gBAAAC,UAAiB,CAAC,eAAe,EAAE,YAAY,CAAC;;;AAIlD,YAAAC,gBAAuB,CAAC,UAAU,CAAC;;QACnC,OAAO,CAAC,EAAE;AACV,YAAA,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;;;AAItC;;;;AAIG;AACH,IAAA,OAAO,cAAc,CAAC,OAAe,EAAE,OAA6B,EAAA;AAClE,QAAA,IAAI;;YAEF,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,eAAe,CAAC;YAClD,IAAI,KAAK,EAAE;AACT,gBAAAF,OAAc,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;;;YAIvC,IAAI,OAAO,EAAE;AACX,gBAAAC,UAAiB,CAAC,iBAAiB,EAAE,OAAO,CAAC;;;AAI/C,YAAAE,cAAqB,CAAC,OAAO,CAAC;;QAC9B,OAAO,CAAC,EAAE;AACV,YAAA,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;;;AAIvC;;;;"}
@@ -1,2 +1,2 @@
1
- import{a as e,f as t}from"./p-Bq0K-WqZ.js";const o="https://api.pincaimao.com/agents/platform";const n="https://www.pincaimao.com";const r=(e,t,o)=>{const n=e.get(t);if(!n){e.set(t,[o])}else if(!n.includes(o)){n.push(o)}};const s=(e,t)=>{let o;return(...n)=>{if(o){clearTimeout(o)}o=setTimeout((()=>{o=0;e(...n)}),t)}};const c=e=>!("isConnected"in e)||e.isConnected;const a=s((e=>{for(let t of e.keys()){e.set(t,e.get(t).filter(c))}}),2e3);const i=()=>{if(typeof e!=="function"){return{}}const o=new Map;return{dispose:()=>o.clear(),get:t=>{const n=e();if(n){r(o,t,n)}},set:e=>{const n=o.get(e);if(n){o.set(e,n.filter(t))}a(o)},reset:()=>{o.forEach((e=>e.forEach(t)));a(o)}}};const u=e=>typeof e==="function"?e():e;const l=(e,t=(e,t)=>e!==t)=>{const o=u(e);let n=new Map(Object.entries(o??{}));const r={dispose:[],get:[],set:[],reset:[]};const s=()=>{n=new Map(Object.entries(u(e)??{}));r.reset.forEach((e=>e()))};const c=()=>{r.dispose.forEach((e=>e()));s()};const a=e=>{r.get.forEach((t=>t(e)));return n.get(e)};const i=(e,o)=>{const s=n.get(e);if(t(o,s,e)){n.set(e,o);r.set.forEach((t=>t(e,o,s)))}};const l=typeof Proxy==="undefined"?{}:new Proxy(o,{get(e,t){return a(t)},ownKeys(e){return Array.from(n.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(e,t){return n.has(t)},set(e,t,o){i(t,o);return true}});const f=(e,t)=>{r[e].push(t);return()=>{d(r[e],t)}};const h=(t,o)=>{const n=f("set",((e,n)=>{if(e===t){o(n)}}));const r=f("reset",(()=>o(u(e)[t])));return()=>{n();r()}};const w=(...e)=>{const t=e.reduce(((e,t)=>{if(t.set){e.push(f("set",t.set))}if(t.get){e.push(f("get",t.get))}if(t.reset){e.push(f("reset",t.reset))}if(t.dispose){e.push(f("dispose",t.dispose))}return e}),[]);return()=>t.forEach((e=>e()))};const m=e=>{const t=n.get(e);r.set.forEach((o=>o(e,t,t)))};return{state:l,get:a,set:i,on:f,onChange:h,use:w,dispose:c,reset:s,forceUpdate:m}};const d=(e,t)=>{const o=e.indexOf(t);if(o>=0){e[o]=e[e.length-1];e.length--}};const f=(e,t)=>{const o=l(e,t);o.use(i());return o};const{state:h,onChange:w}=f({token:localStorage.getItem("pcm-sdk-auth-token")||null});const m={getToken:()=>h.token,setToken:e=>{h.token=e;localStorage.setItem("pcm-sdk-auth-token",e)},clearToken:()=>{h.token=null;localStorage.removeItem("pcm-sdk-auth-token")}};w("token",(e=>{if(e){localStorage.setItem("pcm-sdk-auth-token",e)}else{localStorage.removeItem("pcm-sdk-auth-token")}}));const p=()=>{try{const e=localStorage.getItem("pcm-sdk-config-data");return e?JSON.parse(e):{}}catch(e){console.error("Error parsing stored config:",e);return{}}};const{state:y,onChange:g}=f({data:p()});const k={getConfig:()=>y.data,getItem:(e,t)=>y.data[e]!==undefined?y.data[e]:t,setItem:(e,t)=>{y.data={...y.data,[e]:t}},removeItem:e=>{const t={...y.data};delete t[e];y.data=t},clear:()=>{y.data={}},updateConfig:e=>{y.data={...y.data,...e}}};g("data",(e=>{try{if(Object.keys(e).length>0){localStorage.setItem("pcm-sdk-config-data",JSON.stringify(e))}else{localStorage.removeItem("pcm-sdk-config-data")}}catch(e){console.error("Error saving config to localStorage:",e)}}));const T="1.0.0";function E(e,t,o){return(e||"")+(t?` ${t}`:"")+(o?` ${o}`:"")}const S=()=>m.getToken()||"";const $=3*60*1e3;const v=async(e,t,o=$)=>{const n=new AbortController;const r=setTimeout((()=>n.abort()),o);try{const o=await fetch(e,{...t,signal:n.signal});clearTimeout(r);return o}catch(e){clearTimeout(r);if(e instanceof Error&&e.name==="AbortError"){throw new Error("请求超时,请检查网络连接后重试")}throw e}};const b=async(e,t=false)=>{const{url:n,method:r,headers:s={},data:c,onMessage:a,onError:i,onComplete:u}=e;try{const i=`${o}${n}`;if(!s["authorization"]&&!s["Authorization"]){const e=S();if(e){s["authorization"]=`Bearer ${e}`}}const l=await v(i,{method:r,headers:{Accept:"text/event-stream","Content-Type":"application/json",...s},body:c?JSON.stringify(c):undefined});if(l.status===401){P();if(!t){return b(e,true)}}if(!l.ok){console.error(`HTTP error! status: ${l.status}`)}const d=l.body?.getReader();if(!d)throw new Error("No reader available");const f=new TextDecoder;let h="";while(true){const{value:e,done:t}=await d.read();if(t)break;h+=f.decode(e,{stream:true});const o=h.split("\n");h=o.pop()||"";for(const e of o){if(e.startsWith("data:")){try{const t=e.substring(5).trim();if(!t)continue;const o=JSON.parse(t);a?.(o)}catch(t){console.error("解析 SSE 数据错误:",t,"原始数据:",e)}}}}u?.()}catch(o){console.error("SSE 请求错误:",o);if(!t){return b(e,true)}i?.(o)}};const P=()=>{const e=new CustomEvent("pcm-token-invalid",{bubbles:true,composed:true,detail:{timestamp:(new Date).getTime()}});document.dispatchEvent(e)};const M=async(e,t=true)=>{const{url:n,method:r="GET",headers:s={},params:c={},data:a,formData:i,onMessage:u}=e;try{const l=new URLSearchParams;Object.entries(c).forEach((([e,t])=>{if(t!==undefined&&t!==null){l.append(e,String(t))}}));let d=`${o}${n}${l.toString()?`?${l.toString()}`:""}`;if(s["authorization"]==undefined&&s["Authorization"]==undefined){const e=S();if(e){s["authorization"]=`Bearer ${e}`}}const f={method:r,headers:i?{...s}:{"Content-Type":"application/json",...s}};if(i){f.body=i}else if(r!=="GET"&&r!=="HEAD"&&a){f.body=JSON.stringify(a)}if(r==="GET"&&a){const e=new URLSearchParams;Object.entries(a).forEach((([t,o])=>{if(o!==undefined&&o!==null){e.append(t,String(o))}}));d+=(l.toString()?"&":"?")+e.toString()}const h=await v(d,f);if(h.status===401){P();if(t){return M(e,false)}}const w=await h.json();if(u){u(w)}if(!h.ok){console.error(`HTTP错误: ${h.status} ${h.statusText}`);return{success:false,message:w.message||`HTTP错误: ${h.status}`,error:w}}if(w.code!==0){console.error(`API错误: ${w.message}`);return{success:false,message:w.message,error:w}}return{success:true,data:w.data}}catch(o){console.error("HTTP请求错误:",o);if(t){return M(e,false)}if(e.onError){e.onError(o)}return{success:false,error:o,message:o instanceof Error?o.message:"未知错误"}}finally{if(e.onComplete){e.onComplete()}}};const O=async e=>{const t=await M({url:"/sdk/v1/user",method:"GET",headers:{Authorization:`Bearer ${e}`},data:{sdk_version:T}},false);if(!t.success&&t.error&&t.error.code===401){return false}else{k.setItem("pcm-sdk-CUser",`${t.data.user}(${t.data.chat_user})`);return t.success}};const C=async e=>{if(!e){throw new Error("智能体ID不能为空")}try{const t=await M({url:`/sdk/v1/agent/${e}/info`,method:"GET"});if(!t.success){throw new Error(t.message||"获取智能体信息失败")}return t.data}catch(e){console.error("获取智能体信息失败:",e);throw e}};var _;(function(e){e["Init"]="init";e["Uploading"]="uploading";e["Success"]="success";e["Failed"]="failed"})(_||(_={}));const A=async e=>new Promise(((t,o)=>{const n=new FileReader;n.onload=async e=>{try{const o=e.target?.result;const n=await crypto.subtle.digest("SHA-256",o);const r=Array.from(new Uint8Array(n));const s=r.map((e=>e.toString(16).padStart(2,"0"))).join("");t(s)}catch(e){o(e)}};n.onerror=()=>o(new Error("读取文件失败"));n.readAsArrayBuffer(e)}));const I=async(e,t,o="application/octet-stream",n=2)=>{let r=0;while(true){try{const n=await v(e,{method:"PUT",body:t,headers:{"Content-Type":o}});if(!n.ok){throw new Error(`文件上传失败: ${n.status} ${n.statusText}`)}return n}catch(e){r++;console.error(`文件上传错误(尝试 ${r}/${n}):`,e);if(r>=n){throw e}}}};const R=async(e,t,o)=>{try{const n=await A(e);const r=await M({url:"/sdk/v1/files/generate-upload-url",method:"POST",data:{...o,filename:e.name,filesize:e.size,sha256:n},headers:t});if(!r.success||!r.data){throw new Error(r.message||"获取上传URL失败")}const s=r.data;if(s.is_deleted!=1){const o=await I(s.upload_url,e,s.content_type||"application/octet-stream");if(!o.ok){throw new Error(`文件上传到腾讯云失败: ${o.status} ${o.statusText}`)}M({url:"/sdk/v1/files/mark-as-upload",method:"POST",data:{cos_key:s.cos.cos_key},headers:t})}return{cos_key:s.cos.cos_key,file_name:s.filename,file_size:s.filesize,ext:s.filetype}}catch(e){console.error("文件上传错误:",e);throw e}};const U=async(e,t,n=false)=>{const r=S();if(!r){throw new Error("API密钥不能为空")}try{const s=await v(`${o}/sdk/v1/tts/synthesize_audio`,{method:"POST",headers:{"Content-Type":"application/json",authorization:"Bearer "+r},body:JSON.stringify({text:e})});if(s.status===401){P();if(!n){return U(e,t,true)}}if(!s.ok){throw new Error("语音合成失败")}const c=await s.blob();return URL.createObjectURL(c)}catch(o){console.error("语音合成错误:",o);if(!n){return U(e,t,true)}throw o}};const j=async(e,t)=>{try{const o=await M({url:"/sdk/v1/files/presigned-url",method:"GET",params:{cos_key:e},headers:t});if(o.success&&o.data?.file_url){return o.data.file_url}return null}catch(e){console.error("获取预签名URL失败:",e);return null}};const N=async(e,t)=>{try{const o=await j(e,t);if(o){return`${o}${o.includes("?")?"&":"?"}ci-process=doc-preview&copyable=1&dstType=html`}return null}catch(e){console.error("获取预览URL失败:",e);return null}};const x=e=>{if(!e&&e!==0){return null}const t=Number(e);if(isNaN(t))return null;if(e<1024){return e+"B"}if(e<1024*1024){return(e/1024).toFixed(1)+"KB"}return(e/1024/1024).toFixed(1)+"MB"};const B=()=>{const e=["video/webm;codecs=vp8,opus","video/webm;codecs=vp9,opus","video/webm","video/mp4","video/mp4;codecs=h264,aac",""];if(!window.MediaRecorder){console.warn("MediaRecorder API不可用");return""}for(const t of e){if(!t)return"";try{if(MediaRecorder.isTypeSupported(t)){return t}}catch(e){console.warn(`检查MIME类型支持时出错 ${t}:`,e)}}console.warn("没有找到支持的MIME类型,将使用浏览器默认值");return""};const L=()=>{const e=["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/ogg;codecs=opus","audio/ogg",""];if(!window.MediaRecorder){console.warn("MediaRecorder API不可用");return""}for(const t of e){if(!t)return"";try{if(MediaRecorder.isTypeSupported(t)){return t}}catch(e){console.warn(`检查音频MIME类型支持时出错 ${t}:`,e)}}console.warn("没有找到支持的音频MIME类型,将使用浏览器默认值");return""};const z=async e=>{try{const t=await M({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);throw new Error("音频转文字失败")}};const G=async(e,t,o=0)=>{try{const n=await M({url:"/sdk/v1/verify_sms_code",method:"POST",params:{mobile:e,code:t,code_type:o}});return n}catch(e){console.error("校验短信验证码错误:",e);throw e}};const D=async e=>{const{oemId:t,page:o=1,pageSize:n=10,keyword:r}=e;try{const e=new URLSearchParams;e.append("page",o.toString());e.append("page_size",n.toString());if(r){e.append("keyword",r)}const s=await M({url:`/sdk/v1/oem/${t}/positions?${e.toString()}`,method:"GET"});return s}catch(e){console.error("获取OEM职位列表错误:",e);throw e}};const H=async(e,t)=>{try{const o=await M({url:"/sdk/v1/files/upload-by-url",method:"POST",data:e,headers:t});return o}catch(e){console.error("通过URL上传文件错误:",e);throw e}};export{_ as F,n as P,m as a,b,k as c,U as d,G as e,j as f,N as g,D as h,x as i,L as j,z as k,H as l,C as m,B as n,E as o,M as s,R as u,O as v};
2
- //# sourceMappingURL=p-C5UfA3VN.js.map
1
+ import{a as e,f as t}from"./p-Bq0K-WqZ.js";const o="https://api.pincaimao.com/agents/platform";const n="https://www.pincaimao.com";const r=(e,t,o)=>{const n=e.get(t);if(!n){e.set(t,[o])}else if(!n.includes(o)){n.push(o)}};const s=(e,t)=>{let o;return(...n)=>{if(o){clearTimeout(o)}o=setTimeout((()=>{o=0;e(...n)}),t)}};const c=e=>!("isConnected"in e)||e.isConnected;const a=s((e=>{for(let t of e.keys()){e.set(t,e.get(t).filter(c))}}),2e3);const i=()=>{if(typeof e!=="function"){return{}}const o=new Map;return{dispose:()=>o.clear(),get:t=>{const n=e();if(n){r(o,t,n)}},set:e=>{const n=o.get(e);if(n){o.set(e,n.filter(t))}a(o)},reset:()=>{o.forEach((e=>e.forEach(t)));a(o)}}};const u=e=>typeof e==="function"?e():e;const l=(e,t=(e,t)=>e!==t)=>{const o=u(e);let n=new Map(Object.entries(o??{}));const r={dispose:[],get:[],set:[],reset:[]};const s=()=>{n=new Map(Object.entries(u(e)??{}));r.reset.forEach((e=>e()))};const c=()=>{r.dispose.forEach((e=>e()));s()};const a=e=>{r.get.forEach((t=>t(e)));return n.get(e)};const i=(e,o)=>{const s=n.get(e);if(t(o,s,e)){n.set(e,o);r.set.forEach((t=>t(e,o,s)))}};const l=typeof Proxy==="undefined"?{}:new Proxy(o,{get(e,t){return a(t)},ownKeys(e){return Array.from(n.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(e,t){return n.has(t)},set(e,t,o){i(t,o);return true}});const f=(e,t)=>{r[e].push(t);return()=>{d(r[e],t)}};const h=(t,o)=>{const n=f("set",((e,n)=>{if(e===t){o(n)}}));const r=f("reset",(()=>o(u(e)[t])));return()=>{n();r()}};const w=(...e)=>{const t=e.reduce(((e,t)=>{if(t.set){e.push(f("set",t.set))}if(t.get){e.push(f("get",t.get))}if(t.reset){e.push(f("reset",t.reset))}if(t.dispose){e.push(f("dispose",t.dispose))}return e}),[]);return()=>t.forEach((e=>e()))};const m=e=>{const t=n.get(e);r.set.forEach((o=>o(e,t,t)))};return{state:l,get:a,set:i,on:f,onChange:h,use:w,dispose:c,reset:s,forceUpdate:m}};const d=(e,t)=>{const o=e.indexOf(t);if(o>=0){e[o]=e[e.length-1];e.length--}};const f=(e,t)=>{const o=l(e,t);o.use(i());return o};const{state:h,onChange:w}=f({token:localStorage.getItem("pcm-sdk-auth-token")||null});const m={getToken:()=>h.token,setToken:e=>{h.token=e;localStorage.setItem("pcm-sdk-auth-token",e)},clearToken:()=>{h.token=null;localStorage.removeItem("pcm-sdk-auth-token")}};w("token",(e=>{if(e){localStorage.setItem("pcm-sdk-auth-token",e)}else{localStorage.removeItem("pcm-sdk-auth-token")}}));const p=()=>{try{const e=localStorage.getItem("pcm-sdk-config-data");return e?JSON.parse(e):{}}catch(e){console.error("Error parsing stored config:",e);return{}}};const{state:y,onChange:g}=f({data:p()});const k={getConfig:()=>y.data,getItem:(e,t)=>y.data[e]!==undefined?y.data[e]:t,setItem:(e,t)=>{y.data={...y.data,[e]:t}},removeItem:e=>{const t={...y.data};delete t[e];y.data=t},clear:()=>{y.data={}},updateConfig:e=>{y.data={...y.data,...e}}};g("data",(e=>{try{if(Object.keys(e).length>0){localStorage.setItem("pcm-sdk-config-data",JSON.stringify(e))}else{localStorage.removeItem("pcm-sdk-config-data")}}catch(e){console.error("Error saving config to localStorage:",e)}}));const T="1.0.2";function E(e,t,o){return(e||"")+(t?` ${t}`:"")+(o?` ${o}`:"")}const S=()=>m.getToken()||"";const $=3*60*1e3;const v=async(e,t,o=$)=>{const n=new AbortController;const r=setTimeout((()=>n.abort()),o);try{const o=await fetch(e,{...t,signal:n.signal});clearTimeout(r);return o}catch(e){clearTimeout(r);if(e instanceof Error&&e.name==="AbortError"){throw new Error("请求超时,请检查网络连接后重试")}throw e}};const b=async(e,t=false)=>{const{url:n,method:r,headers:s={},data:c,onMessage:a,onError:i,onComplete:u}=e;try{const i=`${o}${n}`;if(!s["authorization"]&&!s["Authorization"]){const e=S();if(e){s["authorization"]=`Bearer ${e}`}}const l=await v(i,{method:r,headers:{Accept:"text/event-stream","Content-Type":"application/json",...s},body:c?JSON.stringify(c):undefined});if(l.status===401){P();if(!t){return b(e,true)}}if(!l.ok){console.error(`HTTP error! status: ${l.status}`)}const d=l.body?.getReader();if(!d)throw new Error("No reader available");const f=new TextDecoder;let h="";while(true){const{value:e,done:t}=await d.read();if(t)break;h+=f.decode(e,{stream:true});const o=h.split("\n");h=o.pop()||"";for(const e of o){if(e.startsWith("data:")){try{const t=e.substring(5).trim();if(!t)continue;const o=JSON.parse(t);a?.(o)}catch(t){console.error("解析 SSE 数据错误:",t,"原始数据:",e)}}}}u?.()}catch(o){console.error("SSE 请求错误:",o);if(!t){return b(e,true)}i?.(o)}};const P=()=>{const e=new CustomEvent("pcm-token-invalid",{bubbles:true,composed:true,detail:{timestamp:(new Date).getTime()}});document.dispatchEvent(e)};const M=async(e,t=true)=>{const{url:n,method:r="GET",headers:s={},params:c={},data:a,formData:i,onMessage:u}=e;try{const l=new URLSearchParams;Object.entries(c).forEach((([e,t])=>{if(t!==undefined&&t!==null){l.append(e,String(t))}}));let d=`${o}${n}${l.toString()?`?${l.toString()}`:""}`;if(s["authorization"]==undefined&&s["Authorization"]==undefined){const e=S();if(e){s["authorization"]=`Bearer ${e}`}}const f={method:r,headers:i?{...s}:{"Content-Type":"application/json",...s}};if(i){f.body=i}else if(r!=="GET"&&r!=="HEAD"&&a){f.body=JSON.stringify(a)}if(r==="GET"&&a){const e=new URLSearchParams;Object.entries(a).forEach((([t,o])=>{if(o!==undefined&&o!==null){e.append(t,String(o))}}));d+=(l.toString()?"&":"?")+e.toString()}const h=await v(d,f);if(h.status===401){P();if(t){return M(e,false)}}const w=await h.json();if(u){u(w)}if(!h.ok){console.error(`HTTP错误: ${h.status} ${h.statusText}`);return{success:false,message:w.message||`HTTP错误: ${h.status}`,error:w}}if(w.code!==0){console.error(`API错误: ${w.message}`);return{success:false,message:w.message,error:w}}return{success:true,data:w.data}}catch(o){console.error("HTTP请求错误:",o);if(t){return M(e,false)}if(e.onError){e.onError(o)}return{success:false,error:o,message:o instanceof Error?o.message:"未知错误"}}finally{if(e.onComplete){e.onComplete()}}};const O=async e=>{const t=await M({url:"/sdk/v1/user",method:"GET",headers:{Authorization:`Bearer ${e}`},data:{sdk_version:T}},false);if(!t.success&&t.error&&t.error.code===401){return false}else{k.setItem("pcm-sdk-CUser",`${t.data.user}(${t.data.chat_user})`);return t.success}};const C=async e=>{if(!e){throw new Error("智能体ID不能为空")}try{const t=await M({url:`/sdk/v1/agent/${e}/info`,method:"GET"});if(!t.success){throw new Error(t.message||"获取智能体信息失败")}return t.data}catch(e){console.error("获取智能体信息失败:",e);throw e}};var _;(function(e){e["Init"]="init";e["Uploading"]="uploading";e["Success"]="success";e["Failed"]="failed"})(_||(_={}));const A=async e=>new Promise(((t,o)=>{const n=new FileReader;n.onload=async e=>{try{const o=e.target?.result;const n=await crypto.subtle.digest("SHA-256",o);const r=Array.from(new Uint8Array(n));const s=r.map((e=>e.toString(16).padStart(2,"0"))).join("");t(s)}catch(e){o(e)}};n.onerror=()=>o(new Error("读取文件失败"));n.readAsArrayBuffer(e)}));const I=async(e,t,o="application/octet-stream",n=2)=>{let r=0;while(true){try{const n=await v(e,{method:"PUT",body:t,headers:{"Content-Type":o}});if(!n.ok){throw new Error(`文件上传失败: ${n.status} ${n.statusText}`)}return n}catch(e){r++;console.error(`文件上传错误(尝试 ${r}/${n}):`,e);if(r>=n){throw e}}}};const R=async(e,t,o)=>{try{const n=await A(e);const r=await M({url:"/sdk/v1/files/generate-upload-url",method:"POST",data:{...o,filename:e.name,filesize:e.size,sha256:n},headers:t});if(!r.success||!r.data){throw new Error(r.message||"获取上传URL失败")}const s=r.data;if(s.is_deleted!=1){const o=await I(s.upload_url,e,s.content_type||"application/octet-stream");if(!o.ok){throw new Error(`文件上传到腾讯云失败: ${o.status} ${o.statusText}`)}M({url:"/sdk/v1/files/mark-as-upload",method:"POST",data:{cos_key:s.cos.cos_key},headers:t})}return{cos_key:s.cos.cos_key,file_name:s.filename,file_size:s.filesize,ext:s.filetype}}catch(e){console.error("文件上传错误:",e);throw e}};const U=async(e,t,n=false)=>{const r=S();if(!r){throw new Error("API密钥不能为空")}try{const s=await v(`${o}/sdk/v1/tts/synthesize_audio`,{method:"POST",headers:{"Content-Type":"application/json",authorization:"Bearer "+r},body:JSON.stringify({text:e})});if(s.status===401){P();if(!n){return U(e,t,true)}}if(!s.ok){throw new Error("语音合成失败")}const c=await s.blob();return URL.createObjectURL(c)}catch(o){console.error("语音合成错误:",o);if(!n){return U(e,t,true)}throw o}};const j=async(e,t)=>{try{const o=await M({url:"/sdk/v1/files/presigned-url",method:"GET",params:{cos_key:e},headers:t});if(o.success&&o.data?.file_url){return o.data.file_url}return null}catch(e){console.error("获取预签名URL失败:",e);return null}};const N=async(e,t)=>{try{const o=await j(e,t);if(o){return`${o}${o.includes("?")?"&":"?"}ci-process=doc-preview&copyable=1&dstType=html`}return null}catch(e){console.error("获取预览URL失败:",e);return null}};const x=e=>{if(!e&&e!==0){return null}const t=Number(e);if(isNaN(t))return null;if(e<1024){return e+"B"}if(e<1024*1024){return(e/1024).toFixed(1)+"KB"}return(e/1024/1024).toFixed(1)+"MB"};const B=()=>{const e=["video/webm;codecs=vp8,opus","video/webm;codecs=vp9,opus","video/webm","video/mp4","video/mp4;codecs=h264,aac",""];if(!window.MediaRecorder){console.warn("MediaRecorder API不可用");return""}for(const t of e){if(!t)return"";try{if(MediaRecorder.isTypeSupported(t)){return t}}catch(e){console.warn(`检查MIME类型支持时出错 ${t}:`,e)}}console.warn("没有找到支持的MIME类型,将使用浏览器默认值");return""};const L=()=>{const e=["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/ogg;codecs=opus","audio/ogg",""];if(!window.MediaRecorder){console.warn("MediaRecorder API不可用");return""}for(const t of e){if(!t)return"";try{if(MediaRecorder.isTypeSupported(t)){return t}}catch(e){console.warn(`检查音频MIME类型支持时出错 ${t}:`,e)}}console.warn("没有找到支持的音频MIME类型,将使用浏览器默认值");return""};const z=async e=>{try{const t=await M({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);throw new Error("音频转文字失败")}};const G=async(e,t,o=0)=>{try{const n=await M({url:"/sdk/v1/verify_sms_code",method:"POST",params:{mobile:e,code:t,code_type:o}});return n}catch(e){console.error("校验短信验证码错误:",e);throw e}};const D=async e=>{const{oemId:t,page:o=1,pageSize:n=10,keyword:r}=e;try{const e=new URLSearchParams;e.append("page",o.toString());e.append("page_size",n.toString());if(r){e.append("keyword",r)}const s=await M({url:`/sdk/v1/oem/${t}/positions?${e.toString()}`,method:"GET"});return s}catch(e){console.error("获取OEM职位列表错误:",e);throw e}};const H=async(e,t)=>{try{const o=await M({url:"/sdk/v1/files/upload-by-url",method:"POST",data:e,headers:t});return o}catch(e){console.error("通过URL上传文件错误:",e);throw e}};export{_ as F,n as P,m as a,b,k as c,U as d,G as e,H as f,N as g,j as h,D as i,x as j,L as k,z as l,C as m,B as n,E as o,M as s,R as u,O as v};
2
+ //# sourceMappingURL=p-Bktjt_YJ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-C5UfA3VN.js","sources":["src/utils/env.ts","node_modules/.pnpm/@stencil+store@2.1.3_@stencil+core@4.31.0/node_modules/@stencil/store/dist/index.js","store/auth.store.ts","store/config.store.ts"],"sourcesContent":["// 默认 API 域名\r\nconst DEFAULT_API_DOMAIN = 'https://api.pincaimao.com/agents/platform';\r\nconst DEFAULT_PCM_DOMAIN = 'https://www.pincaimao.com';\r\n\r\n\r\n// 从环境变量获取 API 域名,如果未设置则使用默认值\r\nexport const API_DOMAIN = process.env.API_DOMAIN || DEFAULT_API_DOMAIN;\r\nexport const PCM_DOMAIN = process.env.PCM_DOMAIN || DEFAULT_PCM_DOMAIN;\r\n\r\n// 导出其他环境变量\r\nexport const ENV = {\r\n API_DOMAIN,\r\n PCM_DOMAIN,\r\n // 可以添加其他环境变量\r\n}; ","import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2_000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState ?? {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries(unwrap(defaultState) ?? {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","// src/store/auth.store.ts\r\nimport { createStore } from '@stencil/store';\r\n\r\nexport const { state: authState, onChange } = createStore({\r\n token: localStorage.getItem('pcm-sdk-auth-token') || null\r\n});\r\n\r\n// 添加一些辅助方法\r\nexport const authStore = {\r\n getToken: () => authState.token,\r\n setToken: (token: string) => {\r\n authState.token = token;\r\n localStorage.setItem('pcm-sdk-auth-token', token);\r\n },\r\n clearToken: () => {\r\n authState.token = null;\r\n localStorage.removeItem('pcm-sdk-auth-token');\r\n }\r\n};\r\n\r\n// 自动保存到localStorage\r\nonChange('token', value => {\r\n if (value) {\r\n localStorage.setItem('pcm-sdk-auth-token', value);\r\n } else {\r\n localStorage.removeItem('pcm-sdk-auth-token');\r\n }\r\n});","import { createStore } from '@stencil/store';\r\n\r\n// 定义配置数据的类型\r\nexport interface ConfigData {\r\n [key: string]: any;\r\n}\r\n\r\n// 从localStorage获取初始配置\r\nconst getInitialConfig = (): ConfigData => {\r\n try {\r\n const storedConfig = localStorage.getItem('pcm-sdk-config-data');\r\n return storedConfig ? JSON.parse(storedConfig) : {};\r\n } catch (error) {\r\n console.error('Error parsing stored config:', error);\r\n return {};\r\n }\r\n};\r\n\r\n// 创建配置存储\r\nexport const { state: configState, onChange } = createStore<{\r\n data: ConfigData;\r\n}>({\r\n data: getInitialConfig()\r\n});\r\n\r\n// 配置存储的辅助方法\r\nexport const configStore = {\r\n // 获取整个配置对象\r\n getConfig: (): ConfigData => configState.data,\r\n \r\n // 获取特定配置项\r\n getItem: <T>(key: string, defaultValue?: T): T => {\r\n return configState.data[key] !== undefined ? configState.data[key] : defaultValue;\r\n },\r\n \r\n // 设置特定配置项\r\n setItem: <T>(key: string, value: T): void => {\r\n configState.data = {\r\n ...configState.data,\r\n [key]: value\r\n };\r\n },\r\n \r\n // 移除特定配置项\r\n removeItem: (key: string): void => {\r\n const newConfig = { ...configState.data };\r\n delete newConfig[key];\r\n configState.data = newConfig;\r\n },\r\n \r\n // 清除所有配置\r\n clear: (): void => {\r\n configState.data = {};\r\n },\r\n \r\n // 批量更新配置\r\n updateConfig: (newConfig: Partial<ConfigData>): void => {\r\n configState.data = {\r\n ...configState.data,\r\n ...newConfig\r\n };\r\n }\r\n};\r\n\r\n// 自动保存到localStorage\r\nonChange('data', value => {\r\n try {\r\n if (Object.keys(value).length > 0) {\r\n localStorage.setItem('pcm-sdk-config-data', JSON.stringify(value));\r\n } else {\r\n localStorage.removeItem('pcm-sdk-config-data');\r\n }\r\n } catch (error) {\r\n console.error('Error saving config to localStorage:', error);\r\n }\r\n}); "],"names":["onChange"],"mappings":";;AAAA;AAKA;AACO,MAAM,UAAU,GAAG,2CAA4C;AACzD,MAAA,UAAU,GAAG;;ACL1B,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC9C,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC;AACnC,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC;AAClC;AACA,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrC,QAAQ,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AACzB;AACA,CAAC;AACD,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;AAC7B,IAAI,IAAI,SAAS;AACjB,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK;AACxB,QAAQ,IAAI,SAAS,EAAE;AACvB,YAAY,YAAY,CAAC,SAAS,CAAC;AACnC;AACA,QAAQ,SAAS,GAAG,UAAU,CAAC,MAAM;AACrC,YAAY,SAA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CAAC,UAAU,CAAC,qBAAqB,CAAC;;;IAEhD,OAAO,KAAK,EAAE;AACd,QAAA,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,KAAK,CAAC;;AAEhE,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
1
+ {"version":3,"file":"p-Bktjt_YJ.js","sources":["src/utils/env.ts","node_modules/.pnpm/@stencil+store@2.1.3_@stencil+core@4.31.0/node_modules/@stencil/store/dist/index.js","store/auth.store.ts","store/config.store.ts"],"sourcesContent":["// 默认 API 域名\r\nconst DEFAULT_API_DOMAIN = 'https://api.pincaimao.com/agents/platform';\r\nconst DEFAULT_PCM_DOMAIN = 'https://www.pincaimao.com';\r\n\r\n\r\n// 从环境变量获取 API 域名,如果未设置则使用默认值\r\nexport const API_DOMAIN = process.env.API_DOMAIN || DEFAULT_API_DOMAIN;\r\nexport const PCM_DOMAIN = process.env.PCM_DOMAIN || DEFAULT_PCM_DOMAIN;\r\n\r\n// 导出其他环境变量\r\nexport const ENV = {\r\n API_DOMAIN,\r\n PCM_DOMAIN,\r\n // 可以添加其他环境变量\r\n}; ","import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2_000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState ?? {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries(unwrap(defaultState) ?? {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","// src/store/auth.store.ts\r\nimport { createStore } from '@stencil/store';\r\n\r\nexport const { state: authState, onChange } = createStore({\r\n token: localStorage.getItem('pcm-sdk-auth-token') || null\r\n});\r\n\r\n// 添加一些辅助方法\r\nexport const authStore = {\r\n getToken: () => authState.token,\r\n setToken: (token: string) => {\r\n authState.token = token;\r\n localStorage.setItem('pcm-sdk-auth-token', token);\r\n },\r\n clearToken: () => {\r\n authState.token = null;\r\n localStorage.removeItem('pcm-sdk-auth-token');\r\n }\r\n};\r\n\r\n// 自动保存到localStorage\r\nonChange('token', value => {\r\n if (value) {\r\n localStorage.setItem('pcm-sdk-auth-token', value);\r\n } else {\r\n localStorage.removeItem('pcm-sdk-auth-token');\r\n }\r\n});","import { createStore } from '@stencil/store';\r\n\r\n// 定义配置数据的类型\r\nexport interface ConfigData {\r\n [key: string]: any;\r\n}\r\n\r\n// 从localStorage获取初始配置\r\nconst getInitialConfig = (): ConfigData => {\r\n try {\r\n const storedConfig = localStorage.getItem('pcm-sdk-config-data');\r\n return storedConfig ? JSON.parse(storedConfig) : {};\r\n } catch (error) {\r\n console.error('Error parsing stored config:', error);\r\n return {};\r\n }\r\n};\r\n\r\n// 创建配置存储\r\nexport const { state: configState, onChange } = createStore<{\r\n data: ConfigData;\r\n}>({\r\n data: getInitialConfig()\r\n});\r\n\r\n// 配置存储的辅助方法\r\nexport const configStore = {\r\n // 获取整个配置对象\r\n getConfig: (): ConfigData => configState.data,\r\n \r\n // 获取特定配置项\r\n getItem: <T>(key: string, defaultValue?: T): T => {\r\n return configState.data[key] !== undefined ? configState.data[key] : defaultValue;\r\n },\r\n \r\n // 设置特定配置项\r\n setItem: <T>(key: string, value: T): void => {\r\n configState.data = {\r\n ...configState.data,\r\n [key]: value\r\n };\r\n },\r\n \r\n // 移除特定配置项\r\n removeItem: (key: string): void => {\r\n const newConfig = { ...configState.data };\r\n delete newConfig[key];\r\n configState.data = newConfig;\r\n },\r\n \r\n // 清除所有配置\r\n clear: (): void => {\r\n configState.data = {};\r\n },\r\n \r\n // 批量更新配置\r\n updateConfig: (newConfig: Partial<ConfigData>): void => {\r\n configState.data = {\r\n ...configState.data,\r\n ...newConfig\r\n };\r\n }\r\n};\r\n\r\n// 自动保存到localStorage\r\nonChange('data', value => {\r\n try {\r\n if (Object.keys(value).length > 0) {\r\n localStorage.setItem('pcm-sdk-config-data', JSON.stringify(value));\r\n } else {\r\n localStorage.removeItem('pcm-sdk-config-data');\r\n }\r\n } catch (error) {\r\n console.error('Error saving config to localStorage:', error);\r\n }\r\n}); "],"names":["onChange"],"mappings":";;AAAA;AAKA;AACO,MAAM,UAAU,GAAG,2CAA4C;AACzD,MAAA,UAAU,GAAG;;ACL1B,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC9C,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC;AACnC,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC;AAClC;AACA,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrC,QAAQ,KAAK,CAAC,IAAI,CAAC,KAAK,CAA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;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
@@ -1,2 +1,2 @@
1
- import{s as t}from"./p-C5UfA3VN.js";import{S as s}from"./p-CDLRm6tb.js";import{E as e}from"./p-C0FYX2-Z.js";function r(t){try{const s=typeof t==="string"?parseInt(t,10):t;if(isNaN(s)||s<=0){return"未知时间"}const e=new Date(s*1e3);if(isNaN(e.getTime())){return"未知时间"}const r=new Date;const n=Math.floor((r.getTime()-e.getTime())/(1e3*60*60*24));const o=e.getHours().toString().padStart(2,"0");const a=e.getMinutes().toString().padStart(2,"0");const i=(e.getMonth()+1).toString().padStart(2,"0");const c=e.getDate().toString().padStart(2,"0");if(n===0){return`今天 ${o}:${a}`}if(n===1){return`昨天 ${o}:${a}`}if(n>1&&n<7){const t=["周日","周一","周二","周三","周四","周五","周六"];return`${t[e.getDay()]} ${o}:${a}`}return`${i}-${c} ${o}:${a}`}catch{return"时间解析失败"}}async function n(n,o,a="",i=20){try{const s=await t({url:"/sdk/v1/chat/conversations",method:"GET",data:{bot_id:n,last_id:a,limit:i}});if(s.success&&s.data){const t=s.data.data||s.data.items||[];const e=typeof s.data.has_more==="boolean"?s.data.has_more:t.length>i;const n=t.slice(0,i).map((t=>({id:t.id,name:t.name||"新会话",created_at:Number(t.created_at),updated_at:Number(t.updated_at),status:t.status,message_count:t.message_count||0,timeDisplay:r(t.created_at),inputs:t.inputs})));return{items:n,hasMore:e,nextCursor:n.length>0?n[n.length-1].id:""}}return{items:[],hasMore:false,nextCursor:""}}catch(t){console.error("获取历史会话失败:",t);s.captureError(t,{action:"fetchHistoryConversations",component:o,title:"获取历史会话失败"});e.emitError({error:t,message:"获取历史会话失败"});return{items:[],hasMore:false,nextCursor:""}}}export{n as f};
2
- //# sourceMappingURL=p-CC_AWE7Q.js.map
1
+ import{s as t}from"./p-Bktjt_YJ.js";import{S as s}from"./p-B4ClCdh9.js";import{E as e}from"./p-C0FYX2-Z.js";function r(t){try{const s=typeof t==="string"?parseInt(t,10):t;if(isNaN(s)||s<=0){return"未知时间"}const e=new Date(s*1e3);if(isNaN(e.getTime())){return"未知时间"}const r=new Date;const n=Math.floor((r.getTime()-e.getTime())/(1e3*60*60*24));const o=e.getHours().toString().padStart(2,"0");const a=e.getMinutes().toString().padStart(2,"0");const i=(e.getMonth()+1).toString().padStart(2,"0");const c=e.getDate().toString().padStart(2,"0");if(n===0){return`今天 ${o}:${a}`}if(n===1){return`昨天 ${o}:${a}`}if(n>1&&n<7){const t=["周日","周一","周二","周三","周四","周五","周六"];return`${t[e.getDay()]} ${o}:${a}`}return`${i}-${c} ${o}:${a}`}catch{return"时间解析失败"}}async function n(n,o,a="",i=20){try{const s=await t({url:"/sdk/v1/chat/conversations",method:"GET",data:{bot_id:n,last_id:a,limit:i}});if(s.success&&s.data){const t=s.data.data||s.data.items||[];const e=typeof s.data.has_more==="boolean"?s.data.has_more:t.length>i;const n=t.slice(0,i).map((t=>({id:t.id,name:t.name||"新会话",created_at:Number(t.created_at),updated_at:Number(t.updated_at),status:t.status,message_count:t.message_count||0,timeDisplay:r(t.created_at),inputs:t.inputs})));return{items:n,hasMore:e,nextCursor:n.length>0?n[n.length-1].id:""}}return{items:[],hasMore:false,nextCursor:""}}catch(t){console.error("获取历史会话失败:",t);s.captureError(t,{action:"fetchHistoryConversations",component:o,title:"获取历史会话失败"});e.emitError({error:t,message:"获取历史会话失败"});return{items:[],hasMore:false,nextCursor:""}}}export{n as f};
2
+ //# sourceMappingURL=p-CMfzTNOk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-CC_AWE7Q.js","sources":["src/utils/conversation-utils.ts"],"sourcesContent":["import { sendHttpRequest } from './utils';\r\nimport { SentryReporter } from './sentry-reporter';\r\nimport { ErrorEventBus } from './error-event';\r\nimport { ConversationItem, ConversationPageResult, ConversationDetail } from '../interfaces/chat';\r\n\r\ninterface ConversationApiItem {\r\n id: string;\r\n name?: string;\r\n created_at: number | string;\r\n updated_at: number | string;\r\n status?: string;\r\n message_count?: number;\r\n inputs?: any;\r\n}\r\n\r\ninterface ConversationApiData {\r\n data?: ConversationApiItem[];\r\n items?: ConversationApiItem[];\r\n has_more?: boolean;\r\n}\r\n\r\n/**\r\n * 格式化会话时间戳为可读字符串\r\n */\r\nfunction formatConversationTime(createdAt: number | string): string {\r\n try {\r\n const timestamp = typeof createdAt === 'string' ? parseInt(createdAt, 10) : createdAt;\r\n if (isNaN(timestamp) || timestamp <= 0) {\r\n return '未知时间';\r\n }\r\n\r\n const createdTime = new Date(timestamp * 1000);\r\n if (isNaN(createdTime.getTime())) {\r\n return '未知时间';\r\n }\r\n\r\n const now = new Date();\r\n const diffDays = Math.floor((now.getTime() - createdTime.getTime()) / (1000 * 60 * 60 * 24));\r\n const hh = createdTime.getHours().toString().padStart(2, '0');\r\n const mm = createdTime.getMinutes().toString().padStart(2, '0');\r\n const month = (createdTime.getMonth() + 1).toString().padStart(2, '0');\r\n const day = createdTime.getDate().toString().padStart(2, '0');\r\n\r\n if (diffDays === 0) {\r\n return `今天 ${hh}:${mm}`;\r\n }\r\n\r\n if (diffDays === 1) {\r\n return `昨天 ${hh}:${mm}`;\r\n }\r\n\r\n if (diffDays > 1 && diffDays < 7) {\r\n const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];\r\n return `${weekdays[createdTime.getDay()]} ${hh}:${mm}`;\r\n }\r\n\r\n return `${month}-${day} ${hh}:${mm}`;\r\n } catch {\r\n return '时间解析失败';\r\n }\r\n}\r\n\r\n/**\r\n * 获取历史会话列表\r\n * @param botId 机器人 ID\r\n * @param componentName 调用组件名称\r\n * @param lastId 上一页最后一条会话 ID,空字符串表示第一页\r\n * @param limit 每页数量\r\n * @returns 游标分页结果\r\n */\r\nexport async function fetchHistoryConversations(\r\n botId: string,\r\n componentName: string,\r\n lastId: string = '',\r\n limit: number = 20,\r\n): Promise<ConversationPageResult> {\r\n try {\r\n const result = await sendHttpRequest<ConversationApiData>({\r\n url: '/sdk/v1/chat/conversations',\r\n method: 'GET',\r\n data: {\r\n bot_id: botId,\r\n last_id: lastId,\r\n limit,\r\n },\r\n });\r\n\r\n if (result.success && result.data) {\r\n const rawConversations: ConversationApiItem[] = result.data.data || result.data.items || [];\r\n const hasMore = typeof result.data.has_more === 'boolean'\r\n ? result.data.has_more\r\n : rawConversations.length > limit;\r\n const conversations: ConversationItem[] = rawConversations.slice(0, limit).map((conv: ConversationApiItem) => ({\r\n id: conv.id,\r\n name: conv.name || '新会话',\r\n created_at: Number(conv.created_at),\r\n updated_at: Number(conv.updated_at),\r\n status: conv.status,\r\n message_count: conv.message_count || 0,\r\n timeDisplay: formatConversationTime(conv.created_at),\r\n inputs: conv.inputs,\r\n }));\r\n\r\n return {\r\n items: conversations,\r\n hasMore,\r\n nextCursor: conversations.length > 0 ? conversations[conversations.length - 1].id : '',\r\n };\r\n }\r\n\r\n return {\r\n items: [],\r\n hasMore: false,\r\n nextCursor: '',\r\n };\r\n } catch (error) {\r\n console.error('获取历史会话失败:', error);\r\n SentryReporter.captureError(error, {\r\n action: 'fetchHistoryConversations',\r\n component: componentName,\r\n title: '获取历史会话失败',\r\n });\r\n ErrorEventBus.emitError({ error, message: '获取历史会话失败' });\r\n\r\n return {\r\n items: [],\r\n hasMore: false,\r\n nextCursor: '',\r\n };\r\n }\r\n}\r\n\r\n/**\r\n * 获取单个会话详情\r\n * @param conversationId 会话 ID\r\n * @param componentName 调用组件名称\r\n * @returns 会话详情\r\n */\r\nexport async function fetchConversationDetail(\r\n conversationId: string,\r\n componentName: string,\r\n): Promise<ConversationDetail | null> {\r\n try {\r\n const result = await sendHttpRequest<{ data: ConversationDetail }>({\r\n url: '/sdk/v1/chat/conversation',\r\n method: 'GET',\r\n data: {\r\n conversation_id: conversationId,\r\n },\r\n });\r\n\r\n if (result.success && result.data?.data) {\r\n return result.data.data;\r\n }\r\n\r\n return null;\r\n } catch (error) {\r\n console.error('获取会话详情失败:', error);\r\n SentryReporter.captureError(error, {\r\n action: 'fetchConversationDetail',\r\n component: componentName,\r\n title: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A,KAAK,EAAE,UAAU;AACpB,SAAA,CAAC;QACF,aAAa,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;QAEvD,OAAO;AACH,YAAA,KAAK,EAAE,EAAE;AACT,YAAA,OAAO,EAAE,KAAK;AACd,YAAA,UAAU,EAAE,EAAE;SACjB;;AAET;;;;"}
1
+ {"version":3,"file":"p-CMfzTNOk.js","sources":["src/utils/conversation-utils.ts"],"sourcesContent":["import { sendHttpRequest } from './utils';\r\nimport { SentryReporter } from './sentry-reporter';\r\nimport { ErrorEventBus } from './error-event';\r\nimport { ConversationItem, ConversationPageResult, ConversationDetail } from '../interfaces/chat';\r\n\r\ninterface ConversationApiItem {\r\n id: string;\r\n name?: string;\r\n created_at: number | string;\r\n updated_at: number | string;\r\n status?: string;\r\n message_count?: number;\r\n inputs?: any;\r\n}\r\n\r\ninterface ConversationApiData {\r\n data?: ConversationApiItem[];\r\n items?: ConversationApiItem[];\r\n has_more?: boolean;\r\n}\r\n\r\n/**\r\n * 格式化会话时间戳为可读字符串\r\n */\r\nfunction formatConversationTime(createdAt: number | string): string {\r\n try {\r\n const timestamp = typeof createdAt === 'string' ? parseInt(createdAt, 10) : createdAt;\r\n if (isNaN(timestamp) || timestamp <= 0) {\r\n return '未知时间';\r\n }\r\n\r\n const createdTime = new Date(timestamp * 1000);\r\n if (isNaN(createdTime.getTime())) {\r\n return '未知时间';\r\n }\r\n\r\n const now = new Date();\r\n const diffDays = Math.floor((now.getTime() - createdTime.getTime()) / (1000 * 60 * 60 * 24));\r\n const hh = createdTime.getHours().toString().padStart(2, '0');\r\n const mm = createdTime.getMinutes().toString().padStart(2, '0');\r\n const month = (createdTime.getMonth() + 1).toString().padStart(2, '0');\r\n const day = createdTime.getDate().toString().padStart(2, '0');\r\n\r\n if (diffDays === 0) {\r\n return `今天 ${hh}:${mm}`;\r\n }\r\n\r\n if (diffDays === 1) {\r\n return `昨天 ${hh}:${mm}`;\r\n }\r\n\r\n if (diffDays > 1 && diffDays < 7) {\r\n const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];\r\n return `${weekdays[createdTime.getDay()]} ${hh}:${mm}`;\r\n }\r\n\r\n return `${month}-${day} ${hh}:${mm}`;\r\n } catch {\r\n return '时间解析失败';\r\n }\r\n}\r\n\r\n/**\r\n * 获取历史会话列表\r\n * @param botId 机器人 ID\r\n * @param componentName 调用组件名称\r\n * @param lastId 上一页最后一条会话 ID,空字符串表示第一页\r\n * @param limit 每页数量\r\n * @returns 游标分页结果\r\n */\r\nexport async function fetchHistoryConversations(\r\n botId: string,\r\n componentName: string,\r\n lastId: string = '',\r\n limit: number = 20,\r\n): Promise<ConversationPageResult> {\r\n try {\r\n const result = await sendHttpRequest<ConversationApiData>({\r\n url: '/sdk/v1/chat/conversations',\r\n method: 'GET',\r\n data: {\r\n bot_id: botId,\r\n last_id: lastId,\r\n limit,\r\n },\r\n });\r\n\r\n if (result.success && result.data) {\r\n const rawConversations: ConversationApiItem[] = result.data.data || result.data.items || [];\r\n const hasMore = typeof result.data.has_more === 'boolean'\r\n ? result.data.has_more\r\n : rawConversations.length > limit;\r\n const conversations: ConversationItem[] = rawConversations.slice(0, limit).map((conv: ConversationApiItem) => ({\r\n id: conv.id,\r\n name: conv.name || '新会话',\r\n created_at: Number(conv.created_at),\r\n updated_at: Number(conv.updated_at),\r\n status: conv.status,\r\n message_count: conv.message_count || 0,\r\n timeDisplay: formatConversationTime(conv.created_at),\r\n inputs: conv.inputs,\r\n }));\r\n\r\n return {\r\n items: conversations,\r\n hasMore,\r\n nextCursor: conversations.length > 0 ? conversations[conversations.length - 1].id : '',\r\n };\r\n }\r\n\r\n return {\r\n items: [],\r\n hasMore: false,\r\n nextCursor: '',\r\n };\r\n } catch (error) {\r\n console.error('获取历史会话失败:', error);\r\n SentryReporter.captureError(error, {\r\n action: 'fetchHistoryConversations',\r\n component: componentName,\r\n title: '获取历史会话失败',\r\n });\r\n ErrorEventBus.emitError({ error, message: '获取历史会话失败' });\r\n\r\n return {\r\n items: [],\r\n hasMore: false,\r\n nextCursor: '',\r\n };\r\n }\r\n}\r\n\r\n/**\r\n * 获取单个会话详情\r\n * @param conversationId 会话 ID\r\n * @param componentName 调用组件名称\r\n * @returns 会话详情\r\n */\r\nexport async function fetchConversationDetail(\r\n conversationId: string,\r\n componentName: string,\r\n): Promise<ConversationDetail | null> {\r\n try {\r\n const result = await sendHttpRequest<{ data: ConversationDetail }>({\r\n url: '/sdk/v1/chat/conversation',\r\n method: 'GET',\r\n data: {\r\n conversation_id: conversationId,\r\n },\r\n });\r\n\r\n if (result.success && result.data?.data) {\r\n return result.data.data;\r\n }\r\n\r\n return null;\r\n } catch (error) {\r\n console.error('获取会话详情失败:', error);\r\n SentryReporter.captureError(error, {\r\n action: 'fetchConversationDetail',\r\n component: componentName,\r\n title: '获取会话详情失败',\r\n });\r\n ErrorEventBus.emitError({ error, message: '获取会话详情失败' });\r\n\r\n return null;\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;AAqBA;;AAEG;AACH,SAAS,sBAAsB,CAAC,SAA0B,EAAA;AACtD,IAAA,IAAI;AACA,QAAA,MAAM,SAAS,GAAG,OAAO,SAAS,KAAK,QAAQ,GAAG,QAAQ,CAAC,SAAS,EAAE,EAAE,CAAC,GAAG,SAAS;QACrF,IAAI,KAAK,CAAC,SAAS,CAAC,IAAI,SAAS,IAAI,CAAC,EAAE;AACpC,YAAA,OAAO,MAAM;;QAGjB,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QAC9C,IAAI,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,EAAE;AAC9B,YAAA,OAAO,MAAM;;AAGjB,QAAA,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE;AACtB,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,WAAW,CAAC,OAAO,EAAE,KAA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MAAM;AACtB,aAAA,CAAC,CAAC;YAEH,OAAO;AACH,gBAAA,KAAK,EAAE,aAAa;gBACpB,OAAO;gBACP,UAAU,EAAE,aAAa,CAAC,MAAM,GAAG,CAAC,GAAG,aAAa,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE;aACzF;;QAGL,OAAO;AACH,YAAA,KAAK,EAAE,EAAE;AACT,YAAA,OAAO,EAAE,KAAK;AACd,YAAA,UAAU,EAAE,EAAE;SACjB;;IACH,OAAO,KAAK,EAAE;AACZ,QAAA,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC;AACjC,QAAA,cAAc,CAAC,YAAY,CAAC,KAAK,EAAE;AAC/B,YAAA,MAAM,EAAE,2BAA2B;AACnC,YAAA,SAAS,EAAE,aAAa;AACxB,YAAA,KAAK,EAAE,UAAU;AACpB,SAAA,CAAC;QACF,aAAa,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;QAEvD,OAAO;AACH,YAAA,KAAK,EAAE,EAAE;AACT,YAAA,OAAO,EAAE,KAAK;AACd,YAAA,UAAU,EAAE,EAAE;SACjB;;AAET;;;;"}
@@ -0,0 +1,2 @@
1
+ import{g as t,r as o,c as e,h as r}from"./p-Bq0K-WqZ.js";import{a as i,v as a,c as n,s,P as l,g as d,f as c,b as p}from"./p-Bktjt_YJ.js";import{m as h,e as b,s as m}from"./p-BVjB8bxU.js";import{E as f}from"./p-C0FYX2-Z.js";import{S as g}from"./p-B4ClCdh9.js";import"./p-Bs-zO1WZ.js";const u='.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:5vh auto auto 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)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.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-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}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const x=".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}.upload-disabled-wrapper{position:relative;cursor:not-allowed}.upload-disabled-wrapper::before{content:'';position:absolute;inset:0;background-color:rgba(255, 255, 255, 0.7);cursor:not-allowed;z-index:1}.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;gap:8px}.refresh-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;transition:color 0.2s, border-color 0.2s, background 0.2s}.refresh-btn:hover{color:#1890ff;border-color:#1890ff;background:#e6f4ff}.refresh-btn:disabled{color:#bfbfbf;border-color:#d9d9d9;background:#f5f5f5;cursor:not-allowed}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.refresh-btn .rotating{animation:spin 0.8s linear infinite}.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-wrapper{width:100%;display:flex;justify-content:end}.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}@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}}.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 y='.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 w=":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 k=class{modalTitle="简历筛选精灵";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;fullscreen=false;customInputs={};mobileUploadAble=false;mobileJdInputAble=false;showInputHistory=false;showWorkspaceHistory=false;showBatchExport=false;taskId;uploadSuccess;tokenInvalid;someErrorEvent;taskCreated;resumeAnalysisStart;resumeAnalysisComplete;taskSwitch;resumeDeleted;conversationStart;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;taskHistoryDrawerSource="input";isLoadingResumeList=false;isExportRecordsModalOpen=false;_uploadEnabled=true;get hostElement(){return t(this)}tokenInvalidListener;removeErrorListener;botId="3022316191018874";pcmUploadRef;internalConversationId=null;get resumeRecords(){return[...this.uploadedResumeRecords,...this.filteredResumeRecords]}constructor(t){o(this,t);this.modalClosed=e(this,"modalClosed");this.uploadSuccess=e(this,"uploadSuccess");this.tokenInvalid=e(this,"tokenInvalid");this.someErrorEvent=e(this,"someErrorEvent");this.taskCreated=e(this,"taskCreated");this.resumeAnalysisStart=e(this,"resumeAnalysisStart");this.resumeAnalysisComplete=e(this,"resumeAnalysisComplete");this.taskSwitch=e(this,"taskSwitch");this.resumeDeleted=e(this,"resumeDeleted");this.conversationStart=e(this,"conversationStart");h.use(b);h.setOptions({breaks:true,gfm:true});document.addEventListener("click",this.handleDocumentClick)}handleTokenChange(t){if(t&&t!==i.getToken()){i.setToken(t)}}async setUploadEnabled(t){this._uploadEnabled=t}async handleIsOpenChange(t){if(!t){this.resetStates()}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await a(this.token);if(this.taskId){await this.handleSwitchTask(this.taskId)}}}componentWillLoad(){if(this.zIndex){n.setItem("modal-zIndex",this.zIndex)}if(this.token){i.setToken(this.token)}a(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=f.addErrorListener((t=>{this.someErrorEvent.emit(t)}));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.taskHistoryDrawerSource="input";this.isLoadingResumeList=false;this.isExportRecordsModalOpen=false;this.internalConversationId=null};handleClose=()=>{this.modalClosed.emit()};handleJobDescriptionChange=t=>{const o=t.target;this.jobDescription=o.value};handleImportantConditionsChange=t=>{const o=t.target;this.importantConditions=o.value};handleCreateTask=async()=>{if(!this.jobDescription.trim()){m("请输入职位描述","warning");return}if(this.evaluationCriteria.length===0){m("请输入评分标准","warning");return}this.isSubmitting=true;try{const t=await s({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(t.success&&t.data){this.currentTask=t.data;this.currentStep="task";this.taskCreated.emit({task_id:t.data.id,job_description:this.jobDescription,evaluation_criteria:this.evaluationCriteria,create_time:(new Date).toISOString()});if(this.customInputs?.file_urls){await this.startAnalysisWithCustomFileUrls()}}else{throw new Error(t.message||"创建任务失败")}}catch(t){console.error("创建任务时出错:",t);g.captureError(t,{action:"handleCreateTask",component:"pcm-jlsx-modal",title:"创建任务时出错"});this.someErrorEvent.emit({error:t,message:"创建任务时出错,请重试"})}finally{this.isSubmitting=false}};toggleJdDetail=()=>{this.showJdDrawer=true};toggleCriteriaDetail=()=>{this.showCriteriaDrawer=true};closeJdDrawer=()=>{this.showJdDrawer=false};closeCriteriaDrawer=()=>{this.showCriteriaDrawer=false};showPreview=(t,o,e="markdown",r)=>{this.previewTitle=t;this.previewContent=o||"";this.previewType=e;this.previewUrl=r||"";this.showPreviewDrawer=true;this.activeDropdownId=null};closePreviewDrawer=()=>{this.showPreviewDrawer=false;this.previewContent="";this.previewTitle="";this.previewType="markdown";this.previewUrl=""};toggleDropdown=t=>{const o=this.activeDropdownId===t?null:t;this.activeDropdownId=o};handleViewEvaluate=t=>{const o=`${l}/exportFile?id=${t.id}&title=${this.jobTitle||""}&token=${i.getToken()}&referrer=sdk`;this.showPreview(`${t.fileName} - 评估详情`,"","file",o)};exportAllPdfLoading=false;exportAllPDF=async()=>{this.exportAllPdfLoading=true;const t=await s({url:`/sdk/v1/agent/app_filter_task/export_all`,method:"GET",params:{task_id:this.currentTask?.id}});this.exportAllPdfLoading=false;if(t.success){m("导出任务已创建!","success");this.handleExportRecordsClick()}};handleViewResume=async t=>{if(t.file_url||t.resume_file_url){const o=t.file_url||t.resume_file_url;try{const e=await d(o);if(e){this.showPreview(`${t.fileName} - 简历详情`,"","file",e)}else{m("无法获取简历预览,请稍后重试","error")}}catch(t){console.error("获取简历预览失败:",t);g.captureError(t,{action:"handleViewResume",component:"pcm-jlsx-modal",title:"获取简历预览失败"});this.someErrorEvent.emit({error:t,message:"获取简历预览失败,请稍后重试"})}}else{m("简历文件不存在","error")}};handleDeleteRecord=async t=>{this.activeDropdownId=null;const o=this.filteredResumeRecords.find((o=>o.id===t));if(o){this.deletingRecordId=t;try{const e=await s({url:`/sdk/v1/agent/app_filter_resume/delete/${t}`,method:"DELETE"});if(e.success){this.filteredResumeRecords=this.filteredResumeRecords.filter((o=>o.id!==t));m("删除成功","success");this.resumeDeleted.emit({task_id:this.currentTask.id,resume_id:t,resume_name:o.fileName,delete_time:(new Date).toISOString()});await this.loadResumeList()}else{throw new Error(e.message||"删除失败")}}catch(o){console.error("删除记录失败:",o);g.captureError(o,{action:"handleDeleteRecord",component:"pcm-jlsx-modal",title:"删除记录失败",recordId:t});m("删除失败,请重试","error")}finally{this.deletingRecordId=null}}else{this.uploadedResumeRecords=this.uploadedResumeRecords.filter((o=>o.id!==t));m("删除成功","success")}};handleEvaluationCriteriaNameChange=(t,o)=>{const e=[...this.evaluationCriteria];e[t].name=o;this.evaluationCriteria=e};handleEvaluationCriteriaValueChange=(t,o)=>{const e=[...this.evaluationCriteria];const r=parseInt(o)||0;e[t].value=Math.max(0,Math.min(100,r));this.evaluationCriteria=e};handleEvaluationCriteriaDescriptionChange=(t,o)=>{const e=[...this.evaluationCriteria];e[t].description=o;this.evaluationCriteria=e};addEvaluationCriteria=()=>{const t=[...this.evaluationCriteria];t.push({name:"",value:0,description:""});this.evaluationCriteria=t};removeEvaluationCriteria=t=>{if(this.evaluationCriteria.length<=1){m("至少需要保留一个评分标准","warning");return}const o=this.evaluationCriteria.filter(((o,e)=>e!==t));this.evaluationCriteria=o};getTotalWeight=()=>this.evaluationCriteria.reduce(((t,o)=>t+o.value),0);getHistoryEntryLabel=()=>this.currentStep==="input"?"历史任务":"任务管理";getHistoryEntryTitle=()=>this.currentStep==="input"?"点击查看历史任务":"点击查看任务管理";shouldShowHistoryEntry=()=>this.currentStep==="input"?this.showInputHistory:this.showWorkspaceHistory;getTaskHistoryDrawerTitle=()=>this.taskHistoryDrawerSource==="input"?"历史任务":"任务管理";renderInputStep(){return r("div",{class:"input-container"},r("div",{class:"step-header"},r("h3",null,"创建简历筛选任务"),r("p",{class:"step-description"},"请输入职位描述和评分标准")),r("div",{class:"jd-input-section"},r("label",{htmlFor:"job-description"},"职位描述 (JD)"),!!this.mobileJdInputAble&&r("components-mobile-input-btn",{name:"职位描述",onOk:t=>{this.jobDescription=t.detail}}),r("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),r("div",{class:"criteria-input-section"},r("div",{class:"criteria-header"},r("label",{htmlFor:"evaluation-criteria"},"评分标准"),r("div",{class:"criteria-actions"},r("span",{class:`total-weight ${this.getTotalWeight()!==100?"invalid":""}`},"总权重: ",this.getTotalWeight(),"%"),r("span",null))),r("div",{class:"criteria-table-container"},r("table",{class:"criteria-table"},r("thead",null,r("tr",null,r("th",{style:{width:"25%"}},"标准名称"),r("th",{style:{width:"15%"}},"权重(%)"),r("th",{style:{width:"50%"}},"描述"),r("th",{style:{width:"10%"}},"操作"))),r("tbody",null,this.evaluationCriteria.map(((t,o)=>r("tr",{key:o},r("td",null,r("input",{type:"text",class:"criteria-name-input",placeholder:"请输入标准名称",value:t.name,onInput:t=>this.handleEvaluationCriteriaNameChange(o,t.target.value)})),r("td",null,r("input",{type:"number",class:"criteria-value-input",placeholder:"0",min:"0",max:"100",value:t.value,onInput:t=>this.handleEvaluationCriteriaValueChange(o,t.target.value)})),r("td",null,r("textarea",{class:"criteria-description-input",placeholder:"请输入评分标准描述",rows:2,value:t.description,onInput:t=>this.handleEvaluationCriteriaDescriptionChange(o,t.target.value)})),r("td",null,r("button",{type:"button",class:"remove-criteria-btn",disabled:this.evaluationCriteria.length<=1,onClick:()=>this.removeEvaluationCriteria(o),title:this.evaluationCriteria.length<=1?"至少需要保留一个评分标准":"删除此标准"},"×")))))))),r("div",{class:"add-criteria-btn-wrapper"},r("button",{type:"button",class:"add-criteria-btn",onClick:this.addEvaluationCriteria},"+ 添加标准")),this.getTotalWeight()!==100&&r("p",{class:"criteria-warning"},"⚠️ 权重总和应为100%,当前为",this.getTotalWeight(),"%")),r("div",{class:"criteria-input-section"},r("div",{class:"criteria-header"},r("label",{htmlFor:"evaluation-criteria"},"重要条件(选填)"),r("div",null)),r("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"在此栏填写的条件为硬性要求,不符合条件的简历,其最终匹配度将直接判定为0分。",rows:6,value:this.importantConditions,onInput:this.handleImportantConditionsChange})),r("button",{class:"submit-button",disabled:!this.jobDescription.trim()||this.evaluationCriteria.length===0||this.getTotalWeight()!==100||this.isSubmitting,onClick:this.handleCreateTask},this.isSubmitting?"创建中...":"创建任务"),r("div",{class:"ai-disclaimer"},r("p",null,"所有内容均由AI生成仅供参考"),r("p",{class:"beian-info"},r("span",null,"中央网信办生成式人工智能服务备案号"),":",r("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003"))))}renderTaskStep(){return r("div",{class:"task-container"},r("div",{class:"task-info-section"},r("div",{class:"info-cards"},r("div",{class:"info-card"},r("div",{class:"card-header",onClick:this.toggleJdDetail},r("span",{class:"card-title"},"职位描述"),r("button",{class:"toggle-btn"},"查看")),r("div",{class:"card-preview"},r("p",{class:"preview-text"},this.jobDescription))),r("div",{class:"info-card"},r("div",{class:"card-header",onClick:this.toggleCriteriaDetail},r("span",{class:"card-title"},"评分标准、重要条件"),r("button",{class:"toggle-btn"},"查看")),r("div",{class:"card-preview"},r("p",{class:"preview-text"},this.getEvaluationCriteriaText()))))),r("div",{class:"upload-section"},r("div",{class:"section-header"},r("h4",null,"上传简历")),r("div",{class:this.customInputs?.file_urls?"upload-disabled-wrapper":"",onClick:t=>{if(this.customInputs?.file_urls){t.stopPropagation();t.preventDefault();m("不允许上传简历,请联系管理员","warning")}}},r("components-upload",{ref:t=>this.pcmUploadRef=t,multiple:true,maxFileSize:15*1024*1024,acceptFileSuffixList:[".pdf",".doc",".docx",".txt",".md",".ppt",".pptx",".jpg",".jpeg",".png"],mobileUploadAble:this.mobileUploadAble,disabled:Boolean(this.customInputs?.file_urls),uploadParams:{tags:["resume"]},onUploadChange:this.handleUploadChange})),r("div",{class:"upload-actions"},this.uploadedResumeRecords.some((t=>t.evaluate_status!==1&&t.evaluate_status!==0))&&r("button",{class:"analyze-btn",onClick:this.handleStartAnalysis},`开始分析 (${this.uploadedResumeRecords.filter((t=>t.evaluate_status!==1&&t.evaluate_status!==0)).length} 个待分析)`))),r("div",{class:"resume-table-section"},r("div",{class:"section-header"},r("h4",null,"简历列表"),r("div",{class:"section-header-side"},this.showBatchExport&&!!this.resumeRecords?.find((t=>t.evaluate_status==1))&&r("div",{class:"export-actions"},r("div",{class:"export-btn",onClick:this.exportAllPDF},r("span",null,"批量导出报告")),r("div",{class:"export-divide"}),r("div",{class:"export-btn",onClick:this.handleExportRecordsClick},"导出记录")),r("button",{class:"refresh-btn",onClick:this.handleRefreshTable,disabled:this.isLoadingResumeList,title:"刷新表格"},r("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",class:this.isLoadingResumeList?"rotating":""},r("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"}))),r("span",{class:"record-count"},"已筛选 ",this.totalRecords," 条记录"))),r("div",{class:"table-container"},r("table",{class:"resume-table"},r("thead",null,r("tr",null,r("th",null,"简历文件名"),r("th",null,"人才信息"),r("th",{class:`sortable-header ${this.sortOrder!=="none"?"active":""}`,onClick:this.handleSortByScore},r("span",{class:"header-content"},"评估分数",r("span",{class:"sort-icons"},r("svg",{class:`sort-icon ${this.sortOrder==="asc"?"active":""}`,width:"12",height:"12",viewBox:"0 0 12 12"},r("path",{d:"M6 3l4 4H2z",fill:"currentColor"})),r("svg",{class:`sort-icon ${this.sortOrder==="desc"?"active":""}`,width:"12",height:"12",viewBox:"0 0 12 12"},r("path",{d:"M6 9L2 5h8z",fill:"currentColor"}))))),r("th",null,"评估详情"),r("th",null,"状态"),r("th",null,"操作"))),r("tbody",null,this.isLoadingResumeList?r("tr",null,r("td",{colSpan:6,class:"empty-row"},r("div",{class:"empty-state"},r("div",{class:"loading-spinner-small"}),r("p",null,"正在加载简历数据...")))):this.resumeRecords.length===0?r("tr",null,r("td",{colSpan:6,class:"empty-row"},r("div",{class:"empty-state"},r("p",null,"暂无简历数据"),r("p",{class:"empty-hint"},"请上传简历开始筛选")))):this.resumeRecords.map((t=>r("tr",{key:t.id},r("td",{class:"filename-cell"},r("span",{class:"file-icon"},"📝"),r("span",{title:t.fileName},t.fileName)),r("td",{class:"talent-info-cell",title:t.talentInfo},t.talentInfo),r("td",{class:"score-cell"},r("div",{class:`score-badge ${this.getScoreClass(t.score)}`},typeof t.score==="number"?t.score:"--"),t.out_important_conditions===1&&r("div",{class:"out-important-conditions"},"不满足重要条件")),r("td",{class:"detail-cell",title:t.scoreDetail},r("span",{class:"detail-content",onClick:()=>this.handleViewEvaluate(t)},t.scoreDetail)),r("td",{class:"status-cell"},r("span",{class:`status-badge status-${this.getEvaluateStatusClass(t.evaluate_status)}`},this.getEvaluateStatusText(t.evaluate_status))),r("td",{class:"action-cell"},r("div",{class:"action-dropdown"},r("button",{class:"action-btn dropdown-trigger",onClick:o=>{o.stopPropagation();this.toggleDropdown(t.id)}},"操作",r("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor"},r("path",{d:"M7 10l5 5 5-5z"}))),this.activeDropdownId===t.id&&r("div",{class:"dropdown-menu"},r("div",{class:"dropdown-item",onClick:o=>{o.stopPropagation();this.handleViewEvaluate(t)}},r("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},r("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"})),"评估详情"),r("div",{class:"dropdown-item",onClick:o=>{o.stopPropagation();this.handleViewResume(t)}},r("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},r("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"})),"简历详情"),r("div",{class:`dropdown-item danger ${this.deletingRecordId===t.id?"disabled":""}`,onClick:o=>{o.stopPropagation();if(this.deletingRecordId!==t.id){this.handleDeleteRecord(t.id)}}},this.deletingRecordId===t.id?r("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",class:"loading-spinner"},r("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"}),r("path",{d:"M12 2C17.523 2 22 6.477 22 12h-2a8 8 0 0 0-8-8V2z"})):r("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},r("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===t.id?"删除中...":"删除")))))))))),this.totalRecords>this.pageSize&&r("div",{class:"pagination"},r("button",{class:"page-btn",disabled:this.currentPage===1,onClick:()=>this.changePage(this.currentPage-1)},"上一页"),r("span",{class:"page-info"},"第 ",this.currentPage," 页,共 ",Math.ceil(this.totalRecords/this.pageSize)," 页"),r("button",{class:"page-btn",disabled:this.currentPage>=Math.ceil(this.totalRecords/this.pageSize),onClick:()=>this.changePage(this.currentPage+1)},"下一页")),r("div",{style:{height:"100px",width:"100%"}})))}getScoreClass(t){if(t>=90)return"excellent";if(t>=80)return"good";if(t>=70)return"average";if(t>=60)return"below-average";return"poor"}getEvaluationCriteriaText(){return this.evaluationCriteria.map((t=>`${t.name}(${t.value}%):${t.description}`)).join("\n\n")}getEvaluateStatusText(t){const o={0:"筛选中",1:"筛选完成",[-1]:"筛选失败"};return o[t]||"待分析"}getEvaluateStatusClass(t){const o={0:"analyzing",1:"completed",[-1]:"failed"};return o[t]||"pending"}changePage=async t=>{this.currentPage=t;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();m("刷新成功","success")};async loadResumeList(){if(!this.currentTask)return;this.isLoadingResumeList=true;this.filteredResumeRecords=[];this.uploadedResumeRecords=this.uploadedResumeRecords.filter((t=>t.evaluate_status===undefined));try{const t={task_id:this.currentTask.id,page:this.currentPage,size:this.pageSize};if(this.sortOrder==="desc"){t.order_by="score_desc"}else if(this.sortOrder==="asc"){t.order_by="score_asc"}const o=await s({url:"/sdk/v1/agent/app_filter_resume/page",method:"GET",data:t});if(o.success&&o.data){const t=o.data.records.map((t=>{let o="等待分析...";if(t.resume_data){try{const e=JSON.parse(t.resume_data);const r=e.result;if(r){const t=r.phone||r.email||"未知";const e=r.degree||"未知";const i=r.college||"未知";const a=r.work_year||"0";const n=r.work_position||"未知职位";o=`${t} | ${e} | ${i} | ${a}年经验 | ${n}`}}catch(t){console.warn("解析简历数据失败:",t)}}return{...t,id:t.id?.toString()||"",fileName:t.resume_file_name||"未知文件",talentInfo:o,scoreDetail:t.evaluate||"等待分析...",uploadTime:t.create_at?new Date(t.create_at):new Date,file_url:t.resume_file_url}}));this.filteredResumeRecords=t;this.totalRecords=o.data.total||0}}catch(t){console.error("加载简历列表失败:",t)}finally{this.isLoadingResumeList=false}}async startAnalysisWithCustomFileUrls(){if(!this.currentTask){m("任务信息不存在","error");return}const t=this.customInputs?.file_urls;if(!t){return}const o=t.split(",").map((t=>t.trim())).filter(Boolean);if(o.length===0){m("没有有效的简历文件URL","warning");return}this.isAnalyzing=true;this.isLoadingResumeList=true;try{const t=[];for(const e of o){if(e.startsWith("http://")||e.startsWith("https://")){try{const o=e.split("/").pop()||"resume.pdf";const r=await c({url:e,file_name:o});if(r.success&&r.data?.cos_key){t.push(r.data.cos_key)}else{console.error(`上传文件失败: ${e}`,r.message);m(`上传文件 ${o} 失败: ${r.message||"未知错误"}`,"error")}}catch(t){console.error(`上传文件出错: ${e}`,t);m(`上传文件出错: ${t instanceof Error?t.message:"未知错误"}`,"error")}}else{t.push(e)}}if(t.length===0){m("没有有效的简历文件可以分析","error");return}if(t.length<o.length){m(`部分文件上传失败,将继续分析 ${t.length}/${o.length} 个文件`,"warning")}const e=await s({url:"/sdk/v1/agent/app_filter_resume/clear_repeated_resumes",method:"POST",data:{task_id:this.currentTask.id,resume_file_urls:t}});if(!e.success){throw new Error(e.message||"简历校验失败")}const r=e.data||[];if(r.length===0){m("已清除重复上传的简历,没有新的简历需要分析","info");return}const i=this.evaluationCriteria.map((t=>`- ${t.name}(占比${t.value}%):${t.description}`)).join(" \n");this.resumeAnalysisStart.emit({task_id:this.currentTask.id,resume_count:r.length,resume_files:r.map((t=>({file_name:t.split("/").pop()||"未知文件",file_url:t})))});let a=false;await p({url:"/sdk/v1/chat/chat-messages",method:"POST",data:{bot_id:this.botId,response_mode:"blocking",query:"简历筛选",inputs:{job_info:this.jobDescription,jd_id:this.currentTask.jd_id,task_id:this.currentTask.id,file_urls:r.join(","),rule:i}},onMessage:t=>{if(t.event==="error"){a=true;this.someErrorEvent.emit({error:t.data,message:t.data?.message||t.message||"分析失败"});this.internalConversationId=null;return}if(t&&!this.internalConversationId&&(t.message_id||t.conversation_id||t.id)){this.internalConversationId=t.conversation_id;this.conversationStart.emit({conversation_id:t.conversation_id,event:t.event||"message",message_id:t.message_id,id:String(this.currentTask.id)})}},onComplete:async()=>{if(a){this.internalConversationId=null;return}await this.loadResumeList();this.emitAnalysisCompleteEvent();this.internalConversationId=null},onError:t=>{a=true;console.error("简历分析失败:",t);g.captureError(t,{action:"startAnalysisWithCustomFileUrls",component:"pcm-jlsx-modal",title:"简历分析失败"});this.someErrorEvent.emit({error:t,message:"简历分析失败,请重试"});this.internalConversationId=null}})}catch(t){console.error("开始分析失败:",t);g.captureError(t,{action:"startAnalysisWithCustomFileUrls",component:"pcm-jlsx-modal",title:"开始分析失败"});this.someErrorEvent.emit({error:t,message:"开始分析失败,请重试"})}finally{this.isAnalyzing=false;this.isLoadingResumeList=false}}startAnalysis=async()=>{if(!this.currentTask){m("任务信息不存在","error");return}const t=this.uploadedResumeRecords.filter((t=>t.evaluate_status!==1&&t.evaluate_status!==0));if(t.length===0){m("没有需要分析的简历","warning");return}this.isAnalyzing=true;try{t.forEach((t=>{t.evaluate_status=0}));this.uploadedResumeRecords=[...this.uploadedResumeRecords];const o=t.map((t=>t.file_url||t.fileInfo?.cos_key)).filter((t=>t));if(o.length===0){m("简历文件URL获取失败","error");return}const e=await s({url:"/sdk/v1/agent/app_filter_resume/clear_repeated_resumes",method:"POST",data:{task_id:this.currentTask.id,resume_file_urls:o}});if(!e.success){throw new Error(e.message||"简历校验失败")}const r=e.data||[];if(r.length===0){m("已清除重复上传的简历,没有新的简历需要分析","info");this.uploadedResumeRecords=[];return}else{this.uploadedResumeRecords=this.uploadedResumeRecords.filter((t=>{const o=t.file_url||t.fileInfo?.cos_key;return r.includes(o)||t.evaluate_status===0}))}const i=this.evaluationCriteria.map((t=>`- ${t.name}(占比${t.value}%):${t.description}`)).join(" \n");this.resumeAnalysisStart.emit({task_id:this.currentTask.id,resume_count:r.length,resume_files:t.map((t=>({file_name:t.fileName,file_url:t.file_url||t.fileInfo?.cos_key||""}))).filter((t=>r.includes(t.file_url)))});if(this.pcmUploadRef?.clearSelectedFiles){this.pcmUploadRef.clearSelectedFiles()}await p({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:r.join(","),rule:i}},onMessage:o=>{if(o.event==="error"){const e=o.data?.message||o.message||"分析失败";t.forEach((t=>{t.evaluate_status=-1}));this.uploadedResumeRecords=[...this.uploadedResumeRecords];this.someErrorEvent.emit({error:o.data,message:e});this.internalConversationId=null;return}if(o&&!this.internalConversationId&&(o.message_id||o.conversation_id||o.id)){this.internalConversationId=o.conversation_id;this.conversationStart.emit({conversation_id:o.conversation_id,event:o.event||"message",message_id:o.message_id,id:String(this.currentTask.id)})}},onComplete:async()=>{this.uploadedResumeRecords=this.uploadedResumeRecords.filter((t=>t.evaluate_status!==0));await this.loadResumeList();this.emitAnalysisCompleteEvent();this.internalConversationId=null},onError:o=>{console.error("简历分析失败:",o);t.forEach((t=>{t.evaluate_status=-1}));this.uploadedResumeRecords=[...this.uploadedResumeRecords];g.captureError(o,{action:"startAnalysis",component:"pcm-jlsx-modal",title:"开始分析失败"});this.someErrorEvent.emit({error:o,message:"开始分析失败,请重试"});this.internalConversationId=null}})}catch(o){console.error("开始分析失败:",o);t.forEach((t=>{t.evaluate_status=-1}));this.uploadedResumeRecords=[...this.uploadedResumeRecords];g.captureError(o,{action:"startAnalysis",component:"pcm-jlsx-modal",title:"开始分析失败"});this.someErrorEvent.emit({error:o,message:"开始分析失败,请重试"})}finally{this.isAnalyzing=false}};handleTaskHistoryClick=t=>{this.taskHistoryDrawerSource=t;this.isTaskHistoryDrawerOpen=true;this.loadHistoryTasks()};async loadHistoryTasks(){this.isLoadingHistoryTasks=true;try{const t=await s({url:"/sdk/v1/agent/app_filter_task/page",method:"GET",data:{page:this.taskHistoryCurrentPage,size:this.taskHistoryPageSize}});if(t.success&&t.data){this.historyTasks=t.data.records.map((t=>{let o;let e="未知时间";try{o=new Date(t.create_at);if(isNaN(o.getTime())){console.warn("无效的日期对象:",t.create_at);o=new Date}const r=new Date;const i=r.getTime()-o.getTime();const a=Math.floor(i/(1e3*60*60*24));if(a===0){e=`今天 ${o.getHours().toString().padStart(2,"0")}:${o.getMinutes().toString().padStart(2,"0")}`}else if(a===1){e=`昨天 ${o.getHours().toString().padStart(2,"0")}:${o.getMinutes().toString().padStart(2,"0")}`}else if(a>0&&a<7){const t=["周日","周一","周二","周三","周四","周五","周六"];e=`${t[o.getDay()]} ${o.getHours().toString().padStart(2,"0")}:${o.getMinutes().toString().padStart(2,"0")}`}else if(a<0){e=`${(o.getMonth()+1).toString().padStart(2,"0")}-${o.getDate().toString().padStart(2,"0")} ${o.getHours().toString().padStart(2,"0")}:${o.getMinutes().toString().padStart(2,"0")}`}else{e=`${(o.getMonth()+1).toString().padStart(2,"0")}-${o.getDate().toString().padStart(2,"0")} ${o.getHours().toString().padStart(2,"0")}:${o.getMinutes().toString().padStart(2,"0")}`}}catch(o){console.error("时间格式化错误:",o,t.create_at);e="时间解析失败"}return{...t,timeDisplay:e}}));this.taskHistoryTotal=t.data.total||0}}catch(t){console.error("获取历史任务失败:",t);g.captureError(t,{action:"loadHistoryTasks",component:"pcm-jlsx-modal",title:"获取历史任务失败"});this.someErrorEvent.emit({error:t,message:"获取历史任务失败"})}finally{this.isLoadingHistoryTasks=false}}handleSwitchTask=async t=>{if(t===this.currentTask?.id){this.isTaskHistoryDrawerOpen=false;return}const o=this.currentTask?.id;try{const e=await s({url:`/sdk/v1/agent/app_filter_task/query/${t}`,method:"GET"});if(!e.success||!e.data){throw new Error(e.message||"获取任务详情失败")}const r=e.data;let i=[];if(r.extra){try{const t=typeof r.extra==="string"?JSON.parse(r.extra):r.extra;if(Array.isArray(t)){i=t}else if(Array.isArray(t?.criteria)){i=t.criteria.map((t=>({name:t.name,description:t.description,value:t.weight??t.value??0})))}}catch(t){console.warn("解析评分标准失败:",t)}}this.currentTask={id:r.id,jd_id:r.jd_id,user_id:r.user_id,extra:r.extra,important_conditions:r.important_conditions||"",create_at:r.create_at,update_at:r.update_at};this.jobDescription=r.jd_info?.description||"";this.jobTitle=r.jd_info?.title||"";this.evaluationCriteria=i.length>0?i:this.evaluationCriteria;this.importantConditions=r.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:o,current_task_id:r.id,task_title:`任务 #${r.id}`,switch_time:(new Date).toISOString()});m("切换任务成功","success")}catch(t){console.error("切换任务失败:",t);g.captureError(t,{action:"handleSwitchTask",component:"pcm-jlsx-modal",title:"切换任务失败"});this.someErrorEvent.emit({error:t,message:"切换任务失败"})}};handleTaskHistoryPageChange=async t=>{this.taskHistoryCurrentPage=t;await this.loadHistoryTasks()};handleExportRecordsClick=()=>{this.isExportRecordsModalOpen=true};handleExportRecordsModalClose=()=>{this.isExportRecordsModalOpen=false};handleDocumentClick=t=>{const o=t.target;const e=o.closest(".action-dropdown");if(!e&&this.activeDropdownId){this.activeDropdownId=null}};emitAnalysisCompleteEvent=()=>{if(!this.currentTask)return;const t=this.resumeRecords;const o=t.filter((t=>t.evaluate_status===1&&typeof t.score==="number"));const e=t.filter((t=>t.evaluate_status===-1));const r=o.map((t=>t.score)).filter((t=>typeof t==="number"));const i=r.length>0?r.reduce(((t,o)=>t+o),0)/r.length:0;const a=r.length>0?Math.max(...r):0;this.resumeAnalysisComplete.emit({task_id:this.currentTask.id,total_resumes:t.length,analyzed_resumes:o.length,failed_resumes:e.length,average_score:Math.round(i*100)/100,highest_score:a})};handleUploadChange=t=>{if(!this._uploadEnabled){if(this.pcmUploadRef?.clearSelectedFiles){this.pcmUploadRef.clearSelectedFiles()}this.someErrorEvent.emit({error:new Error("上传功能已被禁用"),message:"上传功能已被禁用,请联系管理员"});return}if(!this.currentTask){m("请先创建任务","warning");return}const o=t.detail||[];const e=this.uploadedResumeRecords.map((t=>t.file_url||t.fileInfo?.cos_key)).filter((t=>t));const r=o.filter((t=>!e.includes(t.cos_key)));const i=o.map((t=>t.cos_key));const a=e.filter((t=>!i.includes(t)));if(r.length>0){const t=r.map((t=>{const o={id:Date.now()+Math.random().toString(),fileName:t.file_name||"未知文件",talentInfo:"等待分析...",score:undefined,scoreDetail:"等待分析...",uploadTime:new Date,fileInfo:t,task_id:this.currentTask.id,file_url:t.cos_key,evaluate_status:undefined};return o}));this.uploadedResumeRecords=[...this.uploadedResumeRecords,...t];t.forEach((t=>{this.uploadSuccess.emit(t.fileInfo)}));m(`成功上传 ${t.length} 个简历文件!`,"success")}if(a.length>0){this.uploadedResumeRecords=this.uploadedResumeRecords.filter((t=>{const o=t.file_url||t.fileInfo?.cos_key;return!a.includes(o)}))}};handleStartAnalysis=async()=>{if(await(this.pcmUploadRef?.getIsUploading?.())){m("文件上传中,请稍后","info");return}await this.startAnalysis()};render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const o={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":this.currentStep==="input","task-layout":this.currentStep==="task"};const e={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};return r("div",{class:e,style:t},r("div",{class:o},this.isShowHeader&&r("div",{class:"modal-header"},r("div",{class:"header-left"},this.icon&&r("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),r("div",null,this.modalTitle),this.shouldShowHistoryEntry()&&r("button",{type:"button",class:"header-history-entry",onClick:()=>this.handleTaskHistoryClick(this.currentStep==="input"?"input":"workspace"),title:this.getHistoryEntryTitle()},this.getHistoryEntryLabel())),this.isNeedClose&&r("button",{class:"close-button",onClick:this.handleClose},r("span",null,"×"))),this.currentStep==="input"?this.renderInputStep():this.renderTaskStep()),r("components-drawer",{isOpen:this.showJdDrawer,drawerTitle:"职位描述",width:"500px",onClosed:this.closeJdDrawer},r("div",{class:"drawer-content"},r("div",{class:"drawer-text-content"},this.jobDescription))),r("components-drawer",{isOpen:this.showCriteriaDrawer,drawerTitle:"评分标准、重要条件",width:"500px",onClosed:this.closeCriteriaDrawer},r("div",{class:"drawer-content"},r("div",{class:"pcm-jlsx-card"},r("div",{class:"pcm-jlsx-card-header"},"评分标准"),r("div",{class:"pcm-jlsx-card-body"},this.getEvaluationCriteriaText())),r("div",{class:"pcm-jlsx-card"},r("div",{class:"pcm-jlsx-card-header"},"重要条件"),r("div",{class:"pcm-jlsx-card-body"},this.importantConditions)))),r("components-drawer",{isOpen:this.showPreviewDrawer,drawerTitle:this.previewTitle,width:"600px",onClosed:this.closePreviewDrawer},r("div",{class:"drawer-content"},this.previewType==="markdown"?r("div",{class:"markdown-content markdown-body",innerHTML:h(this.previewContent)}):r("div",{class:"file-preview"},r("iframe",{src:this.previewUrl,frameborder:"0",width:"100%",height:"100%",style:{border:"none",height:"calc(100vh - 120px)"}})))),r("components-drawer",{isOpen:this.isTaskHistoryDrawerOpen,drawerTitle:this.getTaskHistoryDrawerTitle(),width:"500px",onClosed:()=>{this.isTaskHistoryDrawerOpen=false}},r("div",{class:"task-history-drawer-content"},r("div",{class:"task-list"},this.isLoadingHistoryTasks?r("div",{class:"loading-tasks"},r("div",{class:"loading-spinner-small"}),r("p",null,"加载中...")):this.historyTasks.length===0?r("div",{class:"empty-tasks"},r("p",null,"暂无历史任务")):this.historyTasks.map((t=>r("div",{key:t.id,class:{"task-item":true,active:t.id===this.currentTask?.id},onClick:()=>this.handleSwitchTask(t.id)},r("div",{class:"task-info"},r("div",{class:"task-header"},r("div",{class:"task-id"},t.title||`任务 #${t.id}`),r("div",{class:"task-time"},t.timeDisplay))),t.id===this.currentTask?.id&&r("div",{class:"current-task-indicator"},r("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},r("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}))))))),this.taskHistoryTotal>this.taskHistoryPageSize&&r("div",{class:"history-pagination"},r("button",{type:"button",class:"history-pagination-button",disabled:this.taskHistoryCurrentPage===1,onClick:()=>this.handleTaskHistoryPageChange(this.taskHistoryCurrentPage-1)},"上一页"),r("span",{class:"history-pagination-info"},"第 ",this.taskHistoryCurrentPage," 页,共 ",Math.ceil(this.taskHistoryTotal/this.taskHistoryPageSize)," 页"),r("button",{type:"button",class:"history-pagination-button",disabled:this.taskHistoryCurrentPage>=Math.ceil(this.taskHistoryTotal/this.taskHistoryPageSize),onClick:()=>this.handleTaskHistoryPageChange(this.taskHistoryCurrentPage+1)},"下一页")))),r("components-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"]}}};k.style=u+(x+(y+w));export{k as pcm_jlsx_modal};
2
+ //# sourceMappingURL=p-aa606968.entry.js.map