pcm-agents 1.0.2 → 1.0.3
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.
- package/dist/cjs/{components-chat-message_33.cjs.entry.js → components-chat-message_34.cjs.entry.js} +5990 -4059
- package/dist/cjs/components-chat-message_34.cjs.entry.js.map +1 -0
- package/dist/cjs/{conversation-utils-B4jUfmtU.js → conversation-utils-BcyjwLyB.js} +4 -4
- package/dist/cjs/{conversation-utils-B4jUfmtU.js.map → conversation-utils-BcyjwLyB.js.map} +1 -1
- package/dist/cjs/{index-Dghp_NL6.js → index-ByczPiFt.js} +3 -3
- package/dist/cjs/{index-Dghp_NL6.js.map → index-ByczPiFt.js.map} +1 -1
- package/dist/cjs/index-C_qhED9Z.js +6 -6
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/oem-htws-modal.cjs.entry.js +1 -1
- package/dist/cjs/oem-jd-modal.cjs.entry.js +2 -2
- package/dist/cjs/oem-jlpp-modal.cjs.entry.js +1 -1
- package/dist/cjs/oem-jlzz-modal.cjs.entry.js +1 -1
- package/dist/cjs/oem-mnct-modal.cjs.entry.js +1 -1
- package/dist/cjs/oem-qgqjl-modal.cjs.entry.js +3 -3
- package/dist/cjs/pcm-agents.cjs.js +1 -1
- package/dist/cjs/pcm-hr-chat-modal.cjs.entry.js +2 -2
- package/dist/cjs/pcm-jlsx-modal.cjs.entry.js +2 -2
- package/dist/cjs/{oem-mnms-modal.cjs.entry.js → pcm-mnms-modal.cjs.entry.js} +41 -156
- package/dist/cjs/pcm-mnms-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/pcm-mnms-modal.entry.cjs.js.map +1 -0
- package/dist/cjs/{sentry-reporter-CgJowDyu.js → sentry-reporter-CAMphGVG.js} +3 -3
- package/dist/cjs/{sentry-reporter-CgJowDyu.js.map → sentry-reporter-CAMphGVG.js.map} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/components-oem-virtual-chat-modal/components-oem-virtual-chat-modal.css +1109 -0
- package/dist/collection/components/components-oem-virtual-chat-modal/components-oem-virtual-chat-modal.js +2334 -0
- package/dist/collection/components/components-oem-virtual-chat-modal/components-oem-virtual-chat-modal.js.map +1 -0
- package/dist/collection/components/oem-mnms-modal/oem-mnms-modal.js +2 -2
- package/dist/collection/components/oem-mnms-modal/oem-mnms-modal.js.map +1 -1
- package/dist/components/components-chat-message.js +1 -1
- package/dist/components/components-digital-human.js +1 -1
- package/dist/components/components-export-records-modal.js +1 -1
- package/dist/components/components-mobile-input-btn.js +1 -1
- package/dist/components/components-mobile-upload-btn.js +1 -1
- package/dist/components/components-oem-virtual-chat-modal.d.ts +11 -0
- package/dist/components/components-oem-virtual-chat-modal.js +9 -0
- package/dist/components/components-oem-virtual-chat-modal.js.map +1 -0
- package/dist/components/components-position-selector.js +1 -1
- package/dist/components/components-thousand-resume-wrapper.js +1 -1
- package/dist/components/components-upload.js +1 -1
- package/dist/components/components-voice-input-btn.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/oem-htws-modal.js +5 -5
- package/dist/components/oem-jd-modal.js +5 -5
- package/dist/components/oem-jlpp-modal.js +7 -7
- package/dist/components/oem-jlsx-modal.js +5 -5
- package/dist/components/oem-jlzz-modal.js +5 -5
- package/dist/components/oem-mnct-modal.js +7 -7
- package/dist/components/oem-mnms-modal.js +14 -14
- package/dist/components/oem-mnms-modal.js.map +1 -1
- package/dist/components/oem-qgqjl-modal.js +9 -9
- package/dist/components/oem-zygh-modal.js +5 -5
- package/dist/components/{p-CB7myOe_.js → p-BG57SwXj.js} +3 -3
- package/dist/components/{p-CB7myOe_.js.map → p-BG57SwXj.js.map} +1 -1
- package/dist/components/p-Br04SWVa.js +1910 -0
- package/dist/components/p-Br04SWVa.js.map +1 -0
- package/dist/components/{p-DJDJfWq9.js → p-C4wDoFmj.js} +3 -3
- package/dist/components/{p-DJDJfWq9.js.map → p-C4wDoFmj.js.map} +1 -1
- package/dist/components/{p-C-lvK9NX.js → p-CdChGfaD.js} +3 -3
- package/dist/components/{p-C-lvK9NX.js.map → p-CdChGfaD.js.map} +1 -1
- package/dist/components/{p-i4wY2JnB.js → p-DBGeSJL5.js} +4 -4
- package/dist/components/{p-i4wY2JnB.js.map → p-DBGeSJL5.js.map} +1 -1
- package/dist/components/{p-Bg0KKnpU.js → p-DCqDbDa5.js} +3 -3
- package/dist/components/{p-Bg0KKnpU.js.map → p-DCqDbDa5.js.map} +1 -1
- package/dist/components/{p-BDEiyYVl.js → p-DNYpOoXt.js} +3 -3
- package/dist/components/{p-BDEiyYVl.js.map → p-DNYpOoXt.js.map} +1 -1
- package/dist/components/{p-D4RnNrxx.js → p-DOARr5co.js} +3 -3
- package/dist/components/{p-D4RnNrxx.js.map → p-DOARr5co.js.map} +1 -1
- package/dist/components/{p-oVAdweom.js → p-DR3ZWkeG.js} +3 -3
- package/dist/components/{p-oVAdweom.js.map → p-DR3ZWkeG.js.map} +1 -1
- package/dist/components/{p-CEu-bFot.js → p-Di4zSDY1.js} +3 -3
- package/dist/components/{p-CEu-bFot.js.map → p-Di4zSDY1.js.map} +1 -1
- package/dist/components/{p-C7ubjB1x.js → p-DlSEOwkR.js} +3 -3
- package/dist/components/{p-C7ubjB1x.js.map → p-DlSEOwkR.js.map} +1 -1
- package/dist/components/{p-CPq5-i_-.js → p-PGWPY7oW.js} +4 -4
- package/dist/components/{p-CPq5-i_-.js.map → p-PGWPY7oW.js.map} +1 -1
- package/dist/components/{p-CzFKth7J.js → p-vqnzSTh9.js} +3 -3
- package/dist/components/{p-CzFKth7J.js.map → p-vqnzSTh9.js.map} +1 -1
- package/dist/components/{p-BhdGTSLg.js → p-ypLAX0-r.js} +5 -5
- package/dist/components/{p-BhdGTSLg.js.map → p-ypLAX0-r.js.map} +1 -1
- package/dist/components/pcm-1zhanshi-mnms-modal.js +5 -5
- package/dist/components/pcm-app-chat-modal.js +1 -1
- package/dist/components/pcm-ats-mnms-modal.js +5 -5
- package/dist/components/pcm-card.js +1 -1
- package/dist/components/pcm-hr-chat-modal.js +2 -2
- package/dist/components/pcm-htws-modal.js +8 -8
- package/dist/components/pcm-hyzj-modal.js +5 -5
- package/dist/components/pcm-jd-modal.js +6 -6
- package/dist/components/pcm-jlpp-modal.js +8 -8
- package/dist/components/pcm-jlsx-modal.js +5 -5
- package/dist/components/pcm-jlzz-modal.js +6 -6
- package/dist/components/pcm-mnct-modal.js +7 -7
- package/dist/components/pcm-mnms-modal.js +8 -8
- package/dist/components/pcm-mnms-zp-modal.js +8 -8
- package/dist/components/pcm-msbg-modal.js +5 -5
- package/dist/components/pcm-qgqjl-modal.js +9 -9
- package/dist/components/pcm-virtual-chat-modal.js +1 -1
- package/dist/components/pcm-zsk-chat-modal.js +2 -2
- package/dist/components/pcm-zygh-modal.js +7 -7
- package/dist/components/pcm-zygh-v2-modal.js +7 -7
- package/dist/esm/{components-chat-message_33.entry.js → components-chat-message_34.entry.js} +5989 -4059
- package/dist/esm/components-chat-message_34.entry.js.map +1 -0
- package/dist/esm/{conversation-utils-CLO35DHR.js → conversation-utils-Cq6kOMLn.js} +4 -4
- package/dist/esm/{conversation-utils-CLO35DHR.js.map → conversation-utils-Cq6kOMLn.js.map} +1 -1
- package/dist/esm/index-Bq0K-WqZ.js +6 -6
- package/dist/esm/{index-KVnu9w-h.js → index-f9qzAcsI.js} +4 -4
- package/dist/esm/{index-KVnu9w-h.js.map → index-f9qzAcsI.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/oem-htws-modal.entry.js +1 -1
- package/dist/esm/oem-jd-modal.entry.js +2 -2
- package/dist/esm/oem-jlpp-modal.entry.js +1 -1
- package/dist/esm/oem-jlzz-modal.entry.js +1 -1
- package/dist/esm/oem-mnct-modal.entry.js +1 -1
- package/dist/esm/oem-qgqjl-modal.entry.js +3 -3
- package/dist/esm/pcm-agents.js +1 -1
- package/dist/esm/pcm-hr-chat-modal.entry.js +2 -2
- package/dist/esm/pcm-jlsx-modal.entry.js +2 -2
- package/dist/esm/{oem-mnms-modal.entry.js → pcm-mnms-modal.entry.js} +41 -156
- package/dist/esm/pcm-mnms-modal.entry.js.map +1 -0
- package/dist/esm/{sentry-reporter-B4aHQq-A.js → sentry-reporter-BuVO55kB.js} +3 -3
- package/dist/esm/{sentry-reporter-B4aHQq-A.js.map → sentry-reporter-BuVO55kB.js.map} +1 -1
- package/dist/pcm-agents/index.esm.js +1 -1
- package/dist/pcm-agents/p-1a823412.entry.js +2 -0
- package/dist/pcm-agents/p-1a823412.entry.js.map +1 -0
- package/dist/pcm-agents/{p-8144f0d4.entry.js → p-1d7baf58.entry.js} +2 -2
- package/dist/pcm-agents/p-2c7f6866.entry.js +8 -0
- package/dist/pcm-agents/p-2c7f6866.entry.js.map +1 -0
- package/dist/pcm-agents/{p-efb4e819.entry.js → p-3798a359.entry.js} +2 -2
- package/dist/pcm-agents/{p-dd6362f0.entry.js → p-3bc49010.entry.js} +2 -2
- package/dist/pcm-agents/{p-8256890d.entry.js → p-612d5346.entry.js} +2 -2
- package/dist/pcm-agents/{p-e2b9a9f2.entry.js → p-7f080b51.entry.js} +2 -2
- package/dist/pcm-agents/{p-aa606968.entry.js → p-84226c3e.entry.js} +2 -2
- package/dist/pcm-agents/p-BvtPZTpv.js +2 -0
- package/dist/pcm-agents/{p-B4ClCdh9.js.map → p-BvtPZTpv.js.map} +1 -1
- package/dist/pcm-agents/{p-Bktjt_YJ.js → p-CQH9qich.js} +2 -2
- package/dist/pcm-agents/{p-Bktjt_YJ.js.map → p-CQH9qich.js.map} +1 -1
- package/dist/pcm-agents/{p-CMfzTNOk.js → p-CUnvGnxr.js} +2 -2
- package/dist/pcm-agents/{p-CMfzTNOk.js.map → p-CUnvGnxr.js.map} +1 -1
- package/dist/pcm-agents/{p-eb9b355e.entry.js → p-a7dffe87.entry.js} +2 -2
- package/dist/pcm-agents/{p-4d7511e0.entry.js → p-aaf860b0.entry.js} +2 -2
- package/dist/pcm-agents/pcm-agents.esm.js +1 -1
- package/dist/pcm-agents/pcm-mnms-modal.entry.esm.js.map +1 -0
- package/dist/types/components/components-oem-virtual-chat-modal/components-oem-virtual-chat-modal.d.ts +290 -0
- package/dist/types/components.d.ts +186 -0
- package/package.json +1 -1
- package/dist/cjs/components-chat-message_33.cjs.entry.js.map +0 -1
- package/dist/cjs/oem-mnms-modal.cjs.entry.js.map +0 -1
- package/dist/cjs/oem-mnms-modal.entry.cjs.js.map +0 -1
- package/dist/esm/components-chat-message_33.entry.js.map +0 -1
- package/dist/esm/oem-mnms-modal.entry.js.map +0 -1
- package/dist/pcm-agents/oem-mnms-modal.entry.esm.js.map +0 -1
- package/dist/pcm-agents/p-7e8bdfa6.entry.js +0 -2
- package/dist/pcm-agents/p-7e8bdfa6.entry.js.map +0 -1
- package/dist/pcm-agents/p-B4ClCdh9.js +0 -2
- package/dist/pcm-agents/p-f6683f29.entry.js +0 -8
- package/dist/pcm-agents/p-f6683f29.entry.js.map +0 -1
- /package/dist/pcm-agents/{p-8144f0d4.entry.js.map → p-1d7baf58.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-efb4e819.entry.js.map → p-3798a359.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-dd6362f0.entry.js.map → p-3bc49010.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-8256890d.entry.js.map → p-612d5346.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-e2b9a9f2.entry.js.map → p-7f080b51.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-aa606968.entry.js.map → p-84226c3e.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-eb9b355e.entry.js.map → p-a7dffe87.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-4d7511e0.entry.js.map → p-aaf860b0.entry.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-Br04SWVa.js","mappings":";;;;;;;;;AAAA,MAAM,gCAAgC,GAAG,4/cAA4/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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/components-oem-virtual-chat-modal/components-oem-virtual-chat-modal.css?tag=components-oem-virtual-chat-modal&encapsulation=shadow","src/global/host.css?tag=components-oem-virtual-chat-modal&encapsulation=shadow"],"sourcesContent":[":host {\r\n display: block;\r\n font-size: 16px;\r\n}\r\n\r\n.modal-overlay {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n overflow: hidden;\r\n padding: 0;\r\n z-index: 1000;\r\n}\r\n\r\n/* 全屏模式下的overlay样式 */\r\n.fullscreen-overlay {\r\n padding: 0;\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n}\r\n\r\n.modal-container {\r\n background: #fff;\r\n border-radius: 0;\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n position: relative;\r\n margin: 0;\r\n overflow: hidden;\r\n}\r\n\r\n/* 全屏模式样式 */\r\n.modal-container.fullscreen {\r\n width: 100%;\r\n max-width: none;\r\n height: 100%;\r\n border-radius: 0;\r\n margin: 0;\r\n display: flex;\r\n flex-direction: column;\r\n max-height: 100%;\r\n}\r\n\r\n/* 数字人视频背景层 */\r\n.digital-human-background {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n z-index: 1;\r\n overflow: hidden;\r\n display: flex;\r\n justify-content: center;\r\n}\r\n\r\n.digital-human-background-video {\r\n width: 100%;\r\n height: 100%;\r\n object-fit: cover;\r\n object-position: center;\r\n max-width: 1200px;\r\n}\r\n\r\n/* 当没有数字人时的默认背景 */\r\n.modal-container:not(.digital-human-mode) {\r\n background: white;\r\n border-radius: 8px;\r\n width: 100%;\r\n max-width: 900px;\r\n height: 90vh;\r\n max-height: 800px;\r\n}\r\n\r\n/* 内容层 */\r\n.modal-content-layer {\r\n position: relative;\r\n z-index: 10;\r\n height: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n background: linear-gradient(\r\n 180deg,\r\n rgba(0, 0, 0, 0.3) 0%,\r\n rgba(0, 0, 0, 0.1) 20%,\r\n rgba(0, 0, 0, 0.1) 80%,\r\n rgba(0, 0, 0, 0.4) 100%\r\n );\r\n}\r\n\r\n.main-content {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center; /* 水平居中 */\r\n overflow: hidden;\r\n padding: 24px 24px 40px 24px; /* 增加底部间距 */\r\n position: absolute;\r\n bottom: 0px;\r\n width: -webkit-fill-available;\r\n}\r\n\r\n.chat-history-section {\r\n width: 100%;\r\n max-width: 1200px;\r\n text-align: center;\r\n color: white;\r\n}\r\n\r\n.ai-message-item {\r\n padding: 12px 20px;\r\n border-radius: 12px;\r\n margin-bottom: 12px;\r\n animation: fadeIn 0.5s ease-in-out;\r\n}\r\n\r\n.recording-preview-top-right {\r\n position: absolute;\r\n top: 20px;\r\n right: 20px;\r\n width: 180px;\r\n height: 120px;\r\n border-radius: 12px;\r\n overflow: hidden;\r\n border: 2px solid rgba(255, 255, 255, 0.5);\r\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);\r\n background-color: #000;\r\n z-index: 10;\r\n}\r\n\r\n.user-video-preview {\r\n width: 100%;\r\n height: 100%;\r\n object-fit: cover;\r\n}\r\n\r\n.recording-status-bar {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n background-color: white;\r\n padding: 8px 12px;\r\n border-radius: 999px;\r\n margin-top: 4px;\r\n width: 100%;\r\n max-width: 400px;\r\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\r\n animation: slideInUp 0.5s ease-out;\r\n line-height: 40px;\r\n}\r\n\r\n.audio-waveform {\r\n display: flex;\r\n align-items: center;\r\n height: 24px;\r\n}\r\n\r\n.waveform-bar {\r\n width: 4px;\r\n margin: 0 2px;\r\n background-color: #16a34a; /* A vibrant green */\r\n border-radius: 2px;\r\n height: 6px;\r\n animation: waveform-animation 1.2s infinite ease-in-out;\r\n}\r\n\r\n.waveform-bar:nth-child(1) {\r\n animation-delay: 0.1s;\r\n}\r\n.waveform-bar:nth-child(2) {\r\n animation-delay: 0.3s;\r\n}\r\n.waveform-bar:nth-child(3) {\r\n animation-delay: 0.5s;\r\n}\r\n.waveform-bar:nth-child(4) {\r\n animation-delay: 0.2s;\r\n}\r\n.waveform-bar:nth-child(5) {\r\n animation-delay: 0.4s;\r\n}\r\n.waveform-bar:nth-child(6) {\r\n animation-delay: 0.1s;\r\n}\r\n.waveform-bar:nth-child(7) {\r\n animation-delay: 0.3s;\r\n}\r\n.waveform-bar:nth-child(8) {\r\n animation-delay: 0.5s;\r\n}\r\n\r\n@keyframes waveform-animation {\r\n 0%,\r\n 100% {\r\n height: 6px;\r\n }\r\n 50% {\r\n height: 35px;\r\n }\r\n}\r\n\r\n.recording-timer {\r\n font-size: 14px;\r\n color: #595959;\r\n font-family: 'Courier New', Courier, monospace;\r\n}\r\n\r\n.finish-recording-btn {\r\n background-color: #16a34a; /* A vibrant green */\r\n border: none;\r\n border-radius: 50%;\r\n width: 32px;\r\n height: 32px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n cursor: pointer;\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\r\n transition:\r\n background-color 0.3s,\r\n transform 0.2s;\r\n}\r\n\r\n.finish-recording-btn:hover {\r\n background-color: #148a3f;\r\n}\r\n\r\n.finish-recording-btn:active {\r\n transform: scale(0.95);\r\n}\r\n\r\n@keyframes fadeIn {\r\n from {\r\n opacity: 0;\r\n }\r\n to {\r\n opacity: 1;\r\n }\r\n}\r\n\r\n@keyframes slideInUp {\r\n from {\r\n transform: translateY(20px);\r\n opacity: 0;\r\n }\r\n to {\r\n transform: translateY(0);\r\n opacity: 1;\r\n }\r\n}\r\n\r\n.status-indicator-text {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n font-size: 14px;\r\n color: #595959;\r\n width: 100%;\r\n justify-content: center;\r\n}\r\n\r\n.status-indicator-text.loading .loading-spinner-small {\r\n width: 16px;\r\n height: 16px;\r\n border: 2px solid rgba(0, 0, 0, 0.1);\r\n border-top-color: #595959;\r\n border-radius: 50%;\r\n animation: spin 0.8s linear infinite;\r\n}\r\n\r\n.status-indicator-text.error {\r\n color: #ff4d4f;\r\n}\r\n\r\n.status-indicator-text.ready {\r\n color: #16a34a;\r\n}\r\n\r\n@keyframes spin {\r\n from {\r\n transform: rotate(0deg);\r\n }\r\n to {\r\n transform: rotate(360deg);\r\n }\r\n}\r\n\r\n.loading-spinner-small {\r\n width: 20px;\r\n height: 20px;\r\n border: 2px solid #e5e7eb;\r\n border-top-color: #6b7280;\r\n border-radius: 50%;\r\n animation: spin 0.8s linear infinite;\r\n}\r\n\r\n/* 添加上传按钮样式 */\r\n.upload-button {\r\n background: transparent;\r\n border: none;\r\n cursor: pointer;\r\n padding: 8px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n color: #666;\r\n border-radius: 4px;\r\n transition: background-color 0.2s;\r\n}\r\n\r\n.upload-button:hover {\r\n background-color: rgba(0, 0, 0, 0.04);\r\n}\r\n\r\n.upload-button svg {\r\n width: 20px;\r\n height: 20px;\r\n}\r\n\r\n/* 隐藏原生文件输入框 */\r\n.file-input {\r\n display: none;\r\n}\r\n\r\n/* 添加文件名显示区域样式 */\r\n.selected-file {\r\n font-size: 12px;\r\n color: #666;\r\n margin-left: 8px;\r\n max-width: 150px;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n.input-wrapper {\r\n flex: 1;\r\n display: flex;\r\n align-items: center;\r\n border: 1px solid #ddd;\r\n border-radius: 4px;\r\n padding: 0 4px;\r\n background: white;\r\n}\r\n\r\n.input-wrapper input {\r\n border: none;\r\n flex: 1;\r\n padding: 8px;\r\n outline: none;\r\n}\r\n\r\n.input-wrapper:focus-within {\r\n border-color: #bbb;\r\n}\r\n\r\n/* 文件预览区域样式 */\r\n.file-preview {\r\n padding: 8px 16px;\r\n border-top: 1px solid #eee;\r\n background-color: #f9f9f9;\r\n}\r\n\r\n.recording-section {\r\n border-top: 1px solid #eee;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n padding: 10px 20px 0px 20px;\r\n border-radius: 14px 14px 0 0;\r\n flex: 0 0 auto;\r\n}\r\n\r\n.recording-section .video-preview {\r\n width: 100%;\r\n height: 200px;\r\n max-width: 400px;\r\n position: relative;\r\n margin-bottom: 10px;\r\n border: 1px solid #ddd;\r\n border-radius: 12px;\r\n overflow: hidden;\r\n}\r\n\r\n.recording-section video {\r\n width: 100%;\r\n height: 100%;\r\n object-fit: cover;\r\n}\r\n\r\n/* 修改 recording-status 样式 */\r\n.recording-status {\r\n position: absolute;\r\n top: 10px;\r\n left: 10px;\r\n background-color: rgba(0, 0, 0, 0.6);\r\n color: white;\r\n padding: 4px 8px;\r\n border-radius: 4px;\r\n display: flex;\r\n align-items: center;\r\n gap: 5px;\r\n font-size: 14px;\r\n z-index: 0;\r\n}\r\n\r\n.recording-status .recording-dot {\r\n display: inline-block;\r\n width: 10px;\r\n height: 10px;\r\n background-color: red;\r\n border-radius: 50%;\r\n margin-right: 5px;\r\n animation: blink 1s infinite;\r\n}\r\n\r\n.recording-status.warning {\r\n color: #ff4d4f;\r\n animation: blink 1s infinite;\r\n}\r\n\r\n@keyframes blink {\r\n 0% {\r\n opacity: 1;\r\n }\r\n\r\n 50% {\r\n opacity: 0.5;\r\n }\r\n\r\n 100% {\r\n opacity: 1;\r\n }\r\n}\r\n\r\n.recording-section .stop-recording-button {\r\n background-color: #f44336;\r\n color: white;\r\n border: none;\r\n cursor: pointer;\r\n font-weight: bold;\r\n}\r\n\r\n.recording-section .stop-recording-button:hover {\r\n background-color: #d32f2f;\r\n}\r\n\r\n.fullscreen {\r\n width: 100vw;\r\n border-radius: 0;\r\n height: 100vh;\r\n display: flex;\r\n flex-direction: column;\r\n overflow-y: auto;\r\n}\r\n\r\n.recording-controls {\r\n margin-top: 10px;\r\n height: 53px;\r\n width: 100%;\r\n max-width: 400px;\r\n display: flex;\r\n justify-content: center;\r\n}\r\n\r\n.recording-controls .waiting-message {\r\n text-align: center;\r\n color: white;\r\n font-size: 16px;\r\n background-color: #0d75fb;\r\n border-radius: 6px;\r\n width: 95%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n cursor: pointer;\r\n}\r\n\r\n.recording-controls .waiting-message.loading {\r\n background: #faad14;\r\n}\r\n\r\n.recording-controls .waiting-message p {\r\n margin: 0;\r\n font-size: 16px;\r\n color: white;\r\n font-weight: 500;\r\n}\r\n\r\n.recording-controls .stop-recording-button {\r\n background-color: #dc3545;\r\n color: white;\r\n border: none;\r\n cursor: pointer;\r\n font-size: 16px;\r\n}\r\n\r\n.recording-controls .stop-recording-button:hover {\r\n background-color: #c82333;\r\n}\r\n\r\n/* 添加禁用状态的样式 */\r\n.recording-controls .stop-recording-button.disabled {\r\n background: #ccc;\r\n cursor: not-allowed;\r\n}\r\n\r\n.recording-controls .stop-recording-button.disabled:hover {\r\n background: #ccc;\r\n}\r\n\r\n/* 添加进度条和数字进度的样式 */\r\n.progress-container {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n width: 100%;\r\n max-width: 400px;\r\n margin-top: 10px;\r\n padding: 0 5px;\r\n}\r\n\r\n.progress-bar-container {\r\n height: 4px;\r\n background-color: #e5e5e5;\r\n border-radius: 2px;\r\n overflow: hidden;\r\n margin-right: 10px;\r\n width: 75px;\r\n}\r\n\r\n.progress-bar {\r\n height: 100%;\r\n background-image: linear-gradient(111deg, #4a9fff 0%, #1058ff 100%);\r\n border-radius: 2px;\r\n transition: width 0.3s ease;\r\n}\r\n\r\n.progress-text {\r\n font-size: 14px;\r\n color: #666;\r\n white-space: nowrap;\r\n}\r\n\r\n/* 重新设计文本输入区域样式 */\r\n.text-input-area {\r\n display: flex;\r\n flex-direction: column;\r\n width: 100%;\r\n height: 100%;\r\n padding: 0px 16px 16px 16px;\r\n border-radius: 8px;\r\n border: none;\r\n /* 确保容器本身没有边框 */\r\n}\r\n\r\n/* 修改文本输入框样式 */\r\n.text-answer-input {\r\n flex: 1;\r\n min-height: 80px;\r\n padding: 12px 12px 0px 12px;\r\n border: 1px solid #ddd;\r\n border-radius: 8px 8px 0 0;\r\n resize: none;\r\n font-size: 16px;\r\n background-color: #fff;\r\n border-bottom: none;\r\n outline: none;\r\n /* 移除默认的焦点轮廓 */\r\n}\r\n\r\n/* 修改工具栏样式 */\r\n.input-toolbar {\r\n display: flex;\r\n justify-content: flex-end;\r\n align-items: center;\r\n padding: 8px 12px;\r\n background-color: #fff;\r\n border: 1px solid #ddd;\r\n border-top: none;\r\n border-radius: 0 0 8px 8px;\r\n}\r\n\r\n/* 当输入框获得焦点时,修改边框颜色 */\r\n.text-answer-input:focus {\r\n border-color: rgb(74, 144, 226);\r\n border-bottom: none;\r\n}\r\n\r\n.text-answer-input:focus + .input-toolbar {\r\n border-color: rgb(74, 144, 226);\r\n border-top: none;\r\n}\r\n\r\n/* 左侧工具按钮区域 */\r\n.toolbar-actions {\r\n width: 32px;\r\n height: 32px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n margin-right: 10px;\r\n border: 1px solid #d9d9d9;\r\n border-radius: 6px;\r\n}\r\n\r\n.toolbar-actions:hover {\r\n background-color: #f0f0f0;\r\n}\r\n\r\n/* 修改工具按钮样式,确保居中 */\r\n.toolbar-button {\r\n background: transparent;\r\n border: none;\r\n color: #666;\r\n cursor: pointer;\r\n padding: 0;\r\n margin: 0;\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n/* 确保按钮内部的内容也居中 */\r\n.toolbar-button > div,\r\n.toolbar-button > svg {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n/* 发送按钮样式 */\r\n.submit-text-button {\r\n padding: 6px 16px;\r\n background-color: #4a90e2;\r\n color: white;\r\n border: none;\r\n border-radius: 4px;\r\n font-size: 14px;\r\n font-weight: 500;\r\n cursor: pointer;\r\n transition: background-color 0.2s;\r\n}\r\n\r\n.submit-text-button:hover:not(.disabled) {\r\n background-color: #3a7bc8;\r\n}\r\n\r\n.submit-text-button.disabled {\r\n background-color: #b3b3b3;\r\n cursor: not-allowed;\r\n}\r\n\r\n/* 语音输入按钮样式 */\r\n.toolbar-button.recording {\r\n background-color: rgba(255, 0, 0, 0.1);\r\n color: #ff3b30;\r\n animation: pulse 1.5s infinite;\r\n}\r\n\r\n.toolbar-button.converting {\r\n background-color: rgba(0, 122, 255, 0.1);\r\n color: #007aff;\r\n}\r\n\r\n.toolbar-button .recording-time {\r\n font-size: 12px;\r\n margin-left: 4px;\r\n}\r\n\r\n.converting-indicator {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.converting-indicator svg {\r\n animation: spin 1.5s linear infinite;\r\n}\r\n\r\n@keyframes spin {\r\n 0% {\r\n transform: rotate(0deg);\r\n }\r\n\r\n 100% {\r\n transform: rotate(360deg);\r\n }\r\n}\r\n\r\n@keyframes pulse {\r\n 0% {\r\n box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4);\r\n }\r\n\r\n 70% {\r\n box-shadow: 0 0 0 6px rgba(255, 0, 0, 0);\r\n }\r\n\r\n 100% {\r\n box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);\r\n }\r\n}\r\n\r\n/* 响应式布局 */\r\n@media screen and (max-width: 768px) {\r\n .pc-layout {\r\n width: 95%;\r\n }\r\n\r\n .modal-overlay {\r\n padding: 0;\r\n }\r\n\r\n .modal-container.fullscreen {\r\n /* 移动端也基于父组件尺寸 */\r\n width: 100%;\r\n height: 100%;\r\n max-height: 100%;\r\n border-radius: 16px 16px 0 0;\r\n /* 保留安全区域支持 */\r\n padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);\r\n }\r\n}\r\n\r\n/* 工作区样式 */\r\n.workspace-section {\r\n width: 100%;\r\n padding: 0px 16px 16px;\r\n}\r\n\r\n.workspace-toolbar {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: end;\r\n gap: 12px;\r\n position: relative;\r\n}\r\n\r\n.workspace-button {\r\n display: flex;\r\n align-items: center;\r\n gap: 6px;\r\n padding: 8px 16px;\r\n border: 1px solid #d9d9d9;\r\n border-radius: 6px;\r\n background: white;\r\n color: #666;\r\n font-size: 14px;\r\n cursor: pointer;\r\n transition: all 0.2s ease;\r\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\r\n}\r\n\r\n.workspace-button:hover {\r\n border-color: #4096ff;\r\n color: #4096ff;\r\n box-shadow: 0 2px 4px rgba(64, 150, 255, 0.1);\r\n}\r\n\r\n.workspace-button svg {\r\n flex-shrink: 0;\r\n}\r\n\r\n/* 数字人容器样式 */\r\n.digital-human-wrapper {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 120px;\r\n height: 80px;\r\n border: 1px solid #d9d9d9;\r\n border-radius: 8px;\r\n background: #fafafa;\r\n overflow: hidden;\r\n position: absolute;\r\n right: 0px;\r\n}\r\n\r\n\r\n/* 历史会话抽屉样式 */\r\n.history-drawer-content {\r\n height: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n.conversation-list {\r\n flex: 1;\r\n overflow-y: auto;\r\n padding: 8px 0;\r\n}\r\n\r\n.loading-conversations,\r\n.empty-conversations {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 40px 20px;\r\n color: #999;\r\n}\r\n\r\n.loading-conversations .loading-spinner-small {\r\n margin-bottom: 12px;\r\n}\r\n\r\n.conversation-item {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n padding: 12px 16px;\r\n margin: 0 8px 4px 8px;\r\n border-radius: 8px;\r\n cursor: pointer;\r\n transition: all 0.2s ease;\r\n border: 1px solid transparent;\r\n}\r\n\r\n.conversation-item:hover {\r\n background: #f5f5f5;\r\n}\r\n\r\n.conversation-item.active {\r\n background: #e6f7ff;\r\n border-color: #1890ff;\r\n}\r\n\r\n.conversation-info {\r\n flex: 1;\r\n min-width: 0;\r\n}\r\n\r\n.conversation-title {\r\n font-size: 14px;\r\n font-weight: 500;\r\n color: #262626;\r\n margin-bottom: 4px;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n.conversation-meta {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n font-size: 12px;\r\n color: #8c8c8c;\r\n}\r\n\r\n.conversation-time {\r\n flex-shrink: 0;\r\n}\r\n\r\n.message-count {\r\n flex-shrink: 0;\r\n}\r\n\r\n.conversation-status {\r\n padding: 2px 6px;\r\n border-radius: 4px;\r\n font-size: 11px;\r\n font-weight: 500;\r\n}\r\n\r\n.conversation-status.completed {\r\n background: #f6ffed;\r\n color: #52c41a;\r\n}\r\n\r\n.conversation-status.running {\r\n background: #fff7e6;\r\n color: #fa8c16;\r\n}\r\n\r\n.current-indicator {\r\n flex-shrink: 0;\r\n color: #1890ff;\r\n margin-left: 8px;\r\n}\r\n\r\n/* AI消息显示样式 */\r\n.ai-message-item {\r\n margin-bottom: 0;\r\n animation: messageSlideIn 0.3s ease-out;\r\n width: 100%;\r\n padding: 30px;\r\n}\r\n\r\n.ai-message-item.streaming {\r\n position: relative;\r\n}\r\n\r\n@keyframes messageSlideIn {\r\n from {\r\n opacity: 0;\r\n transform: translateY(10px);\r\n }\r\n to {\r\n opacity: 1;\r\n transform: translateY(0);\r\n }\r\n}\r\n\r\n.ai-message-content {\r\n color: #fff;\r\n padding: 30px 36px;\r\n border-radius: 24px;\r\n font-family: \"Microsoft YaHei\", \"PingFang SC\", sans-serif;\r\n font-size: 24px;\r\n font-weight: 500;\r\n line-height: 1.6;\r\n word-wrap: break-word;\r\n backdrop-filter: blur(100px);\r\n border: 1px solid rgba(255, 255, 255, 0.2);\r\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);\r\n margin-bottom: 12px;\r\n max-width: 100%;\r\n text-align: left;\r\n}\r\n\r\n/* 打字指示器 */\r\n.typing-indicator {\r\n display: flex;\r\n align-items: center;\r\n gap: 6px;\r\n padding: 12px 36px;\r\n margin-top: -12px;\r\n}\r\n\r\n.typing-indicator span {\r\n width: 12px;\r\n height: 12px;\r\n border-radius: 50%;\r\n background: #4facfe;\r\n animation: typingPulse 1.4s ease-in-out infinite;\r\n opacity: 0.6;\r\n}\r\n\r\n.typing-indicator span:nth-child(1) { animation-delay: 0s; }\r\n.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }\r\n.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }\r\n\r\n@keyframes typingPulse {\r\n 0%, 60%, 100% {\r\n transform: scale(1);\r\n opacity: 0.4;\r\n }\r\n 30% {\r\n transform: scale(1.3);\r\n opacity: 1;\r\n }\r\n}\r\n\r\n/* 字幕区域响应式适配 */\r\n@media screen and (max-width: 768px) {\r\n .ai-message-item {\r\n padding: 22.5px;\r\n }\r\n\r\n .ai-message-content {\r\n padding: 24px 30px;\r\n font-size: 22.5px;\r\n }\r\n\r\n .typing-indicator {\r\n padding: 9px 30px;\r\n }\r\n}\r\n\r\n@media screen and (max-width: 480px) {\r\n .ai-message-item {\r\n padding: 0;\r\n }\r\n\r\n .ai-message-content {\r\n padding: 21px 27px;\r\n font-size: 21px;\r\n line-height: 1.5;\r\n }\r\n\r\n .typing-indicator {\r\n padding: 7.5px 27px;\r\n }\r\n\r\n .typing-indicator span {\r\n width: 9px;\r\n height: 9px;\r\n }\r\n}\r\n\r\n\r\n.waveform-bar {\r\n width: 3px;\r\n background: #4facfe;\r\n border-radius: 2px;\r\n min-height: 2px;\r\n animation: waveformAnimation 1.2s ease-in-out infinite alternate;\r\n transform-origin: bottom;\r\n}\r\n\r\n@keyframes waveformAnimation {\r\n 0% { transform: scaleY(0.2); }\r\n 100% { transform: scaleY(1); }\r\n}\r\n\r\n.recording-timer {\r\n font-size: 14px;\r\n color: #666;\r\n white-space: nowrap;\r\n}\r\n\r\n.close-button{\r\n position: absolute;\r\n top: 16px;\r\n left: 16px;\r\n z-index: 20;\r\n background: rgba(255, 255, 255, 0.9);\r\n backdrop-filter: blur(4px);\r\n border: 1px solid rgba(0, 0, 0, 0.1);\r\n border-radius: 8px;\r\n width: 40px;\r\n height: 40px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n cursor: pointer;\r\n transition: all 0.2s ease;\r\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\r\n}\r\n\r\n.close-button:hover {\r\n background: rgba(255, 255, 255, 1);\r\n border-color: rgba(0, 0, 0, 0.15);\r\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\r\n transform: translateY(-1px);\r\n}\r\n\r\n.close-button:active {\r\n transform: translateY(0);\r\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);\r\n}\r\n\r\n.close-button svg {\r\n color: #666;\r\n transition: color 0.2s ease;\r\n}\r\n\r\n.close-button:hover svg {\r\n color: #333;\r\n}\r\n\r\n/* 结束面试按钮容器 */\r\n.end-interview-button-container {\r\n display: flex;\r\n align-items: center;\r\n justify-content: flex-start;\r\n width: 100%;\r\n max-width: 400px;\r\n margin-bottom: 4px;\r\n padding-left: 0;\r\n}\r\n\r\n/* 结束面试按钮 */\r\n.end-interview-button {\r\n padding: 5px 10px;\r\n background-color: #ff4d4f;\r\n color: white;\r\n border: none;\r\n border-radius: 20px;\r\n font-size: 14px;\r\n font-weight: 500;\r\n cursor: pointer;\r\n transition: all 0.3s ease;\r\n box-shadow: 0 2px 8px rgba(255, 77, 79, 0.3);\r\n white-space: nowrap;\r\n}\r\n\r\n.end-interview-button:hover {\r\n background-color: #ff7875;\r\n box-shadow: 0 4px 12px rgba(255, 77, 79, 0.4);\r\n transform: translateY(-1px);\r\n}\r\n\r\n.end-interview-button:active {\r\n transform: translateY(0);\r\n box-shadow: 0 2px 8px rgba(255, 77, 79, 0.3);\r\n}\r\n\r\n.end-interview-button:disabled {\r\n background-color: #f0f0f0;\r\n color: #bfbfbf;\r\n cursor: not-allowed;\r\n box-shadow: none;\r\n transform: none;\r\n}\r\n\r\n\r\n",":host {\r\n /* 字体相关属性 */\r\n font-size: 16px;\r\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\r\n font-weight: normal;\r\n font-style: normal;\r\n font-variant: normal;\r\n line-height: 1.5;\r\n letter-spacing: normal;\r\n word-spacing: normal;\r\n \r\n /* 文本相关属性 */\r\n color: #333; /* 重置文字颜色,避免继承外部的red */\r\n text-align: left;\r\n text-indent: 0;\r\n text-transform: none;\r\n white-space: normal;\r\n word-wrap: normal;\r\n word-break: normal;\r\n \r\n /* 可见性 */\r\n visibility: visible;\r\n \r\n /* 列表相关 */\r\n list-style: none;\r\n list-style-image: none;\r\n list-style-position: outside;\r\n list-style-type: disc;\r\n \r\n /* 表格相关 */\r\n border-collapse: separate;\r\n border-spacing: 0;\r\n caption-side: top;\r\n empty-cells: show;\r\n table-layout: auto;\r\n \r\n /* 引用 */\r\n quotes: auto;\r\n \r\n /* 光标 */\r\n cursor: auto;\r\n \r\n /* 文本方向 */\r\n direction: ltr;\r\n \r\n /* 打印相关 */\r\n orphans: 2;\r\n widows: 2;\r\n page-break-inside: auto;\r\n \r\n /* 其他可能被继承的属性 */\r\n text-decoration: none;\r\n text-shadow: none;\r\n \r\n /* 确保组件有独立的盒模型 */\r\n box-sizing: border-box;\r\n \r\n /* 重置一些可能影响布局的继承属性 */\r\n writing-mode: horizontal-tb;\r\n text-orientation: mixed;\r\n}"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h } from './p-CR7WLzmM.js';
|
|
2
|
-
import { s as sendHttpRequest, P as PCM_DOMAIN } from './p-
|
|
2
|
+
import { s as sendHttpRequest, P as PCM_DOMAIN } from './p-DBGeSJL5.js';
|
|
3
3
|
import { M as Message } from './p-D39f_W8k.js';
|
|
4
4
|
import { q as qrcode } from './p-D483moFs.js';
|
|
5
5
|
|
|
@@ -289,6 +289,6 @@ function defineCustomElement() {
|
|
|
289
289
|
defineCustomElement();
|
|
290
290
|
|
|
291
291
|
export { ComponentsMobileUploadBtn as C, defineCustomElement as d };
|
|
292
|
-
//# sourceMappingURL=p-
|
|
292
|
+
//# sourceMappingURL=p-C4wDoFmj.js.map
|
|
293
293
|
|
|
294
|
-
//# sourceMappingURL=p-
|
|
294
|
+
//# sourceMappingURL=p-C4wDoFmj.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-DJDJfWq9.js","mappings":";;;;;AAEA;AACA,MAAM,eAAe,GAAG;AACpB,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,gBAAgB,MAGtB,EAAA;QACG,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,EAAE;AACtC,QAAA,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI;QACvB,IAAI,MAAM,EAAE;AACR,YAAA,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC;gBACjC,GAAG,EAAE,CAAuB,oBAAA,EAAA,MAAM,CAAE,CAAA;AACpC,gBAAA,MAAM,EAAE,QAAQ;AACnB,aAAA,CAAC;AACF,YAAA,IAAI,MAAM,CAAC,OAAO,EAAE;AAChB,gBAAA,IAAI,CAAC,MAAM,GAAG,EAAE;gBAChB,IAAI,IAAI;;iBACL;gBACH,OAAO,IAAI;;;;CAI1B;;ACzBD,MAAM,4BAA4B,GAAG,yhEAAyhE;;ACA9jE,MAAM,SAAS,GAAG,0sSAA0sS;;ACA5tS,MAAM,OAAO,GAAG,2wBAA2wB;;MCW9wB,yBAAyB,iBAAAA,kBAAA,CAAA,MAAA,yBAAA,SAAAC,CAAA,CAAA;;;;;;;AAClC;;AAEG;IACK,QAAQ,GAAY,KAAK;AACjC;;AAEG;IACK,oBAAoB,GAAa,EAAE;AAC3C;;AAEG;IACK,YAAY,GAAW,QAAQ;AACvC;;AAEG;IACK,WAAW,GAAW,QAAQ;AACtC;;AAEG;AACK,IAAA,aAAa;AACrB;;AAEG;AACK,IAAA,YAA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C;AACxB,gBAAA,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC;aACjC,mBAAU,CACT,CACJ,CACJ,CAER;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/components-mobile-upload-btn/uploadNumberSDK.ts","src/components/components-mobile-upload-btn/components-mobile-upload-btn.css?tag=components-mobile-upload-btn&encapsulation=shadow","src/global/global.css?tag=components-mobile-upload-btn&encapsulation=shadow","src/global/host.css?tag=components-mobile-upload-btn&encapsulation=shadow","src/components/components-mobile-upload-btn/components-mobile-upload-btn.tsx"],"sourcesContent":["import { sendHttpRequest } from \"../../utils/utils\";\r\n\r\n// 文件上传流水号SDK\r\nconst uploadNumberSDK = {\r\n number: '',\r\n isWorking: false,\r\n close: async function (params?: {\r\n onOk?: () => void;\r\n onError?: () => void;\r\n }) {\r\n const { onOk, onError } = params ?? {};\r\n const { number } = this;\r\n if (number) {\r\n const result = await sendHttpRequest({\r\n url: `/resource/update_id/${number}`,\r\n method: 'delete',\r\n });\r\n if (result.success) {\r\n this.number = '';\r\n onOk?.();\r\n } else {\r\n onError?.();\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport default uploadNumberSDK;",".upload-area {\r\n max-height: 300px;\r\n overflow-y: auto;\r\n}\r\n\r\n.upload-actions {\r\n display: flex;\r\n gap: 12px;\r\n margin-top: 12px;\r\n width: 100%;\r\n}\r\n\r\n.upload-placeholder {\r\n width: 100%;\r\n cursor: pointer;\r\n}\r\n\r\n.upload-placeholder img {\r\n display: block;\r\n margin: 0 auto;\r\n}\r\n\r\n.upload-placeholder p {\r\n text-align: center;\r\n}\r\n\r\n.upload-text {\r\n margin: 8px 0;\r\n}\r\n\r\n.upload-hint {\r\n font-size: 12px;\r\n color: #999999;\r\n}\r\n\r\n.file-item {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n padding: 8px 0;\r\n}\r\n\r\n.file-item-content {\r\n display: flex;\r\n align-items: center;\r\n min-width: 0;\r\n}\r\n\r\n.file-name {\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n.remove-file {\r\n border: 0;\r\n background: transparent;\r\n cursor: pointer;\r\n font-size: 18px;\r\n}\r\n\r\n.mobile-upload {\r\n display: flex;\r\n justify-content: flex-end;\r\n margin-bottom: 4px;\r\n}\r\n\r\n.btn {\r\n position: relative;\r\n padding: 4px 8px;\r\n border-radius: 4px;\r\n cursor: pointer;\r\n overflow: hidden;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n white-space: nowrap;\r\n}\r\n\r\n.btn::after {\r\n content: '';\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n}\r\n\r\n.btn:hover::after {\r\n background-color: rgba(0,0,0,0.04);\r\n}\r\n\r\n.btn-link {\r\n color: #0D75FB;\r\n}\r\n\r\n.btn-default {\r\n background-color: #ffffff;\r\n color: #0D75FB;\r\n border: 1px solid #0D75FB;\r\n}\r\n\r\n.btn-primary {\r\n background-color: #0D75FB;\r\n color: #ffffff;\r\n}\r\n\r\n\r\n.loading {\r\n font-size: 12px;\r\n color: #999999;\r\n}\r\n\r\n.mask {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n background-color: rgba(0,0,0,0.5);\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n z-index: 10000;\r\n}\r\n\r\n.mask .upload-wrapper {\r\n width: 540px;\r\n max-width: 80%;\r\n max-height: 80%;\r\n background-color: #ffffff;\r\n padding: 32px 24px;\r\n border-radius: 16px;\r\n overflow-y: auto;\r\n}\r\n\r\n.mask .upload-wrapper .upload-box {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n}\r\n\r\n.time-expire {\r\n margin: 8px 0;\r\n text-align: center;\r\n font-size: 12px;\r\n color: #555555;\r\n}\r\n\r\n.time-count-down {\r\n margin-left: 8px;\r\n color: #0D75FB;\r\n}\r\n\r\n.alert-tip {\r\n margin-top: 8px;\r\n text-align: center;\r\n font-size: 12px;\r\n color: #999999;\r\n}\r\n\r\n.qrcode-wrapper {\r\n width: 160px;\r\n height: 160px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n border: 1px solid #e5e5e5;\r\n border-radius: 4px;\r\n padding: 1px;\r\n}\r\n\r\n.qrcode-wrapper .qrcode {\r\n width: 100%;\r\n height: 100%;\r\n}\r\n\r\n.modal-footer {\r\n margin-top: 32px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 8px;\r\n}\r\n\r\n.modal-footer .btn {\r\n min-width: 100px;\r\n}","/* 模态框基础样式 */\r\n.modal-overlay {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n display: flex;\r\n z-index: 1000;\r\n overflow-y: auto;\r\n}\r\n\r\n/* 全屏模式下的overlay样式 - 改为基于父组件 */\r\n.fullscreen-overlay {\r\n padding: 0;\r\n background-color: rgba(0, 0, 0, 0.7);\r\n /* 改为基于父组件的全屏 */\r\n position: absolute;\r\n width: 100%;\r\n height: auto;\r\n}\r\n\r\n.modal-container {\r\n background-color: #fff;\r\n border-radius: 8px;\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n position: relative;\r\n margin: 5vh auto auto auto;\r\n transition: all 0.3s ease-out;\r\n overflow: hidden;\r\n}\r\n\r\n/* 全屏模式样式 - 改为基于父组件 */\r\n.modal-container.fullscreen {\r\n width: 100%;\r\n max-width: none;\r\n height: 100%;\r\n border-radius: 0;\r\n margin: 0;\r\n display: flex;\r\n flex-direction: column;\r\n max-height: 100%;\r\n}\r\n\r\n/* PC端布局 */\r\n.pc-layout {\r\n width: 80%;\r\n max-width: 600px;\r\n min-width: 320px;\r\n}\r\n\r\n/* 响应式布局 */\r\n@media screen and (max-width: 768px) {\r\n .pc-layout {\r\n width: 95%;\r\n }\r\n\r\n .modal-overlay {\r\n padding: 10px 0px 0px 0px;\r\n }\r\n\r\n .modal-container.fullscreen {\r\n /* 移动端也基于父组件尺寸 */\r\n width: 100%;\r\n height: 100%;\r\n max-height: 100%;\r\n border-radius: 16px 16px 0 0;\r\n /* 保留安全区域支持 */\r\n padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);\r\n }\r\n}\r\n\r\n/* 模态框头部样式 */\r\n.modal-header {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n padding: 4px 16px;\r\n height: 50px;\r\n border-bottom: 1px solid #e8e8e8;\r\n flex-shrink: 0;\r\n}\r\n\r\n.header-left {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n font-size: 16px;\r\n font-weight: 600;\r\n color: #333;\r\n}\r\n\r\n.header-icon {\r\n width: 24px;\r\n height: 24px;\r\n}\r\n\r\n.close-button {\r\n background: transparent;\r\n border: none;\r\n cursor: pointer;\r\n padding: 8px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 32px;\r\n height: 32px;\r\n border-radius: 4px;\r\n}\r\n\r\n.close-button:hover {\r\n background-color: rgba(0, 0, 0, 0.04);\r\n}\r\n\r\n.close-button span {\r\n font-size: 24px;\r\n line-height: 1;\r\n color: #999;\r\n}\r\n\r\n.close-button:hover span {\r\n color: #666;\r\n}\r\n\r\n\r\n/* 文件上传区域通用样式 */\r\n.upload-area {\r\n cursor: pointer;\r\n width: 100%;\r\n}\r\n\r\n\r\n.upload-placeholder {\r\n transition: all 0.3s ease;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n background: rgba(0, 0, 0, 0.02);\r\n border: 1px dashed #d9d9d9;\r\n border-radius: 8px;\r\n cursor: pointer;\r\n}\r\n\r\n.upload-placeholder:hover {\r\n border: 1px dashed #1890ff;\r\n}\r\n\r\n.upload-placeholder img {\r\n margin-top: 8px;\r\n width: 50px;\r\n height: 50px;\r\n}\r\n\r\n.upload-placeholder .upload-text {\r\n margin: 4px 0;\r\n color: #332F39;\r\n font-size: 14px;\r\n}\r\n\r\n.upload-placeholder .upload-hint {\r\n font-size: 14px;\r\n color: #949AA5;\r\n margin-top: 8px;\r\n padding: 0px 10px;\r\n text-align: center;\r\n white-space: normal;\r\n word-wrap: break-word;\r\n word-break: break-all;\r\n line-height: 1.4;\r\n}\r\n\r\n\r\n/* 文件项样式 */\r\n.file-item {\r\n position: relative;\r\n padding: 16px;\r\n border: 1px solid #e2e8f0;\r\n border-radius: 8px;\r\n transition: border-color 0.3s;\r\n cursor: pointer;\r\n margin-bottom: 16px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n\r\n.file-item:hover {\r\n border-color: #0D75FB;\r\n}\r\n\r\n.file-item-content {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n flex: 1;\r\n min-width: 0;\r\n overflow: hidden;\r\n}\r\n\r\n.file-icon {\r\n color: #0D75FB;\r\n flex-shrink: 0;\r\n}\r\n\r\n.file-name {\r\n font-weight: 500;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n max-width: calc(100% - 50px);\r\n}\r\n\r\n.remove-file {\r\n background: transparent;\r\n border: none;\r\n color: #94a3b8;\r\n cursor: pointer;\r\n font-size: 18px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 4px;\r\n margin-left: 8px;\r\n border-radius: 4px;\r\n transition: all 0.2s;\r\n min-width: 30px;\r\n min-height: 30px;\r\n}\r\n\r\n.remove-file:hover {\r\n background-color: #f1f5f9;\r\n color: #475569;\r\n}\r\n\r\n.file-input {\r\n display: none;\r\n}\r\n\r\n\r\n\r\n/* 输入容器样式 */\r\n.input-container {\r\n padding: 20px;\r\n display: flex;\r\n flex-direction: column;\r\n height: calc(100% - 50px);\r\n background: linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;\r\n /* 减去header高度 */\r\n overflow-y: auto;\r\n}\r\n\r\n.input-container h3 {\r\n margin-top: 0;\r\n margin-bottom: 20px;\r\n font-size: 18px;\r\n color: #333;\r\n text-align: center;\r\n}\r\n\r\n/* JD输入区域样式 */\r\n.jd-input-section {\r\n margin-bottom: 20px;\r\n}\r\n\r\n.jd-input-section label {\r\n display: block;\r\n margin-bottom: 8px;\r\n font-weight: 500;\r\n color: #333;\r\n}\r\n\r\n.job-description-textarea {\r\n width: calc(100% - 16px);\r\n border: 1px solid #ddd;\r\n border-radius: 4px;\r\n resize: vertical;\r\n font-family: inherit;\r\n font-size: 14px;\r\n line-height: 1.5;\r\n transition: border-color 0.3s;\r\n padding: 8px;\r\n}\r\n\r\n.job-description-textarea:focus {\r\n outline: none;\r\n border-color: #1890ff;\r\n box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);\r\n}\r\n\r\n/* 简历上传区域样式 */\r\n.resume-upload-section {\r\n margin-bottom: 20px;\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n.resume-upload-section label {\r\n display: block;\r\n margin-bottom: 8px;\r\n font-weight: 500;\r\n color: #333;\r\n}\r\n\r\n/* 面试设置区域 */\r\n.interview-settings-section {\r\n margin-bottom: 24px;\r\n padding: 20px;\r\n background-color: #f8f9fa;\r\n border-radius: 8px;\r\n border: 1px solid #e9ecef;\r\n}\r\n\r\n.settings-row {\r\n margin-bottom: 20px;\r\n}\r\n\r\n.settings-row:last-child {\r\n margin-bottom: 0;\r\n}\r\n\r\n.settings-label {\r\n display: block;\r\n font-weight: 500;\r\n color: #333;\r\n margin-bottom: 12px;\r\n font-size: 14px;\r\n}\r\n\r\n/* 题目数量滑块样式 */\r\n.question-number-section {\r\n width: 100%;\r\n}\r\n\r\n.slider-container {\r\n display: flex;\r\n align-items: center;\r\n gap: 12px;\r\n}\r\n\r\n.question-slider {\r\n flex: 1;\r\n height: 6px;\r\n background: #ddd;\r\n outline: none;\r\n border-radius: 3px;\r\n -webkit-appearance: none;\r\n appearance: none;\r\n}\r\n\r\n.question-slider::-webkit-slider-thumb {\r\n -webkit-appearance: none;\r\n appearance: none;\r\n width: 20px;\r\n height: 20px;\r\n background: #0D75FB;\r\n cursor: pointer;\r\n border-radius: 50%;\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\n.question-slider::-moz-range-thumb {\r\n width: 20px;\r\n height: 20px;\r\n background: #0D75FB;\r\n cursor: pointer;\r\n border-radius: 50%;\r\n border: none;\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\n.slider-value {\r\n font-weight: 600;\r\n color: #0D75FB;\r\n font-size: 14px;\r\n min-width: 30px;\r\n text-align: center;\r\n}\r\n\r\n/* 开关样式 */\r\n.analysis-toggle-section {\r\n width: 100%;\r\n}\r\n\r\n.toggle-container {\r\n display: flex;\r\n align-items: center;\r\n gap: 12px;\r\n}\r\n\r\n.toggle-switch {\r\n position: relative;\r\n display: inline-block;\r\n width: 44px;\r\n height: 24px;\r\n}\r\n\r\n.toggle-switch input {\r\n opacity: 0;\r\n width: 0;\r\n height: 0;\r\n}\r\n\r\n.toggle-slider {\r\n position: absolute;\r\n cursor: pointer;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: #ccc;\r\n transition: 0.3s;\r\n border-radius: 24px;\r\n}\r\n\r\n.toggle-slider:before {\r\n position: absolute;\r\n content: \"\";\r\n height: 18px;\r\n width: 18px;\r\n left: 3px;\r\n bottom: 3px;\r\n background-color: white;\r\n transition: 0.3s;\r\n border-radius: 50%;\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\ninput:checked + .toggle-slider {\r\n background-color: #0D75FB;\r\n}\r\n\r\ninput:checked + .toggle-slider:before {\r\n transform: translateX(20px);\r\n}\r\n\r\n.toggle-text {\r\n font-size: 14px;\r\n color: #666;\r\n font-weight: 500;\r\n}\r\n\r\n/* 提交按钮通用样式 */\r\n.submit-button {\r\n margin-top: 10px;\r\n padding: 10px 30px;\r\n background: #0D75FB;\r\n color: white;\r\n border: none;\r\n border-radius: 4px;\r\n font-size: 16px;\r\n cursor: pointer;\r\n transition: all 0.3s ease;\r\n width: 100%;\r\n max-width: 400px;\r\n align-self: center;\r\n}\r\n\r\n.submit-button:hover {\r\n background-color: #40a9ff;\r\n}\r\n\r\n.submit-button:disabled {\r\n background-color: rgba(0,0,0,0.04);\r\n color: rgba(0,0,0,0.25);\r\n cursor: not-allowed;\r\n}\r\n\r\n\r\n\r\n/* AI免责声明和备案信息样式 */\r\n.ai-disclaimer {\r\n margin-top: 16px;\r\n text-align: center;\r\n font-size: 12px;\r\n color: #999;\r\n line-height: 1.5;\r\n}\r\n\r\n.ai-disclaimer p {\r\n margin: 4px 0;\r\n}\r\n\r\n.beian-info {\r\n display: flex;\r\n justify-content: center;\r\n flex-wrap: wrap;\r\n gap: 4px;\r\n}\r\n\r\n.ai-disclaimer a {\r\n color: #666;\r\n text-decoration: none;\r\n transition: color 0.2s ease;\r\n}\r\n\r\n.ai-disclaimer a:hover {\r\n color: #1890ff;\r\n text-decoration: underline;\r\n}\r\n\r\n/* 添加加载状态的样式 */\r\n.loading-container {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n height: 100%;\r\n padding: 24px;\r\n }\r\n \r\n .loading-spinner {\r\n width: 40px;\r\n height: 40px;\r\n border: 4px solid rgba(0, 0, 0, 0.1);\r\n border-radius: 50%;\r\n border-top-color: var(--pcm-primary-color, #1890ff);\r\n animation: spin 1s linear infinite;\r\n margin-bottom: 16px;\r\n }\r\n \r\n .loading-text {\r\n font-size: 16px;\r\n color: var(--pcm-text-color, #333);\r\n }\r\n \r\n @keyframes spin {\r\n 0% { transform: rotate(0deg); }\r\n 100% { transform: rotate(360deg); }\r\n }\r\n\r\n/* 历史会话按钮 */\r\n.header-history-button {\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 4px;\r\n padding: 4px 8px;\r\n border: none;\r\n border-radius: 4px;\r\n background: transparent;\r\n color: #bbb;\r\n cursor: pointer;\r\n font-size: 13px;\r\n font-family: inherit;\r\n line-height: 1;\r\n transition: all 0.2s ease;\r\n flex-shrink: 0;\r\n white-space: nowrap;\r\n}\r\n\r\n.header-history-button svg {\r\n width: 16px;\r\n height: 16px;\r\n display: block;\r\n flex-shrink: 0;\r\n}\r\n\r\n.header-history-button:hover {\r\n background-color: rgba(0, 0, 0, 0.04);\r\n color: #666;\r\n}\r\n\r\n.header-history-button:focus-visible {\r\n outline: 2px solid rgba(13, 117, 251, 0.35);\r\n outline-offset: 2px;\r\n}\r\n\r\n/* 历史会话抽屉内容 */\r\n.history-drawer-content {\r\n height: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n.conversation-list {\r\n flex: 1;\r\n overflow-y: auto;\r\n padding: 8px 0;\r\n}\r\n\r\n.loading-conversations,\r\n.empty-conversations {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 40px 20px;\r\n color: #999;\r\n}\r\n\r\n.loading-conversations .loading-spinner-small {\r\n margin-bottom: 12px;\r\n}\r\n\r\n.conversation-item {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n padding: 12px 16px;\r\n margin: 0 8px 4px 8px;\r\n border-radius: 8px;\r\n cursor: pointer;\r\n transition: all 0.2s ease;\r\n border: 1px solid transparent;\r\n}\r\n\r\n.conversation-item:hover {\r\n background: #f5f5f5;\r\n}\r\n\r\n.conversation-info {\r\n flex: 1;\r\n min-width: 0;\r\n}\r\n\r\n.conversation-title {\r\n font-size: 14px;\r\n font-weight: 500;\r\n color: #262626;\r\n margin-bottom: 4px;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n.conversation-meta {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n font-size: 12px;\r\n color: #8c8c8c;\r\n}\r\n\r\n.conversation-time {\r\n flex-shrink: 0;\r\n}\r\n\r\n.message-count {\r\n flex-shrink: 0;\r\n}\r\n\r\n.conversation-status {\r\n padding: 2px 6px;\r\n border-radius: 4px;\r\n font-size: 11px;\r\n font-weight: 500;\r\n}\r\n\r\n.conversation-status.completed {\r\n background: #f6ffed;\r\n color: #52c41a;\r\n}\r\n\r\n.conversation-status.running {\r\n background: #fff7e6;\r\n color: #fa8c16;\r\n}\r\n\r\n.header-history-entry {\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n margin-left: 8px;\r\n padding: 4px 8px;\r\n border: none;\r\n border-radius: 4px;\r\n background: #e6f7ff;\r\n color: #1890ff;\r\n cursor: pointer;\r\n font-size: 12px;\r\n font-family: inherit;\r\n line-height: 1;\r\n white-space: nowrap;\r\n transition: all 0.2s ease;\r\n}\r\n\r\n.header-history-entry:hover {\r\n background: #bae7ff;\r\n color: #0958d9;\r\n transform: translateY(-1px);\r\n}\r\n\r\n.header-history-entry:focus-visible {\r\n outline: 2px solid rgba(13, 117, 251, 0.35);\r\n outline-offset: 2px;\r\n}\r\n\r\n.history-pagination {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n gap: 12px;\r\n padding: 12px 16px 16px;\r\n border-top: 1px solid #f0f0f0;\r\n}\r\n\r\n.history-pagination-button {\r\n min-width: 72px;\r\n padding: 6px 12px;\r\n border: 1px solid #d9d9d9;\r\n border-radius: 6px;\r\n background: #fff;\r\n color: #595959;\r\n cursor: pointer;\r\n font-size: 12px;\r\n transition: all 0.2s ease;\r\n}\r\n\r\n.history-pagination-button:hover:not(:disabled) {\r\n border-color: #1890ff;\r\n color: #1890ff;\r\n background: #e6f7ff;\r\n}\r\n\r\n.history-pagination-button:disabled {\r\n border-color: #f0f0f0;\r\n color: #bfbfbf;\r\n background: #fafafa;\r\n cursor: not-allowed;\r\n}\r\n\r\n.history-pagination-info {\r\n flex: 1;\r\n text-align: center;\r\n color: #8c8c8c;\r\n font-size: 12px;\r\n}\r\n \r\n",":host {\r\n /* 字体相关属性 */\r\n font-size: 16px;\r\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\r\n font-weight: normal;\r\n font-style: normal;\r\n font-variant: normal;\r\n line-height: 1.5;\r\n letter-spacing: normal;\r\n word-spacing: normal;\r\n \r\n /* 文本相关属性 */\r\n color: #333; /* 重置文字颜色,避免继承外部的red */\r\n text-align: left;\r\n text-indent: 0;\r\n text-transform: none;\r\n white-space: normal;\r\n word-wrap: normal;\r\n word-break: normal;\r\n \r\n /* 可见性 */\r\n visibility: visible;\r\n \r\n /* 列表相关 */\r\n list-style: none;\r\n list-style-image: none;\r\n list-style-position: outside;\r\n list-style-type: disc;\r\n \r\n /* 表格相关 */\r\n border-collapse: separate;\r\n border-spacing: 0;\r\n caption-side: top;\r\n empty-cells: show;\r\n table-layout: auto;\r\n \r\n /* 引用 */\r\n quotes: auto;\r\n \r\n /* 光标 */\r\n cursor: auto;\r\n \r\n /* 文本方向 */\r\n direction: ltr;\r\n \r\n /* 打印相关 */\r\n orphans: 2;\r\n widows: 2;\r\n page-break-inside: auto;\r\n \r\n /* 其他可能被继承的属性 */\r\n text-decoration: none;\r\n text-shadow: none;\r\n \r\n /* 确保组件有独立的盒模型 */\r\n box-sizing: border-box;\r\n \r\n /* 重置一些可能影响布局的继承属性 */\r\n writing-mode: horizontal-tb;\r\n text-orientation: mixed;\r\n}","import { Component, Prop, State, Event, h, EventEmitter, Method } from \"@stencil/core\";\r\nimport { FileUploadResponse, sendHttpRequest, PCM_DOMAIN } from \"../../utils/utils\";\r\nimport uploadNumberSDK from \"./uploadNumberSDK\";\r\nimport { Message } from \"../../services/message.service\";\r\nimport qrcode from 'qrcode-generator'\r\n\r\n@Component({\r\n tag: 'components-mobile-upload-btn',\r\n styleUrls: ['components-mobile-upload-btn.css', '../../global/global.css', '../../global/host.css'],\r\n shadow: true,\r\n})\r\nexport class ComponentsMobileUploadBtn {\r\n /**\r\n * 是否支持多文件上传\r\n */\r\n @Prop() multiple: boolean = false;\r\n /**\r\n * 支持的文件后缀列表(需要带上小数点.)\r\n */\r\n @Prop() acceptFileSuffixList: string[] = [];\r\n /**\r\n * 最大文件数\r\n */\r\n @Prop() maxFileCount: number = Infinity;\r\n /**\r\n * 最大文件大小\r\n */\r\n @Prop() maxFileSize: number = Infinity;\r\n /**\r\n * 上传请求头\r\n */\r\n @Prop() uploadHeaders?: Record<string, unknown>;\r\n /**\r\n * 上传请求参数\r\n */\r\n @Prop() uploadParams?: Record<string, unknown>;\r\n /**\r\n * 是否使用上传区域样式\r\n */\r\n @Prop() uploadAreaMode: boolean = false;\r\n /**\r\n * 是否禁用上传\r\n */\r\n @Prop() disabled: boolean = false;\r\n /**\r\n * 默认文件列表\r\n */\r\n @Prop() defaultFileList: FileUploadResponse[] = [];\r\n /**\r\n * 上传区域提示文本\r\n */\r\n @Prop() uploadText: string = '点击上传简历';\r\n @State() QR_CODE_VALID_TIME: number = 0;\r\n @State() open: boolean = false;\r\n @State() mobileUrl: string = '';\r\n @State() setStartMobileUpload: boolean = false;\r\n @State() startMobileUploadLoading: boolean = false;\r\n @State() qrcodeStatus: 'active' | 'expired' | 'loading' | undefined = 'loading';\r\n @State() value: FileUploadResponse[] = [];\r\n @State() mobileUploadFiles: FileUploadResponse[] = [];\r\n @State() expireTime: string = ''; // 过期时间\r\n\r\n @Event() ok: EventEmitter<FileUploadResponse[]>;\r\n\r\n componentWillLoad(): void {\r\n this.value = [...this.defaultFileList];\r\n }\r\n\r\n @Method()\r\n async getIsUploading(): Promise<boolean> {\r\n return this.startMobileUploadLoading;\r\n }\r\n\r\n @Method()\r\n async clearSelectedFiles(): Promise<void> {\r\n this.value = [];\r\n }\r\n\r\n private setStartMobileUploadWrapper = (e: boolean) => {\r\n uploadNumberSDK.isWorking = e;\r\n this.setStartMobileUpload = e;\r\n }\r\n\r\n @State() qrcodeUrl: string = '';\r\n private setMobileUrlWrapper = (e: string) => {\r\n this.mobileUrl = e;\r\n if (e) {\r\n const qr = qrcode(0, 'M');\r\n qr.addData(e);\r\n qr.make();\r\n this.qrcodeUrl = qr.createDataURL(4, 0);\r\n } else {\r\n this.qrcodeUrl = '';\r\n }\r\n }\r\n\r\n // 轮询流水号数据\r\n private pollingQueryNumberInfo = async (num: string): Promise<void> => {\r\n const res = await sendHttpRequest({\r\n url: `/sdk/v1/update_id/${num}/status`,\r\n method: 'get',\r\n });\r\n if (res?.success) {\r\n const resData: {\r\n update_id?: any;\r\n tags?: any;\r\n status?: any;\r\n file_list?: any;\r\n user_id?: any;\r\n cfg?: any;\r\n iat?: any;\r\n exp?: any;\r\n } = res.data ?? {};\r\n const { file_list } = resData;\r\n this.mobileUploadFiles = file_list ?? [];\r\n }\r\n if (uploadNumberSDK.isWorking) {\r\n setTimeout(() => {\r\n this.pollingQueryNumberInfo(num);\r\n }, 3000);\r\n }\r\n }\r\n\r\n private handleStartMobileUpload = async () => {\r\n const that = this;\r\n this.qrcodeStatus = 'loading';\r\n this.startMobileUploadLoading = true;\r\n const params = this.uploadParams ?? {};\r\n const tags = Array.isArray(params.tags) ? params.tags as string[] : undefined;\r\n const reqData: {\r\n tags?: string[];\r\n cfg?: Record<string, any>;\r\n is_knowledge_doc?: boolean,\r\n } = {\r\n is_knowledge_doc: false,\r\n tags,\r\n cfg: {\r\n maxSize: that.maxFileSize,\r\n maxCount: that.multiple ? that.maxFileCount : 1,\r\n fromUserName: '',\r\n fromUserId: '',\r\n customAccept: that.acceptFileSuffixList.join(','),\r\n upload: that.uploadParams,\r\n },\r\n }\r\n const res = await sendHttpRequest({\r\n url: `/sdk/v1/update_id`,\r\n method: 'post',\r\n data: reqData,\r\n });\r\n if (res?.success) {\r\n const resData: {\r\n update_id?: any;\r\n tags?: any;\r\n status?: any;\r\n file_list?: any;\r\n user_id?: any;\r\n cfg?: any;\r\n iat?: any;\r\n exp?: any;\r\n now?: any;\r\n custom_data?: any;\r\n } = res.data ?? {};\r\n uploadNumberSDK.number = resData.update_id;\r\n // 计算过期时间:创建后+1小时\r\n const expireDate = new Date(Date.now() + 3600 * 1000);\r\n this.expireTime = `${expireDate.getHours().toString().padStart(2, '0')}:${expireDate.getMinutes().toString().padStart(2, '0')}`;\r\n const theMobileUrl = `${PCM_DOMAIN}/agents/uploadFileByCode?num=${uploadNumberSDK.number}`;\r\n this.setMobileUrlWrapper(theMobileUrl)\r\n this.setStartMobileUploadWrapper(true);\r\n this.qrcodeStatus = 'active';\r\n // 开启轮询\r\n this.pollingQueryNumberInfo(uploadNumberSDK.number);\r\n }\r\n this.startMobileUploadLoading = false;\r\n }\r\n\r\n // 取消手机上传\r\n @State() cancelLoading = false;\r\n private cancelMobileUpload = async (clearValue: boolean = true) => {\r\n this.cancelLoading = true;\r\n await uploadNumberSDK.close({\r\n onError() {\r\n Message.info('取消失败');\r\n }\r\n })\r\n this.cancelLoading = false;\r\n this.QR_CODE_VALID_TIME = 0;\r\n this.expireTime = '';\r\n this.setStartMobileUploadWrapper(false);\r\n this.setMobileUrlWrapper('');\r\n this.qrcodeStatus = 'expired';\r\n if (clearValue) {\r\n this.mobileUploadFiles = [];\r\n }\r\n this.open = false;\r\n }\r\n\r\n // 删除文件\r\n private handleDelete = async (cos_key: any) => {\r\n const res = await sendHttpRequest({\r\n url: `/sdk/v1/update_id/${uploadNumberSDK.number}/file`,\r\n method: 'delete',\r\n params: {\r\n update_id: uploadNumberSDK.number,\r\n cos_key,\r\n }\r\n });\r\n if (res?.success) {\r\n this.mobileUploadFiles = this.mobileUploadFiles.filter(it => it.cos_key !== cos_key);\r\n this.value = this.value.filter(it => it.cos_key !== cos_key);\r\n this.ok.emit(this.value);\r\n }\r\n }\r\n\r\n\r\n private handleOpenUpload = (): void => {\r\n if (this.disabled) return;\r\n if (this.maxFileCount <= this.value.length) {\r\n Message.info('文件数量已达到上限!');\r\n return;\r\n }\r\n this.mobileUploadFiles = [];\r\n this.open = true;\r\n this.handleStartMobileUpload();\r\n }\r\n\r\n render() {\r\n return (\r\n <div>\r\n {this.uploadAreaMode ? <div class=\"upload-area-mode\">\r\n <div class=\"upload-area\">\r\n {this.value.map((item, index) => <div class=\"file-item\" key={item.cos_key || index}>\r\n <div class=\"file-item-content\">\r\n <span class=\"file-icon\">📝</span>\r\n <span class=\"file-name\">{item.file_name}</span>\r\n </div>\r\n {!this.disabled && <button class=\"remove-file\" onClick={(event) => {\r\n event.stopPropagation();\r\n this.handleDelete(item.cos_key);\r\n }}>×</button>}\r\n </div>)}\r\n </div>\r\n {!this.disabled && this.value.length < this.maxFileCount && <div class=\"upload-actions\">\r\n <div class=\"upload-placeholder\" onClick={this.handleOpenUpload}>\r\n <img src=\"https://pub.pincaimao.com/static/web/images/home/i_upload.png\" />\r\n <p class=\"upload-text\">{this.uploadText}</p>\r\n {!!this.acceptFileSuffixList.length && <p class=\"upload-hint\">支持 {this.acceptFileSuffixList.join('、')} 格式。</p>}\r\n </div>\r\n </div>}\r\n </div> : <div class=\"mobile-upload\">\r\n <div class=\"btn btn-link\" onClick={this.handleOpenUpload}>扫码上传</div>\r\n </div>}\r\n {\r\n this.open && <div class=\"mask\">\r\n <div class=\"upload-wrapper\">\r\n {\r\n this.setStartMobileUpload ? <div class=\"upload-box\">\r\n <div class=\"qrcode-wrapper\">\r\n {\r\n this.qrcodeStatus === 'active' && <img class=\"qrcode\" src={this.qrcodeUrl} />\r\n }\r\n {\r\n this.qrcodeStatus === 'loading' && <span class=\"loading\">加载中...</span>\r\n }\r\n {\r\n this.qrcodeStatus === 'expired' && <div\r\n class=\"btn btn-link\"\r\n onClick={this.handleStartMobileUpload}\r\n >重新获取</div>\r\n }\r\n </div>\r\n <div class=\"time-expire\">\r\n 二维码有效期至 {this.expireTime}\r\n </div>\r\n <div class=\"alert-tip\">\r\n 上传过程中请不要关闭此弹窗\r\n </div>\r\n {\r\n this.qrcodeStatus === 'active' && <div\r\n style={{ marginTop: '12px', fontSize: '12px' }}\r\n class=\"btn btn-link\"\r\n onClick={() => {\r\n navigator.clipboard\r\n .writeText(this.mobileUrl)\r\n .then(() => {\r\n Message.success(\"已复制到剪贴板\");\r\n })\r\n .catch(() => {\r\n Message.error(\"复制失败\");\r\n });\r\n }}\r\n >复制二维码地址</div>\r\n }\r\n </div> : (this.startMobileUploadLoading && <span class=\"loading\">加载中...</span>)\r\n }\r\n {/* 上传文件列表 */}\r\n <div style={{ marginTop: '12px' }}>\r\n {\r\n this.mobileUploadFiles.map((item, index) => {\r\n return <div class=\"file-item\" key={index}>\r\n <div class=\"file-item-content\">\r\n <span class=\"file-icon\">📝</span>\r\n <span class=\"file-name\">{item?.file_name}</span>\r\n </div>\r\n <button class=\"remove-file\" onClick={(e) => {\r\n e.stopPropagation();\r\n this.handleDelete(item.cos_key)\r\n }}>×</button>\r\n </div>\r\n })\r\n }\r\n </div>\r\n <div class=\"modal-footer\">\r\n <div class=\"btn btn-default\" onClick={() => this.cancelMobileUpload()}>取消</div>\r\n <div class=\"btn btn-primary\" onClick={() => {\r\n if (this.value.length + this.mobileUploadFiles.length > this.maxFileCount) {\r\n Message.info(`最多只能选择${this.maxFileCount}个文件,请删除多余文件!`);\r\n return;\r\n }\r\n this.value = this.multiple\r\n ? [...this.value, ...this.mobileUploadFiles]\r\n : this.mobileUploadFiles.slice(0, 1);\r\n this.ok.emit(this.value);\r\n this.cancelMobileUpload(false);\r\n }}>完成</div>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n )\r\n }\r\n}"],"version":3}
|
|
1
|
+
{"file":"p-C4wDoFmj.js","mappings":";;;;;AAEA;AACA,MAAM,eAAe,GAAG;AACpB,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,gBAAgB,MAGtB,EAAA;QACG,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,EAAE;AACtC,QAAA,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI;QACvB,IAAI,MAAM,EA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AA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,iBAAiB,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,kBAAkB,EAAE,EAAU,EAAA,cAAA,CAAA,EAC/E,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,iBAAiB,EAAC,OAAO,EAAE,MAAK;AACvC,gBAAA,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,EAAE;oBACvE,OAAO,CAAC,IAAI,CAAC,CAAA,MAAA,EAAS,IAAI,CAAC,YAAY,CAAc,YAAA,CAAA,CAAC;oBACtD;;AAEJ,gBAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;sBACZ,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,iBAAiB;sBACzC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;gBACxC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;AACxB,gBAAA,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC;aACjC,mBAAU,CACT,CACJ,CACJ,CAER;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/components-mobile-upload-btn/uploadNumberSDK.ts","src/components/components-mobile-upload-btn/components-mobile-upload-btn.css?tag=components-mobile-upload-btn&encapsulation=shadow","src/global/global.css?tag=components-mobile-upload-btn&encapsulation=shadow","src/global/host.css?tag=components-mobile-upload-btn&encapsulation=shadow","src/components/components-mobile-upload-btn/components-mobile-upload-btn.tsx"],"sourcesContent":["import { sendHttpRequest } from \"../../utils/utils\";\r\n\r\n// 文件上传流水号SDK\r\nconst uploadNumberSDK = {\r\n number: '',\r\n isWorking: false,\r\n close: async function (params?: {\r\n onOk?: () => void;\r\n onError?: () => void;\r\n }) {\r\n const { onOk, onError } = params ?? {};\r\n const { number } = this;\r\n if (number) {\r\n const result = await sendHttpRequest({\r\n url: `/resource/update_id/${number}`,\r\n method: 'delete',\r\n });\r\n if (result.success) {\r\n this.number = '';\r\n onOk?.();\r\n } else {\r\n onError?.();\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport default uploadNumberSDK;",".upload-area {\r\n max-height: 300px;\r\n overflow-y: auto;\r\n}\r\n\r\n.upload-actions {\r\n display: flex;\r\n gap: 12px;\r\n margin-top: 12px;\r\n width: 100%;\r\n}\r\n\r\n.upload-placeholder {\r\n width: 100%;\r\n cursor: pointer;\r\n}\r\n\r\n.upload-placeholder img {\r\n display: block;\r\n margin: 0 auto;\r\n}\r\n\r\n.upload-placeholder p {\r\n text-align: center;\r\n}\r\n\r\n.upload-text {\r\n margin: 8px 0;\r\n}\r\n\r\n.upload-hint {\r\n font-size: 12px;\r\n color: #999999;\r\n}\r\n\r\n.file-item {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n padding: 8px 0;\r\n}\r\n\r\n.file-item-content {\r\n display: flex;\r\n align-items: center;\r\n min-width: 0;\r\n}\r\n\r\n.file-name {\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n.remove-file {\r\n border: 0;\r\n background: transparent;\r\n cursor: pointer;\r\n font-size: 18px;\r\n}\r\n\r\n.mobile-upload {\r\n display: flex;\r\n justify-content: flex-end;\r\n margin-bottom: 4px;\r\n}\r\n\r\n.btn {\r\n position: relative;\r\n padding: 4px 8px;\r\n border-radius: 4px;\r\n cursor: pointer;\r\n overflow: hidden;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n white-space: nowrap;\r\n}\r\n\r\n.btn::after {\r\n content: '';\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n}\r\n\r\n.btn:hover::after {\r\n background-color: rgba(0,0,0,0.04);\r\n}\r\n\r\n.btn-link {\r\n color: #0D75FB;\r\n}\r\n\r\n.btn-default {\r\n background-color: #ffffff;\r\n color: #0D75FB;\r\n border: 1px solid #0D75FB;\r\n}\r\n\r\n.btn-primary {\r\n background-color: #0D75FB;\r\n color: #ffffff;\r\n}\r\n\r\n\r\n.loading {\r\n font-size: 12px;\r\n color: #999999;\r\n}\r\n\r\n.mask {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n background-color: rgba(0,0,0,0.5);\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n z-index: 10000;\r\n}\r\n\r\n.mask .upload-wrapper {\r\n width: 540px;\r\n max-width: 80%;\r\n max-height: 80%;\r\n background-color: #ffffff;\r\n padding: 32px 24px;\r\n border-radius: 16px;\r\n overflow-y: auto;\r\n}\r\n\r\n.mask .upload-wrapper .upload-box {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n}\r\n\r\n.time-expire {\r\n margin: 8px 0;\r\n text-align: center;\r\n font-size: 12px;\r\n color: #555555;\r\n}\r\n\r\n.time-count-down {\r\n margin-left: 8px;\r\n color: #0D75FB;\r\n}\r\n\r\n.alert-tip {\r\n margin-top: 8px;\r\n text-align: center;\r\n font-size: 12px;\r\n color: #999999;\r\n}\r\n\r\n.qrcode-wrapper {\r\n width: 160px;\r\n height: 160px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n border: 1px solid #e5e5e5;\r\n border-radius: 4px;\r\n padding: 1px;\r\n}\r\n\r\n.qrcode-wrapper .qrcode {\r\n width: 100%;\r\n height: 100%;\r\n}\r\n\r\n.modal-footer {\r\n margin-top: 32px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 8px;\r\n}\r\n\r\n.modal-footer .btn {\r\n min-width: 100px;\r\n}","/* 模态框基础样式 */\r\n.modal-overlay {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n display: flex;\r\n z-index: 1000;\r\n overflow-y: auto;\r\n}\r\n\r\n/* 全屏模式下的overlay样式 - 改为基于父组件 */\r\n.fullscreen-overlay {\r\n padding: 0;\r\n background-color: rgba(0, 0, 0, 0.7);\r\n /* 改为基于父组件的全屏 */\r\n position: absolute;\r\n width: 100%;\r\n height: auto;\r\n}\r\n\r\n.modal-container {\r\n background-color: #fff;\r\n border-radius: 8px;\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n position: relative;\r\n margin: 5vh auto auto auto;\r\n transition: all 0.3s ease-out;\r\n overflow: hidden;\r\n}\r\n\r\n/* 全屏模式样式 - 改为基于父组件 */\r\n.modal-container.fullscreen {\r\n width: 100%;\r\n max-width: none;\r\n height: 100%;\r\n border-radius: 0;\r\n margin: 0;\r\n display: flex;\r\n flex-direction: column;\r\n max-height: 100%;\r\n}\r\n\r\n/* PC端布局 */\r\n.pc-layout {\r\n width: 80%;\r\n max-width: 600px;\r\n min-width: 320px;\r\n}\r\n\r\n/* 响应式布局 */\r\n@media screen and (max-width: 768px) {\r\n .pc-layout {\r\n width: 95%;\r\n }\r\n\r\n .modal-overlay {\r\n padding: 10px 0px 0px 0px;\r\n }\r\n\r\n .modal-container.fullscreen {\r\n /* 移动端也基于父组件尺寸 */\r\n width: 100%;\r\n height: 100%;\r\n max-height: 100%;\r\n border-radius: 16px 16px 0 0;\r\n /* 保留安全区域支持 */\r\n padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);\r\n }\r\n}\r\n\r\n/* 模态框头部样式 */\r\n.modal-header {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n padding: 4px 16px;\r\n height: 50px;\r\n border-bottom: 1px solid #e8e8e8;\r\n flex-shrink: 0;\r\n}\r\n\r\n.header-left {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n font-size: 16px;\r\n font-weight: 600;\r\n color: #333;\r\n}\r\n\r\n.header-icon {\r\n width: 24px;\r\n height: 24px;\r\n}\r\n\r\n.close-button {\r\n background: transparent;\r\n border: none;\r\n cursor: pointer;\r\n padding: 8px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 32px;\r\n height: 32px;\r\n border-radius: 4px;\r\n}\r\n\r\n.close-button:hover {\r\n background-color: rgba(0, 0, 0, 0.04);\r\n}\r\n\r\n.close-button span {\r\n font-size: 24px;\r\n line-height: 1;\r\n color: #999;\r\n}\r\n\r\n.close-button:hover span {\r\n color: #666;\r\n}\r\n\r\n\r\n/* 文件上传区域通用样式 */\r\n.upload-area {\r\n cursor: pointer;\r\n width: 100%;\r\n}\r\n\r\n\r\n.upload-placeholder {\r\n transition: all 0.3s ease;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n background: rgba(0, 0, 0, 0.02);\r\n border: 1px dashed #d9d9d9;\r\n border-radius: 8px;\r\n cursor: pointer;\r\n}\r\n\r\n.upload-placeholder:hover {\r\n border: 1px dashed #1890ff;\r\n}\r\n\r\n.upload-placeholder img {\r\n margin-top: 8px;\r\n width: 50px;\r\n height: 50px;\r\n}\r\n\r\n.upload-placeholder .upload-text {\r\n margin: 4px 0;\r\n color: #332F39;\r\n font-size: 14px;\r\n}\r\n\r\n.upload-placeholder .upload-hint {\r\n font-size: 14px;\r\n color: #949AA5;\r\n margin-top: 8px;\r\n padding: 0px 10px;\r\n text-align: center;\r\n white-space: normal;\r\n word-wrap: break-word;\r\n word-break: break-all;\r\n line-height: 1.4;\r\n}\r\n\r\n\r\n/* 文件项样式 */\r\n.file-item {\r\n position: relative;\r\n padding: 16px;\r\n border: 1px solid #e2e8f0;\r\n border-radius: 8px;\r\n transition: border-color 0.3s;\r\n cursor: pointer;\r\n margin-bottom: 16px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n\r\n.file-item:hover {\r\n border-color: #0D75FB;\r\n}\r\n\r\n.file-item-content {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n flex: 1;\r\n min-width: 0;\r\n overflow: hidden;\r\n}\r\n\r\n.file-icon {\r\n color: #0D75FB;\r\n flex-shrink: 0;\r\n}\r\n\r\n.file-name {\r\n font-weight: 500;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n max-width: calc(100% - 50px);\r\n}\r\n\r\n.remove-file {\r\n background: transparent;\r\n border: none;\r\n color: #94a3b8;\r\n cursor: pointer;\r\n font-size: 18px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 4px;\r\n margin-left: 8px;\r\n border-radius: 4px;\r\n transition: all 0.2s;\r\n min-width: 30px;\r\n min-height: 30px;\r\n}\r\n\r\n.remove-file:hover {\r\n background-color: #f1f5f9;\r\n color: #475569;\r\n}\r\n\r\n.file-input {\r\n display: none;\r\n}\r\n\r\n\r\n\r\n/* 输入容器样式 */\r\n.input-container {\r\n padding: 20px;\r\n display: flex;\r\n flex-direction: column;\r\n height: calc(100% - 50px);\r\n background: linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;\r\n /* 减去header高度 */\r\n overflow-y: auto;\r\n}\r\n\r\n.input-container h3 {\r\n margin-top: 0;\r\n margin-bottom: 20px;\r\n font-size: 18px;\r\n color: #333;\r\n text-align: center;\r\n}\r\n\r\n/* JD输入区域样式 */\r\n.jd-input-section {\r\n margin-bottom: 20px;\r\n}\r\n\r\n.jd-input-section label {\r\n display: block;\r\n margin-bottom: 8px;\r\n font-weight: 500;\r\n color: #333;\r\n}\r\n\r\n.job-description-textarea {\r\n width: calc(100% - 16px);\r\n border: 1px solid #ddd;\r\n border-radius: 4px;\r\n resize: vertical;\r\n font-family: inherit;\r\n font-size: 14px;\r\n line-height: 1.5;\r\n transition: border-color 0.3s;\r\n padding: 8px;\r\n}\r\n\r\n.job-description-textarea:focus {\r\n outline: none;\r\n border-color: #1890ff;\r\n box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);\r\n}\r\n\r\n/* 简历上传区域样式 */\r\n.resume-upload-section {\r\n margin-bottom: 20px;\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n.resume-upload-section label {\r\n display: block;\r\n margin-bottom: 8px;\r\n font-weight: 500;\r\n color: #333;\r\n}\r\n\r\n/* 面试设置区域 */\r\n.interview-settings-section {\r\n margin-bottom: 24px;\r\n padding: 20px;\r\n background-color: #f8f9fa;\r\n border-radius: 8px;\r\n border: 1px solid #e9ecef;\r\n}\r\n\r\n.settings-row {\r\n margin-bottom: 20px;\r\n}\r\n\r\n.settings-row:last-child {\r\n margin-bottom: 0;\r\n}\r\n\r\n.settings-label {\r\n display: block;\r\n font-weight: 500;\r\n color: #333;\r\n margin-bottom: 12px;\r\n font-size: 14px;\r\n}\r\n\r\n/* 题目数量滑块样式 */\r\n.question-number-section {\r\n width: 100%;\r\n}\r\n\r\n.slider-container {\r\n display: flex;\r\n align-items: center;\r\n gap: 12px;\r\n}\r\n\r\n.question-slider {\r\n flex: 1;\r\n height: 6px;\r\n background: #ddd;\r\n outline: none;\r\n border-radius: 3px;\r\n -webkit-appearance: none;\r\n appearance: none;\r\n}\r\n\r\n.question-slider::-webkit-slider-thumb {\r\n -webkit-appearance: none;\r\n appearance: none;\r\n width: 20px;\r\n height: 20px;\r\n background: #0D75FB;\r\n cursor: pointer;\r\n border-radius: 50%;\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\n.question-slider::-moz-range-thumb {\r\n width: 20px;\r\n height: 20px;\r\n background: #0D75FB;\r\n cursor: pointer;\r\n border-radius: 50%;\r\n border: none;\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\n.slider-value {\r\n font-weight: 600;\r\n color: #0D75FB;\r\n font-size: 14px;\r\n min-width: 30px;\r\n text-align: center;\r\n}\r\n\r\n/* 开关样式 */\r\n.analysis-toggle-section {\r\n width: 100%;\r\n}\r\n\r\n.toggle-container {\r\n display: flex;\r\n align-items: center;\r\n gap: 12px;\r\n}\r\n\r\n.toggle-switch {\r\n position: relative;\r\n display: inline-block;\r\n width: 44px;\r\n height: 24px;\r\n}\r\n\r\n.toggle-switch input {\r\n opacity: 0;\r\n width: 0;\r\n height: 0;\r\n}\r\n\r\n.toggle-slider {\r\n position: absolute;\r\n cursor: pointer;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: #ccc;\r\n transition: 0.3s;\r\n border-radius: 24px;\r\n}\r\n\r\n.toggle-slider:before {\r\n position: absolute;\r\n content: \"\";\r\n height: 18px;\r\n width: 18px;\r\n left: 3px;\r\n bottom: 3px;\r\n background-color: white;\r\n transition: 0.3s;\r\n border-radius: 50%;\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\ninput:checked + .toggle-slider {\r\n background-color: #0D75FB;\r\n}\r\n\r\ninput:checked + .toggle-slider:before {\r\n transform: translateX(20px);\r\n}\r\n\r\n.toggle-text {\r\n font-size: 14px;\r\n color: #666;\r\n font-weight: 500;\r\n}\r\n\r\n/* 提交按钮通用样式 */\r\n.submit-button {\r\n margin-top: 10px;\r\n padding: 10px 30px;\r\n background: #0D75FB;\r\n color: white;\r\n border: none;\r\n border-radius: 4px;\r\n font-size: 16px;\r\n cursor: pointer;\r\n transition: all 0.3s ease;\r\n width: 100%;\r\n max-width: 400px;\r\n align-self: center;\r\n}\r\n\r\n.submit-button:hover {\r\n background-color: #40a9ff;\r\n}\r\n\r\n.submit-button:disabled {\r\n background-color: rgba(0,0,0,0.04);\r\n color: rgba(0,0,0,0.25);\r\n cursor: not-allowed;\r\n}\r\n\r\n\r\n\r\n/* AI免责声明和备案信息样式 */\r\n.ai-disclaimer {\r\n margin-top: 16px;\r\n text-align: center;\r\n font-size: 12px;\r\n color: #999;\r\n line-height: 1.5;\r\n}\r\n\r\n.ai-disclaimer p {\r\n margin: 4px 0;\r\n}\r\n\r\n.beian-info {\r\n display: flex;\r\n justify-content: center;\r\n flex-wrap: wrap;\r\n gap: 4px;\r\n}\r\n\r\n.ai-disclaimer a {\r\n color: #666;\r\n text-decoration: none;\r\n transition: color 0.2s ease;\r\n}\r\n\r\n.ai-disclaimer a:hover {\r\n color: #1890ff;\r\n text-decoration: underline;\r\n}\r\n\r\n/* 添加加载状态的样式 */\r\n.loading-container {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n height: 100%;\r\n padding: 24px;\r\n }\r\n \r\n .loading-spinner {\r\n width: 40px;\r\n height: 40px;\r\n border: 4px solid rgba(0, 0, 0, 0.1);\r\n border-radius: 50%;\r\n border-top-color: var(--pcm-primary-color, #1890ff);\r\n animation: spin 1s linear infinite;\r\n margin-bottom: 16px;\r\n }\r\n \r\n .loading-text {\r\n font-size: 16px;\r\n color: var(--pcm-text-color, #333);\r\n }\r\n \r\n @keyframes spin {\r\n 0% { transform: rotate(0deg); }\r\n 100% { transform: rotate(360deg); }\r\n }\r\n\r\n/* 历史会话按钮 */\r\n.header-history-button {\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 4px;\r\n padding: 4px 8px;\r\n border: none;\r\n border-radius: 4px;\r\n background: transparent;\r\n color: #bbb;\r\n cursor: pointer;\r\n font-size: 13px;\r\n font-family: inherit;\r\n line-height: 1;\r\n transition: all 0.2s ease;\r\n flex-shrink: 0;\r\n white-space: nowrap;\r\n}\r\n\r\n.header-history-button svg {\r\n width: 16px;\r\n height: 16px;\r\n display: block;\r\n flex-shrink: 0;\r\n}\r\n\r\n.header-history-button:hover {\r\n background-color: rgba(0, 0, 0, 0.04);\r\n color: #666;\r\n}\r\n\r\n.header-history-button:focus-visible {\r\n outline: 2px solid rgba(13, 117, 251, 0.35);\r\n outline-offset: 2px;\r\n}\r\n\r\n/* 历史会话抽屉内容 */\r\n.history-drawer-content {\r\n height: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n.conversation-list {\r\n flex: 1;\r\n overflow-y: auto;\r\n padding: 8px 0;\r\n}\r\n\r\n.loading-conversations,\r\n.empty-conversations {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 40px 20px;\r\n color: #999;\r\n}\r\n\r\n.loading-conversations .loading-spinner-small {\r\n margin-bottom: 12px;\r\n}\r\n\r\n.conversation-item {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n padding: 12px 16px;\r\n margin: 0 8px 4px 8px;\r\n border-radius: 8px;\r\n cursor: pointer;\r\n transition: all 0.2s ease;\r\n border: 1px solid transparent;\r\n}\r\n\r\n.conversation-item:hover {\r\n background: #f5f5f5;\r\n}\r\n\r\n.conversation-info {\r\n flex: 1;\r\n min-width: 0;\r\n}\r\n\r\n.conversation-title {\r\n font-size: 14px;\r\n font-weight: 500;\r\n color: #262626;\r\n margin-bottom: 4px;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n.conversation-meta {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n font-size: 12px;\r\n color: #8c8c8c;\r\n}\r\n\r\n.conversation-time {\r\n flex-shrink: 0;\r\n}\r\n\r\n.message-count {\r\n flex-shrink: 0;\r\n}\r\n\r\n.conversation-status {\r\n padding: 2px 6px;\r\n border-radius: 4px;\r\n font-size: 11px;\r\n font-weight: 500;\r\n}\r\n\r\n.conversation-status.completed {\r\n background: #f6ffed;\r\n color: #52c41a;\r\n}\r\n\r\n.conversation-status.running {\r\n background: #fff7e6;\r\n color: #fa8c16;\r\n}\r\n\r\n.header-history-entry {\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n margin-left: 8px;\r\n padding: 4px 8px;\r\n border: none;\r\n border-radius: 4px;\r\n background: #e6f7ff;\r\n color: #1890ff;\r\n cursor: pointer;\r\n font-size: 12px;\r\n font-family: inherit;\r\n line-height: 1;\r\n white-space: nowrap;\r\n transition: all 0.2s ease;\r\n}\r\n\r\n.header-history-entry:hover {\r\n background: #bae7ff;\r\n color: #0958d9;\r\n transform: translateY(-1px);\r\n}\r\n\r\n.header-history-entry:focus-visible {\r\n outline: 2px solid rgba(13, 117, 251, 0.35);\r\n outline-offset: 2px;\r\n}\r\n\r\n.history-pagination {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n gap: 12px;\r\n padding: 12px 16px 16px;\r\n border-top: 1px solid #f0f0f0;\r\n}\r\n\r\n.history-pagination-button {\r\n min-width: 72px;\r\n padding: 6px 12px;\r\n border: 1px solid #d9d9d9;\r\n border-radius: 6px;\r\n background: #fff;\r\n color: #595959;\r\n cursor: pointer;\r\n font-size: 12px;\r\n transition: all 0.2s ease;\r\n}\r\n\r\n.history-pagination-button:hover:not(:disabled) {\r\n border-color: #1890ff;\r\n color: #1890ff;\r\n background: #e6f7ff;\r\n}\r\n\r\n.history-pagination-button:disabled {\r\n border-color: #f0f0f0;\r\n color: #bfbfbf;\r\n background: #fafafa;\r\n cursor: not-allowed;\r\n}\r\n\r\n.history-pagination-info {\r\n flex: 1;\r\n text-align: center;\r\n color: #8c8c8c;\r\n font-size: 12px;\r\n}\r\n \r\n",":host {\r\n /* 字体相关属性 */\r\n font-size: 16px;\r\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\r\n font-weight: normal;\r\n font-style: normal;\r\n font-variant: normal;\r\n line-height: 1.5;\r\n letter-spacing: normal;\r\n word-spacing: normal;\r\n \r\n /* 文本相关属性 */\r\n color: #333; /* 重置文字颜色,避免继承外部的red */\r\n text-align: left;\r\n text-indent: 0;\r\n text-transform: none;\r\n white-space: normal;\r\n word-wrap: normal;\r\n word-break: normal;\r\n \r\n /* 可见性 */\r\n visibility: visible;\r\n \r\n /* 列表相关 */\r\n list-style: none;\r\n list-style-image: none;\r\n list-style-position: outside;\r\n list-style-type: disc;\r\n \r\n /* 表格相关 */\r\n border-collapse: separate;\r\n border-spacing: 0;\r\n caption-side: top;\r\n empty-cells: show;\r\n table-layout: auto;\r\n \r\n /* 引用 */\r\n quotes: auto;\r\n \r\n /* 光标 */\r\n cursor: auto;\r\n \r\n /* 文本方向 */\r\n direction: ltr;\r\n \r\n /* 打印相关 */\r\n orphans: 2;\r\n widows: 2;\r\n page-break-inside: auto;\r\n \r\n /* 其他可能被继承的属性 */\r\n text-decoration: none;\r\n text-shadow: none;\r\n \r\n /* 确保组件有独立的盒模型 */\r\n box-sizing: border-box;\r\n \r\n /* 重置一些可能影响布局的继承属性 */\r\n writing-mode: horizontal-tb;\r\n text-orientation: mixed;\r\n}","import { Component, Prop, State, Event, h, EventEmitter, Method } from \"@stencil/core\";\r\nimport { FileUploadResponse, sendHttpRequest, PCM_DOMAIN } from \"../../utils/utils\";\r\nimport uploadNumberSDK from \"./uploadNumberSDK\";\r\nimport { Message } from \"../../services/message.service\";\r\nimport qrcode from 'qrcode-generator'\r\n\r\n@Component({\r\n tag: 'components-mobile-upload-btn',\r\n styleUrls: ['components-mobile-upload-btn.css', '../../global/global.css', '../../global/host.css'],\r\n shadow: true,\r\n})\r\nexport class ComponentsMobileUploadBtn {\r\n /**\r\n * 是否支持多文件上传\r\n */\r\n @Prop() multiple: boolean = false;\r\n /**\r\n * 支持的文件后缀列表(需要带上小数点.)\r\n */\r\n @Prop() acceptFileSuffixList: string[] = [];\r\n /**\r\n * 最大文件数\r\n */\r\n @Prop() maxFileCount: number = Infinity;\r\n /**\r\n * 最大文件大小\r\n */\r\n @Prop() maxFileSize: number = Infinity;\r\n /**\r\n * 上传请求头\r\n */\r\n @Prop() uploadHeaders?: Record<string, unknown>;\r\n /**\r\n * 上传请求参数\r\n */\r\n @Prop() uploadParams?: Record<string, unknown>;\r\n /**\r\n * 是否使用上传区域样式\r\n */\r\n @Prop() uploadAreaMode: boolean = false;\r\n /**\r\n * 是否禁用上传\r\n */\r\n @Prop() disabled: boolean = false;\r\n /**\r\n * 默认文件列表\r\n */\r\n @Prop() defaultFileList: FileUploadResponse[] = [];\r\n /**\r\n * 上传区域提示文本\r\n */\r\n @Prop() uploadText: string = '点击上传简历';\r\n @State() QR_CODE_VALID_TIME: number = 0;\r\n @State() open: boolean = false;\r\n @State() mobileUrl: string = '';\r\n @State() setStartMobileUpload: boolean = false;\r\n @State() startMobileUploadLoading: boolean = false;\r\n @State() qrcodeStatus: 'active' | 'expired' | 'loading' | undefined = 'loading';\r\n @State() value: FileUploadResponse[] = [];\r\n @State() mobileUploadFiles: FileUploadResponse[] = [];\r\n @State() expireTime: string = ''; // 过期时间\r\n\r\n @Event() ok: EventEmitter<FileUploadResponse[]>;\r\n\r\n componentWillLoad(): void {\r\n this.value = [...this.defaultFileList];\r\n }\r\n\r\n @Method()\r\n async getIsUploading(): Promise<boolean> {\r\n return this.startMobileUploadLoading;\r\n }\r\n\r\n @Method()\r\n async clearSelectedFiles(): Promise<void> {\r\n this.value = [];\r\n }\r\n\r\n private setStartMobileUploadWrapper = (e: boolean) => {\r\n uploadNumberSDK.isWorking = e;\r\n this.setStartMobileUpload = e;\r\n }\r\n\r\n @State() qrcodeUrl: string = '';\r\n private setMobileUrlWrapper = (e: string) => {\r\n this.mobileUrl = e;\r\n if (e) {\r\n const qr = qrcode(0, 'M');\r\n qr.addData(e);\r\n qr.make();\r\n this.qrcodeUrl = qr.createDataURL(4, 0);\r\n } else {\r\n this.qrcodeUrl = '';\r\n }\r\n }\r\n\r\n // 轮询流水号数据\r\n private pollingQueryNumberInfo = async (num: string): Promise<void> => {\r\n const res = await sendHttpRequest({\r\n url: `/sdk/v1/update_id/${num}/status`,\r\n method: 'get',\r\n });\r\n if (res?.success) {\r\n const resData: {\r\n update_id?: any;\r\n tags?: any;\r\n status?: any;\r\n file_list?: any;\r\n user_id?: any;\r\n cfg?: any;\r\n iat?: any;\r\n exp?: any;\r\n } = res.data ?? {};\r\n const { file_list } = resData;\r\n this.mobileUploadFiles = file_list ?? [];\r\n }\r\n if (uploadNumberSDK.isWorking) {\r\n setTimeout(() => {\r\n this.pollingQueryNumberInfo(num);\r\n }, 3000);\r\n }\r\n }\r\n\r\n private handleStartMobileUpload = async () => {\r\n const that = this;\r\n this.qrcodeStatus = 'loading';\r\n this.startMobileUploadLoading = true;\r\n const params = this.uploadParams ?? {};\r\n const tags = Array.isArray(params.tags) ? params.tags as string[] : undefined;\r\n const reqData: {\r\n tags?: string[];\r\n cfg?: Record<string, any>;\r\n is_knowledge_doc?: boolean,\r\n } = {\r\n is_knowledge_doc: false,\r\n tags,\r\n cfg: {\r\n maxSize: that.maxFileSize,\r\n maxCount: that.multiple ? that.maxFileCount : 1,\r\n fromUserName: '',\r\n fromUserId: '',\r\n customAccept: that.acceptFileSuffixList.join(','),\r\n upload: that.uploadParams,\r\n },\r\n }\r\n const res = await sendHttpRequest({\r\n url: `/sdk/v1/update_id`,\r\n method: 'post',\r\n data: reqData,\r\n });\r\n if (res?.success) {\r\n const resData: {\r\n update_id?: any;\r\n tags?: any;\r\n status?: any;\r\n file_list?: any;\r\n user_id?: any;\r\n cfg?: any;\r\n iat?: any;\r\n exp?: any;\r\n now?: any;\r\n custom_data?: any;\r\n } = res.data ?? {};\r\n uploadNumberSDK.number = resData.update_id;\r\n // 计算过期时间:创建后+1小时\r\n const expireDate = new Date(Date.now() + 3600 * 1000);\r\n this.expireTime = `${expireDate.getHours().toString().padStart(2, '0')}:${expireDate.getMinutes().toString().padStart(2, '0')}`;\r\n const theMobileUrl = `${PCM_DOMAIN}/agents/uploadFileByCode?num=${uploadNumberSDK.number}`;\r\n this.setMobileUrlWrapper(theMobileUrl)\r\n this.setStartMobileUploadWrapper(true);\r\n this.qrcodeStatus = 'active';\r\n // 开启轮询\r\n this.pollingQueryNumberInfo(uploadNumberSDK.number);\r\n }\r\n this.startMobileUploadLoading = false;\r\n }\r\n\r\n // 取消手机上传\r\n @State() cancelLoading = false;\r\n private cancelMobileUpload = async (clearValue: boolean = true) => {\r\n this.cancelLoading = true;\r\n await uploadNumberSDK.close({\r\n onError() {\r\n Message.info('取消失败');\r\n }\r\n })\r\n this.cancelLoading = false;\r\n this.QR_CODE_VALID_TIME = 0;\r\n this.expireTime = '';\r\n this.setStartMobileUploadWrapper(false);\r\n this.setMobileUrlWrapper('');\r\n this.qrcodeStatus = 'expired';\r\n if (clearValue) {\r\n this.mobileUploadFiles = [];\r\n }\r\n this.open = false;\r\n }\r\n\r\n // 删除文件\r\n private handleDelete = async (cos_key: any) => {\r\n const res = await sendHttpRequest({\r\n url: `/sdk/v1/update_id/${uploadNumberSDK.number}/file`,\r\n method: 'delete',\r\n params: {\r\n update_id: uploadNumberSDK.number,\r\n cos_key,\r\n }\r\n });\r\n if (res?.success) {\r\n this.mobileUploadFiles = this.mobileUploadFiles.filter(it => it.cos_key !== cos_key);\r\n this.value = this.value.filter(it => it.cos_key !== cos_key);\r\n this.ok.emit(this.value);\r\n }\r\n }\r\n\r\n\r\n private handleOpenUpload = (): void => {\r\n if (this.disabled) return;\r\n if (this.maxFileCount <= this.value.length) {\r\n Message.info('文件数量已达到上限!');\r\n return;\r\n }\r\n this.mobileUploadFiles = [];\r\n this.open = true;\r\n this.handleStartMobileUpload();\r\n }\r\n\r\n render() {\r\n return (\r\n <div>\r\n {this.uploadAreaMode ? <div class=\"upload-area-mode\">\r\n <div class=\"upload-area\">\r\n {this.value.map((item, index) => <div class=\"file-item\" key={item.cos_key || index}>\r\n <div class=\"file-item-content\">\r\n <span class=\"file-icon\">📝</span>\r\n <span class=\"file-name\">{item.file_name}</span>\r\n </div>\r\n {!this.disabled && <button class=\"remove-file\" onClick={(event) => {\r\n event.stopPropagation();\r\n this.handleDelete(item.cos_key);\r\n }}>×</button>}\r\n </div>)}\r\n </div>\r\n {!this.disabled && this.value.length < this.maxFileCount && <div class=\"upload-actions\">\r\n <div class=\"upload-placeholder\" onClick={this.handleOpenUpload}>\r\n <img src=\"https://pub.pincaimao.com/static/web/images/home/i_upload.png\" />\r\n <p class=\"upload-text\">{this.uploadText}</p>\r\n {!!this.acceptFileSuffixList.length && <p class=\"upload-hint\">支持 {this.acceptFileSuffixList.join('、')} 格式。</p>}\r\n </div>\r\n </div>}\r\n </div> : <div class=\"mobile-upload\">\r\n <div class=\"btn btn-link\" onClick={this.handleOpenUpload}>扫码上传</div>\r\n </div>}\r\n {\r\n this.open && <div class=\"mask\">\r\n <div class=\"upload-wrapper\">\r\n {\r\n this.setStartMobileUpload ? <div class=\"upload-box\">\r\n <div class=\"qrcode-wrapper\">\r\n {\r\n this.qrcodeStatus === 'active' && <img class=\"qrcode\" src={this.qrcodeUrl} />\r\n }\r\n {\r\n this.qrcodeStatus === 'loading' && <span class=\"loading\">加载中...</span>\r\n }\r\n {\r\n this.qrcodeStatus === 'expired' && <div\r\n class=\"btn btn-link\"\r\n onClick={this.handleStartMobileUpload}\r\n >重新获取</div>\r\n }\r\n </div>\r\n <div class=\"time-expire\">\r\n 二维码有效期至 {this.expireTime}\r\n </div>\r\n <div class=\"alert-tip\">\r\n 上传过程中请不要关闭此弹窗\r\n </div>\r\n {\r\n this.qrcodeStatus === 'active' && <div\r\n style={{ marginTop: '12px', fontSize: '12px' }}\r\n class=\"btn btn-link\"\r\n onClick={() => {\r\n navigator.clipboard\r\n .writeText(this.mobileUrl)\r\n .then(() => {\r\n Message.success(\"已复制到剪贴板\");\r\n })\r\n .catch(() => {\r\n Message.error(\"复制失败\");\r\n });\r\n }}\r\n >复制二维码地址</div>\r\n }\r\n </div> : (this.startMobileUploadLoading && <span class=\"loading\">加载中...</span>)\r\n }\r\n {/* 上传文件列表 */}\r\n <div style={{ marginTop: '12px' }}>\r\n {\r\n this.mobileUploadFiles.map((item, index) => {\r\n return <div class=\"file-item\" key={index}>\r\n <div class=\"file-item-content\">\r\n <span class=\"file-icon\">📝</span>\r\n <span class=\"file-name\">{item?.file_name}</span>\r\n </div>\r\n <button class=\"remove-file\" onClick={(e) => {\r\n e.stopPropagation();\r\n this.handleDelete(item.cos_key)\r\n }}>×</button>\r\n </div>\r\n })\r\n }\r\n </div>\r\n <div class=\"modal-footer\">\r\n <div class=\"btn btn-default\" onClick={() => this.cancelMobileUpload()}>取消</div>\r\n <div class=\"btn btn-primary\" onClick={() => {\r\n if (this.value.length + this.mobileUploadFiles.length > this.maxFileCount) {\r\n Message.info(`最多只能选择${this.maxFileCount}个文件,请删除多余文件!`);\r\n return;\r\n }\r\n this.value = this.multiple\r\n ? [...this.value, ...this.mobileUploadFiles]\r\n : this.mobileUploadFiles.slice(0, 1);\r\n this.ok.emit(this.value);\r\n this.cancelMobileUpload(false);\r\n }}>完成</div>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n )\r\n }\r\n}"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h } from './p-CR7WLzmM.js';
|
|
2
|
-
import {
|
|
2
|
+
import { l as getSupportedAudioMimeType, h as uploadFileToBackend, i as convertAudioToText } from './p-DBGeSJL5.js';
|
|
3
3
|
|
|
4
4
|
const componentsVoiceInputBtnCss = ":host{display:inline-flex}.voice-input-button{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;padding:0;margin:0;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#666;cursor:pointer;transition:background-color 0.2s, color 0.2s, border-color 0.2s}.voice-input-button:hover:not(:disabled){background-color:#f0f0f0;border-color:#bfbfbf}.voice-input-button:focus-visible{outline:2px solid rgba(46, 110, 223, 0.35);outline-offset:2px}.voice-input-button:disabled{cursor:not-allowed;opacity:0.55}.voice-input-button.recording{background-color:rgba(255, 0, 0, 0.1);border-color:rgba(255, 59, 48, 0.45);color:#ff3b30;animation:pulse 1.5s infinite}.voice-input-button.converting{background-color:rgba(0, 122, 255, 0.1);border-color:rgba(0, 122, 255, 0.35);color:#007aff}.converting-icon{animation:spin 1.5s linear infinite}@keyframes pulse{0%,100%{opacity:1}50%{opacity:0.65}}@keyframes spin{to{transform:rotate(360deg)}}";
|
|
5
5
|
|
|
@@ -231,6 +231,6 @@ function defineCustomElement() {
|
|
|
231
231
|
defineCustomElement();
|
|
232
232
|
|
|
233
233
|
export { ComponentsVoiceInputBtn as C, defineCustomElement as d };
|
|
234
|
-
//# sourceMappingURL=p-
|
|
234
|
+
//# sourceMappingURL=p-CdChGfaD.js.map
|
|
235
235
|
|
|
236
|
-
//# sourceMappingURL=p-
|
|
236
|
+
//# sourceMappingURL=p-CdChGfaD.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-C-lvK9NX.js","mappings":";;;AAAA,MAAM,0BAA0B,GAAG,u8BAAu8B;;MCe79B,uBAAuB,iBAAAA,kBAAA,CAAA,MAAA,uBAAA,SAAAC,CAAA,CAAA;;;;;;;;;AAClC;;AAEG;IACK,QAAQ,GAAY,KAAK;AAEjC;;AAEG;IACK,gBAAgB,GAAW,EAAE;AAErC;;AAEG;IACK,MAAM,GAAgB,IAAI;AAElC;;AAEG;AACM,IAAA,eAAe;AAExB;;AAEG;AACM,IAAA,iBAAiB;AAE1B;;AAEG;AACM,IAAA,cAAc;IAEN,OAAO,GAAqB,MAAM;IAClC,kBAAkB,GAAW,EAAE;IAExC,cAAc,GAAyB,IAAI;IAC3C,YAAY,GAAuB,IAAI;IACvC,YAAY,GAAe,EAAE;IAC7B,cAAc,GAAW,EAAE;IAC3B,mBAAmB,GAAW,CAAC;IAC/B,eAAe,GAA0C,IAAI;IAErE,oBAAoB,GAAA;QAClB,IAAI,CAAC,0BAA0B,EAAE;;IAG3B,QAAQ,CAAC,MAAc,EAAE,MAAc,EAAA;AAC7C,QAAA,OAAO,IAAI,CAAC,MAAM,KAAK,IAAI,GAAG,MAAM,GAAG,MAAM;;AAGvC,IAAA,UAAU,CAAC,MAAwB,EAAA;AACzC,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM;AACrB,QAAA,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC;;IAG7B,UAAU,CAAC,KAAc,EAAE,OAAe,EAAA;AAChD,QAAA,OAAO,CAAC,KAAK,CAA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Q,EACb,KAAK,EAAE;AACL,gBAAA,oBAAoB,EAAE,IAAI;AAC1B,gBAAA,WAAW,EAAE,WAAW;AACxB,gBAAA,YAAY,EAAE,YAAY;AAC3B,aAAA,EACD,KAAK,EAAE,KAAK,EACA,YAAA,EAAA,KAAK,EACH,cAAA,EAAA,WAAW,GAAG,MAAM,GAAG,OAAO,EAC5C,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,YAAY,EACvC,OAAO,EAAE,IAAI,CAAC,YAAY,EAEzB,EAAA,YAAY,IACX,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,iBAAiB,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,cAAc,EAAA,aAAA,EAAa,MAAM,EAAA,EAC5G,CAAM,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,iOAAiO,EAAG,CAAA,CACxO,KAEN,CAAA,CAAA,KAAA,EAAA,EAAK,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,cAAc,EAAA,aAAA,EAAa,MAAM,EAAA,EACpF,CAAM,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,8EAA8E,EAAG,CAAA,EACzF,CAAM,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,sGAAsG,EAAG,CAAA,EAChH,WAAW,IAAI,cAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,EAAC,IAAI,EAAC,KAAK,GAAG,CACvD,CACP,CACM;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/components-voice-input-btn/components-voice-input-btn.css?tag=components-voice-input-btn&encapsulation=shadow","src/components/components-voice-input-btn/components-voice-input-btn.tsx"],"sourcesContent":[":host {\n display: inline-flex;\n}\n\n.voice-input-button {\n width: 32px;\n height: 32px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n margin: 0;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n background: #fff;\n color: #666;\n cursor: pointer;\n transition: background-color 0.2s, color 0.2s, border-color 0.2s;\n}\n\n.voice-input-button:hover:not(:disabled) {\n background-color: #f0f0f0;\n border-color: #bfbfbf;\n}\n\n.voice-input-button:focus-visible {\n outline: 2px solid rgba(46, 110, 223, 0.35);\n outline-offset: 2px;\n}\n\n.voice-input-button:disabled {\n cursor: not-allowed;\n opacity: 0.55;\n}\n\n.voice-input-button.recording {\n background-color: rgba(255, 0, 0, 0.1);\n border-color: rgba(255, 59, 48, 0.45);\n color: #ff3b30;\n animation: pulse 1.5s infinite;\n}\n\n.voice-input-button.converting {\n background-color: rgba(0, 122, 255, 0.1);\n border-color: rgba(0, 122, 255, 0.35);\n color: #007aff;\n}\n\n.converting-icon {\n animation: spin 1.5s linear infinite;\n}\n\n@keyframes pulse {\n 0%, 100% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.65;\n }\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n","import { Component, Event, EventEmitter, h, Prop, State } from '@stencil/core';\nimport { convertAudioToText, getSupportedAudioMimeType, uploadFileToBackend } from '../../utils/utils';\nimport { ErrorEventDetail } from '../../utils/error-event';\n\nexport type VoiceInputStatus = 'idle' | 'recording' | 'converting';\n\n/**\n * 通用语音输入按钮\n * 负责录音、上传音频并将语音转换为文字\n */\n@Component({\n tag: 'components-voice-input-btn',\n styleUrls: ['components-voice-input-btn.css'],\n shadow: true,\n})\nexport class ComponentsVoiceInputBtn {\n /**\n * 是否禁用语音输入\n */\n @Prop() disabled: boolean = false;\n\n /**\n * 最大录音时长,单位为秒\n */\n @Prop() maxRecordingTime: number = 60;\n\n /**\n * 组件语言\n */\n @Prop() locale: 'zh' | 'en' = 'zh';\n\n /**\n * 语音识别完成事件,返回识别后的文字\n */\n @Event() voiceRecognized: EventEmitter<string>;\n\n /**\n * 语音输入状态变化事件\n */\n @Event() voiceStatusChange: EventEmitter<VoiceInputStatus>;\n\n /**\n * 语音输入错误事件\n */\n @Event() someErrorEvent: EventEmitter<ErrorEventDetail>;\n\n @State() private _status: VoiceInputStatus = 'idle';\n @State() private _recordingTimeLeft: number = 60;\n\n private _audioRecorder: MediaRecorder | null = null;\n private _audioStream: MediaStream | null = null;\n private _audioChunks: BlobPart[] = [];\n private _audioMimeType: string = '';\n private _recordingStartTime: number = 0;\n private _recordingTimer: ReturnType<typeof setInterval> | null = null;\n\n disconnectedCallback(): void {\n this._releaseRecordingResources();\n }\n\n private _getText(zhText: string, enText: string): string {\n return this.locale === 'en' ? enText : zhText;\n }\n\n private _setStatus(status: VoiceInputStatus): void {\n this._status = status;\n this.voiceStatusChange.emit(status);\n }\n\n private _emitError(error: unknown, message: string): void {\n console.error(message, error);\n this.someErrorEvent.emit({ error, message });\n }\n\n private _handleClick = (): void => {\n if (this.disabled || this._status === 'converting') {\n return;\n }\n\n if (this._status === 'recording') {\n this._stopRecording();\n return;\n }\n\n if (!navigator.mediaDevices?.getUserMedia || !window.MediaRecorder) {\n this._emitError(new Error('MediaRecorder API is unavailable'), this._getText('当前浏览器不支持语音输入', 'Voice input is not supported by this browser'));\n return;\n }\n\n navigator.mediaDevices\n .getUserMedia({ audio: true })\n .then((stream: MediaStream) => this._startRecording(stream))\n .catch((error: unknown) => {\n this._emitError(error, this._getText('无法访问麦克风,请检查麦克风权限', 'Unable to access the microphone. Please check microphone permissions'));\n });\n };\n\n private _startRecording(stream: MediaStream): void {\n this._audioStream = stream;\n\n try {\n const supportedMimeType = getSupportedAudioMimeType();\n this._audioRecorder = supportedMimeType\n ? new MediaRecorder(stream, { mimeType: supportedMimeType })\n : new MediaRecorder(stream);\n this._audioMimeType = this._audioRecorder.mimeType || supportedMimeType || 'audio/webm';\n } catch (error) {\n this._releaseRecordingResources();\n this._emitError(error, this._getText('无法启动录音,请检查麦克风设备', 'Unable to start recording. Please check the microphone'));\n return;\n }\n\n this._audioChunks = [];\n this._recordingStartTime = Date.now();\n this._recordingTimeLeft = this.maxRecordingTime;\n\n this._audioRecorder.ondataavailable = (event: BlobEvent): void => {\n if (event.data.size > 0) {\n this._audioChunks.push(event.data);\n }\n };\n\n this._audioRecorder.onerror = (event: Event): void => {\n this._emitError(event, this._getText('录音失败,请重试', 'Recording failed. Please try again'));\n this._releaseRecordingResources();\n this._setStatus('idle');\n };\n\n this._audioRecorder.onstop = (): void => {\n this._stopMediaStream();\n void this._processAudioRecording();\n };\n\n try {\n this._audioRecorder.start(100);\n this._setStatus('recording');\n this._recordingTimer = setInterval((): void => {\n const elapsedTime = Math.floor((Date.now() - this._recordingStartTime) / 1000);\n this._recordingTimeLeft = Math.max(0, this.maxRecordingTime - elapsedTime);\n if (this._recordingTimeLeft <= 0) {\n this._stopRecording();\n }\n }, 1000);\n } catch (error) {\n this._releaseRecordingResources();\n this._setStatus('idle');\n this._emitError(error, this._getText('开始录音失败,请重试', 'Failed to start recording. Please try again'));\n }\n }\n\n private _stopRecording(): void {\n if (!this._audioRecorder || this._audioRecorder.state === 'inactive') {\n return;\n }\n\n this._clearRecordingTimer();\n this._audioRecorder.stop();\n }\n\n private async _processAudioRecording(): Promise<void> {\n if (this._audioChunks.length === 0) {\n this._setStatus('idle');\n this._emitError(new Error('Recorded audio is empty'), this._getText('未录制到语音内容,请重试', 'No audio was recorded. Please try again'));\n return;\n }\n\n this._setStatus('converting');\n\n try {\n const audioBlob = new Blob(this._audioChunks, { type: this._audioMimeType });\n if (audioBlob.size === 0) {\n throw new Error('Recorded audio is empty');\n }\n\n const extension = this._getFileExtension(this._audioMimeType);\n const audioFile = new File([audioBlob], `audio_input.${extension}`, { type: this._audioMimeType });\n const fileInfo = await uploadFileToBackend(audioFile, {}, { tags: ['audio'] });\n const transcriptionText = await convertAudioToText(fileInfo.cos_key);\n\n if (!transcriptionText) {\n throw new Error('No transcription text returned');\n }\n\n this.voiceRecognized.emit(transcriptionText);\n } catch (error) {\n this._emitError(error, this._getText('语音识别失败,请重试', 'Speech recognition failed. Please try again'));\n } finally {\n this._audioChunks = [];\n this._audioRecorder = null;\n this._setStatus('idle');\n }\n }\n\n private _getFileExtension(mimeType: string): string {\n if (mimeType.includes('mp4')) return 'm4a';\n if (mimeType.includes('ogg')) return 'ogg';\n return 'webm';\n }\n\n private _clearRecordingTimer(): void {\n if (this._recordingTimer) {\n clearInterval(this._recordingTimer);\n this._recordingTimer = null;\n }\n }\n\n private _stopMediaStream(): void {\n this._audioStream?.getTracks().forEach((track: MediaStreamTrack): void => track.stop());\n this._audioStream = null;\n }\n\n private _releaseRecordingResources(): void {\n this._clearRecordingTimer();\n\n if (this._audioRecorder) {\n this._audioRecorder.ondataavailable = null;\n this._audioRecorder.onerror = null;\n this._audioRecorder.onstop = null;\n if (this._audioRecorder.state !== 'inactive') {\n this._audioRecorder.stop();\n }\n }\n\n this._stopMediaStream();\n this._audioRecorder = null;\n this._audioChunks = [];\n }\n\n render() {\n const isRecording = this._status === 'recording';\n const isConverting = this._status === 'converting';\n const title = isRecording\n ? this._getText(`点击停止录音(剩余${this._recordingTimeLeft}秒)`, `Stop recording (${this._recordingTimeLeft}s remaining)`)\n : isConverting\n ? this._getText('正在识别语音...', 'Recognizing speech...')\n : this._getText('语音输入', 'Voice input');\n\n return (\n <button\n type=\"button\"\n class={{\n 'voice-input-button': true,\n 'recording': isRecording,\n 'converting': isConverting,\n }}\n title={title}\n aria-label={title}\n aria-pressed={isRecording ? 'true' : 'false'}\n disabled={this.disabled || isConverting}\n onClick={this._handleClick}\n >\n {isConverting ? (\n <svg class=\"converting-icon\" viewBox=\"0 0 24 24\" width=\"20\" height=\"20\" fill=\"currentColor\" aria-hidden=\"true\">\n <path d=\"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z\" />\n </svg>\n ) : (\n <svg viewBox=\"0 0 24 24\" width=\"20\" height=\"20\" fill=\"currentColor\" aria-hidden=\"true\">\n <path d=\"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z\" />\n <path d=\"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z\" />\n {isRecording && <circle cx=\"12\" cy=\"11\" r=\"4\" fill=\"red\" />}\n </svg>\n )}\n </button>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-CdChGfaD.js","mappings":";;;AAAA,MAAM,0BAA0B,GAAG,u8BAAu8B;;MCe79B,uBAAuB,iBAAAA,kBAAA,CAAA,MAAA,uBAAA,SAAAC,CAAA,CAAA;;;;;;;;;AAClC;;AAEG;IACK,QAAQ,GAAY,KAAK;AAEjC;;AAEG;IACK,gBAAgB,GAAW,EAAE;AAErC;;AAEG;IACK,MAAM,GAAgB,IAAI;AAElC;;AAEG;AACM,IAAA,eAAe;AAExB;;AAEG;AACM,IAAA,iBAAiB;AAE1B;;AAEG;AACM,IAAA,cAAc;IAEN,OAAO,GAAqB,MAAM;IAClC,kBAAkB,GAAW,EAAE;IAExC,cAAc,GAAyB,IAAI;IAC3C,YAAY,GAAuB,IAAI;IACvC,YAAY,GAAe,EAAE;IAC7B,cAAc,GAAW,EAAE;IAC3B,mBAAmB,GAAW,CAAC;IAC/B,eAAe,GAA0C,IAAI;IAErE,oBAAoB,GAAA;QAClB,IAAI,CAAC,0BAA0B,EAAE;;IAG3B,QAAQ,CAAC,MAAc,EAAE,MAAc,EAAA;AAC7C,QAAA,OAAO,IAAI,CAAC,MAAM,KAAK,IAAI,GAAG,MAAM,GAAG,MAAM;;AAGvC,I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;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/components-voice-input-btn/components-voice-input-btn.css?tag=components-voice-input-btn&encapsulation=shadow","src/components/components-voice-input-btn/components-voice-input-btn.tsx"],"sourcesContent":[":host {\n display: inline-flex;\n}\n\n.voice-input-button {\n width: 32px;\n height: 32px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n margin: 0;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n background: #fff;\n color: #666;\n cursor: pointer;\n transition: background-color 0.2s, color 0.2s, border-color 0.2s;\n}\n\n.voice-input-button:hover:not(:disabled) {\n background-color: #f0f0f0;\n border-color: #bfbfbf;\n}\n\n.voice-input-button:focus-visible {\n outline: 2px solid rgba(46, 110, 223, 0.35);\n outline-offset: 2px;\n}\n\n.voice-input-button:disabled {\n cursor: not-allowed;\n opacity: 0.55;\n}\n\n.voice-input-button.recording {\n background-color: rgba(255, 0, 0, 0.1);\n border-color: rgba(255, 59, 48, 0.45);\n color: #ff3b30;\n animation: pulse 1.5s infinite;\n}\n\n.voice-input-button.converting {\n background-color: rgba(0, 122, 255, 0.1);\n border-color: rgba(0, 122, 255, 0.35);\n color: #007aff;\n}\n\n.converting-icon {\n animation: spin 1.5s linear infinite;\n}\n\n@keyframes pulse {\n 0%, 100% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.65;\n }\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n","import { Component, Event, EventEmitter, h, Prop, State } from '@stencil/core';\nimport { convertAudioToText, getSupportedAudioMimeType, uploadFileToBackend } from '../../utils/utils';\nimport { ErrorEventDetail } from '../../utils/error-event';\n\nexport type VoiceInputStatus = 'idle' | 'recording' | 'converting';\n\n/**\n * 通用语音输入按钮\n * 负责录音、上传音频并将语音转换为文字\n */\n@Component({\n tag: 'components-voice-input-btn',\n styleUrls: ['components-voice-input-btn.css'],\n shadow: true,\n})\nexport class ComponentsVoiceInputBtn {\n /**\n * 是否禁用语音输入\n */\n @Prop() disabled: boolean = false;\n\n /**\n * 最大录音时长,单位为秒\n */\n @Prop() maxRecordingTime: number = 60;\n\n /**\n * 组件语言\n */\n @Prop() locale: 'zh' | 'en' = 'zh';\n\n /**\n * 语音识别完成事件,返回识别后的文字\n */\n @Event() voiceRecognized: EventEmitter<string>;\n\n /**\n * 语音输入状态变化事件\n */\n @Event() voiceStatusChange: EventEmitter<VoiceInputStatus>;\n\n /**\n * 语音输入错误事件\n */\n @Event() someErrorEvent: EventEmitter<ErrorEventDetail>;\n\n @State() private _status: VoiceInputStatus = 'idle';\n @State() private _recordingTimeLeft: number = 60;\n\n private _audioRecorder: MediaRecorder | null = null;\n private _audioStream: MediaStream | null = null;\n private _audioChunks: BlobPart[] = [];\n private _audioMimeType: string = '';\n private _recordingStartTime: number = 0;\n private _recordingTimer: ReturnType<typeof setInterval> | null = null;\n\n disconnectedCallback(): void {\n this._releaseRecordingResources();\n }\n\n private _getText(zhText: string, enText: string): string {\n return this.locale === 'en' ? enText : zhText;\n }\n\n private _setStatus(status: VoiceInputStatus): void {\n this._status = status;\n this.voiceStatusChange.emit(status);\n }\n\n private _emitError(error: unknown, message: string): void {\n console.error(message, error);\n this.someErrorEvent.emit({ error, message });\n }\n\n private _handleClick = (): void => {\n if (this.disabled || this._status === 'converting') {\n return;\n }\n\n if (this._status === 'recording') {\n this._stopRecording();\n return;\n }\n\n if (!navigator.mediaDevices?.getUserMedia || !window.MediaRecorder) {\n this._emitError(new Error('MediaRecorder API is unavailable'), this._getText('当前浏览器不支持语音输入', 'Voice input is not supported by this browser'));\n return;\n }\n\n navigator.mediaDevices\n .getUserMedia({ audio: true })\n .then((stream: MediaStream) => this._startRecording(stream))\n .catch((error: unknown) => {\n this._emitError(error, this._getText('无法访问麦克风,请检查麦克风权限', 'Unable to access the microphone. Please check microphone permissions'));\n });\n };\n\n private _startRecording(stream: MediaStream): void {\n this._audioStream = stream;\n\n try {\n const supportedMimeType = getSupportedAudioMimeType();\n this._audioRecorder = supportedMimeType\n ? new MediaRecorder(stream, { mimeType: supportedMimeType })\n : new MediaRecorder(stream);\n this._audioMimeType = this._audioRecorder.mimeType || supportedMimeType || 'audio/webm';\n } catch (error) {\n this._releaseRecordingResources();\n this._emitError(error, this._getText('无法启动录音,请检查麦克风设备', 'Unable to start recording. Please check the microphone'));\n return;\n }\n\n this._audioChunks = [];\n this._recordingStartTime = Date.now();\n this._recordingTimeLeft = this.maxRecordingTime;\n\n this._audioRecorder.ondataavailable = (event: BlobEvent): void => {\n if (event.data.size > 0) {\n this._audioChunks.push(event.data);\n }\n };\n\n this._audioRecorder.onerror = (event: Event): void => {\n this._emitError(event, this._getText('录音失败,请重试', 'Recording failed. Please try again'));\n this._releaseRecordingResources();\n this._setStatus('idle');\n };\n\n this._audioRecorder.onstop = (): void => {\n this._stopMediaStream();\n void this._processAudioRecording();\n };\n\n try {\n this._audioRecorder.start(100);\n this._setStatus('recording');\n this._recordingTimer = setInterval((): void => {\n const elapsedTime = Math.floor((Date.now() - this._recordingStartTime) / 1000);\n this._recordingTimeLeft = Math.max(0, this.maxRecordingTime - elapsedTime);\n if (this._recordingTimeLeft <= 0) {\n this._stopRecording();\n }\n }, 1000);\n } catch (error) {\n this._releaseRecordingResources();\n this._setStatus('idle');\n this._emitError(error, this._getText('开始录音失败,请重试', 'Failed to start recording. Please try again'));\n }\n }\n\n private _stopRecording(): void {\n if (!this._audioRecorder || this._audioRecorder.state === 'inactive') {\n return;\n }\n\n this._clearRecordingTimer();\n this._audioRecorder.stop();\n }\n\n private async _processAudioRecording(): Promise<void> {\n if (this._audioChunks.length === 0) {\n this._setStatus('idle');\n this._emitError(new Error('Recorded audio is empty'), this._getText('未录制到语音内容,请重试', 'No audio was recorded. Please try again'));\n return;\n }\n\n this._setStatus('converting');\n\n try {\n const audioBlob = new Blob(this._audioChunks, { type: this._audioMimeType });\n if (audioBlob.size === 0) {\n throw new Error('Recorded audio is empty');\n }\n\n const extension = this._getFileExtension(this._audioMimeType);\n const audioFile = new File([audioBlob], `audio_input.${extension}`, { type: this._audioMimeType });\n const fileInfo = await uploadFileToBackend(audioFile, {}, { tags: ['audio'] });\n const transcriptionText = await convertAudioToText(fileInfo.cos_key);\n\n if (!transcriptionText) {\n throw new Error('No transcription text returned');\n }\n\n this.voiceRecognized.emit(transcriptionText);\n } catch (error) {\n this._emitError(error, this._getText('语音识别失败,请重试', 'Speech recognition failed. Please try again'));\n } finally {\n this._audioChunks = [];\n this._audioRecorder = null;\n this._setStatus('idle');\n }\n }\n\n private _getFileExtension(mimeType: string): string {\n if (mimeType.includes('mp4')) return 'm4a';\n if (mimeType.includes('ogg')) return 'ogg';\n return 'webm';\n }\n\n private _clearRecordingTimer(): void {\n if (this._recordingTimer) {\n clearInterval(this._recordingTimer);\n this._recordingTimer = null;\n }\n }\n\n private _stopMediaStream(): void {\n this._audioStream?.getTracks().forEach((track: MediaStreamTrack): void => track.stop());\n this._audioStream = null;\n }\n\n private _releaseRecordingResources(): void {\n this._clearRecordingTimer();\n\n if (this._audioRecorder) {\n this._audioRecorder.ondataavailable = null;\n this._audioRecorder.onerror = null;\n this._audioRecorder.onstop = null;\n if (this._audioRecorder.state !== 'inactive') {\n this._audioRecorder.stop();\n }\n }\n\n this._stopMediaStream();\n this._audioRecorder = null;\n this._audioChunks = [];\n }\n\n render() {\n const isRecording = this._status === 'recording';\n const isConverting = this._status === 'converting';\n const title = isRecording\n ? this._getText(`点击停止录音(剩余${this._recordingTimeLeft}秒)`, `Stop recording (${this._recordingTimeLeft}s remaining)`)\n : isConverting\n ? this._getText('正在识别语音...', 'Recognizing speech...')\n : this._getText('语音输入', 'Voice input');\n\n return (\n <button\n type=\"button\"\n class={{\n 'voice-input-button': true,\n 'recording': isRecording,\n 'converting': isConverting,\n }}\n title={title}\n aria-label={title}\n aria-pressed={isRecording ? 'true' : 'false'}\n disabled={this.disabled || isConverting}\n onClick={this._handleClick}\n >\n {isConverting ? (\n <svg class=\"converting-icon\" viewBox=\"0 0 24 24\" width=\"20\" height=\"20\" fill=\"currentColor\" aria-hidden=\"true\">\n <path d=\"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z\" />\n </svg>\n ) : (\n <svg viewBox=\"0 0 24 24\" width=\"20\" height=\"20\" fill=\"currentColor\" aria-hidden=\"true\">\n <path d=\"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z\" />\n <path d=\"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z\" />\n {isRecording && <circle cx=\"12\" cy=\"11\" r=\"4\" fill=\"red\" />}\n </svg>\n )}\n </button>\n );\n }\n}\n"],"version":3}
|
|
@@ -31,7 +31,7 @@ onChange('token', value => {
|
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
|
|
34
|
-
const version = "1.0.
|
|
34
|
+
const version = "1.0.3";
|
|
35
35
|
|
|
36
36
|
// 导入环境变量
|
|
37
37
|
function format(first, middle, last) {
|
|
@@ -729,7 +729,7 @@ const uploadFileByUrl = async (params, headers) => {
|
|
|
729
729
|
}
|
|
730
730
|
};
|
|
731
731
|
|
|
732
|
-
export { FileUploadState as F, PCM_DOMAIN as P, authStore as a, verifySmsCode as b, sendSSERequest as c,
|
|
733
|
-
//# sourceMappingURL=p-
|
|
732
|
+
export { FileUploadState as F, PCM_DOMAIN as P, authStore as a, verifySmsCode as b, sendSSERequest as c, fetchAgentInfo as d, getSupportedMimeType as e, format as f, getCosPreviewUrl as g, uploadFileToBackend as h, convertAudioToText as i, getOemPositions as j, synthesizeAudio as k, getSupportedAudioMimeType as l, getCosPresignedUrl as m, formatFileSize as n, sendHttpRequest as s, uploadFileByUrl as u, verifyApiKey as v };
|
|
733
|
+
//# sourceMappingURL=p-DBGeSJL5.js.map
|
|
734
734
|
|
|
735
|
-
//# sourceMappingURL=p-
|
|
735
|
+
//# sourceMappingURL=p-DBGeSJL5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-DBGeSJL5.js","mappings":";;AAAA;AAKA;AACO,MAAM,UAAU,GAAG,2CAA4C;AACzD,MAAA,UAAU,GAAG;;ACP1B;AAGO,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,WAAW,CAAC;IACxD,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI;AACtD,CAAA,CAAC;AAEF;AACa,MAAA,SAAS,GAAG;AACvB,IAAA,QAAQ,EAAE,MAAM,SAAS,CAAC,KAAK;AAC/B,IAAA,QAAQ,EAAE,CAAC,KAAa,KAAI;AAC1B,QAAA,SAAS,CAAC,KAAK,GAAG,KAAK;AACvB,QAAA,YAAY,CAAC,OAAO,CAAC,oBAAoB,EAAE,KAAK,CAAC;KAClD;IACD,UAAU,EAAE,MAAK;AACf,QAAA,SAAS,CAAC,KAAK,GAAG,IAAI;AACtB,QAAA,YAAY,CAAC,UAAU,CAAC,oBAAoB,CAAC;;;AAIjD;AACA,QAAQ,CAAC,OAAO,EAAE,KAAK,IAAG;IACxB,IAAI,KAAK,EAAE;AACT,QAAA,YAAY,CAAC,OAAO,CAAC,oBAAoB,EAAE,KAAK,CAAC;;SAC5C;AACL,QAAA,YAAY,CAAC,UAAU,CAAC,oBAAoB,CAAC;;AAEjD,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/utils/env.ts","store/auth.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}; ","// 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});"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h } from './p-CR7WLzmM.js';
|
|
2
|
-
import { a as authStore, v as verifyApiKey, c as sendSSERequest, P as PCM_DOMAIN } from './p-
|
|
2
|
+
import { a as authStore, v as verifyApiKey, c as sendSSERequest, P as PCM_DOMAIN } from './p-DBGeSJL5.js';
|
|
3
3
|
import { E as ErrorEventBus } from './p-C0FYX2-Z.js';
|
|
4
4
|
import { c as configStore } from './p-DUQ46MUh.js';
|
|
5
5
|
|
|
@@ -317,6 +317,6 @@ function defineCustomElement() {
|
|
|
317
317
|
defineCustomElement();
|
|
318
318
|
|
|
319
319
|
export { ComponentsThousandResumeWrapper as C, defineCustomElement as d };
|
|
320
|
-
//# sourceMappingURL=p-
|
|
320
|
+
//# sourceMappingURL=p-DCqDbDa5.js.map
|
|
321
321
|
|
|
322
|
-
//# sourceMappingURL=p-
|
|
322
|
+
//# sourceMappingURL=p-DCqDbDa5.js.map
|