pcm-agents 0.6.76 → 0.6.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components-position-selector.cjs.entry.js +1 -1
- package/dist/cjs/index-C_qhED9Z.js +2 -6
- package/dist/cjs/{index-DJuHr4W9.js → index-DOCJeM7I.js} +3 -3
- package/dist/cjs/{index-DJuHr4W9.js.map → index-DOCJeM7I.js.map} +1 -1
- 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-jlsx-modal.cjs.entry.js +24 -2
- package/dist/cjs/oem-jlsx-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/oem-jlsx-modal.entry.cjs.js.map +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-mnms-modal.cjs.entry.js +1 -1
- package/dist/cjs/oem-qgqjl-modal.cjs.entry.js +1 -1
- package/dist/cjs/oem-zygh-modal.cjs.entry.js +1 -1
- package/dist/cjs/{pcm-1zhanshi-mnms-modal_28.cjs.entry.js → pcm-1zhanshi-mnms-modal_29.cjs.entry.js} +540 -108
- package/dist/cjs/pcm-1zhanshi-mnms-modal_29.cjs.entry.js.map +1 -0
- package/dist/cjs/pcm-agents.cjs.js +1 -1
- package/dist/cjs/pcm-hr-chat-modal.cjs.entry.js +19 -2
- package/dist/cjs/pcm-hr-chat-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/pcm-hr-chat-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/{sentry-reporter-COJ0pOg4.js → sentry-reporter-BY3e-WWj.js} +3 -3
- package/dist/cjs/{sentry-reporter-COJ0pOg4.js.map → sentry-reporter-BY3e-WWj.js.map} +1 -1
- package/dist/collection/components/oem-jlsx-modal/oem-jlsx-modal.js +22 -0
- package/dist/collection/components/oem-jlsx-modal/oem-jlsx-modal.js.map +1 -1
- package/dist/collection/components/pcm-app-chat-modal/pcm-app-chat-modal.js +19 -0
- package/dist/collection/components/pcm-app-chat-modal/pcm-app-chat-modal.js.map +1 -1
- package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.js +17 -0
- package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.js.map +1 -1
- package/dist/collection/components/pcm-jlpp-modal/pcm-jlpp-modal.js +12 -11
- package/dist/collection/components/pcm-jlpp-modal/pcm-jlpp-modal.js.map +1 -1
- package/dist/collection/components/pcm-jlsx-modal/pcm-jlsx-modal.js +12 -0
- package/dist/collection/components/pcm-jlsx-modal/pcm-jlsx-modal.js.map +1 -1
- package/dist/collection/components/pcm-jlzz-modal/pcm-jlzz-modal.js +88 -2
- package/dist/collection/components/pcm-jlzz-modal/pcm-jlzz-modal.js.map +1 -1
- package/dist/collection/components/pcm-qgqjl-modal/pcm-qgqjl-modal.js +20 -19
- package/dist/collection/components/pcm-qgqjl-modal/pcm-qgqjl-modal.js.map +1 -1
- package/dist/collection/components/pcm-virtual-chat-modal/pcm-virtual-chat-modal.js +108 -3
- package/dist/collection/components/pcm-virtual-chat-modal/pcm-virtual-chat-modal.js.map +1 -1
- package/dist/collection/components/pcm-zsk-chat-modal/pcm-zsk-chat-modal.js +17 -0
- package/dist/collection/components/pcm-zsk-chat-modal/pcm-zsk-chat-modal.js.map +1 -1
- package/dist/collection/components/pcm-zygh-v2-modal/pcm-zygh-v2-modal.js +14 -14
- package/dist/collection/components/pcm-zygh-v2-modal/pcm-zygh-v2-modal.js.map +1 -1
- package/dist/components/components-position-selector.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/oem-htws-modal.js +6 -6
- package/dist/components/oem-jd-modal.js +4 -4
- package/dist/components/oem-jlpp-modal.js +8 -8
- package/dist/components/oem-jlsx-modal.js +28 -6
- package/dist/components/oem-jlsx-modal.js.map +1 -1
- package/dist/components/oem-jlzz-modal.js +6 -6
- package/dist/components/oem-mnct-modal.js +8 -8
- package/dist/components/oem-mnms-modal.js +9 -9
- package/dist/components/oem-qgqjl-modal.js +8 -8
- package/dist/components/oem-zygh-modal.js +6 -6
- package/dist/components/{p-CGRQB-kz.js → p-9hnllPbt.js} +3 -3
- package/dist/components/{p-CGRQB-kz.js.map → p-9hnllPbt.js.map} +1 -1
- package/dist/components/{p-nFix5BDn.js → p-B7cdvqSY.js} +4 -4
- package/dist/components/{p-nFix5BDn.js.map → p-B7cdvqSY.js.map} +1 -1
- package/dist/components/{p-BZeNORff.js → p-BnkPmLIU.js} +111 -6
- package/dist/components/p-BnkPmLIU.js.map +1 -0
- package/dist/components/{p-DtCXILg5.js → p-C4KAf-6-.js} +3 -3
- package/dist/components/{p-DtCXILg5.js.map → p-C4KAf-6-.js.map} +1 -1
- package/dist/components/{p-pTzOe1-b.js → p-C6OdIxkm.js} +3 -3
- package/dist/components/{p-pTzOe1-b.js.map → p-C6OdIxkm.js.map} +1 -1
- package/dist/components/{p-BJnD41Qm.js → p-DHwXxizT.js} +3 -3
- package/dist/components/{p-BJnD41Qm.js.map → p-DHwXxizT.js.map} +1 -1
- package/dist/components/{p-Caxrsbp0.js → p-Da-8BxdM.js} +24 -5
- package/dist/components/p-Da-8BxdM.js.map +1 -0
- package/dist/components/{p--B9t4xVs.js → p-QwH3TimN.js} +3 -3
- package/dist/components/{p--B9t4xVs.js.map → p-QwH3TimN.js.map} +1 -1
- package/dist/components/{p-BjKpPzZZ.js → p-ikx6J73I.js} +3 -3
- package/dist/components/{p-BjKpPzZZ.js.map → p-ikx6J73I.js.map} +1 -1
- package/dist/components/{p-CvHWzHdd.js → p-qUBE1daM.js} +3 -3
- package/dist/components/{p-CvHWzHdd.js.map → p-qUBE1daM.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-chat-message.js +1 -1
- package/dist/components/pcm-digital-human.js +1 -1
- package/dist/components/pcm-export-records-modal.js +1 -1
- package/dist/components/pcm-hr-chat-modal.js +19 -2
- package/dist/components/pcm-hr-chat-modal.js.map +1 -1
- package/dist/components/pcm-htws-modal.js +7 -7
- package/dist/components/pcm-hyzj-modal.js +4 -4
- package/dist/components/pcm-jd-modal.js +4 -4
- package/dist/components/pcm-jlpp-modal.js +18 -17
- package/dist/components/pcm-jlpp-modal.js.map +1 -1
- package/dist/components/pcm-jlsx-modal.js +17 -5
- package/dist/components/pcm-jlsx-modal.js.map +1 -1
- package/dist/components/pcm-jlzz-modal.js +39 -8
- package/dist/components/pcm-jlzz-modal.js.map +1 -1
- package/dist/components/pcm-mnct-modal.js +4 -4
- package/dist/components/pcm-mnms-modal.js +8 -8
- package/dist/components/pcm-mnms-zp-modal.js +8 -8
- package/dist/components/pcm-mobile-input-btn.js +1 -1
- package/dist/components/pcm-mobile-upload-btn.js +1 -1
- package/dist/components/pcm-msbg-modal.js +4 -4
- package/dist/components/pcm-qgqjl-modal.js +26 -25
- package/dist/components/pcm-qgqjl-modal.js.map +1 -1
- package/dist/components/pcm-upload.js +1 -1
- package/dist/components/pcm-virtual-chat-modal.js +1 -1
- package/dist/components/pcm-zsk-chat-modal.js +19 -2
- package/dist/components/pcm-zsk-chat-modal.js.map +1 -1
- package/dist/components/pcm-zygh-modal.js +6 -6
- package/dist/components/pcm-zygh-v2-modal.js +18 -18
- package/dist/components/pcm-zygh-v2-modal.js.map +1 -1
- package/dist/esm/components-position-selector.entry.js +1 -1
- package/dist/esm/index-Bq0K-WqZ.js +2 -6
- package/dist/esm/{index-DBfBNGaa.js → index-CtBK1m67.js} +3 -3
- package/dist/esm/{index-DBfBNGaa.js.map → index-CtBK1m67.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-jlsx-modal.entry.js +24 -2
- package/dist/esm/oem-jlsx-modal.entry.js.map +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-mnms-modal.entry.js +1 -1
- package/dist/esm/oem-qgqjl-modal.entry.js +1 -1
- package/dist/esm/oem-zygh-modal.entry.js +1 -1
- package/dist/esm/{pcm-1zhanshi-mnms-modal_28.entry.js → pcm-1zhanshi-mnms-modal_29.entry.js} +540 -109
- package/dist/esm/pcm-1zhanshi-mnms-modal_29.entry.js.map +1 -0
- package/dist/esm/pcm-agents.js +1 -1
- package/dist/esm/pcm-hr-chat-modal.entry.js +19 -2
- package/dist/esm/pcm-hr-chat-modal.entry.js.map +1 -1
- package/dist/esm/{sentry-reporter-BcA0r0vQ.js → sentry-reporter-D8jwTnnH.js} +3 -3
- package/dist/esm/{sentry-reporter-BcA0r0vQ.js.map → sentry-reporter-D8jwTnnH.js.map} +1 -1
- package/dist/pcm-agents/index.esm.js +1 -1
- package/dist/pcm-agents/oem-jlsx-modal.entry.esm.js.map +1 -1
- package/dist/pcm-agents/p-0a831595.entry.js +2 -0
- package/dist/pcm-agents/{p-365a351b.entry.js.map → p-0a831595.entry.js.map} +1 -1
- package/dist/pcm-agents/{p-d9e464fd.entry.js → p-1cc1dbcc.entry.js} +2 -2
- package/dist/pcm-agents/{p-cc3c0220.entry.js → p-43cefa20.entry.js} +2 -2
- package/dist/pcm-agents/{p-4b363eb3.entry.js → p-5bf761de.entry.js} +2 -2
- package/dist/pcm-agents/{p-96c41b85.entry.js → p-680bf3a3.entry.js} +2 -2
- package/dist/pcm-agents/p-8452f80b.entry.js +251 -0
- package/dist/pcm-agents/p-8452f80b.entry.js.map +1 -0
- package/dist/pcm-agents/{p-86c2748a.entry.js → p-890fb793.entry.js} +2 -2
- package/dist/pcm-agents/{p-Dz4pPCio.js → p-B1X08zm_.js} +2 -2
- package/dist/pcm-agents/{p-Dz4pPCio.js.map → p-B1X08zm_.js.map} +1 -1
- package/dist/pcm-agents/{p-zJbvNgZt.js → p-BmPGiYO3.js} +2 -2
- package/dist/pcm-agents/{p-zJbvNgZt.js.map → p-BmPGiYO3.js.map} +1 -1
- package/dist/pcm-agents/{p-a54ca8e2.entry.js → p-a31fa268.entry.js} +2 -2
- package/dist/pcm-agents/{p-4b257381.entry.js → p-ad6ce0c9.entry.js} +2 -2
- package/dist/pcm-agents/{p-41b4b6bb.entry.js → p-b80f01e6.entry.js} +2 -2
- package/dist/pcm-agents/{p-e442dabc.entry.js → p-c3eb9590.entry.js} +2 -2
- package/dist/pcm-agents/{p-92eea906.entry.js → p-eb44bda0.entry.js} +2 -2
- package/dist/pcm-agents/pcm-agents.esm.js +1 -1
- package/dist/pcm-agents/pcm-hr-chat-modal.entry.esm.js.map +1 -1
- package/dist/types/components/pcm-jlpp-modal/pcm-jlpp-modal.d.ts +3 -2
- package/dist/types/components/pcm-jlzz-modal/pcm-jlzz-modal.d.ts +14 -0
- package/dist/types/components/pcm-qgqjl-modal/pcm-qgqjl-modal.d.ts +3 -2
- package/dist/types/components/pcm-virtual-chat-modal/pcm-virtual-chat-modal.d.ts +10 -0
- package/dist/types/components/pcm-zygh-v2-modal/pcm-zygh-v2-modal.d.ts +4 -4
- package/dist/types/components.d.ts +36 -12
- package/package.json +1 -1
- package/dist/cjs/pcm-1zhanshi-mnms-modal_28.cjs.entry.js.map +0 -1
- package/dist/cjs/pcm-zygh-v2-modal.cjs.entry.js +0 -260
- package/dist/cjs/pcm-zygh-v2-modal.cjs.entry.js.map +0 -1
- package/dist/cjs/pcm-zygh-v2-modal.entry.cjs.js.map +0 -1
- package/dist/components/p-BZeNORff.js.map +0 -1
- package/dist/components/p-Caxrsbp0.js.map +0 -1
- package/dist/esm/pcm-1zhanshi-mnms-modal_28.entry.js.map +0 -1
- package/dist/esm/pcm-zygh-v2-modal.entry.js +0 -258
- package/dist/esm/pcm-zygh-v2-modal.entry.js.map +0 -1
- package/dist/pcm-agents/p-210d610a.entry.js +0 -2
- package/dist/pcm-agents/p-210d610a.entry.js.map +0 -1
- package/dist/pcm-agents/p-365a351b.entry.js +0 -2
- package/dist/pcm-agents/p-6551d616.entry.js +0 -251
- package/dist/pcm-agents/p-6551d616.entry.js.map +0 -1
- package/dist/pcm-agents/pcm-zygh-v2-modal.entry.esm.js.map +0 -1
- /package/dist/pcm-agents/{p-d9e464fd.entry.js.map → p-1cc1dbcc.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-cc3c0220.entry.js.map → p-43cefa20.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-4b363eb3.entry.js.map → p-5bf761de.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-96c41b85.entry.js.map → p-680bf3a3.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-86c2748a.entry.js.map → p-890fb793.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-a54ca8e2.entry.js.map → p-a31fa268.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-4b257381.entry.js.map → p-ad6ce0c9.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-41b4b6bb.entry.js.map → p-b80f01e6.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-e442dabc.entry.js.map → p-c3eb9590.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-92eea906.entry.js.map → p-eb44bda0.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,g as i,h as o}from"./p-Bq0K-WqZ.js";import{a as n,v as a,c as r,b as s}from"./p-Dz4pPCio.js";import{E as l}from"./p-C0FYX2-Z.js";import{S as d}from"./p-zJbvNgZt.js";import"./p-Bs-zO1WZ.js";const c=".input-mode-toggle{display:flex;align-items:center;margin-bottom:16px}.input-mode-toggle span{color:#333;margin-right:12px}.toggle-button{display:flex;align-items:center;background:none;border:none;color:#2E6EDF;cursor:pointer;font-size:14px;padding:4px 8px}.toggle-button svg{margin-right:4px}.toggle-button:disabled{opacity:0.5;cursor:not-allowed}.structured-input{width:100%}.job-name-input{margin-bottom:20px}.job-name-input label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-name-input input{width:95%;padding:10px 12px;border:1px solid #ddd;border-radius:4px;font-size:14px;background-color:#f9f9f9}.job-name-input input:focus{outline:none;border-color:#2E6EDF;box-shadow:0 0 0 2px rgba(46, 110, 223, 0.2)}.required{color:#f56c6c}.button-container{display:flex;justify-content:center;margin-top:24px;gap:12px;max-width:100%;box-sizing:border-box;flex-wrap:wrap}.next-button{background-color:#2E6EDF;color:white}.next-button:hover{background-color:#2457b8}.next-button:disabled{background-color:#a0c0e8;cursor:not-allowed}.prev-button{background-color:#f0f0f0 !important;color:#333 !important}.prev-button:hover{background-color:#e0e0e0}.tag-selection{width:100%}.tag-selection-content{width:100%}.section-title{font-weight:600;color:#333;margin-bottom:12px;font-size:16px}.ai-tags-section,.basic-tags-section{margin-bottom:24px}.tag-group{margin-bottom:16px}.tag-title{color:#555;margin-bottom:8px;font-weight:500}.tag-container{display:flex;flex-wrap:wrap;gap:8px;max-width:100%;box-sizing:border-box}.tag{display:inline-flex;align-items:center;padding:6px 12px;border-radius:4px;background-color:#f5f5f5;border:1px solid #e0e0e0;color:#333;font-size:13px;cursor:pointer;transition:all 0.2s;max-width:100%;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tag:hover{background-color:#e8e8e8}.tag-selected{background-color:#e6f0ff;border-color:#2E6EDF;color:#2E6EDF}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 0;background-color:#f9f9f9;border-radius:8px;margin:20px 0;max-width:100%;box-sizing:border-box}.loading-spinner{width:40px;height:40px;border:3px solid rgba(46, 110, 223, 0.2);border-radius:50%;border-top-color:#2E6EDF;animation:spin 1s linear infinite;margin-bottom:16px}@keyframes spin{to{transform:rotate(360deg)}}.loading-text{text-align:center;color:#333;font-weight:500}.loading-subtext{color:#888;font-size:14px;margin-top:4px}.free-input{width:100%}.textarea-container{margin-bottom:16px}.textarea-container label{display:block;margin-bottom:8px;font-weight:500;color:#333}.textarea-container textarea{border:1px solid #ddd;border-radius:4px;font-size:14px;resize:vertical;background-color:#f9f9f9;min-height:150px;width:100%;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.textarea-container textarea:focus{outline:none;border-color:#2E6EDF;box-shadow:0 0 0 2px rgba(46, 110, 223, 0.2)}.input-guide{background-color:#f5f7fa;border-radius:4px;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.guide-title{font-weight:500;color:#333;margin-bottom:8px}.guide-content{color:#666;font-size:13px;max-width:100%;word-wrap:break-word}.guide-content div{margin-bottom:4px}@media (max-width: 768px){.tag-container{gap:7px}.tag{padding:4px 8px;font-size:12px}}@media (max-width: 480px){.button-container{flex-direction:column;align-items:center}.next-button,.prev-button,.submit-button{width:100%;margin-bottom:8px}.tag{max-width:calc(50% - 8px)}}.tag-selection,.tag-selection-content,.ai-tags-section,.basic-tags-section,.structured-input,.free-input{max-width:100%;box-sizing:border-box}";const p='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const h=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const u=class{constructor(i){t(this,i);this.modalClosed=e(this,"modalClosed");this.streamComplete=e(this,"streamComplete");this.conversationStart=e(this,"conversationStart");this.interviewComplete=e(this,"interviewComplete");this.tokenInvalid=e(this,"tokenInvalid");this.someErrorEvent=e(this,"someErrorEvent")}modalTitle="职位生成";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请帮我生成职位信息";fullscreen=false;customInputs={};showWorkspaceHistory=false;showSaveJdButton=false;saveJdButtonText="保存职位";streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="window";showChatModal=false;get hostElement(){return i(this)}inputMode="structured";step="input";jobName="";freeInputText="";isLoading=false;isSubmitting=false;tagGroups=[];shuffledTagGroups=[];selectedAITags={};selectedTags={salary:"",benefits:[],education:""};tokenInvalidListener;removeErrorListener;handleTokenChange(t){if(t&&t!==n.getToken()){n.setToken(t)}}async handleIsOpenChange(t){if(!t){this.showChatModal=false;this.jobDescription="";this.jobName="";this.freeInputText="";this.step="input";this.inputMode="structured";this.tagGroups=[];this.shuffledTagGroups=[];this.selectedAITags={};this.selectedTags={salary:"",benefits:[],education:""}}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info;this.inputMode="free";this.freeInputText=this.customInputs.job_info}await a(this.token);if(this.conversationId){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){r.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=l.addErrorListener((t=>{this.someErrorEvent.emit(t)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}salaryRanges=[{text:"3k-5k",value:"3k_5k"},{text:"5k-8k",value:"5k_8k"},{text:"8k-12k",value:"8k_12k"},{text:"12k-15k",value:"12k_15k"},{text:"15k-20k",value:"15k_20k"},{text:"20k以上",value:"above_20k"}];benefits=[{text:"五险一金",value:"五险一金"},{text:"年终奖",value:"年终奖"},{text:"带薪年假",value:"带薪年假"},{text:"加班补贴",value:"加班补贴"},{text:"餐补",value:"餐补"},{text:"交通补贴",value:"交通补贴"},{text:"节日福利",value:"节日福利"},{text:"团队建设",value:"团队建设"}];educationRequirements=[{text:"大专",value:"大专"},{text:"本科",value:"本科"},{text:"硕士",value:"硕士"},{text:"博士",value:"博士"},{text:"学历不限",value:"学历不限"}];handleClose=()=>{this.modalClosed.emit()};handleToggleInput=()=>{this.inputMode=this.inputMode==="structured"?"free":"structured"};handleJobNameChange=t=>{const e=t.target;this.jobName=e.value};handleFreeInputChange=t=>{const e=t.target;this.freeInputText=e.value};handleNextStep=async()=>{if(!this.jobName.trim()){alert("请输入职位名称");return}this.step="review";await this.handlePositionAnalysis(this.jobName)};handlePrevStep=()=>{this.step="input"};async handlePositionAnalysis(t){if(!t.trim())return;this.isLoading=true;try{const e=await s({url:"/sdk/v1/chat/workflow/block-run",method:"POST",data:{inputs:{input_info:t},bot_id:"59322522667307008",workflow_code:"generate_jd_tags"}});if(e.success&&e.data?.data.outputs?.text){try{let t=e.data.data.outputs.text.trim();const i=t.match(/```json\s*([\s\S]*?)\s*```/);if(i){t=i[1].trim()}const o=JSON.parse(t);this.tagGroups=o.tagGroup||[];const n={};const a=(o.tagGroup||[]).map((t=>{const e=[...t.defaultTags||[],...t.optionalTags||[]];for(let t=e.length-1;t>0;t--){const i=Math.floor(Math.random()*(t+1));[e[t],e[i]]=[e[i],e[t]]}if(t.defaultTags&&t.defaultTags.length>0){n[t.dimensionName]=[...t.defaultTags]}return{dimensionName:t.dimensionName,tags:e}}));this.shuffledTagGroups=a;this.selectedAITags=n}catch(t){d.captureError(t,{action:"handlePositionAnalysis",component:"oem-jd-modal",title:"解析前置标签时错误"});l.emitError({error:t,message:"解析前置标签时错误"})}}}catch(t){console.error("工作流运行错误:",t)}finally{this.isLoading=false}}handleTagClick=(t,e)=>{if(t==="benefits"){const t=[...this.selectedTags.benefits];const i=t.includes(e)?t.filter((t=>t!==e)):[...t,e];this.selectedTags={...this.selectedTags,benefits:i}}else{this.selectedTags={...this.selectedTags,[t]:this.selectedTags[t]===e?"":e}}};handleAITagClick=(t,e)=>{const i=this.selectedAITags[t]||[];const o=i.includes(e)?i.filter((t=>t!==e)):[...i,e];this.selectedAITags={...this.selectedAITags,[t]:o}};handleSubmitStructured=async()=>{this.isSubmitting=true;try{let t="";if(this.selectedTags.salary){const e=this.salaryRanges.find((t=>t.value===this.selectedTags.salary));if(e){t=e.text}}const e=this.selectedTags.benefits.join("、");let i="";if(this.selectedTags.education){const t=this.educationRequirements.find((t=>t.value===this.selectedTags.education));if(t){i=t.text}}let o=`职位名称:${this.jobName}\n`;if(t){o+=`薪资范围:${t}\n`}if(e){o+=`福利待遇:${e}\n`}if(i){o+=`学历要求:${i}\n`}Object.entries(this.selectedAITags).forEach((([t,e])=>{if(e.length>0){o+=`${t}:${e.join("、")}\n`}}));this.showChatModal=true;this.jobDescription=o}catch(t){console.error("提交结构化数据时出错:",t);d.captureError(t,{action:"handleSubmitStructured",component:"oem-jd-modal",title:"提交数据时出错"});l.emitError({error:t,message:"提交数据时出错,请重试"})}finally{this.isSubmitting=false}};handleSubmitFree=async()=>{if(!this.freeInputText.trim()){alert("请输入职位需求信息");return}this.isSubmitting=true;try{this.jobDescription=this.freeInputText;this.showChatModal=true}catch(t){console.error("提交自由输入数据时出错:",t);d.captureError(t,{action:"handleSubmitFree",component:"oem-jd-modal",title:"提交数据时出错"});l.emitError({error:t,message:"提交数据时出错,请重试"})}finally{this.isSubmitting=false}};jobDescription="";renderTagGroup(t,e,i){return o("div",{class:"tag-group"},o("div",{class:"tag-title"},t),o("div",{class:"tag-container"},e.map((t=>{const e=i==="benefits"?this.selectedTags.benefits.includes(t.value):this.selectedTags[i]===t.value;return o("div",{class:{tag:true,"tag-selected":e},onClick:()=>this.handleTagClick(i,t.value)},t.text)}))))}renderAITagGroups(){return o("div",{class:"ai-tag-groups"},this.shuffledTagGroups.map((t=>o("div",{class:"tag-group"},o("div",{class:"tag-title"},t.dimensionName),o("div",{class:"tag-container"},t.tags.map((e=>{const i=(this.selectedAITags[t.dimensionName]||[]).includes(e);return o("div",{class:{tag:true,"tag-selected":i},onClick:()=>this.handleAITagClick(t.dimensionName,e)},e)})))))))}renderLoadingState(){return o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("div",{class:"loading-text"},o("div",null,"AI 正在分析职位信息"),o("div",{class:"loading-subtext"},"请稍候...")))}render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const i={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;return o("div",{class:i,style:t},o("div",{class:e},this.isShowHeader&&o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),!this.showChatModal&&!this.conversationId&&true&&o("div",{class:"input-container"},o("div",{class:"input-mode-toggle"},o("span",null,"职位需求信息"),o("button",{class:"toggle-button",onClick:this.handleToggleInput,disabled:this.isLoading},o("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"})),"切换输入")),this.inputMode==="structured"&&o("div",{class:"structured-input"},this.step==="input"&&o("div",{class:"job-name-input"},o("label",{htmlFor:"job-name"},"职位名称 ",o("span",{class:"required"},"*")),o("input",{id:"job-name",type:"text",placeholder:"请输入职位名称",value:this.jobName,onInput:this.handleJobNameChange,disabled:this.isLoading}),o("div",{class:"button-container"},o("button",{class:"submit-button next-button",onClick:this.handleNextStep,disabled:!this.jobName.trim()||this.isLoading},"下一步"))),this.step==="review"&&o("div",{class:"tag-selection"},this.isLoading?this.renderLoadingState():o("div",{class:"tag-selection-content"},this.tagGroups.length>0&&o("div",{class:"ai-tags-section"},o("div",{class:"section-title"},"AI 推荐标签"),this.renderAITagGroups()),this.tagGroups.length>0&&o("div",{class:"basic-tags-section"},this.renderTagGroup("月薪范围",this.salaryRanges,"salary"),this.renderTagGroup("福利待遇",this.benefits,"benefits"),this.renderTagGroup("学历要求",this.educationRequirements,"education")),o("div",{class:"button-container"},o("button",{class:"submit-button prev-button",onClick:this.handlePrevStep},"上一步"),o("button",{class:"submit-button",onClick:this.handleSubmitStructured,disabled:this.isSubmitting},this.isSubmitting?"处理中...":"生成JD"))))),this.inputMode==="free"&&o("div",{class:"free-input"},o("div",{class:"textarea-container"},o("label",{htmlFor:"free-input-text"},"JD信息 ",o("span",{class:"required"},"*")),o("textarea",{id:"free-input-text",placeholder:"请按照下方提示格式输入职位需求信息",rows:8,value:this.freeInputText,onInput:this.handleFreeInputChange})),o("div",{class:"input-guide"},o("div",{class:"guide-title"},"输入格式参考:"),o("div",{class:"guide-content"},o("div",null,"• 职位名称 - 明确定义职位的名称"),o("div",null,"• 薪资范围 - 明确该岗位的月薪或年薪"),o("div",null,"• 福利待遇 - 该职位的福利待遇,如:五险一金、年休假、下午茶等"),o("div",null,"• 工作职责 - 描述工作内容"),o("div",null,"• 任职资格 - 包括学历、经验和技术要求"),o("div",null,"• 工作地点与性质 - 全职/兼职、远程/办公室"))),o("div",{class:"button-container"},o("button",{class:"submit-button",onClick:this.handleSubmitFree,disabled:!this.freeInputText.trim()||this.isSubmitting},this.isSubmitting?"处理中...":"生成JD"))),o("div",{class:"ai-disclaimer"},o("p",null,"所有内容均由AI生成仅供参考"),o("p",{class:"beian-info"},o("span",null,"中央网信办生成式人工智能服务备案号"),":",o("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&o("div",null,o("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:"3022316191018873",conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,job_info:this.customInputs?.job_info||this.jobDescription},interviewMode:"text",showSaveJdButton:this.showSaveJdButton,saveJdButtonText:this.saveJdButtonText}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};u.style=c+(p+h);export{u as oem_jd_modal};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,g as i,h as o}from"./p-Bq0K-WqZ.js";import{a as n,v as a,c as r,b as s}from"./p-B1X08zm_.js";import{E as l}from"./p-C0FYX2-Z.js";import{S as d}from"./p-BmPGiYO3.js";import"./p-Bs-zO1WZ.js";const c=".input-mode-toggle{display:flex;align-items:center;margin-bottom:16px}.input-mode-toggle span{color:#333;margin-right:12px}.toggle-button{display:flex;align-items:center;background:none;border:none;color:#2E6EDF;cursor:pointer;font-size:14px;padding:4px 8px}.toggle-button svg{margin-right:4px}.toggle-button:disabled{opacity:0.5;cursor:not-allowed}.structured-input{width:100%}.job-name-input{margin-bottom:20px}.job-name-input label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-name-input input{width:95%;padding:10px 12px;border:1px solid #ddd;border-radius:4px;font-size:14px;background-color:#f9f9f9}.job-name-input input:focus{outline:none;border-color:#2E6EDF;box-shadow:0 0 0 2px rgba(46, 110, 223, 0.2)}.required{color:#f56c6c}.button-container{display:flex;justify-content:center;margin-top:24px;gap:12px;max-width:100%;box-sizing:border-box;flex-wrap:wrap}.next-button{background-color:#2E6EDF;color:white}.next-button:hover{background-color:#2457b8}.next-button:disabled{background-color:#a0c0e8;cursor:not-allowed}.prev-button{background-color:#f0f0f0 !important;color:#333 !important}.prev-button:hover{background-color:#e0e0e0}.tag-selection{width:100%}.tag-selection-content{width:100%}.section-title{font-weight:600;color:#333;margin-bottom:12px;font-size:16px}.ai-tags-section,.basic-tags-section{margin-bottom:24px}.tag-group{margin-bottom:16px}.tag-title{color:#555;margin-bottom:8px;font-weight:500}.tag-container{display:flex;flex-wrap:wrap;gap:8px;max-width:100%;box-sizing:border-box}.tag{display:inline-flex;align-items:center;padding:6px 12px;border-radius:4px;background-color:#f5f5f5;border:1px solid #e0e0e0;color:#333;font-size:13px;cursor:pointer;transition:all 0.2s;max-width:100%;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tag:hover{background-color:#e8e8e8}.tag-selected{background-color:#e6f0ff;border-color:#2E6EDF;color:#2E6EDF}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 0;background-color:#f9f9f9;border-radius:8px;margin:20px 0;max-width:100%;box-sizing:border-box}.loading-spinner{width:40px;height:40px;border:3px solid rgba(46, 110, 223, 0.2);border-radius:50%;border-top-color:#2E6EDF;animation:spin 1s linear infinite;margin-bottom:16px}@keyframes spin{to{transform:rotate(360deg)}}.loading-text{text-align:center;color:#333;font-weight:500}.loading-subtext{color:#888;font-size:14px;margin-top:4px}.free-input{width:100%}.textarea-container{margin-bottom:16px}.textarea-container label{display:block;margin-bottom:8px;font-weight:500;color:#333}.textarea-container textarea{border:1px solid #ddd;border-radius:4px;font-size:14px;resize:vertical;background-color:#f9f9f9;min-height:150px;width:100%;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.textarea-container textarea:focus{outline:none;border-color:#2E6EDF;box-shadow:0 0 0 2px rgba(46, 110, 223, 0.2)}.input-guide{background-color:#f5f7fa;border-radius:4px;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.guide-title{font-weight:500;color:#333;margin-bottom:8px}.guide-content{color:#666;font-size:13px;max-width:100%;word-wrap:break-word}.guide-content div{margin-bottom:4px}@media (max-width: 768px){.tag-container{gap:7px}.tag{padding:4px 8px;font-size:12px}}@media (max-width: 480px){.button-container{flex-direction:column;align-items:center}.next-button,.prev-button,.submit-button{width:100%;margin-bottom:8px}.tag{max-width:calc(50% - 8px)}}.tag-selection,.tag-selection-content,.ai-tags-section,.basic-tags-section,.structured-input,.free-input{max-width:100%;box-sizing:border-box}";const p='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const h=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const u=class{constructor(i){t(this,i);this.modalClosed=e(this,"modalClosed");this.streamComplete=e(this,"streamComplete");this.conversationStart=e(this,"conversationStart");this.interviewComplete=e(this,"interviewComplete");this.tokenInvalid=e(this,"tokenInvalid");this.someErrorEvent=e(this,"someErrorEvent")}modalTitle="职位生成";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请帮我生成职位信息";fullscreen=false;customInputs={};showWorkspaceHistory=false;showSaveJdButton=false;saveJdButtonText="保存职位";streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="window";showChatModal=false;get hostElement(){return i(this)}inputMode="structured";step="input";jobName="";freeInputText="";isLoading=false;isSubmitting=false;tagGroups=[];shuffledTagGroups=[];selectedAITags={};selectedTags={salary:"",benefits:[],education:""};tokenInvalidListener;removeErrorListener;handleTokenChange(t){if(t&&t!==n.getToken()){n.setToken(t)}}async handleIsOpenChange(t){if(!t){this.showChatModal=false;this.jobDescription="";this.jobName="";this.freeInputText="";this.step="input";this.inputMode="structured";this.tagGroups=[];this.shuffledTagGroups=[];this.selectedAITags={};this.selectedTags={salary:"",benefits:[],education:""}}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info;this.inputMode="free";this.freeInputText=this.customInputs.job_info}await a(this.token);if(this.conversationId){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){r.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=l.addErrorListener((t=>{this.someErrorEvent.emit(t)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}salaryRanges=[{text:"3k-5k",value:"3k_5k"},{text:"5k-8k",value:"5k_8k"},{text:"8k-12k",value:"8k_12k"},{text:"12k-15k",value:"12k_15k"},{text:"15k-20k",value:"15k_20k"},{text:"20k以上",value:"above_20k"}];benefits=[{text:"五险一金",value:"五险一金"},{text:"年终奖",value:"年终奖"},{text:"带薪年假",value:"带薪年假"},{text:"加班补贴",value:"加班补贴"},{text:"餐补",value:"餐补"},{text:"交通补贴",value:"交通补贴"},{text:"节日福利",value:"节日福利"},{text:"团队建设",value:"团队建设"}];educationRequirements=[{text:"大专",value:"大专"},{text:"本科",value:"本科"},{text:"硕士",value:"硕士"},{text:"博士",value:"博士"},{text:"学历不限",value:"学历不限"}];handleClose=()=>{this.modalClosed.emit()};handleToggleInput=()=>{this.inputMode=this.inputMode==="structured"?"free":"structured"};handleJobNameChange=t=>{const e=t.target;this.jobName=e.value};handleFreeInputChange=t=>{const e=t.target;this.freeInputText=e.value};handleNextStep=async()=>{if(!this.jobName.trim()){alert("请输入职位名称");return}this.step="review";await this.handlePositionAnalysis(this.jobName)};handlePrevStep=()=>{this.step="input"};async handlePositionAnalysis(t){if(!t.trim())return;this.isLoading=true;try{const e=await s({url:"/sdk/v1/chat/workflow/block-run",method:"POST",data:{inputs:{input_info:t},bot_id:"59322522667307008",workflow_code:"generate_jd_tags"}});if(e.success&&e.data?.data.outputs?.text){try{let t=e.data.data.outputs.text.trim();const i=t.match(/```json\s*([\s\S]*?)\s*```/);if(i){t=i[1].trim()}const o=JSON.parse(t);this.tagGroups=o.tagGroup||[];const n={};const a=(o.tagGroup||[]).map((t=>{const e=[...t.defaultTags||[],...t.optionalTags||[]];for(let t=e.length-1;t>0;t--){const i=Math.floor(Math.random()*(t+1));[e[t],e[i]]=[e[i],e[t]]}if(t.defaultTags&&t.defaultTags.length>0){n[t.dimensionName]=[...t.defaultTags]}return{dimensionName:t.dimensionName,tags:e}}));this.shuffledTagGroups=a;this.selectedAITags=n}catch(t){d.captureError(t,{action:"handlePositionAnalysis",component:"oem-jd-modal",title:"解析前置标签时错误"});l.emitError({error:t,message:"解析前置标签时错误"})}}}catch(t){console.error("工作流运行错误:",t)}finally{this.isLoading=false}}handleTagClick=(t,e)=>{if(t==="benefits"){const t=[...this.selectedTags.benefits];const i=t.includes(e)?t.filter((t=>t!==e)):[...t,e];this.selectedTags={...this.selectedTags,benefits:i}}else{this.selectedTags={...this.selectedTags,[t]:this.selectedTags[t]===e?"":e}}};handleAITagClick=(t,e)=>{const i=this.selectedAITags[t]||[];const o=i.includes(e)?i.filter((t=>t!==e)):[...i,e];this.selectedAITags={...this.selectedAITags,[t]:o}};handleSubmitStructured=async()=>{this.isSubmitting=true;try{let t="";if(this.selectedTags.salary){const e=this.salaryRanges.find((t=>t.value===this.selectedTags.salary));if(e){t=e.text}}const e=this.selectedTags.benefits.join("、");let i="";if(this.selectedTags.education){const t=this.educationRequirements.find((t=>t.value===this.selectedTags.education));if(t){i=t.text}}let o=`职位名称:${this.jobName}\n`;if(t){o+=`薪资范围:${t}\n`}if(e){o+=`福利待遇:${e}\n`}if(i){o+=`学历要求:${i}\n`}Object.entries(this.selectedAITags).forEach((([t,e])=>{if(e.length>0){o+=`${t}:${e.join("、")}\n`}}));this.showChatModal=true;this.jobDescription=o}catch(t){console.error("提交结构化数据时出错:",t);d.captureError(t,{action:"handleSubmitStructured",component:"oem-jd-modal",title:"提交数据时出错"});l.emitError({error:t,message:"提交数据时出错,请重试"})}finally{this.isSubmitting=false}};handleSubmitFree=async()=>{if(!this.freeInputText.trim()){alert("请输入职位需求信息");return}this.isSubmitting=true;try{this.jobDescription=this.freeInputText;this.showChatModal=true}catch(t){console.error("提交自由输入数据时出错:",t);d.captureError(t,{action:"handleSubmitFree",component:"oem-jd-modal",title:"提交数据时出错"});l.emitError({error:t,message:"提交数据时出错,请重试"})}finally{this.isSubmitting=false}};jobDescription="";renderTagGroup(t,e,i){return o("div",{class:"tag-group"},o("div",{class:"tag-title"},t),o("div",{class:"tag-container"},e.map((t=>{const e=i==="benefits"?this.selectedTags.benefits.includes(t.value):this.selectedTags[i]===t.value;return o("div",{class:{tag:true,"tag-selected":e},onClick:()=>this.handleTagClick(i,t.value)},t.text)}))))}renderAITagGroups(){return o("div",{class:"ai-tag-groups"},this.shuffledTagGroups.map((t=>o("div",{class:"tag-group"},o("div",{class:"tag-title"},t.dimensionName),o("div",{class:"tag-container"},t.tags.map((e=>{const i=(this.selectedAITags[t.dimensionName]||[]).includes(e);return o("div",{class:{tag:true,"tag-selected":i},onClick:()=>this.handleAITagClick(t.dimensionName,e)},e)})))))))}renderLoadingState(){return o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("div",{class:"loading-text"},o("div",null,"AI 正在分析职位信息"),o("div",{class:"loading-subtext"},"请稍候...")))}render(){if(!this.isOpen)return null;const t={zIndex:String(this.zIndex)};const e={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const i={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;return o("div",{class:i,style:t},o("div",{class:e},this.isShowHeader&&o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),!this.showChatModal&&!this.conversationId&&true&&o("div",{class:"input-container"},o("div",{class:"input-mode-toggle"},o("span",null,"职位需求信息"),o("button",{class:"toggle-button",onClick:this.handleToggleInput,disabled:this.isLoading},o("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"})),"切换输入")),this.inputMode==="structured"&&o("div",{class:"structured-input"},this.step==="input"&&o("div",{class:"job-name-input"},o("label",{htmlFor:"job-name"},"职位名称 ",o("span",{class:"required"},"*")),o("input",{id:"job-name",type:"text",placeholder:"请输入职位名称",value:this.jobName,onInput:this.handleJobNameChange,disabled:this.isLoading}),o("div",{class:"button-container"},o("button",{class:"submit-button next-button",onClick:this.handleNextStep,disabled:!this.jobName.trim()||this.isLoading},"下一步"))),this.step==="review"&&o("div",{class:"tag-selection"},this.isLoading?this.renderLoadingState():o("div",{class:"tag-selection-content"},this.tagGroups.length>0&&o("div",{class:"ai-tags-section"},o("div",{class:"section-title"},"AI 推荐标签"),this.renderAITagGroups()),this.tagGroups.length>0&&o("div",{class:"basic-tags-section"},this.renderTagGroup("月薪范围",this.salaryRanges,"salary"),this.renderTagGroup("福利待遇",this.benefits,"benefits"),this.renderTagGroup("学历要求",this.educationRequirements,"education")),o("div",{class:"button-container"},o("button",{class:"submit-button prev-button",onClick:this.handlePrevStep},"上一步"),o("button",{class:"submit-button",onClick:this.handleSubmitStructured,disabled:this.isSubmitting},this.isSubmitting?"处理中...":"生成JD"))))),this.inputMode==="free"&&o("div",{class:"free-input"},o("div",{class:"textarea-container"},o("label",{htmlFor:"free-input-text"},"JD信息 ",o("span",{class:"required"},"*")),o("textarea",{id:"free-input-text",placeholder:"请按照下方提示格式输入职位需求信息",rows:8,value:this.freeInputText,onInput:this.handleFreeInputChange})),o("div",{class:"input-guide"},o("div",{class:"guide-title"},"输入格式参考:"),o("div",{class:"guide-content"},o("div",null,"• 职位名称 - 明确定义职位的名称"),o("div",null,"• 薪资范围 - 明确该岗位的月薪或年薪"),o("div",null,"• 福利待遇 - 该职位的福利待遇,如:五险一金、年休假、下午茶等"),o("div",null,"• 工作职责 - 描述工作内容"),o("div",null,"• 任职资格 - 包括学历、经验和技术要求"),o("div",null,"• 工作地点与性质 - 全职/兼职、远程/办公室"))),o("div",{class:"button-container"},o("button",{class:"submit-button",onClick:this.handleSubmitFree,disabled:!this.freeInputText.trim()||this.isSubmitting},this.isSubmitting?"处理中...":"生成JD"))),o("div",{class:"ai-disclaimer"},o("p",null,"所有内容均由AI生成仅供参考"),o("p",{class:"beian-info"},o("span",null,"中央网信办生成式人工智能服务备案号"),":",o("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&o("div",null,o("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:"3022316191018873",conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,job_info:this.customInputs?.job_info||this.jobDescription},interviewMode:"text",showSaveJdButton:this.showSaveJdButton,saveJdButtonText:this.saveJdButtonText}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};u.style=c+(p+h);export{u as oem_jd_modal};
|
|
2
|
+
//# sourceMappingURL=p-890fb793.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,f as t}from"./p-Bq0K-WqZ.js";const o="https://api.pincaimao.com/agents/platform";const n="https://www.pincaimao.com";const r=(e,t,o)=>{const n=e.get(t);if(!n){e.set(t,[o])}else if(!n.includes(o)){n.push(o)}};const s=(e,t)=>{let o;return(...n)=>{if(o){clearTimeout(o)}o=setTimeout((()=>{o=0;e(...n)}),t)}};const c=e=>!("isConnected"in e)||e.isConnected;const a=s((e=>{for(let t of e.keys()){e.set(t,e.get(t).filter(c))}}),2e3);const i=()=>{if(typeof e!=="function"){return{}}const o=new Map;return{dispose:()=>o.clear(),get:t=>{const n=e();if(n){r(o,t,n)}},set:e=>{const n=o.get(e);if(n){o.set(e,n.filter(t))}a(o)},reset:()=>{o.forEach((e=>e.forEach(t)));a(o)}}};const u=e=>typeof e==="function"?e():e;const l=(e,t=(e,t)=>e!==t)=>{const o=u(e);let n=new Map(Object.entries(o??{}));const r={dispose:[],get:[],set:[],reset:[]};const s=()=>{n=new Map(Object.entries(u(e)??{}));r.reset.forEach((e=>e()))};const c=()=>{r.dispose.forEach((e=>e()));s()};const a=e=>{r.get.forEach((t=>t(e)));return n.get(e)};const i=(e,o)=>{const s=n.get(e);if(t(o,s,e)){n.set(e,o);r.set.forEach((t=>t(e,o,s)))}};const l=typeof Proxy==="undefined"?{}:new Proxy(o,{get(e,t){return a(t)},ownKeys(e){return Array.from(n.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(e,t){return n.has(t)},set(e,t,o){i(t,o);return true}});const f=(e,t)=>{r[e].push(t);return()=>{d(r[e],t)}};const h=(t,o)=>{const n=f("set",((e,n)=>{if(e===t){o(n)}}));const r=f("reset",(()=>o(u(e)[t])));return()=>{n();r()}};const w=(...e)=>{const t=e.reduce(((e,t)=>{if(t.set){e.push(f("set",t.set))}if(t.get){e.push(f("get",t.get))}if(t.reset){e.push(f("reset",t.reset))}if(t.dispose){e.push(f("dispose",t.dispose))}return e}),[]);return()=>t.forEach((e=>e()))};const m=e=>{const t=n.get(e);r.set.forEach((o=>o(e,t,t)))};return{state:l,get:a,set:i,on:f,onChange:h,use:w,dispose:c,reset:s,forceUpdate:m}};const d=(e,t)=>{const o=e.indexOf(t);if(o>=0){e[o]=e[e.length-1];e.length--}};const f=(e,t)=>{const o=l(e,t);o.use(i());return o};const{state:h,onChange:w}=f({token:localStorage.getItem("pcm-sdk-auth-token")||null});const m={getToken:()=>h.token,setToken:e=>{h.token=e;localStorage.setItem("pcm-sdk-auth-token",e)},clearToken:()=>{h.token=null;localStorage.removeItem("pcm-sdk-auth-token")}};w("token",(e=>{if(e){localStorage.setItem("pcm-sdk-auth-token",e)}else{localStorage.removeItem("pcm-sdk-auth-token")}}));const p=()=>{try{const e=localStorage.getItem("pcm-sdk-config-data");return e?JSON.parse(e):{}}catch(e){console.error("Error parsing stored config:",e);return{}}};const{state:y,onChange:g}=f({data:p()});const k={getConfig:()=>y.data,getItem:(e,t)=>y.data[e]!==undefined?y.data[e]:t,setItem:(e,t)=>{y.data={...y.data,[e]:t}},removeItem:e=>{const t={...y.data};delete t[e];y.data=t},clear:()=>{y.data={}},updateConfig:e=>{y.data={...y.data,...e}}};g("data",(e=>{try{if(Object.keys(e).length>0){localStorage.setItem("pcm-sdk-config-data",JSON.stringify(e))}else{localStorage.removeItem("pcm-sdk-config-data")}}catch(e){console.error("Error saving config to localStorage:",e)}}));const T="0.6.76";function E(e,t,o){return(e||"")+(t?` ${t}`:"")+(o?` ${o}`:"")}const S=()=>m.getToken()||"";const $=3*60*1e3;const v=async(e,t,o=$)=>{const n=new AbortController;const r=setTimeout((()=>n.abort()),o);try{const o=await fetch(e,{...t,signal:n.signal});clearTimeout(r);return o}catch(e){clearTimeout(r);if(e instanceof Error&&e.name==="AbortError"){throw new Error("请求超时,请检查网络连接后重试")}throw e}};const b=async(e,t=false)=>{const{url:n,method:r,headers:s={},data:c,onMessage:a,onError:i,onComplete:u}=e;try{const i=`${o}${n}`;if(!s["authorization"]&&!s["Authorization"]){const e=S();if(e){s["authorization"]=`Bearer ${e}`}}const l=await v(i,{method:r,headers:{Accept:"text/event-stream","Content-Type":"application/json",...s},body:c?JSON.stringify(c):undefined});if(l.status===401){P();if(!t){return b(e,true)}}if(!l.ok){console.error(`HTTP error! status: ${l.status}`)}const d=l.body?.getReader();if(!d)throw new Error("No reader available");const f=new TextDecoder;let h="";while(true){const{value:e,done:t}=await d.read();if(t)break;h+=f.decode(e,{stream:true});const o=h.split("\n");h=o.pop()||"";for(const e of o){if(e.startsWith("data:")){try{const t=e.substring(5).trim();if(!t)continue;const o=JSON.parse(t);a?.(o)}catch(t){console.error("解析 SSE 数据错误:",t,"原始数据:",e)}}}}u?.()}catch(o){console.error("SSE 请求错误:",o);if(!t){return b(e,true)}i?.(o)}};const P=()=>{const e=new CustomEvent("pcm-token-invalid",{bubbles:true,composed:true,detail:{timestamp:(new Date).getTime()}});document.dispatchEvent(e)};const M=async(e,t=true)=>{const{url:n,method:r="GET",headers:s={},params:c={},data:a,formData:i,onMessage:u}=e;try{const l=new URLSearchParams;Object.entries(c).forEach((([e,t])=>{if(t!==undefined&&t!==null){l.append(e,String(t))}}));let d=`${o}${n}${l.toString()?`?${l.toString()}`:""}`;if(s["authorization"]==undefined&&s["Authorization"]==undefined){const e=S();if(e){s["authorization"]=`Bearer ${e}`}}const f={method:r,headers:i?{...s}:{"Content-Type":"application/json",...s}};if(i){f.body=i}else if(r!=="GET"&&r!=="HEAD"&&a){f.body=JSON.stringify(a)}if(r==="GET"&&a){const e=new URLSearchParams;Object.entries(a).forEach((([t,o])=>{if(o!==undefined&&o!==null){e.append(t,String(o))}}));d+=(l.toString()?"&":"?")+e.toString()}const h=await v(d,f);if(h.status===401){P();if(t){return M(e,false)}}const w=await h.json();if(u){u(w)}if(!h.ok){console.error(`HTTP错误: ${h.status} ${h.statusText}`);return{success:false,message:w.message||`HTTP错误: ${h.status}`,error:w}}if(w.code!==0){console.error(`API错误: ${w.message}`);return{success:false,message:w.message,error:w}}return{success:true,data:w.data}}catch(o){console.error("HTTP请求错误:",o);if(t){return M(e,false)}if(e.onError){e.onError(o)}return{success:false,error:o,message:o instanceof Error?o.message:"未知错误"}}finally{if(e.onComplete){e.onComplete()}}};const O=async e=>{const t=await M({url:"/sdk/v1/user",method:"GET",headers:{Authorization:`Bearer ${e}`},data:{sdk_version:T}},false);if(!t.success&&t.error&&t.error.code===401){return false}else{k.setItem("pcm-sdk-CUser",`${t.data.user}(${t.data.chat_user})`);return t.success}};const C=async e=>{if(!e){throw new Error("智能体ID不能为空")}try{const t=await M({url:`/sdk/v1/agent/${e}/info`,method:"GET"});if(!t.success){throw new Error(t.message||"获取智能体信息失败")}return t.data}catch(e){console.error("获取智能体信息失败:",e);throw e}};var _;(function(e){e["Init"]="init";e["Uploading"]="uploading";e["Success"]="success";e["Failed"]="failed"})(_||(_={}));const A=async e=>new Promise(((t,o)=>{const n=new FileReader;n.onload=async e=>{try{const o=e.target?.result;const n=await crypto.subtle.digest("SHA-256",o);const r=Array.from(new Uint8Array(n));const s=r.map((e=>e.toString(16).padStart(2,"0"))).join("");t(s)}catch(e){o(e)}};n.onerror=()=>o(new Error("读取文件失败"));n.readAsArrayBuffer(e)}));const I=async(e,t,o="application/octet-stream",n=2)=>{let r=0;while(true){try{const n=await v(e,{method:"PUT",body:t,headers:{"Content-Type":o}});if(!n.ok){throw new Error(`文件上传失败: ${n.status} ${n.statusText}`)}return n}catch(e){r++;console.error(`文件上传错误(尝试 ${r}/${n}):`,e);if(r>=n){throw e}}}};const R=async(e,t,o)=>{try{const n=await A(e);const r=await M({url:"/sdk/v1/files/generate-upload-url",method:"POST",data:{...o,filename:e.name,filesize:e.size,sha256:n},headers:t});if(!r.success||!r.data){throw new Error(r.message||"获取上传URL失败")}const s=r.data;if(s.is_deleted!=1){const o=await I(s.upload_url,e,s.content_type||"application/octet-stream");if(!o.ok){throw new Error(`文件上传到腾讯云失败: ${o.status} ${o.statusText}`)}M({url:"/sdk/v1/files/mark-as-upload",method:"POST",data:{cos_key:s.cos.cos_key},headers:t})}return{cos_key:s.cos.cos_key,file_name:s.filename,file_size:s.filesize,ext:s.filetype}}catch(e){console.error("文件上传错误:",e);throw e}};const U=async(e,t,n=false)=>{const r=S();if(!r){throw new Error("API密钥不能为空")}try{const s=await v(`${o}/sdk/v1/tts/synthesize_audio`,{method:"POST",headers:{"Content-Type":"application/json",authorization:"Bearer "+r},body:JSON.stringify({text:e})});if(s.status===401){P();if(!n){return U(e,t,true)}}if(!s.ok){throw new Error("语音合成失败")}const c=await s.blob();return URL.createObjectURL(c)}catch(o){console.error("语音合成错误:",o);if(!n){return U(e,t,true)}throw o}};const j=async(e,t)=>{try{const o=await M({url:"/sdk/v1/files/presigned-url",method:"GET",params:{cos_key:e},headers:t});if(o.success&&o.data?.file_url){return o.data.file_url}return null}catch(e){console.error("获取预签名URL失败:",e);return null}};const N=async(e,t)=>{try{const o=await j(e,t);if(o){return`${o}${o.includes("?")?"&":"?"}ci-process=doc-preview©able=1&dstType=html`}return null}catch(e){console.error("获取预览URL失败:",e);return null}};const x=e=>{if(!e&&e!==0){return null}const t=Number(e);if(isNaN(t))return null;if(e<1024){return e+"B"}if(e<1024*1024){return(e/1024).toFixed(1)+"KB"}return(e/1024/1024).toFixed(1)+"MB"};const B=()=>{let e=false;if(!e){e=window.innerWidth<768}return e};const L=()=>{const e=["video/webm;codecs=vp8,opus","video/webm;codecs=vp9,opus","video/webm","video/mp4","video/mp4;codecs=h264,aac",""];if(!window.MediaRecorder){console.warn("MediaRecorder API不可用");return""}for(const t of e){if(!t)return"";try{if(MediaRecorder.isTypeSupported(t)){return t}}catch(e){console.warn(`检查MIME类型支持时出错 ${t}:`,e)}}console.warn("没有找到支持的MIME类型,将使用浏览器默认值");return""};const z=()=>{const e=["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/ogg;codecs=opus","audio/ogg",""];if(!window.MediaRecorder){console.warn("MediaRecorder API不可用");return""}for(const t of e){if(!t)return"";try{if(MediaRecorder.isTypeSupported(t)){return t}}catch(e){console.warn(`检查音频MIME类型支持时出错 ${t}:`,e)}}console.warn("没有找到支持的音频MIME类型,将使用浏览器默认值");return""};const G=async e=>{try{const t=await M({url:"/sdk/v1/tts/audio_to_text",method:"POST",data:{cos_key:e}});if(t.success&&t.data&&t.data.text){return t.data.text}else{console.warn("音频转文字返回结果格式不正确");return null}}catch(e){console.error("音频转文字错误:",e);throw new Error("音频转文字失败")}};const D=async(e,t,o=0)=>{try{const n=await M({url:"/sdk/v1/verify_sms_code",method:"POST",params:{mobile:e,code:t,code_type:o}});return n}catch(e){console.error("校验短信验证码错误:",e);throw e}};const H=async e=>{const{oemId:t,page:o=1,pageSize:n=10,keyword:r}=e;try{const e=new URLSearchParams;e.append("page",o.toString());e.append("page_size",n.toString());if(r){e.append("keyword",r)}const s=await M({url:`/sdk/v1/oem/${t}/positions?${e.toString()}`,method:"GET"});return s}catch(e){console.error("获取OEM职位列表错误:",e);throw e}};const J=async(e,t)=>{try{const o=await M({url:"/sdk/v1/files/upload-by-url",method:"POST",data:e,headers:t});return o}catch(e){console.error("通过URL上传文件错误:",e);throw e}};export{_ as F,n as P,m as a,M as b,k as c,U as d,D as e,N as f,H as g,J as h,C as i,L as j,G as k,z as l,j as m,B as n,x as o,E as p,b as s,R as u,O as v};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{a as e,f as t}from"./p-Bq0K-WqZ.js";const o="https://api.pincaimao.com/agents/platform";const n="https://www.pincaimao.com";const r=(e,t,o)=>{const n=e.get(t);if(!n){e.set(t,[o])}else if(!n.includes(o)){n.push(o)}};const s=(e,t)=>{let o;return(...n)=>{if(o){clearTimeout(o)}o=setTimeout((()=>{o=0;e(...n)}),t)}};const c=e=>!("isConnected"in e)||e.isConnected;const a=s((e=>{for(let t of e.keys()){e.set(t,e.get(t).filter(c))}}),2e3);const i=()=>{if(typeof e!=="function"){return{}}const o=new Map;return{dispose:()=>o.clear(),get:t=>{const n=e();if(n){r(o,t,n)}},set:e=>{const n=o.get(e);if(n){o.set(e,n.filter(t))}a(o)},reset:()=>{o.forEach((e=>e.forEach(t)));a(o)}}};const u=e=>typeof e==="function"?e():e;const l=(e,t=(e,t)=>e!==t)=>{const o=u(e);let n=new Map(Object.entries(o??{}));const r={dispose:[],get:[],set:[],reset:[]};const s=()=>{n=new Map(Object.entries(u(e)??{}));r.reset.forEach((e=>e()))};const c=()=>{r.dispose.forEach((e=>e()));s()};const a=e=>{r.get.forEach((t=>t(e)));return n.get(e)};const i=(e,o)=>{const s=n.get(e);if(t(o,s,e)){n.set(e,o);r.set.forEach((t=>t(e,o,s)))}};const l=typeof Proxy==="undefined"?{}:new Proxy(o,{get(e,t){return a(t)},ownKeys(e){return Array.from(n.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(e,t){return n.has(t)},set(e,t,o){i(t,o);return true}});const f=(e,t)=>{r[e].push(t);return()=>{d(r[e],t)}};const h=(t,o)=>{const n=f("set",((e,n)=>{if(e===t){o(n)}}));const r=f("reset",(()=>o(u(e)[t])));return()=>{n();r()}};const w=(...e)=>{const t=e.reduce(((e,t)=>{if(t.set){e.push(f("set",t.set))}if(t.get){e.push(f("get",t.get))}if(t.reset){e.push(f("reset",t.reset))}if(t.dispose){e.push(f("dispose",t.dispose))}return e}),[]);return()=>t.forEach((e=>e()))};const m=e=>{const t=n.get(e);r.set.forEach((o=>o(e,t,t)))};return{state:l,get:a,set:i,on:f,onChange:h,use:w,dispose:c,reset:s,forceUpdate:m}};const d=(e,t)=>{const o=e.indexOf(t);if(o>=0){e[o]=e[e.length-1];e.length--}};const f=(e,t)=>{const o=l(e,t);o.use(i());return o};const{state:h,onChange:w}=f({token:localStorage.getItem("pcm-sdk-auth-token")||null});const m={getToken:()=>h.token,setToken:e=>{h.token=e;localStorage.setItem("pcm-sdk-auth-token",e)},clearToken:()=>{h.token=null;localStorage.removeItem("pcm-sdk-auth-token")}};w("token",(e=>{if(e){localStorage.setItem("pcm-sdk-auth-token",e)}else{localStorage.removeItem("pcm-sdk-auth-token")}}));const p=()=>{try{const e=localStorage.getItem("pcm-sdk-config-data");return e?JSON.parse(e):{}}catch(e){console.error("Error parsing stored config:",e);return{}}};const{state:y,onChange:g}=f({data:p()});const k={getConfig:()=>y.data,getItem:(e,t)=>y.data[e]!==undefined?y.data[e]:t,setItem:(e,t)=>{y.data={...y.data,[e]:t}},removeItem:e=>{const t={...y.data};delete t[e];y.data=t},clear:()=>{y.data={}},updateConfig:e=>{y.data={...y.data,...e}}};g("data",(e=>{try{if(Object.keys(e).length>0){localStorage.setItem("pcm-sdk-config-data",JSON.stringify(e))}else{localStorage.removeItem("pcm-sdk-config-data")}}catch(e){console.error("Error saving config to localStorage:",e)}}));const T="0.6.78";function E(e,t,o){return(e||"")+(t?` ${t}`:"")+(o?` ${o}`:"")}const S=()=>m.getToken()||"";const $=3*60*1e3;const v=async(e,t,o=$)=>{const n=new AbortController;const r=setTimeout((()=>n.abort()),o);try{const o=await fetch(e,{...t,signal:n.signal});clearTimeout(r);return o}catch(e){clearTimeout(r);if(e instanceof Error&&e.name==="AbortError"){throw new Error("请求超时,请检查网络连接后重试")}throw e}};const b=async(e,t=false)=>{const{url:n,method:r,headers:s={},data:c,onMessage:a,onError:i,onComplete:u}=e;try{const i=`${o}${n}`;if(!s["authorization"]&&!s["Authorization"]){const e=S();if(e){s["authorization"]=`Bearer ${e}`}}const l=await v(i,{method:r,headers:{Accept:"text/event-stream","Content-Type":"application/json",...s},body:c?JSON.stringify(c):undefined});if(l.status===401){P();if(!t){return b(e,true)}}if(!l.ok){console.error(`HTTP error! status: ${l.status}`)}const d=l.body?.getReader();if(!d)throw new Error("No reader available");const f=new TextDecoder;let h="";while(true){const{value:e,done:t}=await d.read();if(t)break;h+=f.decode(e,{stream:true});const o=h.split("\n");h=o.pop()||"";for(const e of o){if(e.startsWith("data:")){try{const t=e.substring(5).trim();if(!t)continue;const o=JSON.parse(t);a?.(o)}catch(t){console.error("解析 SSE 数据错误:",t,"原始数据:",e)}}}}u?.()}catch(o){console.error("SSE 请求错误:",o);if(!t){return b(e,true)}i?.(o)}};const P=()=>{const e=new CustomEvent("pcm-token-invalid",{bubbles:true,composed:true,detail:{timestamp:(new Date).getTime()}});document.dispatchEvent(e)};const M=async(e,t=true)=>{const{url:n,method:r="GET",headers:s={},params:c={},data:a,formData:i,onMessage:u}=e;try{const l=new URLSearchParams;Object.entries(c).forEach((([e,t])=>{if(t!==undefined&&t!==null){l.append(e,String(t))}}));let d=`${o}${n}${l.toString()?`?${l.toString()}`:""}`;if(s["authorization"]==undefined&&s["Authorization"]==undefined){const e=S();if(e){s["authorization"]=`Bearer ${e}`}}const f={method:r,headers:i?{...s}:{"Content-Type":"application/json",...s}};if(i){f.body=i}else if(r!=="GET"&&r!=="HEAD"&&a){f.body=JSON.stringify(a)}if(r==="GET"&&a){const e=new URLSearchParams;Object.entries(a).forEach((([t,o])=>{if(o!==undefined&&o!==null){e.append(t,String(o))}}));d+=(l.toString()?"&":"?")+e.toString()}const h=await v(d,f);if(h.status===401){P();if(t){return M(e,false)}}const w=await h.json();if(u){u(w)}if(!h.ok){console.error(`HTTP错误: ${h.status} ${h.statusText}`);return{success:false,message:w.message||`HTTP错误: ${h.status}`,error:w}}if(w.code!==0){console.error(`API错误: ${w.message}`);return{success:false,message:w.message,error:w}}return{success:true,data:w.data}}catch(o){console.error("HTTP请求错误:",o);if(t){return M(e,false)}if(e.onError){e.onError(o)}return{success:false,error:o,message:o instanceof Error?o.message:"未知错误"}}finally{if(e.onComplete){e.onComplete()}}};const O=async e=>{const t=await M({url:"/sdk/v1/user",method:"GET",headers:{Authorization:`Bearer ${e}`},data:{sdk_version:T}},false);if(!t.success&&t.error&&t.error.code===401){return false}else{k.setItem("pcm-sdk-CUser",`${t.data.user}(${t.data.chat_user})`);return t.success}};const C=async e=>{if(!e){throw new Error("智能体ID不能为空")}try{const t=await M({url:`/sdk/v1/agent/${e}/info`,method:"GET"});if(!t.success){throw new Error(t.message||"获取智能体信息失败")}return t.data}catch(e){console.error("获取智能体信息失败:",e);throw e}};var _;(function(e){e["Init"]="init";e["Uploading"]="uploading";e["Success"]="success";e["Failed"]="failed"})(_||(_={}));const A=async e=>new Promise(((t,o)=>{const n=new FileReader;n.onload=async e=>{try{const o=e.target?.result;const n=await crypto.subtle.digest("SHA-256",o);const r=Array.from(new Uint8Array(n));const s=r.map((e=>e.toString(16).padStart(2,"0"))).join("");t(s)}catch(e){o(e)}};n.onerror=()=>o(new Error("读取文件失败"));n.readAsArrayBuffer(e)}));const I=async(e,t,o="application/octet-stream",n=2)=>{let r=0;while(true){try{const n=await v(e,{method:"PUT",body:t,headers:{"Content-Type":o}});if(!n.ok){throw new Error(`文件上传失败: ${n.status} ${n.statusText}`)}return n}catch(e){r++;console.error(`文件上传错误(尝试 ${r}/${n}):`,e);if(r>=n){throw e}}}};const R=async(e,t,o)=>{try{const n=await A(e);const r=await M({url:"/sdk/v1/files/generate-upload-url",method:"POST",data:{...o,filename:e.name,filesize:e.size,sha256:n},headers:t});if(!r.success||!r.data){throw new Error(r.message||"获取上传URL失败")}const s=r.data;if(s.is_deleted!=1){const o=await I(s.upload_url,e,s.content_type||"application/octet-stream");if(!o.ok){throw new Error(`文件上传到腾讯云失败: ${o.status} ${o.statusText}`)}M({url:"/sdk/v1/files/mark-as-upload",method:"POST",data:{cos_key:s.cos.cos_key},headers:t})}return{cos_key:s.cos.cos_key,file_name:s.filename,file_size:s.filesize,ext:s.filetype}}catch(e){console.error("文件上传错误:",e);throw e}};const U=async(e,t,n=false)=>{const r=S();if(!r){throw new Error("API密钥不能为空")}try{const s=await v(`${o}/sdk/v1/tts/synthesize_audio`,{method:"POST",headers:{"Content-Type":"application/json",authorization:"Bearer "+r},body:JSON.stringify({text:e})});if(s.status===401){P();if(!n){return U(e,t,true)}}if(!s.ok){throw new Error("语音合成失败")}const c=await s.blob();return URL.createObjectURL(c)}catch(o){console.error("语音合成错误:",o);if(!n){return U(e,t,true)}throw o}};const j=async(e,t)=>{try{const o=await M({url:"/sdk/v1/files/presigned-url",method:"GET",params:{cos_key:e},headers:t});if(o.success&&o.data?.file_url){return o.data.file_url}return null}catch(e){console.error("获取预签名URL失败:",e);return null}};const N=async(e,t)=>{try{const o=await j(e,t);if(o){return`${o}${o.includes("?")?"&":"?"}ci-process=doc-preview©able=1&dstType=html`}return null}catch(e){console.error("获取预览URL失败:",e);return null}};const x=e=>{if(!e&&e!==0){return null}const t=Number(e);if(isNaN(t))return null;if(e<1024){return e+"B"}if(e<1024*1024){return(e/1024).toFixed(1)+"KB"}return(e/1024/1024).toFixed(1)+"MB"};const B=()=>{let e=false;if(!e){e=window.innerWidth<768}return e};const L=()=>{const e=["video/webm;codecs=vp8,opus","video/webm;codecs=vp9,opus","video/webm","video/mp4","video/mp4;codecs=h264,aac",""];if(!window.MediaRecorder){console.warn("MediaRecorder API不可用");return""}for(const t of e){if(!t)return"";try{if(MediaRecorder.isTypeSupported(t)){return t}}catch(e){console.warn(`检查MIME类型支持时出错 ${t}:`,e)}}console.warn("没有找到支持的MIME类型,将使用浏览器默认值");return""};const z=()=>{const e=["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/ogg;codecs=opus","audio/ogg",""];if(!window.MediaRecorder){console.warn("MediaRecorder API不可用");return""}for(const t of e){if(!t)return"";try{if(MediaRecorder.isTypeSupported(t)){return t}}catch(e){console.warn(`检查音频MIME类型支持时出错 ${t}:`,e)}}console.warn("没有找到支持的音频MIME类型,将使用浏览器默认值");return""};const G=async e=>{try{const t=await M({url:"/sdk/v1/tts/audio_to_text",method:"POST",data:{cos_key:e}});if(t.success&&t.data&&t.data.text){return t.data.text}else{console.warn("音频转文字返回结果格式不正确");return null}}catch(e){console.error("音频转文字错误:",e);throw new Error("音频转文字失败")}};const D=async(e,t,o=0)=>{try{const n=await M({url:"/sdk/v1/verify_sms_code",method:"POST",params:{mobile:e,code:t,code_type:o}});return n}catch(e){console.error("校验短信验证码错误:",e);throw e}};const H=async e=>{const{oemId:t,page:o=1,pageSize:n=10,keyword:r}=e;try{const e=new URLSearchParams;e.append("page",o.toString());e.append("page_size",n.toString());if(r){e.append("keyword",r)}const s=await M({url:`/sdk/v1/oem/${t}/positions?${e.toString()}`,method:"GET"});return s}catch(e){console.error("获取OEM职位列表错误:",e);throw e}};const J=async(e,t)=>{try{const o=await M({url:"/sdk/v1/files/upload-by-url",method:"POST",data:e,headers:t});return o}catch(e){console.error("通过URL上传文件错误:",e);throw e}};export{_ as F,n as P,m as a,M as b,k as c,U as d,D as e,N as f,H as g,J as h,C as i,L as j,G as k,z as l,j as m,B as n,x as o,E as p,b as s,R as u,O as v};
|
|
2
|
+
//# sourceMappingURL=p-B1X08zm_.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-Dz4pPCio.js","sources":["src/utils/env.ts","node_modules/.pnpm/@stencil+store@2.1.3_@stencil+core@4.31.0/node_modules/@stencil/store/dist/index.js","store/auth.store.ts","store/config.store.ts"],"sourcesContent":["// 默认 API 域名\r\nconst DEFAULT_API_DOMAIN = 'https://api.pincaimao.com/agents/platform';\r\nconst DEFAULT_PCM_DOMAIN = 'https://www.pincaimao.com';\r\n\r\n\r\n// 从环境变量获取 API 域名,如果未设置则使用默认值\r\nexport const API_DOMAIN = process.env.API_DOMAIN || DEFAULT_API_DOMAIN;\r\nexport const PCM_DOMAIN = process.env.PCM_DOMAIN || DEFAULT_PCM_DOMAIN;\r\n\r\n// 导出其他环境变量\r\nexport const ENV = {\r\n API_DOMAIN,\r\n PCM_DOMAIN,\r\n // 可以添加其他环境变量\r\n}; ","import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2_000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState ?? {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries(unwrap(defaultState) ?? {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","// src/store/auth.store.ts\r\nimport { createStore } from '@stencil/store';\r\n\r\nexport const { state: authState, onChange } = createStore({\r\n token: localStorage.getItem('pcm-sdk-auth-token') || null\r\n});\r\n\r\n// 添加一些辅助方法\r\nexport const authStore = {\r\n getToken: () => authState.token,\r\n setToken: (token: string) => {\r\n authState.token = token;\r\n localStorage.setItem('pcm-sdk-auth-token', token);\r\n },\r\n clearToken: () => {\r\n authState.token = null;\r\n localStorage.removeItem('pcm-sdk-auth-token');\r\n }\r\n};\r\n\r\n// 自动保存到localStorage\r\nonChange('token', value => {\r\n if (value) {\r\n localStorage.setItem('pcm-sdk-auth-token', value);\r\n } else {\r\n localStorage.removeItem('pcm-sdk-auth-token');\r\n }\r\n});","import { createStore } from '@stencil/store';\r\n\r\n// 定义配置数据的类型\r\nexport interface ConfigData {\r\n [key: string]: any;\r\n}\r\n\r\n// 从localStorage获取初始配置\r\nconst getInitialConfig = (): ConfigData => {\r\n try {\r\n const storedConfig = localStorage.getItem('pcm-sdk-config-data');\r\n return storedConfig ? JSON.parse(storedConfig) : {};\r\n } catch (error) {\r\n console.error('Error parsing stored config:', error);\r\n return {};\r\n }\r\n};\r\n\r\n// 创建配置存储\r\nexport const { state: configState, onChange } = createStore<{\r\n data: ConfigData;\r\n}>({\r\n data: getInitialConfig()\r\n});\r\n\r\n// 配置存储的辅助方法\r\nexport const configStore = {\r\n // 获取整个配置对象\r\n getConfig: (): ConfigData => configState.data,\r\n \r\n // 获取特定配置项\r\n getItem: <T>(key: string, defaultValue?: T): T => {\r\n return configState.data[key] !== undefined ? configState.data[key] : defaultValue;\r\n },\r\n \r\n // 设置特定配置项\r\n setItem: <T>(key: string, value: T): void => {\r\n configState.data = {\r\n ...configState.data,\r\n [key]: value\r\n };\r\n },\r\n \r\n // 移除特定配置项\r\n removeItem: (key: string): void => {\r\n const newConfig = { ...configState.data };\r\n delete newConfig[key];\r\n configState.data = newConfig;\r\n },\r\n \r\n // 清除所有配置\r\n clear: (): void => {\r\n configState.data = {};\r\n },\r\n \r\n // 批量更新配置\r\n updateConfig: (newConfig: Partial<ConfigData>): void => {\r\n configState.data = {\r\n ...configState.data,\r\n ...newConfig\r\n };\r\n }\r\n};\r\n\r\n// 自动保存到localStorage\r\nonChange('data', value => {\r\n try {\r\n if (Object.keys(value).length > 0) {\r\n localStorage.setItem('pcm-sdk-config-data', JSON.stringify(value));\r\n } else {\r\n localStorage.removeItem('pcm-sdk-config-data');\r\n }\r\n } catch (error) {\r\n console.error('Error saving config to localStorage:', error);\r\n }\r\n}); "],"names":["onChange"],"mappings":";;AAAA;AAKA;AACO,MAAM,UAAU,GAAG,2CAA4C;AACzD,MAAA,UAAU,GAAG;;ACL1B,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC9C,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC;AACnC,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC;AAClC;AACA,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrC,QAAQ,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AACzB;AACA,CAAC;AACD,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;AAC7B,IAAI,IAAI,SAAS;AACjB,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK;AACxB,QAAQ,IAAI,SAAS,EAAE;AACvB,YAAY,YAAY,CAAC,SAAS,CAAC;AACnC;AACA,QAAQ,SAAS,GAAG,UAAU,CAAC,MAAM;AACrC,YAAY,SAAS,GAAG,CAAC;AACzB,YAAY,EAAE,CAAC,GAAG,IAAI,CAAC;AACvB,SAAS,EAAE,EAAE,CAAC;AACd,KAAK;AACL,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW,GAAG,CAAC,YAAY,KAAK,EAAE,aAAa,IAAI,YAAY,CAAC,IAAI,YAAY,CAAC,WAAW;AAClG,MAAM,eAAe,GAAG,QAAQ,CAAC,CAAC,GAAG,KAAK;AAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
|
|
1
|
+
{"version":3,"file":"p-B1X08zm_.js","sources":["src/utils/env.ts","node_modules/.pnpm/@stencil+store@2.1.3_@stencil+core@4.31.0/node_modules/@stencil/store/dist/index.js","store/auth.store.ts","store/config.store.ts"],"sourcesContent":["// 默认 API 域名\r\nconst DEFAULT_API_DOMAIN = 'https://api.pincaimao.com/agents/platform';\r\nconst DEFAULT_PCM_DOMAIN = 'https://www.pincaimao.com';\r\n\r\n\r\n// 从环境变量获取 API 域名,如果未设置则使用默认值\r\nexport const API_DOMAIN = process.env.API_DOMAIN || DEFAULT_API_DOMAIN;\r\nexport const PCM_DOMAIN = process.env.PCM_DOMAIN || DEFAULT_PCM_DOMAIN;\r\n\r\n// 导出其他环境变量\r\nexport const ENV = {\r\n API_DOMAIN,\r\n PCM_DOMAIN,\r\n // 可以添加其他环境变量\r\n}; ","import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2_000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState ?? {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries(unwrap(defaultState) ?? {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","// src/store/auth.store.ts\r\nimport { createStore } from '@stencil/store';\r\n\r\nexport const { state: authState, onChange } = createStore({\r\n token: localStorage.getItem('pcm-sdk-auth-token') || null\r\n});\r\n\r\n// 添加一些辅助方法\r\nexport const authStore = {\r\n getToken: () => authState.token,\r\n setToken: (token: string) => {\r\n authState.token = token;\r\n localStorage.setItem('pcm-sdk-auth-token', token);\r\n },\r\n clearToken: () => {\r\n authState.token = null;\r\n localStorage.removeItem('pcm-sdk-auth-token');\r\n }\r\n};\r\n\r\n// 自动保存到localStorage\r\nonChange('token', value => {\r\n if (value) {\r\n localStorage.setItem('pcm-sdk-auth-token', value);\r\n } else {\r\n localStorage.removeItem('pcm-sdk-auth-token');\r\n }\r\n});","import { createStore } from '@stencil/store';\r\n\r\n// 定义配置数据的类型\r\nexport interface ConfigData {\r\n [key: string]: any;\r\n}\r\n\r\n// 从localStorage获取初始配置\r\nconst getInitialConfig = (): ConfigData => {\r\n try {\r\n const storedConfig = localStorage.getItem('pcm-sdk-config-data');\r\n return storedConfig ? JSON.parse(storedConfig) : {};\r\n } catch (error) {\r\n console.error('Error parsing stored config:', error);\r\n return {};\r\n }\r\n};\r\n\r\n// 创建配置存储\r\nexport const { state: configState, onChange } = createStore<{\r\n data: ConfigData;\r\n}>({\r\n data: getInitialConfig()\r\n});\r\n\r\n// 配置存储的辅助方法\r\nexport const configStore = {\r\n // 获取整个配置对象\r\n getConfig: (): ConfigData => configState.data,\r\n \r\n // 获取特定配置项\r\n getItem: <T>(key: string, defaultValue?: T): T => {\r\n return configState.data[key] !== undefined ? configState.data[key] : defaultValue;\r\n },\r\n \r\n // 设置特定配置项\r\n setItem: <T>(key: string, value: T): void => {\r\n configState.data = {\r\n ...configState.data,\r\n [key]: value\r\n };\r\n },\r\n \r\n // 移除特定配置项\r\n removeItem: (key: string): void => {\r\n const newConfig = { ...configState.data };\r\n delete newConfig[key];\r\n configState.data = newConfig;\r\n },\r\n \r\n // 清除所有配置\r\n clear: (): void => {\r\n configState.data = {};\r\n },\r\n \r\n // 批量更新配置\r\n updateConfig: (newConfig: Partial<ConfigData>): void => {\r\n configState.data = {\r\n ...configState.data,\r\n ...newConfig\r\n };\r\n }\r\n};\r\n\r\n// 自动保存到localStorage\r\nonChange('data', value => {\r\n try {\r\n if (Object.keys(value).length > 0) {\r\n localStorage.setItem('pcm-sdk-config-data', JSON.stringify(value));\r\n } else {\r\n localStorage.removeItem('pcm-sdk-config-data');\r\n }\r\n } catch (error) {\r\n console.error('Error saving config to localStorage:', error);\r\n }\r\n}); "],"names":["onChange"],"mappings":";;AAAA;AAKA;AACO,MAAM,UAAU,GAAG,2CAA4C;AACzD,MAAA,UAAU,GAAG;;ACL1B,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC9C,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC;AACnC,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC;AAClC;AACA,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrC,QAAQ,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AACzB;AACA,CAAC;AACD,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;AAC7B,IAAI,IAAI,SAAS;AACjB,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK;AACxB,QAAQ,IAAI,SAAS,EAAE;AACvB,YAAY,YAAY,CAAC,SAAS,CAAC;AACnC;AACA,QAAQ,SAAS,GAAG,UAAU,CAAC,MAAM;AACrC,YAAY,SAAS,GAAG,CAAC;AAC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,qBAAqB,CAAC;;;IAEhD,OAAO,KAAK,EAAE;AACd,QAAA,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,KAAK,CAAC;;AAEhE,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as s}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{c as s}from"./p-B1X08zm_.js";import{s as t,a as r,c,b as e}from"./p-Bs-zO1WZ.js";class o{static captureError(e,o){try{const a=s.getItem("pcm-sdk-CUser");if(a){t({id:String(a)})}let i=e;if(o?.title){i=new Error(o.title);if(e?.stack){i.stack=e.stack}i.cause=e}if(o){const{title:s,...t}=o;r("error_context",t)}c(i)}catch(s){console.error("Sentry 上报错误失败:",s)}}static captureMessage(c,o){try{const a=s.getItem("pcm-sdk-CUser");if(a){t({id:String(a)})}if(o){r("message_context",o)}e(c)}catch(s){console.error("Sentry 上报消息失败:",s)}}}export{o as S};
|
|
2
|
+
//# sourceMappingURL=p-BmPGiYO3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-
|
|
1
|
+
{"version":3,"file":"p-BmPGiYO3.js","sources":["src/utils/sentry-reporter.ts"],"sourcesContent":["import * as Sentry from \"@sentry/browser\";\r\nimport { configStore } from \"../../store/config.store\";\r\n\r\n/**\r\n * Sentry事件上报工具类\r\n * 提供统一的错误上报接口,自动添加用户认证信息\r\n */\r\nexport class SentryReporter {\r\n\r\n /**\r\n * 捕获并上报错误\r\n * @param error 错误对象\r\n * @param context 错误上下文\r\n */\r\n static captureError(error: any, context?: Record<string, any> & { title?: string }): void {\r\n try {\r\n // 添加认证信息\r\n const CUser = configStore.getItem('pcm-sdk-CUser');\r\n if (CUser) {\r\n Sentry.setUser({ id: String(CUser) });\r\n }\r\n \r\n let finalError = error;\r\n \r\n // 如果提供了自定义标题,创建新的错误对象\r\n if (context?.title) {\r\n finalError = new Error(context.title);\r\n if (error?.stack) {\r\n finalError.stack = error.stack;\r\n }\r\n finalError.cause = error;\r\n }\r\n \r\n // 添加上下文\r\n if (context) {\r\n const { title, ...otherContext } = context;\r\n Sentry.setContext('error_context', otherContext);\r\n }\r\n \r\n // 上报错误\r\n Sentry.captureException(finalError);\r\n } catch (e) {\r\n console.error('Sentry 上报错误失败:', e);\r\n }\r\n }\r\n\r\n /**\r\n * 捕获并上报消息\r\n * @param message 消息内容\r\n * @param context 消息上下文\r\n */\r\n static captureMessage(message: string, context?: Record<string, any>): void {\r\n try {\r\n // 添加认证信息\r\n const CUser = configStore.getItem('pcm-sdk-CUser');\r\n if (CUser) {\r\n Sentry.setUser({ id: String(CUser) });\r\n }\r\n \r\n // 添加上下文\r\n if (context) {\r\n Sentry.setContext('message_context', context);\r\n }\r\n \r\n // 上报消息\r\n Sentry.captureMessage(message);\r\n } catch (e) {\r\n console.error('Sentry 上报消息失败:', e);\r\n }\r\n }\r\n\r\n}"],"names":["Sentry.setUser","Sentry.setContext","Sentry.captureException","Sentry.captureMessage"],"mappings":";;;AAGA;;;AAGG;MACU,cAAc,CAAA;AAEzB;;;;AAIG;AACH,IAAA,OAAO,YAAY,CAAC,KAAU,EAAE,OAAkD,EAAA;AAChF,QAAA,IAAI;;YAEF,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,eAAe,CAAC;YAClD,IAAI,KAAK,EAAE;AACT,gBAAAA,OAAc,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;;YAGvC,IAAI,UAAU,GAAG,KAAK;;AAGtB,YAAA,IAAI,OAAO,EAAE,KAAK,EAAE;gBAClB,UAAU,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;AACrC,gBAAA,IAAI,KAAK,EAAE,KAAK,EAAE;AAChB,oBAAA,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK;;AAEhC,gBAAA,UAAU,CAAC,KAAK,GAAG,KAAK;;;YAI1B,IAAI,OAAO,EAAE;gBACX,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO;AAC1C,gBAAAC,UAAiB,CAAC,eAAe,EAAE,YAAY,CAAC;;;AAIlD,YAAAC,gBAAuB,CAAC,UAAU,CAAC;;QACnC,OAAO,CAAC,EAAE;AACV,YAAA,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;;;AAItC;;;;AAIG;AACH,IAAA,OAAO,cAAc,CAAC,OAAe,EAAE,OAA6B,EAAA;AAClE,QAAA,IAAI;;YAEF,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,eAAe,CAAC;YAClD,IAAI,KAAK,EAAE;AACT,gBAAAF,OAAc,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;;;YAIvC,IAAI,OAAO,EAAE;AACX,gBAAAC,UAAiB,CAAC,iBAAiB,EAAE,OAAO,CAAC;;;AAI/C,YAAAE,cAAqB,CAAC,OAAO,CAAC;;QAC9B,OAAO,CAAC,EAAE;AACV,YAAA,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;;;AAIvC;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,c as t,g as i,h as o}from"./p-Bq0K-WqZ.js";import{a as n,v as a,c as s,P as r}from"./p-Dz4pPCio.js";import{E as l}from"./p-C0FYX2-Z.js";import{M as d}from"./p-DXVhHj6-.js";const p=".resume-type-container{display:flex;flex-direction:row;gap:32px;margin-bottom:16px;border-bottom:2px solid #f0f0f0;padding-left:4px}.resume-type-item{cursor:pointer;font-size:16px;color:#333;padding:0 0 8px 0;position:relative;background:none;border:none;outline:none;font-weight:400;transition:color 0.2s}.resume-type-item.selected{color:#2563eb;font-weight:600}.resume-type-item.selected::after{content:'';display:block;position:absolute;left:0;bottom:-2px;width:100%;height:2px;background:#2563eb;border-radius:2px}.chat-content{background-color:#f7f9fc;border:1px solid #e0e6f1;border-radius:8px;padding:16px;display:flex;align-items:center;gap:16px}.chat-content-icon{font-size:24px;flex-shrink:0}.chat-content-text{font-size:14px;color:#595959;line-height:1.6}.resume-type-item:not(.selected):hover{color:#2563eb}.iframe-container{width:100%;height:85vh}.iframe-container iframe{width:100%;height:100%}.optimizing-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.35);z-index:2000;display:flex;align-items:center;justify-content:center}.optimizing-modal-content{background:#fff;border-radius:8px;padding:32px 40px;box-shadow:0 4px 24px rgba(0, 0, 0, 0.12);display:flex;flex-direction:column;align-items:center}.optimizing-modal-content .loading-spinner{width:40px;height:40px;border:4px solid #e0e0e0;border-top:4px solid #2563eb;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:16px}.converstation-list{height:600px;overflow:auto}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-item.active{background:#e6f7ff;border-color:#1890ff}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.optimizing-modal-content .loading-text{font-size:18px;color:#222;font-weight:500;margin:0}";const c='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const h=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const u=class{constructor(i){e(this,i);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent");this.getResumeData=t(this,"getResumeData")}modalTitle="简历制作";token;isOpen=false;isSuccess=false;exportButtonText="导出简历json数据";modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="根据对话生成简历";fullscreen=false;customInputs={};uploadSuccess;streamComplete;conversationStart;tokenInvalid;someErrorEvent;getResumeData;filePreviewMode="window";isUploading=false;uploadedFileInfo=null;showChatModal=false;resumeType="chat";get hostElement(){return i(this)}isSubmitting=false;showIframe=false;tokenInvalidListener;removeErrorListener;pcmUploadRef;_iframeEl;handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}async handleIsOpenChange(e){if(!e){this.showChatModal=false;this.showIframe=false;this.isSuccess=false;this.conversationId=undefined;this.resumeType="chat"}else{await a(this.token)}}handleIsSuccessChange(e){if(e&&this.resumeType!=="chat"){this.showIframe=true}}handleStreamComplete=e=>{this.conversationId=e.detail.conversation_id;if(this.resumeType!=="chat"){this.showIframe=true;this.isSuccess=true}};componentWillLoad(){if(this.zIndex){s.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=l.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}componentDidLoad(){window.addEventListener("message",this.handleIframeMessage)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}window.removeEventListener("message",this.handleIframeMessage)}handleIframeLoad=()=>{};handleIframeMessage=e=>{const t=["http://localhost:3000",r];if(!t.includes(e.origin))return;const{type:i,value:o}=e.data||{};if(i==="callParentMethod"){this.exampleMethodFromIframe(o)}if(i==="iframeReady"&&this._iframeEl?.contentWindow){const e=new URL(this._iframeEl.src).origin;this._iframeEl.contentWindow.postMessage({type:"parentReady",origin:window.location.origin},e);this._iframeEl.contentWindow.postMessage({type:"setToken",token:this.token},e);this._iframeEl.contentWindow.postMessage({type:"buttonConfig",config:{hideExportButton:true,exportButtonText:this.exportButtonText}},e)}};exampleMethodFromIframe(e){this.getResumeData.emit(JSON.parse(e))}handleClose=()=>{this.modalClosed.emit()};changeType=e=>{this.resumeType=e};handleStartInterview=async()=>{if(this.resumeType==="upload"&&!this.uploadedFileInfo){d.info("请上传简历");return}if(this.resumeType==="upload"&&await(this.pcmUploadRef?.getIsUploading?.())){d.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};closeResumeChat=()=>{this.isSuccess=false;this.resumeType="upload"};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":!this.isSuccess};const i={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=Boolean(this.customInputs&&this.customInputs.file_url);const a=Boolean(this.customInputs?.file_url&&this.customInputs?.job_info);return o("div",{class:i,style:e},o("div",{class:t},this.isShowHeader&&!this.showChatModal&&o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!a&&!this.showIframe&&o("div",{class:"input-container"},o("div",{class:"resume-type-container"},o("div",{class:{"resume-type-item":true,selected:this.resumeType==="chat"},onClick:()=>this.changeType("chat")},"直接开始"),o("div",{class:{"resume-type-item":true,selected:this.resumeType==="upload"},onClick:()=>this.changeType("upload")},"上传简历")),!n&&this.resumeType==="upload"&&o("div",{class:"resume-upload-section"},o("label",null,"上传简历"),o("pcm-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:true,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),this.resumeType==="chat"&&o("div",{class:"jd-input-section"},o("label",{htmlFor:"job-description"},"从头开始创建"),o("div",{class:"chat-content"},o("div",{class:"chat-content-text"},"🤖无需复杂操作,只需回答AI的几个简单问题,系统会根据你的回答自动生成内容完整、格式专业的个人简历"))),o("button",{class:"submit-button",disabled:this.resumeType==="upload"&&!n&&!this.uploadedFileInfo||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":this.resumeType==="upload"?"开始制作":"开始对话"),o("div",{class:"ai-disclaimer"},o("p",null,"所有内容均由AI生成仅供参考"),o("p",{class:"beian-info"},o("span",null,"中央网信办生成式人工智能服务备案号"),":",o("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),this.showChatModal&&o(o.Fragment,null,o("div",{style:{display:this.resumeType==="chat"?"block":"none"}},o("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:false,botId:"39284520284983296",conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.resumeType==="upload"?this.customInputs.file_url||this.uploadedFileInfo?.cos_key:"",mode_type:this.resumeType==="chat"?1:0},interviewMode:"text",closeResume:this.closeResumeChat,onStreamComplete:this.handleStreamComplete})),this.resumeType!=="chat"&&!this.showIframe&&o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("p",{class:"loading-text"},"AI正在优化您的简历...")),this.showIframe&&o(o.Fragment,null,o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),o("div",{class:"iframe-container"},o("iframe",{ref:e=>this._iframeEl=e,src:`${r}/myresume?conversation_id=${this.conversationId}&isSdk=true`,frameborder:"0",onLoad:this.handleIframeLoad}))))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"],isSuccess:["handleIsSuccessChange"]}}};u.style=p+(c+h);export{u as oem_jlzz_modal};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,c as t,g as i,h as o}from"./p-Bq0K-WqZ.js";import{a as n,v as a,c as s,P as r}from"./p-B1X08zm_.js";import{E as l}from"./p-C0FYX2-Z.js";import{M as d}from"./p-DXVhHj6-.js";const p=".resume-type-container{display:flex;flex-direction:row;gap:32px;margin-bottom:16px;border-bottom:2px solid #f0f0f0;padding-left:4px}.resume-type-item{cursor:pointer;font-size:16px;color:#333;padding:0 0 8px 0;position:relative;background:none;border:none;outline:none;font-weight:400;transition:color 0.2s}.resume-type-item.selected{color:#2563eb;font-weight:600}.resume-type-item.selected::after{content:'';display:block;position:absolute;left:0;bottom:-2px;width:100%;height:2px;background:#2563eb;border-radius:2px}.chat-content{background-color:#f7f9fc;border:1px solid #e0e6f1;border-radius:8px;padding:16px;display:flex;align-items:center;gap:16px}.chat-content-icon{font-size:24px;flex-shrink:0}.chat-content-text{font-size:14px;color:#595959;line-height:1.6}.resume-type-item:not(.selected):hover{color:#2563eb}.iframe-container{width:100%;height:85vh}.iframe-container iframe{width:100%;height:100%}.optimizing-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.35);z-index:2000;display:flex;align-items:center;justify-content:center}.optimizing-modal-content{background:#fff;border-radius:8px;padding:32px 40px;box-shadow:0 4px 24px rgba(0, 0, 0, 0.12);display:flex;flex-direction:column;align-items:center}.optimizing-modal-content .loading-spinner{width:40px;height:40px;border:4px solid #e0e0e0;border-top:4px solid #2563eb;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:16px}.converstation-list{height:600px;overflow:auto}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-item.active{background:#e6f7ff;border-color:#1890ff}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.optimizing-modal-content .loading-text{font-size:18px;color:#222;font-weight:500;margin:0}";const c='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const h=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const u=class{constructor(i){e(this,i);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent");this.getResumeData=t(this,"getResumeData")}modalTitle="简历制作";token;isOpen=false;isSuccess=false;exportButtonText="导出简历json数据";modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="根据对话生成简历";fullscreen=false;customInputs={};uploadSuccess;streamComplete;conversationStart;tokenInvalid;someErrorEvent;getResumeData;filePreviewMode="window";isUploading=false;uploadedFileInfo=null;showChatModal=false;resumeType="chat";get hostElement(){return i(this)}isSubmitting=false;showIframe=false;tokenInvalidListener;removeErrorListener;pcmUploadRef;_iframeEl;handleTokenChange(e){if(e&&e!==n.getToken()){n.setToken(e)}}async handleIsOpenChange(e){if(!e){this.showChatModal=false;this.showIframe=false;this.isSuccess=false;this.conversationId=undefined;this.resumeType="chat"}else{await a(this.token)}}handleIsSuccessChange(e){if(e&&this.resumeType!=="chat"){this.showIframe=true}}handleStreamComplete=e=>{this.conversationId=e.detail.conversation_id;if(this.resumeType!=="chat"){this.showIframe=true;this.isSuccess=true}};componentWillLoad(){if(this.zIndex){s.setItem("modal-zIndex",this.zIndex)}if(this.token){n.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=l.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}componentDidLoad(){window.addEventListener("message",this.handleIframeMessage)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}window.removeEventListener("message",this.handleIframeMessage)}handleIframeLoad=()=>{};handleIframeMessage=e=>{const t=["http://localhost:3000",r];if(!t.includes(e.origin))return;const{type:i,value:o}=e.data||{};if(i==="callParentMethod"){this.exampleMethodFromIframe(o)}if(i==="iframeReady"&&this._iframeEl?.contentWindow){const e=new URL(this._iframeEl.src).origin;this._iframeEl.contentWindow.postMessage({type:"parentReady",origin:window.location.origin},e);this._iframeEl.contentWindow.postMessage({type:"setToken",token:this.token},e);this._iframeEl.contentWindow.postMessage({type:"buttonConfig",config:{hideExportButton:true,exportButtonText:this.exportButtonText}},e)}};exampleMethodFromIframe(e){this.getResumeData.emit(JSON.parse(e))}handleClose=()=>{this.modalClosed.emit()};changeType=e=>{this.resumeType=e};handleStartInterview=async()=>{if(this.resumeType==="upload"&&!this.uploadedFileInfo){d.info("请上传简历");return}if(this.resumeType==="upload"&&await(this.pcmUploadRef?.getIsUploading?.())){d.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};closeResumeChat=()=>{this.isSuccess=false;this.resumeType="upload"};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":!this.isSuccess};const i={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=Boolean(this.customInputs&&this.customInputs.file_url);const a=Boolean(this.customInputs?.file_url&&this.customInputs?.job_info);return o("div",{class:i,style:e},o("div",{class:t},this.isShowHeader&&!this.showChatModal&&o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!a&&!this.showIframe&&o("div",{class:"input-container"},o("div",{class:"resume-type-container"},o("div",{class:{"resume-type-item":true,selected:this.resumeType==="chat"},onClick:()=>this.changeType("chat")},"直接开始"),o("div",{class:{"resume-type-item":true,selected:this.resumeType==="upload"},onClick:()=>this.changeType("upload")},"上传简历")),!n&&this.resumeType==="upload"&&o("div",{class:"resume-upload-section"},o("label",null,"上传简历"),o("pcm-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:true,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),this.resumeType==="chat"&&o("div",{class:"jd-input-section"},o("label",{htmlFor:"job-description"},"从头开始创建"),o("div",{class:"chat-content"},o("div",{class:"chat-content-text"},"🤖无需复杂操作,只需回答AI的几个简单问题,系统会根据你的回答自动生成内容完整、格式专业的个人简历"))),o("button",{class:"submit-button",disabled:this.resumeType==="upload"&&!n&&!this.uploadedFileInfo||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":this.resumeType==="upload"?"开始制作":"开始对话"),o("div",{class:"ai-disclaimer"},o("p",null,"所有内容均由AI生成仅供参考"),o("p",{class:"beian-info"},o("span",null,"中央网信办生成式人工智能服务备案号"),":",o("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),this.showChatModal&&o(o.Fragment,null,o("div",{style:{display:this.resumeType==="chat"?"block":"none"}},o("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:false,botId:"39284520284983296",conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.resumeType==="upload"?this.customInputs.file_url||this.uploadedFileInfo?.cos_key:"",mode_type:this.resumeType==="chat"?1:0},interviewMode:"text",closeResume:this.closeResumeChat,onStreamComplete:this.handleStreamComplete})),this.resumeType!=="chat"&&!this.showIframe&&o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("p",{class:"loading-text"},"AI正在优化您的简历...")),this.showIframe&&o(o.Fragment,null,o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),o("div",{class:"iframe-container"},o("iframe",{ref:e=>this._iframeEl=e,src:`${r}/myresume?conversation_id=${this.conversationId}&isSdk=true`,frameborder:"0",onLoad:this.handleIframeLoad}))))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"],isSuccess:["handleIsSuccessChange"]}}};u.style=p+(c+h);export{u as oem_jlzz_modal};
|
|
2
|
+
//# sourceMappingURL=p-a31fa268.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,c as t,h as o}from"./p-Bq0K-WqZ.js";import{g as i}from"./p-Dz4pPCio.js";import{M as n}from"./p-DXVhHj6-.js";const a=":host{display:block;width:100%;height:100%}.position-selector-container{display:flex;flex-direction:column;width:100%;height:100%;background:#fff}.search-bar{display:flex;align-items:center;gap:12px;padding:16px;border-bottom:1px solid #f0f0f0;flex-shrink:0}.search-input-wrapper{position:relative;display:flex;align-items:center;flex:1;min-width:200px;max-width:500px}.search-icon{position:absolute;left:12px;color:#bfbfbf;pointer-events:none}.search-input{width:100%;height:36px;padding:4px 36px 4px 36px;font-size:14px;line-height:1.5;color:rgba(0, 0, 0, 0.85);background-color:#fff;background-image:none;border:1px solid #d9d9d9;border-radius:6px;transition:all 0.3s;outline:none}.search-input:hover{border-color:#40a9ff}.search-input:focus{border-color:#40a9ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.search-input::placeholder{color:#bfbfbf}.clear-button{position:absolute;right:12px;background:none;border:none;padding:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#bfbfbf;transition:color 0.3s}.clear-button:hover{color:#8c8c8c}.search-button{padding:4px 15px;height:36px;font-size:14px;line-height:1.5;border-radius:6px;color:#fff;background-color:#1890ff;border:1px solid #1890ff;cursor:pointer;transition:all 0.3s;outline:none;white-space:nowrap;flex-shrink:0}.search-button:hover{background-color:#40a9ff;border-color:#40a9ff}.search-button:active{background-color:#096dd9;border-color:#096dd9}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;gap:16px;color:#8c8c8c}.loading-spinner{width:32px;height:32px;border:3px solid #f0f0f0;border-top-color:#1890ff;border-radius:50%;animation:spin 0.8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.empty-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;gap:16px}.empty-icon{opacity:0.5}.empty-text{margin:0;color:#8c8c8c;font-size:14px}.position-list{flex:1;overflow-y:auto;min-height:0}.table-container{width:100%;overflow-x:auto}.position-table{width:100%;border-collapse:collapse;font-size:14px}.position-table thead{background-color:#fafafa;position:sticky;top:0;z-index:1}.position-table th{padding:12px 16px;text-align:left;font-weight:500;color:rgba(0, 0, 0, 0.85);border-bottom:1px solid #f0f0f0;white-space:nowrap}.position-table td{padding:12px 16px;border-bottom:1px solid #f0f0f0;color:rgba(0, 0, 0, 0.65)}.position-table tbody tr{transition:background-color 0.3s}.position-table tbody tr:hover{background-color:#fafafa}.position-table tbody tr.selected-row{background-color:#e6f7ff}.checkbox-column{width:50px;text-align:center}.title-column{min-width:150px;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.company-column{min-width:120px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.location-column{min-width:100px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.requirements-column{min-width:200px;max-width:300px}.requirements-text{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;word-break:break-word;line-height:1.5}.salary-column{min-width:100px;white-space:nowrap}.action-column{width:100px;text-align:center}.position-checkbox{width:16px;height:16px;cursor:pointer;accent-color:#1890ff}.select-button{padding:4px 15px;height:28px;font-size:14px;line-height:1.5;border-radius:6px;color:#fff;background-color:#1890ff;border:1px solid #1890ff;cursor:pointer;transition:all 0.3s;outline:none}.select-button:hover{background-color:#40a9ff;border-color:#40a9ff}.select-button:active{background-color:#096dd9;border-color:#096dd9}@media screen and (max-width: 768px){.search-bar{padding:12px;gap:8px}.search-input-wrapper{min-width:auto;max-width:none}.search-input{height:40px;font-size:16px}.search-button{height:40px;padding:4px 12px}.table-container{overflow-x:auto;-webkit-overflow-scrolling:touch}.position-table{font-size:12px}.position-table th,.position-table td{padding:8px 12px}.title-column,.company-column,.location-column{min-width:100px}.select-button{padding:4px 12px;height:32px;font-size:14px}}.pagination-container{display:flex;align-items:center;justify-content:center;gap:16px;padding:16px;border-top:1px solid #f0f0f0;flex-shrink:0}.pagination-button{padding:4px 15px;height:32px;font-size:14px;line-height:1.5;border-radius:6px;color:rgba(0, 0, 0, 0.85);background-color:#fff;border:1px solid #d9d9d9;cursor:pointer;transition:all 0.3s;outline:none}.pagination-button:hover:not(:disabled){color:#40a9ff;border-color:#40a9ff}.pagination-button:active:not(:disabled){color:#096dd9;border-color:#096dd9}.pagination-button:disabled{color:rgba(0, 0, 0, 0.25);background-color:#f5f5f5;border-color:#d9d9d9;cursor:not-allowed}.pagination-info{font-size:14px;color:rgba(0, 0, 0, 0.65)}.position-list::-webkit-scrollbar{width:8px;height:8px}.position-list::-webkit-scrollbar-track{background:#f1f1f1}.position-list::-webkit-scrollbar-thumb{background:#888;border-radius:4px}.position-list::-webkit-scrollbar-thumb:hover{background:#555}";const r='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const s=class{constructor(o){e(this,o);this.positionSelected=t(this,"positionSelected");this.positionSelectionChange=t(this,"positionSelectionChange");this.search=t(this,"search");this.sort=t(this,"sort")}oemId;multiple=false;selectedIds=[];pageSize=10;positionSelected;positionSelectionChange;search;sort;searchKeyword="";currentSelectedIds=[];currentPage=1;totalCount=0;positionsList=[];loading=false;handleSelectedIdsChange(e){this.currentSelectedIds=[...e]}async handleOemIdChange(e){if(e){await this.loadPositions()}}async componentWillLoad(){this.currentSelectedIds=[...this.selectedIds];if(this.oemId){await this.loadPositions()}}async loadPositions(){this.loading=true;try{const e=await i({oemId:this.oemId,page:this.currentPage,pageSize:this.pageSize,keyword:this.searchKeyword||undefined});if(e.success&&e.data){this.positionsList=e.data.items||[];this.totalCount=e.data.total||0}else{n.error(e.message||"获取职位列表失败");this.positionsList=[];this.totalCount=0}}catch(e){console.error("获取职位列表失败:",e);n.error("获取职位列表失败");this.positionsList=[];this.totalCount=0}finally{this.loading=false}}handleSearchInput=e=>{const t=e.target;this.searchKeyword=t.value};handleSearchKeyPress=async e=>{if(e.key==="Enter"){this.currentPage=1;await this.loadPositions()}};handleSearchClick=async()=>{this.currentPage=1;await this.loadPositions()};handleSearchClear=async()=>{this.searchKeyword="";this.currentPage=1;await this.loadPositions()};handlePageChange=async e=>{this.currentPage=e;await this.loadPositions()};getTotalPages=()=>Math.ceil(this.totalCount/this.pageSize);getDisplayPositions=()=>this.positionsList;formatPositionText=e=>{const t=[];if(e.title)t.push(`职位名称:${e.title}`);if(e.company_name)t.push(`公司名称:${e.company_name}`);if(e.department)t.push(`部门:${e.department}`);if(e.employment_type)t.push(`招聘类型:${e.employment_type}`);if(e.salary_range)t.push(`薪资范围:${e.salary_range}`);if(e.salary_min||e.salary_max){const o=`薪资:${e.salary_min||""}${e.salary_min&&e.salary_max?"-":""}${e.salary_max||""}`;if(o!=="薪资:")t.push(o)}if(e.location)t.push(`工作地点:${e.location}`);if(e.province)t.push(`省份:${e.province}`);if(e.city)t.push(`城市:${e.city}`);if(e.district)t.push(`区域:${e.district}`);if(e.address)t.push(`详细地址:${e.address}`);if(e.education_required)t.push(`学历要求:${e.education_required}`);if(e.experience_required)t.push(`经验要求:${e.experience_required}`);if(e.work_experience)t.push(`工作经验:${e.work_experience}`);if(e.recruiting_number)t.push(`招聘人数:${e.recruiting_number}`);if(e.job_description)t.push(`职位描述:${e.job_description}`);if(e.job_responsibilities)t.push(`工作职责:${e.job_responsibilities}`);if(e.job_requirements)t.push(`任职要求:${e.job_requirements}`);if(e.skills_required)t.push(`技能要求:${e.skills_required}`);if(e.benefits)t.push(`福利待遇:${e.benefits}`);if(e.job_type)t.push(`职位类型:${e.job_type}`);if(e.work_industry)t.push(`所属行业:${e.work_industry}`);if(e.recruitment_channel)t.push(`招聘渠道:${e.recruitment_channel}`);if(e.deadline)t.push(`截止日期:${e.deadline}`);return t.join("\n")};handleSelect=e=>{if(!this.multiple){const t={...e,formatted_text:this.formatPositionText(e)};this.positionSelected.emit(t)}};handleCheckboxChange=(e,t)=>{if(!this.multiple)return;if(t){if(!this.currentSelectedIds.includes(e.id)){this.currentSelectedIds=[...this.currentSelectedIds,e.id];this.positionSelectionChange.emit({action:"add",positions:[e]})}}else{this.currentSelectedIds=this.currentSelectedIds.filter((t=>t!==e.id));this.positionSelectionChange.emit({action:"remove",positions:[e]})}};isSelected=e=>this.currentSelectedIds.includes(e);render(){const e=this.getDisplayPositions();const t=this.getTotalPages();const i=t>1;return o("div",{key:"b9a2a7a5fcf7f6babf545618c29c94767c9a7f15",class:"position-selector-container"},o("div",{key:"34b07a48a6407fb38232fa15bca9a1bc46a44977",class:"search-bar"},o("div",{key:"d9d6753b9c15deda249d712aab910b3bd3291ee6",class:"search-input-wrapper"},o("svg",{key:"0e3d4f496e946da810a951ec053b87742ea5d6a1",class:"search-icon",viewBox:"0 0 1024 1024",width:"16",height:"16"},o("path",{key:"81430360a9066757d05dec77db66d9ae2bf4f934",d:"M945.066667 898.133333l-189.866667-189.866666c55.466667-64 87.466667-149.333333 87.466667-241.066667 0-204.8-168.533333-373.333333-373.333334-373.333333S96 264.533333 96 469.333333 264.533333 842.666667 469.333333 842.666667c91.733333 0 174.933333-34.133333 241.066667-87.466667l189.866667 189.866667c6.4 6.4 14.933333 8.533333 23.466666 8.533333s17.066667-2.133333 23.466667-8.533333c8.533333-12.8 8.533333-34.133333-2.133333-46.933334zM469.333333 778.666667C298.666667 778.666667 160 640 160 469.333333S298.666667 160 469.333333 160 778.666667 298.666667 778.666667 469.333333 640 778.666667 469.333333 778.666667z",fill:"currentColor"})),o("input",{key:"e7c7a2411ef25c92febcb8d954a5b39adf6f2ddb",type:"text",class:"search-input",placeholder:"搜索职位名称",value:this.searchKeyword,onInput:this.handleSearchInput,onKeyPress:this.handleSearchKeyPress}),this.searchKeyword&&o("button",{key:"a0ca6955d7f8cfd0e7a1f8cbf8917fd34f9ec0c6",class:"clear-button",onClick:this.handleSearchClear},o("svg",{key:"2deeeb04f3ec672fb6ddb6a94c28f02d054673b2",viewBox:"0 0 1024 1024",width:"14",height:"14"},o("path",{key:"ef7a34671fd551b10bd80207e8b5c95e9a181a51",d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-0.3L512 563.4l-99.3 118.4-66.1 0.3c-4.4 0-8-3.5-8-8 0-1.9 0.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1 0.3L512 464.6l99.3-118.4 66-0.3c4.4 0 8 3.5 8 8 0 1.9-0.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z",fill:"currentColor"})))),o("button",{key:"75463782a60e1a9cdd92ab50d5c958682606b5c2",class:"search-button",onClick:this.handleSearchClick},"搜索")),this.loading&&o("div",{key:"377bb0fefe3a0712a18d876de9728996a33537be",class:"loading-container"},o("div",{key:"8af27dad62ec9606e71433f37410a9392751e176",class:"loading-spinner"}),o("p",{key:"a8912f94c5a7b947f19166634653b6501fe0ebfe"},"加载中...")),!this.loading&&o("div",{key:"49a30136533f75beea03038bf99242a8165a6a71",class:"position-list"},e.length===0?o("div",{class:"empty-container"},o("svg",{class:"empty-icon",viewBox:"0 0 1024 1024",width:"64",height:"64"},o("path",{d:"M512 128C300.8 128 128 300.8 128 512s172.8 384 384 384 384-172.8 384-384S723.2 128 512 128z m0 704c-176 0-320-144-320-320s144-320 320-320 320 144 320 320-144 320-320 320z",fill:"#d9d9d9"}),o("path",{d:"M512 320c-17.6 0-32 14.4-32 32v256c0 17.6 14.4 32 32 32s32-14.4 32-32V352c0-17.6-14.4-32-32-32z m0 384c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z",fill:"#d9d9d9"})),o("p",{class:"empty-text"},"暂无职位")):o("div",{class:"table-container"},o("table",{class:"position-table"},o("thead",null,o("tr",null,this.multiple&&o("th",{class:"checkbox-column"}),o("th",{class:"title-column"},"职位名称"),o("th",{class:"company-column"},"公司名称"),o("th",{class:"location-column"},"工作地点"),o("th",{class:"requirements-column"},"职位要求"),!this.multiple&&o("th",{class:"action-column"},"操作"))),o("tbody",null,e.map((e=>o("tr",{key:e.id,class:{"selected-row":this.multiple&&this.isSelected(e.id)}},this.multiple&&o("td",{class:"checkbox-column"},o("input",{type:"checkbox",class:"position-checkbox",checked:this.isSelected(e.id),onChange:t=>this.handleCheckboxChange(e,t.target.checked)})),o("td",{class:"title-column",title:e.title},e.title),o("td",{class:"company-column",title:e.company_name},e.company_name||"-"),o("td",{class:"location-column",title:e.location},e.location||"-"),o("td",{class:"requirements-column"},o("div",{class:"requirements-text",title:e.job_requirements||e.job_responsibilities||"-"},e.job_requirements||e.job_responsibilities||"-")),!this.multiple&&o("td",{class:"action-column"},o("button",{class:"select-button",onClick:()=>this.handleSelect(e)},"选择"))))))))),i&&o("div",{key:"a120b2b9a11f140d3b4bb690bdded76c84953fbf",class:"pagination-container"},o("button",{key:"230a815e0715d1c43d2b28845488bd929d47e4ed",class:"pagination-button",disabled:this.currentPage===1,onClick:()=>this.handlePageChange(this.currentPage-1)},"上一页"),o("span",{key:"18932249cd20ec09990a1f63732d81073f9d49d3",class:"pagination-info"},"第 ",this.currentPage," / ",t," 页,共 ",this.totalCount," 条"),o("button",{key:"856b49851b722b4d267ba34f65a7793b864b0c18",class:"pagination-button",disabled:this.currentPage>=t,onClick:()=>this.handlePageChange(this.currentPage+1)},"下一页")))}static get watchers(){return{selectedIds:["handleSelectedIdsChange"],oemId:["handleOemIdChange"]}}};s.style=a+r;export{s as components_position_selector};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,c as t,h as o}from"./p-Bq0K-WqZ.js";import{g as i}from"./p-B1X08zm_.js";import{M as n}from"./p-DXVhHj6-.js";const a=":host{display:block;width:100%;height:100%}.position-selector-container{display:flex;flex-direction:column;width:100%;height:100%;background:#fff}.search-bar{display:flex;align-items:center;gap:12px;padding:16px;border-bottom:1px solid #f0f0f0;flex-shrink:0}.search-input-wrapper{position:relative;display:flex;align-items:center;flex:1;min-width:200px;max-width:500px}.search-icon{position:absolute;left:12px;color:#bfbfbf;pointer-events:none}.search-input{width:100%;height:36px;padding:4px 36px 4px 36px;font-size:14px;line-height:1.5;color:rgba(0, 0, 0, 0.85);background-color:#fff;background-image:none;border:1px solid #d9d9d9;border-radius:6px;transition:all 0.3s;outline:none}.search-input:hover{border-color:#40a9ff}.search-input:focus{border-color:#40a9ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.search-input::placeholder{color:#bfbfbf}.clear-button{position:absolute;right:12px;background:none;border:none;padding:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#bfbfbf;transition:color 0.3s}.clear-button:hover{color:#8c8c8c}.search-button{padding:4px 15px;height:36px;font-size:14px;line-height:1.5;border-radius:6px;color:#fff;background-color:#1890ff;border:1px solid #1890ff;cursor:pointer;transition:all 0.3s;outline:none;white-space:nowrap;flex-shrink:0}.search-button:hover{background-color:#40a9ff;border-color:#40a9ff}.search-button:active{background-color:#096dd9;border-color:#096dd9}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;gap:16px;color:#8c8c8c}.loading-spinner{width:32px;height:32px;border:3px solid #f0f0f0;border-top-color:#1890ff;border-radius:50%;animation:spin 0.8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.empty-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;gap:16px}.empty-icon{opacity:0.5}.empty-text{margin:0;color:#8c8c8c;font-size:14px}.position-list{flex:1;overflow-y:auto;min-height:0}.table-container{width:100%;overflow-x:auto}.position-table{width:100%;border-collapse:collapse;font-size:14px}.position-table thead{background-color:#fafafa;position:sticky;top:0;z-index:1}.position-table th{padding:12px 16px;text-align:left;font-weight:500;color:rgba(0, 0, 0, 0.85);border-bottom:1px solid #f0f0f0;white-space:nowrap}.position-table td{padding:12px 16px;border-bottom:1px solid #f0f0f0;color:rgba(0, 0, 0, 0.65)}.position-table tbody tr{transition:background-color 0.3s}.position-table tbody tr:hover{background-color:#fafafa}.position-table tbody tr.selected-row{background-color:#e6f7ff}.checkbox-column{width:50px;text-align:center}.title-column{min-width:150px;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.company-column{min-width:120px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.location-column{min-width:100px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.requirements-column{min-width:200px;max-width:300px}.requirements-text{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;word-break:break-word;line-height:1.5}.salary-column{min-width:100px;white-space:nowrap}.action-column{width:100px;text-align:center}.position-checkbox{width:16px;height:16px;cursor:pointer;accent-color:#1890ff}.select-button{padding:4px 15px;height:28px;font-size:14px;line-height:1.5;border-radius:6px;color:#fff;background-color:#1890ff;border:1px solid #1890ff;cursor:pointer;transition:all 0.3s;outline:none}.select-button:hover{background-color:#40a9ff;border-color:#40a9ff}.select-button:active{background-color:#096dd9;border-color:#096dd9}@media screen and (max-width: 768px){.search-bar{padding:12px;gap:8px}.search-input-wrapper{min-width:auto;max-width:none}.search-input{height:40px;font-size:16px}.search-button{height:40px;padding:4px 12px}.table-container{overflow-x:auto;-webkit-overflow-scrolling:touch}.position-table{font-size:12px}.position-table th,.position-table td{padding:8px 12px}.title-column,.company-column,.location-column{min-width:100px}.select-button{padding:4px 12px;height:32px;font-size:14px}}.pagination-container{display:flex;align-items:center;justify-content:center;gap:16px;padding:16px;border-top:1px solid #f0f0f0;flex-shrink:0}.pagination-button{padding:4px 15px;height:32px;font-size:14px;line-height:1.5;border-radius:6px;color:rgba(0, 0, 0, 0.85);background-color:#fff;border:1px solid #d9d9d9;cursor:pointer;transition:all 0.3s;outline:none}.pagination-button:hover:not(:disabled){color:#40a9ff;border-color:#40a9ff}.pagination-button:active:not(:disabled){color:#096dd9;border-color:#096dd9}.pagination-button:disabled{color:rgba(0, 0, 0, 0.25);background-color:#f5f5f5;border-color:#d9d9d9;cursor:not-allowed}.pagination-info{font-size:14px;color:rgba(0, 0, 0, 0.65)}.position-list::-webkit-scrollbar{width:8px;height:8px}.position-list::-webkit-scrollbar-track{background:#f1f1f1}.position-list::-webkit-scrollbar-thumb{background:#888;border-radius:4px}.position-list::-webkit-scrollbar-thumb:hover{background:#555}";const r='.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const s=class{constructor(o){e(this,o);this.positionSelected=t(this,"positionSelected");this.positionSelectionChange=t(this,"positionSelectionChange");this.search=t(this,"search");this.sort=t(this,"sort")}oemId;multiple=false;selectedIds=[];pageSize=10;positionSelected;positionSelectionChange;search;sort;searchKeyword="";currentSelectedIds=[];currentPage=1;totalCount=0;positionsList=[];loading=false;handleSelectedIdsChange(e){this.currentSelectedIds=[...e]}async handleOemIdChange(e){if(e){await this.loadPositions()}}async componentWillLoad(){this.currentSelectedIds=[...this.selectedIds];if(this.oemId){await this.loadPositions()}}async loadPositions(){this.loading=true;try{const e=await i({oemId:this.oemId,page:this.currentPage,pageSize:this.pageSize,keyword:this.searchKeyword||undefined});if(e.success&&e.data){this.positionsList=e.data.items||[];this.totalCount=e.data.total||0}else{n.error(e.message||"获取职位列表失败");this.positionsList=[];this.totalCount=0}}catch(e){console.error("获取职位列表失败:",e);n.error("获取职位列表失败");this.positionsList=[];this.totalCount=0}finally{this.loading=false}}handleSearchInput=e=>{const t=e.target;this.searchKeyword=t.value};handleSearchKeyPress=async e=>{if(e.key==="Enter"){this.currentPage=1;await this.loadPositions()}};handleSearchClick=async()=>{this.currentPage=1;await this.loadPositions()};handleSearchClear=async()=>{this.searchKeyword="";this.currentPage=1;await this.loadPositions()};handlePageChange=async e=>{this.currentPage=e;await this.loadPositions()};getTotalPages=()=>Math.ceil(this.totalCount/this.pageSize);getDisplayPositions=()=>this.positionsList;formatPositionText=e=>{const t=[];if(e.title)t.push(`职位名称:${e.title}`);if(e.company_name)t.push(`公司名称:${e.company_name}`);if(e.department)t.push(`部门:${e.department}`);if(e.employment_type)t.push(`招聘类型:${e.employment_type}`);if(e.salary_range)t.push(`薪资范围:${e.salary_range}`);if(e.salary_min||e.salary_max){const o=`薪资:${e.salary_min||""}${e.salary_min&&e.salary_max?"-":""}${e.salary_max||""}`;if(o!=="薪资:")t.push(o)}if(e.location)t.push(`工作地点:${e.location}`);if(e.province)t.push(`省份:${e.province}`);if(e.city)t.push(`城市:${e.city}`);if(e.district)t.push(`区域:${e.district}`);if(e.address)t.push(`详细地址:${e.address}`);if(e.education_required)t.push(`学历要求:${e.education_required}`);if(e.experience_required)t.push(`经验要求:${e.experience_required}`);if(e.work_experience)t.push(`工作经验:${e.work_experience}`);if(e.recruiting_number)t.push(`招聘人数:${e.recruiting_number}`);if(e.job_description)t.push(`职位描述:${e.job_description}`);if(e.job_responsibilities)t.push(`工作职责:${e.job_responsibilities}`);if(e.job_requirements)t.push(`任职要求:${e.job_requirements}`);if(e.skills_required)t.push(`技能要求:${e.skills_required}`);if(e.benefits)t.push(`福利待遇:${e.benefits}`);if(e.job_type)t.push(`职位类型:${e.job_type}`);if(e.work_industry)t.push(`所属行业:${e.work_industry}`);if(e.recruitment_channel)t.push(`招聘渠道:${e.recruitment_channel}`);if(e.deadline)t.push(`截止日期:${e.deadline}`);return t.join("\n")};handleSelect=e=>{if(!this.multiple){const t={...e,formatted_text:this.formatPositionText(e)};this.positionSelected.emit(t)}};handleCheckboxChange=(e,t)=>{if(!this.multiple)return;if(t){if(!this.currentSelectedIds.includes(e.id)){this.currentSelectedIds=[...this.currentSelectedIds,e.id];this.positionSelectionChange.emit({action:"add",positions:[e]})}}else{this.currentSelectedIds=this.currentSelectedIds.filter((t=>t!==e.id));this.positionSelectionChange.emit({action:"remove",positions:[e]})}};isSelected=e=>this.currentSelectedIds.includes(e);render(){const e=this.getDisplayPositions();const t=this.getTotalPages();const i=t>1;return o("div",{key:"b9a2a7a5fcf7f6babf545618c29c94767c9a7f15",class:"position-selector-container"},o("div",{key:"34b07a48a6407fb38232fa15bca9a1bc46a44977",class:"search-bar"},o("div",{key:"d9d6753b9c15deda249d712aab910b3bd3291ee6",class:"search-input-wrapper"},o("svg",{key:"0e3d4f496e946da810a951ec053b87742ea5d6a1",class:"search-icon",viewBox:"0 0 1024 1024",width:"16",height:"16"},o("path",{key:"81430360a9066757d05dec77db66d9ae2bf4f934",d:"M945.066667 898.133333l-189.866667-189.866666c55.466667-64 87.466667-149.333333 87.466667-241.066667 0-204.8-168.533333-373.333333-373.333334-373.333333S96 264.533333 96 469.333333 264.533333 842.666667 469.333333 842.666667c91.733333 0 174.933333-34.133333 241.066667-87.466667l189.866667 189.866667c6.4 6.4 14.933333 8.533333 23.466666 8.533333s17.066667-2.133333 23.466667-8.533333c8.533333-12.8 8.533333-34.133333-2.133333-46.933334zM469.333333 778.666667C298.666667 778.666667 160 640 160 469.333333S298.666667 160 469.333333 160 778.666667 298.666667 778.666667 469.333333 640 778.666667 469.333333 778.666667z",fill:"currentColor"})),o("input",{key:"e7c7a2411ef25c92febcb8d954a5b39adf6f2ddb",type:"text",class:"search-input",placeholder:"搜索职位名称",value:this.searchKeyword,onInput:this.handleSearchInput,onKeyPress:this.handleSearchKeyPress}),this.searchKeyword&&o("button",{key:"a0ca6955d7f8cfd0e7a1f8cbf8917fd34f9ec0c6",class:"clear-button",onClick:this.handleSearchClear},o("svg",{key:"2deeeb04f3ec672fb6ddb6a94c28f02d054673b2",viewBox:"0 0 1024 1024",width:"14",height:"14"},o("path",{key:"ef7a34671fd551b10bd80207e8b5c95e9a181a51",d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-0.3L512 563.4l-99.3 118.4-66.1 0.3c-4.4 0-8-3.5-8-8 0-1.9 0.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1 0.3L512 464.6l99.3-118.4 66-0.3c4.4 0 8 3.5 8 8 0 1.9-0.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z",fill:"currentColor"})))),o("button",{key:"75463782a60e1a9cdd92ab50d5c958682606b5c2",class:"search-button",onClick:this.handleSearchClick},"搜索")),this.loading&&o("div",{key:"377bb0fefe3a0712a18d876de9728996a33537be",class:"loading-container"},o("div",{key:"8af27dad62ec9606e71433f37410a9392751e176",class:"loading-spinner"}),o("p",{key:"a8912f94c5a7b947f19166634653b6501fe0ebfe"},"加载中...")),!this.loading&&o("div",{key:"49a30136533f75beea03038bf99242a8165a6a71",class:"position-list"},e.length===0?o("div",{class:"empty-container"},o("svg",{class:"empty-icon",viewBox:"0 0 1024 1024",width:"64",height:"64"},o("path",{d:"M512 128C300.8 128 128 300.8 128 512s172.8 384 384 384 384-172.8 384-384S723.2 128 512 128z m0 704c-176 0-320-144-320-320s144-320 320-320 320 144 320 320-144 320-320 320z",fill:"#d9d9d9"}),o("path",{d:"M512 320c-17.6 0-32 14.4-32 32v256c0 17.6 14.4 32 32 32s32-14.4 32-32V352c0-17.6-14.4-32-32-32z m0 384c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z",fill:"#d9d9d9"})),o("p",{class:"empty-text"},"暂无职位")):o("div",{class:"table-container"},o("table",{class:"position-table"},o("thead",null,o("tr",null,this.multiple&&o("th",{class:"checkbox-column"}),o("th",{class:"title-column"},"职位名称"),o("th",{class:"company-column"},"公司名称"),o("th",{class:"location-column"},"工作地点"),o("th",{class:"requirements-column"},"职位要求"),!this.multiple&&o("th",{class:"action-column"},"操作"))),o("tbody",null,e.map((e=>o("tr",{key:e.id,class:{"selected-row":this.multiple&&this.isSelected(e.id)}},this.multiple&&o("td",{class:"checkbox-column"},o("input",{type:"checkbox",class:"position-checkbox",checked:this.isSelected(e.id),onChange:t=>this.handleCheckboxChange(e,t.target.checked)})),o("td",{class:"title-column",title:e.title},e.title),o("td",{class:"company-column",title:e.company_name},e.company_name||"-"),o("td",{class:"location-column",title:e.location},e.location||"-"),o("td",{class:"requirements-column"},o("div",{class:"requirements-text",title:e.job_requirements||e.job_responsibilities||"-"},e.job_requirements||e.job_responsibilities||"-")),!this.multiple&&o("td",{class:"action-column"},o("button",{class:"select-button",onClick:()=>this.handleSelect(e)},"选择"))))))))),i&&o("div",{key:"a120b2b9a11f140d3b4bb690bdded76c84953fbf",class:"pagination-container"},o("button",{key:"230a815e0715d1c43d2b28845488bd929d47e4ed",class:"pagination-button",disabled:this.currentPage===1,onClick:()=>this.handlePageChange(this.currentPage-1)},"上一页"),o("span",{key:"18932249cd20ec09990a1f63732d81073f9d49d3",class:"pagination-info"},"第 ",this.currentPage," / ",t," 页,共 ",this.totalCount," 条"),o("button",{key:"856b49851b722b4d267ba34f65a7793b864b0c18",class:"pagination-button",disabled:this.currentPage>=t,onClick:()=>this.handlePageChange(this.currentPage+1)},"下一页")))}static get watchers(){return{selectedIds:["handleSelectedIdsChange"],oemId:["handleOemIdChange"]}}};s.style=a+r;export{s as components_position_selector};
|
|
2
|
+
//# sourceMappingURL=p-ad6ce0c9.entry.js.map
|