pcm-agents 0.6.82 → 0.6.83
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-75Tc0zjX.js → index-fZAU5hF-.js} +3 -3
- package/dist/cjs/{index-75Tc0zjX.js.map → index-fZAU5hF-.js.map} +1 -1
- package/dist/cjs/index.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 +2 -2
- 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 +6 -6
- package/dist/cjs/oem-zygh-modal_30.cjs.entry.js +2 -2
- package/dist/cjs/pcm-hr-chat-modal.cjs.entry.js +2 -2
- package/dist/cjs/{sentry-reporter-PeXnJUzw.js → sentry-reporter-DQtaDnfE.js} +3 -3
- package/dist/cjs/{sentry-reporter-PeXnJUzw.js.map → sentry-reporter-DQtaDnfE.js.map} +1 -1
- package/dist/collection/components/oem-qgqjl-modal/oem-qgqjl-modal.js +5 -5
- package/dist/collection/components/oem-qgqjl-modal/oem-qgqjl-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 +6 -6
- 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 +13 -13
- package/dist/components/oem-zygh-modal.js +6 -6
- package/dist/components/{p-CvjRg0eF.js → p-5TmmmqrL.js} +3 -3
- package/dist/components/{p-CvjRg0eF.js.map → p-5TmmmqrL.js.map} +1 -1
- package/dist/components/{p-Bb_Asr0L.js → p-8kvLu9VD.js} +3 -3
- package/dist/components/{p-Bb_Asr0L.js.map → p-8kvLu9VD.js.map} +1 -1
- package/dist/components/{p-Dr6g-ZaP.js → p-BphKMQmw.js} +3 -3
- package/dist/components/{p-Dr6g-ZaP.js.map → p-BphKMQmw.js.map} +1 -1
- package/dist/components/{p-DWntimK_.js → p-BxSav0Qq.js} +3 -3
- package/dist/components/{p-DWntimK_.js.map → p-BxSav0Qq.js.map} +1 -1
- package/dist/components/{p-TTAVC3Ul.js → p-C6Aaulk-.js} +4 -4
- package/dist/components/{p-TTAVC3Ul.js.map → p-C6Aaulk-.js.map} +1 -1
- package/dist/components/{p-Bt0FTAzP.js → p-C92VNjO_.js} +3 -3
- package/dist/components/{p-Bt0FTAzP.js.map → p-C92VNjO_.js.map} +1 -1
- package/dist/components/{p-BpK1rCbH.js → p-CCyryIL3.js} +3 -3
- package/dist/components/{p-BpK1rCbH.js.map → p-CCyryIL3.js.map} +1 -1
- package/dist/components/{p-DIbVoSwR.js → p-D_G3xgcz.js} +3 -3
- package/dist/components/{p-DIbVoSwR.js.map → p-D_G3xgcz.js.map} +1 -1
- package/dist/components/{p-DPyZfGuL.js → p-DwFKVjl9.js} +3 -3
- package/dist/components/{p-DPyZfGuL.js.map → p-DwFKVjl9.js.map} +1 -1
- package/dist/components/{p-CsQTVC99.js → p-GOMxt-hX.js} +5 -5
- package/dist/components/{p-CsQTVC99.js.map → p-GOMxt-hX.js.map} +1 -1
- package/dist/components/{p-B1TmuKF1.js → p-nTHvcriq.js} +3 -3
- package/dist/components/{p-B1TmuKF1.js.map → p-nTHvcriq.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 +2 -2
- package/dist/components/pcm-htws-modal.js +8 -8
- package/dist/components/pcm-hyzj-modal.js +5 -5
- package/dist/components/pcm-jd-modal.js +5 -5
- package/dist/components/pcm-jlpp-modal.js +8 -8
- package/dist/components/pcm-jlsx-modal.js +5 -5
- package/dist/components/pcm-jlzz-modal.js +6 -6
- package/dist/components/pcm-mnct-modal.js +7 -7
- package/dist/components/pcm-mnms-modal.js +8 -8
- package/dist/components/pcm-mnms-zp-modal.js +8 -8
- package/dist/components/pcm-mobile-input-btn.js +1 -1
- package/dist/components/pcm-mobile-upload-btn.js +1 -1
- package/dist/components/pcm-msbg-modal.js +5 -5
- package/dist/components/pcm-qgqjl-modal.js +8 -8
- 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 +2 -2
- package/dist/components/pcm-zygh-modal.js +7 -7
- package/dist/components/pcm-zygh-v2-modal.js +7 -7
- package/dist/esm/components-position-selector.entry.js +1 -1
- package/dist/esm/{index-Q4M1Gugl.js → index-BjAyf7cB.js} +3 -3
- package/dist/esm/{index-Q4M1Gugl.js.map → index-BjAyf7cB.js.map} +1 -1
- package/dist/esm/index.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 +2 -2
- 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 +6 -6
- package/dist/esm/oem-zygh-modal_30.entry.js +2 -2
- package/dist/esm/pcm-hr-chat-modal.entry.js +2 -2
- package/dist/esm/{sentry-reporter-CNG21bAv.js → sentry-reporter-Tjr1WIe_.js} +3 -3
- package/dist/esm/{sentry-reporter-CNG21bAv.js.map → sentry-reporter-Tjr1WIe_.js.map} +1 -1
- package/dist/pcm-agents/index.esm.js +1 -1
- package/dist/pcm-agents/{p-87776e16.entry.js → p-00b85fd4.entry.js} +2 -2
- package/dist/pcm-agents/{p-69763efd.entry.js → p-105c817e.entry.js} +2 -2
- package/dist/pcm-agents/{p-fffc5878.entry.js → p-14f39966.entry.js} +2 -2
- package/dist/pcm-agents/{p-a5f5fc66.entry.js → p-35abbac6.entry.js} +2 -2
- package/dist/pcm-agents/{p-3b33fab3.entry.js → p-63dad0cc.entry.js} +2 -2
- package/dist/pcm-agents/{p-e165942c.entry.js → p-7f526ecd.entry.js} +2 -2
- package/dist/pcm-agents/{p-BLzykf1G.js → p-8UPRxu25.js} +2 -2
- package/dist/pcm-agents/{p-BLzykf1G.js.map → p-8UPRxu25.js.map} +1 -1
- package/dist/pcm-agents/{p-2AXrgovz.js → p-CtiIaBjM.js} +2 -2
- package/dist/pcm-agents/{p-2AXrgovz.js.map → p-CtiIaBjM.js.map} +1 -1
- package/dist/pcm-agents/{p-9bf5c3ea.entry.js → p-a784e67b.entry.js} +2 -2
- package/dist/pcm-agents/{p-c2612bde.entry.js → p-cff06581.entry.js} +2 -2
- package/dist/pcm-agents/{p-d2f4d723.entry.js → p-d3fa28ab.entry.js} +2 -2
- package/dist/pcm-agents/{p-66986a51.entry.js → p-e9e8a461.entry.js} +2 -2
- package/dist/pcm-agents/{p-a332d951.entry.js → p-f08feed7.entry.js} +15 -15
- package/dist/pcm-agents/pcm-agents.esm.js +1 -1
- package/package.json +1 -1
- /package/dist/pcm-agents/{p-87776e16.entry.js.map → p-00b85fd4.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-69763efd.entry.js.map → p-105c817e.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-fffc5878.entry.js.map → p-14f39966.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-a5f5fc66.entry.js.map → p-35abbac6.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-3b33fab3.entry.js.map → p-63dad0cc.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-e165942c.entry.js.map → p-7f526ecd.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-9bf5c3ea.entry.js.map → p-a784e67b.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-c2612bde.entry.js.map → p-cff06581.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-d2f4d723.entry.js.map → p-d3fa28ab.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-66986a51.entry.js.map → p-e9e8a461.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-a332d951.entry.js.map → p-f08feed7.entry.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-fZAU5hF-.js');
|
|
5
5
|
var message_service = require('./message.service-DGUsA-FY.js');
|
|
6
6
|
|
|
7
7
|
const componentsPositionSelectorCss = ":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}";
|
|
@@ -286,7 +286,7 @@ onChange('data', value => {
|
|
|
286
286
|
}
|
|
287
287
|
});
|
|
288
288
|
|
|
289
|
-
const version = "0.6.
|
|
289
|
+
const version = "0.6.83";
|
|
290
290
|
|
|
291
291
|
// 导入环境变量
|
|
292
292
|
function format(first, middle, last) {
|
|
@@ -1015,6 +1015,6 @@ exports.uploadFileByUrl = uploadFileByUrl;
|
|
|
1015
1015
|
exports.uploadFileToBackend = uploadFileToBackend;
|
|
1016
1016
|
exports.verifyApiKey = verifyApiKey;
|
|
1017
1017
|
exports.verifySmsCode = verifySmsCode;
|
|
1018
|
-
//# sourceMappingURL=index-
|
|
1018
|
+
//# sourceMappingURL=index-fZAU5hF-.js.map
|
|
1019
1019
|
|
|
1020
|
-
//# sourceMappingURL=index-
|
|
1020
|
+
//# sourceMappingURL=index-fZAU5hF-.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-75Tc0zjX.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":["getRenderingRef","forceUpdate","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,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
|
|
1
|
+
{"version":3,"file":"index-fZAU5hF-.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":["getRenderingRef","forceUpdate","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,QA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1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-fZAU5hF-.js');
|
|
5
5
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
6
6
|
var message_service = require('./message.service-DGUsA-FY.js');
|
|
7
7
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-fZAU5hF-.js');
|
|
5
5
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
6
|
-
var sentryReporter = require('./sentry-reporter-
|
|
6
|
+
var sentryReporter = require('./sentry-reporter-DQtaDnfE.js');
|
|
7
7
|
require('./exports-Dc-pQh4A.js');
|
|
8
8
|
|
|
9
9
|
const oemJdModalCss = ".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}";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-fZAU5hF-.js');
|
|
5
5
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
6
6
|
var message_service = require('./message.service-DGUsA-FY.js');
|
|
7
7
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-fZAU5hF-.js');
|
|
5
5
|
var messageUtils = require('./message-utils-OP5WQarf.js');
|
|
6
6
|
var message_service = require('./message.service-DGUsA-FY.js');
|
|
7
7
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
8
|
-
var sentryReporter = require('./sentry-reporter-
|
|
8
|
+
var sentryReporter = require('./sentry-reporter-DQtaDnfE.js');
|
|
9
9
|
require('./exports-Dc-pQh4A.js');
|
|
10
10
|
|
|
11
11
|
const globalCss = ".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)}}.header-history-button{display:flex;align-items:end;gap:4px;padding:3px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-fZAU5hF-.js');
|
|
5
5
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
6
6
|
var message_service = require('./message.service-DGUsA-FY.js');
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-fZAU5hF-.js');
|
|
5
5
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
6
6
|
var message_service = require('./message.service-DGUsA-FY.js');
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-fZAU5hF-.js');
|
|
5
5
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
6
6
|
var message_service = require('./message.service-DGUsA-FY.js');
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-fZAU5hF-.js');
|
|
5
5
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
6
6
|
var message_service = require('./message.service-DGUsA-FY.js');
|
|
7
7
|
|
|
@@ -292,10 +292,10 @@ const OemQgqjlModal = class {
|
|
|
292
292
|
return;
|
|
293
293
|
}
|
|
294
294
|
// 如果没有预设的job_info,则需要检查用户输入
|
|
295
|
-
if (!this.customInputs?.job_info && !this.jobDescription.trim()) {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
295
|
+
// if (!this.customInputs?.job_info && !this.jobDescription.trim()) {
|
|
296
|
+
// Message.info('请输入职位描述');
|
|
297
|
+
// return;
|
|
298
|
+
// }
|
|
299
299
|
// 判断文件是否正在上传
|
|
300
300
|
if (await this.pcmUploadRef?.getIsUploading?.()) {
|
|
301
301
|
message_service.Message.info('文件上传中,请稍后');
|
|
@@ -339,7 +339,7 @@ const OemQgqjlModal = class {
|
|
|
339
339
|
const result = e.detail ?? [];
|
|
340
340
|
this.uploadedFileInfo = result[0];
|
|
341
341
|
this.uploadSuccess.emit(this.uploadedFileInfo);
|
|
342
|
-
} })), index.h("button", { class: "submit-button", disabled: (!disableResumeUpload && !this.uploadedFileInfo) ||
|
|
342
|
+
} })), index.h("button", { class: "submit-button", disabled: (!disableResumeUpload && !this.uploadedFileInfo) || this.isUploading || this.isSubmitting, onClick: this.handleStartInterview }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'), index.h("div", { class: "ai-disclaimer" }, index.h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), index.h("p", { class: "beian-info" }, index.h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", index.h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))))), isLoading && !this.showIframe && (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("p", { class: "loading-text" }, "\u6B63\u5728\u52A0\u8F7D\u5BF9\u8BDD..."))), this.showChatModal && (index.h("div", null, index.h("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: "45444431062634496", conversationId: this.currentConversationId, defaultQuery: this.defaultQuery, filePreviewMode: this.filePreviewMode, closeResume: this.closeResumeChat, customInputs: {
|
|
343
343
|
...this.customInputs,
|
|
344
344
|
file_url: this.customInputs?.file_url || this.uploadedFileInfo?.cos_key,
|
|
345
345
|
file_name: this.customInputs?.file_name || this.uploadedFileInfo?.file_name,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-fZAU5hF-.js');
|
|
5
5
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
6
6
|
var message_service = require('./message.service-DGUsA-FY.js');
|
|
7
7
|
var messageUtils = require('./message-utils-OP5WQarf.js');
|
|
8
|
-
var sentryReporter = require('./sentry-reporter-
|
|
8
|
+
var sentryReporter = require('./sentry-reporter-DQtaDnfE.js');
|
|
9
9
|
require('./exports-Dc-pQh4A.js');
|
|
10
10
|
|
|
11
11
|
const globalCss$i = ".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)}}.header-history-button{display:flex;align-items:end;gap:4px;padding:3px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-fZAU5hF-.js');
|
|
5
5
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
6
|
-
var sentryReporter = require('./sentry-reporter-
|
|
6
|
+
var sentryReporter = require('./sentry-reporter-DQtaDnfE.js');
|
|
7
7
|
require('./exports-Dc-pQh4A.js');
|
|
8
8
|
|
|
9
9
|
const pcmHrChatModalCss = ":host{display:block}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;overflow-y:auto;padding:20px;z-index:1000}.fullscreen-overlay{padding:0}.modal-container{background:white;border-radius:8px;width:100%;max-width:800px;display:flex;flex-direction:column;position:relative;margin:auto}.modal-container.fullscreen{width:100vw;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;height:100vh;max-height:100vh}.modal-container.fullscreen>div:not(.modal-header):not(.initial-upload){display:flex;flex-direction:column;flex:1;overflow:hidden;height:100%}.pc-layout{width:80%;max-width:800px;min-width:320px;min-height:400px}@media screen and (max-width: 768px){.pc-layout{width:95%;}.modal-overlay{padding:0}.modal-container.fullscreen{height:-webkit-fill-available;max-height:-webkit-fill-available;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.video-preview.placeholder{display:flex;justify-content:center;align-items:center;background:#EAEAEA}.placeholder-status{color:#00000066}.placeholder-status p{font-size:16px}.waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-container{width:100%;display:flex;flex-direction:column;align-items:center}.video-area{width:100%;display:flex;flex-direction:column;align-items:center}.stop-recording-button{width:100%;height:100%;font-size:16px;background:#f44336;border-radius:6px;color:white;border:none;cursor:pointer}.stop-recording-button:hover{background:#d32f2f}.play-audio-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0;}.header-left{display:flex;align-items:center;gap:8px}.header-left div{font-size:16px}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.chat-history{position:relative;flex:1;overflow-y:auto;padding:20px;scroll-behavior:smooth;min-height:200px;background:url(https://pcm-resource-1312611446.cos.ap-guangzhou.myqcloud.com/web/sdk/chat_bg.png);background-size:100%}.fullscreen .chat-history{height:auto;flex:1 1 auto}.message-input{padding:16px;border-top:1px solid #eee;display:flex;gap:8px;align-items:center}.message-input input{flex:1;padding:8px 12px;border:1px solid #ddd;border-radius:4px;outline:none;transition:border-color 0.2s ease}.message-input input:focus{border-color:#bbb}.message{margin-bottom:16px;opacity:1;transition:opacity 0.3s ease}.message-content{max-width:70%;padding:8px 12px;border-radius:8px;word-break:break-word}.message-content p{margin:0;word-break:break-word}.user-message{display:flex;justify-content:flex-end}.agent-message{display:flex;justify-content:flex-start}.user-message .message-content{background-color:#007bff;color:white}.agent-message .message-content{background-color:#f1f1f1}.message-time{font-size:12px;color:#999;margin-top:4px;display:block}.send-button{background-color:#1890ff;color:white;border:none;border-radius:4px;padding:8px 16px;cursor:pointer;font-weight:500}.send-button:disabled{background-color:#ccc;cursor:not-allowed}.empty-state{display:flex;justify-content:center;align-items:center;height:100%;color:#999;text-align:center}.loading-container{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:rgba(255, 255, 255, 0.98);z-index:1;opacity:1;transition:opacity 0.3s ease}.loading-container p{margin-top:16px;color:#666;font-size:14px}.loading-spinner{width:40px;height:40px;border:3px solid #f3f3f3;border-top:3px solid #1890ff;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.messages-wrapper{width:100%;min-height:100%;display:flex;flex-direction:column;justify-content:flex-end}.messages-wrapper.has-overflow{justify-content:flex-start}.suggested-questions{display:flex;flex-direction:column;gap:8px;padding:16px}.suggested-question{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background-color:#f3f4f6;border-radius:4px;cursor:pointer;font-size:14px;color:#374151;transition:background-color 0.2s}.suggested-question:hover{background-color:#e5e7eb}.arrow-right{margin-left:8px}.loading-suggestions{display:flex;justify-content:center;padding:16px}.loading-spinner-small{width:20px;height:20px;border:2px solid #e5e7eb;border-top-color:#6b7280;border-radius:50%;animation:spin 1s linear infinite}.upload-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;color:#666;border-radius:4px;transition:background-color 0.2s}.upload-button:hover{background-color:rgba(0, 0, 0, 0.04)}.upload-button svg{width:20px;height:20px}.file-input{display:none}.selected-file{font-size:12px;color:#666;margin-left:8px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.input-wrapper{flex:1;display:flex;align-items:center;border:1px solid #ddd;border-radius:4px;padding:0 4px;background:white}.input-wrapper input{border:none;flex:1;padding:8px;outline:none}.input-wrapper:focus-within{border-color:#bbb}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#999;cursor:pointer;padding:4px 8px;font-size:16px;line-height:1;border-radius:4px;transition:all 0.2s}.remove-file:hover{background-color:#f0f0f0;color:#666}.initial-upload{padding:16px;display:flex;flex-direction:column;align-items:center;height:100%}.upload-section{max-width:600px;width:100%;text-align:center}.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}.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}.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}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.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}.submit-button:disabled{background:#ccc;cursor:not-allowed}.submit-button:hover:not(:disabled){background:#40a9ff}.category-select,.dimension-select{margin:30px 0}.category-options,.dimension-options{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}.category-button,.dimension-button{padding:12px 16px;border:1px solid #E5E5E5;border-radius:6px;background:white;cursor:pointer;transition:all 0.3s}.category-button:hover,.dimension-button:hover{background:#f5f5f5}.category-button.selected{background-image:linear-gradient(111deg, #4A9FFF 0%, #1058FF 100%);color:white}.dimension-button.selected{background-image:linear-gradient(111deg, #4A9FFF 0%, #1058FF 100%);color:white}.recording-section{border-top:1px solid #eee;display:flex;flex-direction:column;align-items:center;padding:20px;border-radius:14px 14px 0 0;flex:0 0 auto}.recording-section .video-preview{width:100%;height:200px;max-width:400px;position:relative;margin-bottom:10px;border:1px solid #ddd;border-radius:12px;overflow:hidden}.recording-section video{width:100%;height:100%;object-fit:cover}.recording-status{position:absolute;top:10px;left:10px;background-color:rgba(0, 0, 0, 0.6);color:white;padding:4px 8px;border-radius:4px;display:flex;align-items:center;gap:5px;font-size:14px;z-index:2}.recording-status .recording-dot{display:inline-block;width:10px;height:10px;background-color:red;border-radius:50%;margin-right:5px;animation:blink 1s infinite}.recording-status.warning{color:#ff4d4f;animation:blink 1s infinite}@keyframes blink{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}.recording-section .stop-recording-button{background-color:#f44336;color:white;border:none;cursor:pointer;font-weight:bold}.recording-section .stop-recording-button:hover{background-color:#d32f2f}.fullscreen{width:100vw;border-radius:0;height:100vh;display:flex;flex-direction:column;overflow-y:auto}.recording-controls{margin-top:10px;height:53px;width:100%;max-width:400px;display:flex;justify-content:center}.recording-controls .waiting-message{text-align:center;color:white;font-size:16px;background-image:linear-gradient(100deg, #4A9FFF 0%, #1058FF 100%);border-radius:6px;box-shadow:0 2px 8px rgba(0, 0, 0, 0.15);width:95%;display:flex;justify-content:center;align-items:center;cursor:pointer}.recording-controls .waiting-message.loading{background:#faad14}.recording-controls .waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-controls .stop-recording-button{background-color:#dc3545;color:white;border:none;cursor:pointer;font-size:16px}.recording-controls .stop-recording-button:hover{background-color:#c82333}.recording-controls .stop-recording-button.disabled{background:#ccc;cursor:not-allowed}.recording-controls .stop-recording-button.disabled:hover{background:#ccc}.progress-container{display:flex;justify-content:space-between;align-items:center;width:100%;max-width:400px;margin-top:10px;padding:0 5px}.progress-bar-container{height:4px;background-color:#E5E5E5;border-radius:2px;overflow:hidden;margin-right:10px;width:75px}.progress-bar{height:100%;background-image:linear-gradient(111deg, #4A9FFF 0%, #1058FF 100%);border-radius:2px;transition:width 0.3s ease}.progress-text{font-size:14px;color:#666;white-space:nowrap}";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-fZAU5hF-.js');
|
|
4
4
|
var exports$1 = require('./exports-Dc-pQh4A.js');
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -67,6 +67,6 @@ class SentryReporter {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
exports.SentryReporter = SentryReporter;
|
|
70
|
-
//# sourceMappingURL=sentry-reporter-
|
|
70
|
+
//# sourceMappingURL=sentry-reporter-DQtaDnfE.js.map
|
|
71
71
|
|
|
72
|
-
//# sourceMappingURL=sentry-reporter-
|
|
72
|
+
//# sourceMappingURL=sentry-reporter-DQtaDnfE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentry-reporter-
|
|
1
|
+
{"version":3,"file":"sentry-reporter-DQtaDnfE.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":["configStore","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,GAAGA,iBAAW,CAAC,OAAO,CAAC,eAAe,CAAC;YAClD,IAAI,KAAK,EAAE;AACT,gBAAAC,iBAAc,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,oBAAiB,CAAC,eAAe,EAAE,YAAY,CAAC;;;AAIlD,YAAAC,0BAAuB,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,GAAGH,iBAAW,CAAC,OAAO,CAAC,eAAe,CAAC;YAClD,IAAI,KAAK,EAAE;AACT,gBAAAC,iBAAc,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;;;YAIvC,IAAI,OAAO,EAAE;AACX,gBAAAC,oBAAiB,CAAC,iBAAiB,EAAE,OAAO,CAAC;;;AAI/C,YAAAE,wBAAqB,CAAC,OAAO,CAAC;;QAC9B,OAAO,CAAC,EAAE;AACV,YAAA,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;;;AAIvC;;;;"}
|
|
@@ -278,10 +278,10 @@ export class OemQgqjlModal {
|
|
|
278
278
|
return;
|
|
279
279
|
}
|
|
280
280
|
// 如果没有预设的job_info,则需要检查用户输入
|
|
281
|
-
if (!this.customInputs?.job_info && !this.jobDescription.trim()) {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
281
|
+
// if (!this.customInputs?.job_info && !this.jobDescription.trim()) {
|
|
282
|
+
// Message.info('请输入职位描述');
|
|
283
|
+
// return;
|
|
284
|
+
// }
|
|
285
285
|
// 判断文件是否正在上传
|
|
286
286
|
if (await this.pcmUploadRef?.getIsUploading?.()) {
|
|
287
287
|
Message.info('文件上传中,请稍后');
|
|
@@ -325,7 +325,7 @@ export class OemQgqjlModal {
|
|
|
325
325
|
const result = e.detail ?? [];
|
|
326
326
|
this.uploadedFileInfo = result[0];
|
|
327
327
|
this.uploadSuccess.emit(this.uploadedFileInfo);
|
|
328
|
-
} })), h("button", { class: "submit-button", disabled: (!disableResumeUpload && !this.uploadedFileInfo) ||
|
|
328
|
+
} })), h("button", { class: "submit-button", disabled: (!disableResumeUpload && !this.uploadedFileInfo) || this.isUploading || this.isSubmitting, onClick: this.handleStartInterview }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'), h("div", { class: "ai-disclaimer" }, h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), h("p", { class: "beian-info" }, h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))))), isLoading && !this.showIframe && (h("div", { class: "loading-container" }, h("div", { class: "loading-spinner" }), h("p", { class: "loading-text" }, "\u6B63\u5728\u52A0\u8F7D\u5BF9\u8BDD..."))), this.showChatModal && (h("div", null, h("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: "45444431062634496", conversationId: this.currentConversationId, defaultQuery: this.defaultQuery, filePreviewMode: this.filePreviewMode, closeResume: this.closeResumeChat, customInputs: {
|
|
329
329
|
...this.customInputs,
|
|
330
330
|
file_url: this.customInputs?.file_url || this.uploadedFileInfo?.cos_key,
|
|
331
331
|
file_name: this.customInputs?.file_name || this.uploadedFileInfo?.file_name,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oem-qgqjl-modal.js","sourceRoot":"","sources":["../../../../src/components/oem-qgqjl-modal/oem-qgqjl-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAC/F,OAAO,EAAsB,YAAY,EAAE,UAAU,EAAY,MAAM,mBAAmB,CAAC;AAE3F,OAAO,EAAE,aAAa,EAAoB,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAEzD;;GAEG;AAOH,MAAM,OAAO,aAAa;IACxB;;OAEG;IACK,UAAU,GAAW,OAAO,CAAC;IAErC;;OAEG;IAC2B,KAAK,CAAU;IAE7C;;OAEG;IACsB,MAAM,GAAY,KAAK,CAAC;IAEjD;;OAEG;IACM,WAAW,CAAqB;IAEzC;;OAEG;IACK,IAAI,CAAU;IAEtB;;OAEG;IACK,MAAM,GAAY,IAAI,CAAC;IAE/B;;OAEG;IACK,YAAY,GAAY,IAAI,CAAC;IAErC;;OAEG;IACK,WAAW,GAAY,IAAI,CAAC;IAEpC;;OAEG;IACsB,cAAc,CAAU;IAEjD;;OAEG;IACK,YAAY,GAAW,SAAS,CAAC;IACzC;;OAEG;IACM,aAAa,CAAoB;IAC1C;;OAEG;IACK,gBAAgB,GAAW,YAAY,CAAC;IAEhD;;OAEG;IACK,UAAU,GAAY,KAAK,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, State, Element, Event, EventEmitter, Watch } from '@stencil/core';\r\nimport { FileUploadResponse, verifyApiKey, PCM_DOMAIN, Position } from '../../utils/utils';\r\nimport { ConversationStartEventData, InterviewCompleteEventData, StreamCompleteEventData } from '../../components';\r\nimport { ErrorEventBus, ErrorEventDetail } from '../../utils/error-event';\r\nimport { authStore } from '../../../store/auth.store';\r\nimport { configStore } from '../../../store/config.store';\r\nimport { Message } from '../../services/message.service';\r\n\r\n/**\r\n * 千岗千简历\r\n */\r\n\r\n@Component({\r\n tag: 'oem-qgqjl-modal',\r\n styleUrls: ['oem-qgqjl-modal.css', '../../global/global.css', '../../global/host.css'],\r\n shadow: true,\r\n})\r\nexport class OemQgqjlModal {\r\n /**\r\n * 模态框标题\r\n */\r\n @Prop() modalTitle: string = '千岗千简历';\r\n\r\n /**\r\n * SDK鉴权密钥\r\n */\r\n @Prop({ attribute: 'token' }) token!: string;\r\n\r\n /**\r\n * 是否显示聊天模态框\r\n */\r\n @Prop({ mutable: true }) isOpen: boolean = false;\r\n\r\n /**\r\n * 当点击模态框关闭时触发\r\n */\r\n @Event() modalClosed: EventEmitter<void>;\r\n\r\n /**\r\n * 应用图标URL\r\n */\r\n @Prop() icon?: string;\r\n\r\n /**\r\n * 聊天框的页面层级\r\n */\r\n @Prop() zIndex?: number = 1000;\r\n\r\n /**\r\n * 是否展示顶部标题栏\r\n */\r\n @Prop() isShowHeader: boolean = true;\r\n\r\n /**\r\n * 是否展示右上角的关闭按钮\r\n */\r\n @Prop() isNeedClose: boolean = true;\r\n\r\n /**\r\n * 会话ID,传入继续对话,否则创建新会话\r\n */\r\n @Prop({ mutable: true }) conversationId?: string;\r\n\r\n /**\r\n * 默认查询文本\r\n */\r\n @Prop() defaultQuery: string = '请帮我优化简历';\r\n /**\r\n * 获取简历数据事件(用户点击导出简历json数据后触发)\r\n */\r\n @Event() getResumeData: EventEmitter<any>;\r\n /**\r\n * 导出按钮的文本\r\n */\r\n @Prop() exportButtonText: string = '导出简历json数据';\r\n\r\n /**\r\n * 是否以全屏模式打开,移动端建议设置为true\r\n */\r\n @Prop() fullscreen: boolean = false;\r\n\r\n /**\r\n * 自定义输入参数,传入customInputs.job_info时,JD输入区域不可修改<br>\r\n * 传入customInputs.file_url时,简历上传区域不可修改。<br>\r\n */\r\n @Prop() customInputs: Record<string, string> = {};\r\n\r\n /**\r\n * 是否显示工作区历史会话按钮\r\n */\r\n @Prop() showWorkspaceHistory: boolean = false;\r\n\r\n /**\r\n * OEM ID,用于获取职位列表\r\n */\r\n @Prop() oemId?: string;\r\n\r\n /**\r\n * 上传成功事件\r\n */\r\n @Event() uploadSuccess: EventEmitter<FileUploadResponse>;\r\n\r\n /**\r\n * 流式输出完成事件\r\n */\r\n @Event() streamComplete: EventEmitter<StreamCompleteEventData>;\r\n\r\n /**\r\n * 新会话开始的回调,只会在一轮对话开始时触发一次\r\n */\r\n @Event() conversationStart: EventEmitter<ConversationStartEventData>;\r\n\r\n /**\r\n * 当聊天完成时触发\r\n */\r\n @Event() interviewComplete: EventEmitter<InterviewCompleteEventData>;\r\n\r\n /**\r\n * SDK密钥验证失败事件\r\n */\r\n @Event() tokenInvalid: EventEmitter<void>;\r\n\r\n /**\r\n * 错误事件\r\n */\r\n @Event() someErrorEvent: EventEmitter<ErrorEventDetail>;\r\n\r\n /**\r\n * 附件预览模式\r\n * 'drawer': 在右侧抽屉中预览\r\n * 'window': 在新窗口中打开\r\n */\r\n @Prop() filePreviewMode: 'drawer' | 'window' = 'window';\r\n\r\n @State() isUploading: boolean = false;\r\n @State() uploadedFileInfo: FileUploadResponse | null = null;\r\n @State() showChatModal: boolean = false;\r\n @State() showIframe: boolean = false;\r\n\r\n // 使用 @Element 装饰器获取组件的 host 元素\r\n @Element() hostElement: HTMLElement;\r\n\r\n @State() jobDescription: string = '';\r\n @State() isSubmitting: boolean = false;\r\n\r\n // 职位选择器相关状态\r\n @State() showPositionSelector: boolean = false;\r\n\r\n // 内部会话ID状态,用于保存流式输出返回的会话ID\r\n @State() private _internalConversationId?: string;\r\n /**\r\n * iframe DOM 引用\r\n */\r\n private _iframeEl?: HTMLIFrameElement;\r\n\r\n private tokenInvalidListener: () => void;\r\n private removeErrorListener: () => void;\r\n private pcmUploadRef;\r\n\r\n @Watch('token')\r\n handleTokenChange(newToken: string) {\r\n // 当传入的 token 变化时,更新 authStore 中的 token\r\n if (newToken && newToken !== authStore.getToken()) {\r\n authStore.setToken(newToken);\r\n }\r\n }\r\n\r\n @Watch('isOpen')\r\n async handleIsOpenChange(newValue: boolean) {\r\n if (!newValue) {\r\n // 重置状态\r\n this.showChatModal = false;\r\n this.showIframe = false;\r\n this.jobDescription = '';\r\n this._internalConversationId = undefined;\r\n this.uploadedFileInfo = null;\r\n this.isUploading = false;\r\n this.isSubmitting = false;\r\n this.showPositionSelector = false;\r\n } else {\r\n await verifyApiKey(this.token);\r\n\r\n // 如果有会话ID直接显示聊天模态框\r\n if (this.currentConversationId) {\r\n this.showChatModal = true;\r\n this.showIframe = false;\r\n }\r\n }\r\n }\r\n\r\n componentWillLoad() {\r\n // 将 zIndex 存入配置缓存\r\n if (this.zIndex) {\r\n configStore.setItem('modal-zIndex', this.zIndex);\r\n }\r\n\r\n // 初始化时设置 token,但不验证(验证在 @Watch('isOpen') 中处理)\r\n if (this.token) {\r\n authStore.setToken(this.token);\r\n }\r\n\r\n // 添加全局token无效事件监听器\r\n this.tokenInvalidListener = () => {\r\n this.tokenInvalid.emit();\r\n };\r\n // 添加全局错误监听\r\n this.removeErrorListener = ErrorEventBus.addErrorListener(errorDetail => {\r\n this.someErrorEvent.emit(errorDetail);\r\n });\r\n document.addEventListener('pcm-token-invalid', this.tokenInvalidListener);\r\n }\r\n\r\n /**\r\n * 获取当前应该使用的会话ID\r\n * 优先使用外部传入的conversationId,否则使用内部保存的_internalConversationId\r\n */\r\n private get currentConversationId(): string | undefined {\r\n return this.conversationId || this._internalConversationId;\r\n }\r\n\r\n /**\r\n * 处理流式响应完成事件\r\n */\r\n private handleStreamComplete = (event: CustomEvent<StreamCompleteEventData>) => {\r\n // 保存会话ID到内部状态,用于后续的iframe URL\r\n this._internalConversationId = event.detail.conversation_id;\r\n };\r\n\r\n componentDidLoad() {\r\n // 监听来自 iframe 的消息\r\n window.addEventListener('message', this.handleIframeMessage);\r\n }\r\n\r\n disconnectedCallback() {\r\n // 组件销毁时移除事件监听器\r\n document.removeEventListener('pcm-token-invalid', this.tokenInvalidListener);\r\n // 移除错误监听器\r\n if (this.removeErrorListener) {\r\n this.removeErrorListener();\r\n }\r\n window.removeEventListener('message', this.handleIframeMessage);\r\n }\r\n\r\n private handleClose = () => {\r\n this.modalClosed.emit();\r\n };\r\n\r\n\r\n // 生成简历\r\n private closeResumeChat = () => {\r\n this.showIframe = true;\r\n this.showChatModal = false;\r\n };\r\n /**\r\n * 处理 iframe 加载完成(不再直接发送 token)\r\n * 由 iframe 主动 postMessage { type: 'iframeReady' } 通知父页面后再发送 token\r\n */\r\n private handleIframeLoad = () => {\r\n console.log(this._iframeEl, 'this._iframeEl');\r\n // 不再直接发送 token,等待 iframeReady 消息\r\n };\r\n /**\r\n * 处理来自 iframe 的消息\r\n * 支持 iframe 调用父组件方法,也支持握手机制\r\n */\r\n private handleIframeMessage = (event: MessageEvent) => {\r\n // 允许本地和线上环境\r\n const allowedOrigins = ['http://localhost:3000', PCM_DOMAIN];\r\n if (!allowedOrigins.includes(event.origin)) return;\r\n const { type, value } = event.data || {};\r\n if (type === 'callParentMethod') {\r\n this.exampleMethodFromIframe(value);\r\n }\r\n // 关键:收到 iframeReady 后再发送 token\r\n if (type === 'iframeReady' && this._iframeEl?.contentWindow) {\r\n // 动态获取 targetOrigin,兼容本地和线上\r\n const targetOrigin = new URL(this._iframeEl.src).origin;\r\n // 1. 先发送 parentReady,带上父页面的 origin\r\n this._iframeEl.contentWindow.postMessage({ type: 'parentReady', origin: window.location.origin }, targetOrigin);\r\n // 2. 再发送 token\r\n this._iframeEl.contentWindow.postMessage({ type: 'setToken', token: this.token }, targetOrigin);\r\n console.log(this.exportButtonText, 'this.exportButtonText');\r\n this._iframeEl.contentWindow.postMessage(\r\n {\r\n type: 'buttonConfig',\r\n config: {\r\n hideExportButton: true,\r\n exportButtonText: this.exportButtonText,\r\n },\r\n },\r\n targetOrigin,\r\n );\r\n console.log('父组件已发送 token 给 iframe,targetOrigin:', targetOrigin);\r\n }\r\n };\r\n\r\n /**\r\n * 导出简历数据\r\n * @param value 简历数据是字符串形式\r\n */\r\n public exampleMethodFromIframe(value: string) {\r\n this.getResumeData.emit(JSON.parse(value));\r\n }\r\n\r\n\r\n\r\n private handleJobDescriptionChange = (event: Event) => {\r\n const textarea = event.target as HTMLTextAreaElement;\r\n this.jobDescription = textarea.value;\r\n };\r\n\r\n private handleOpenPositionSelector = () => {\r\n if (!this.oemId) {\r\n Message.info('未配置OEM ID,无法选择职位');\r\n return;\r\n }\r\n this.showPositionSelector = true;\r\n };\r\n\r\n private handleClosePositionSelector = () => {\r\n this.showPositionSelector = false;\r\n };\r\n\r\n private handlePositionSelected = (event: CustomEvent<Position & { formatted_text?: string }>) => {\r\n const position = event.detail;\r\n // 直接使用职位选择器组件提供的格式化文本\r\n this.jobDescription = position.formatted_text || '';\r\n this.showPositionSelector = false;\r\n Message.success('职位信息已填充');\r\n };\r\n\r\n private handleStartInterview = async () => {\r\n // 既没有预设 file_url,也没有上传文件,则提示\r\n if (!this.customInputs?.file_url && !this.uploadedFileInfo) {\r\n Message.info('请上传简历');\r\n return;\r\n }\r\n\r\n // 如果没有预设的job_info,则需要检查用户输入\r\n if (!this.customInputs?.job_info && !this.jobDescription.trim()) {\r\n Message.info('请输入职位描述');\r\n return;\r\n }\r\n\r\n // 判断文件是否正在上传\r\n if (await this.pcmUploadRef?.getIsUploading?.()) {\r\n Message.info('文件上传中,请稍后');\r\n return;\r\n }\r\n\r\n this.isSubmitting = true;\r\n this.showChatModal = true;\r\n this.isSubmitting = false;\r\n };\r\n\r\n render() {\r\n if (!this.isOpen) return null;\r\n\r\n const modalStyle = {\r\n zIndex: String(this.zIndex),\r\n };\r\n\r\n const containerClass = {\r\n 'modal-container': true,\r\n 'fullscreen': this.fullscreen,\r\n 'pc-layout': !this.showIframe,\r\n };\r\n\r\n const overlayClass = {\r\n 'modal-overlay': true,\r\n 'fullscreen-overlay': this.fullscreen,\r\n };\r\n\r\n // 显示加载状态\r\n const isLoading = this.currentConversationId && !this.showChatModal;\r\n\r\n // 判断是否禁用JD输入区域(有预设job_info时禁用)\r\n const disableJdInput = Boolean(this.customInputs && this.customInputs.job_info);\r\n\r\n // 判断是否禁用简历上传区域(有预设file_url时禁用)\r\n const disableResumeUpload = Boolean(this.customInputs && this.customInputs.file_url);\r\n\r\n return (\r\n <div class={overlayClass} style={modalStyle}>\r\n <div class={containerClass}>\r\n {this.isShowHeader && (\r\n <div class=\"modal-header\">\r\n <div class=\"header-left\">\r\n {this.icon && <img src={this.icon} class=\"header-icon\" alt=\"应用图标\" />}\r\n <div>{this.modalTitle}</div>\r\n </div>\r\n {this.isNeedClose && (\r\n <button class=\"close-button\" onClick={this.handleClose}>\r\n <span>×</span>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n\r\n {/* 输入界面 - 仅在不显示聊天模态框且没有会话ID时显示 */}\r\n {!this.showChatModal && !this.currentConversationId && (\r\n <div class=\"input-container\">\r\n {/* JD输入区域 */}\r\n <div class=\"jd-input-section\">\r\n <div class=\"label-with-button\">\r\n <label htmlFor=\"job-description\">请输入职位描述 (JD)</label>\r\n {!disableJdInput && (\r\n <div class=\"button-group\">\r\n {this.oemId && (\r\n <button\r\n class=\"position-selector-button\"\r\n onClick={this.handleOpenPositionSelector}\r\n type=\"button\"\r\n >\r\n 选择职位\r\n </button>\r\n )}\r\n <pcm-mobile-input-btn\r\n name=\"职位描述\"\r\n onOk={(e) => {\r\n this.jobDescription = e.detail;\r\n }}\r\n />\r\n </div>\r\n )}\r\n </div>\r\n <textarea\r\n id=\"job-description\"\r\n class=\"job-description-textarea\"\r\n placeholder=\"请输入职位描述,包括职责、要求等信息...\"\r\n rows={6}\r\n value={this.customInputs?.job_info || this.jobDescription}\r\n onInput={this.handleJobDescriptionChange}\r\n disabled={disableJdInput}\r\n ></textarea>\r\n </div>\r\n\r\n {/* 简历上传区域 */}\r\n <div class=\"resume-upload-section\">\r\n <label>上传简历</label>\r\n <pcm-upload\r\n ref={el => this.pcmUploadRef = el}\r\n maxFileSize={15 * 1024 * 1024}\r\n multiple={false}\r\n mobileUploadAble={true}\r\n acceptFileSuffixList={['.txt', '.md', '.pdf', '.docx', '.doc']}\r\n uploadParams={{\r\n tags: ['resume'],\r\n }}\r\n defaultFileList={this.customInputs?.file_url ? [{\r\n cos_key: this.customInputs.file_url,\r\n file_name: this.customInputs?.file_name || '预设简历',\r\n file_size: 0,\r\n ext: '',\r\n }] : undefined}\r\n disabled={disableResumeUpload}\r\n onUploadChange={(e) => {\r\n const result: FileUploadResponse[] = e.detail ?? [];\r\n this.uploadedFileInfo = result[0];\r\n this.uploadSuccess.emit(this.uploadedFileInfo);\r\n }}\r\n />\r\n </div>\r\n\r\n <button\r\n class=\"submit-button\"\r\n disabled={(!disableResumeUpload && !this.uploadedFileInfo) || !(this.customInputs?.job_info || this.jobDescription.trim()) || this.isUploading || this.isSubmitting}\r\n onClick={this.handleStartInterview}\r\n >\r\n {this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'}\r\n </button>\r\n\r\n <div class=\"ai-disclaimer\">\r\n <p>所有内容均由AI生成仅供参考</p>\r\n <p class=\"beian-info\">\r\n <span>中央网信办生成式人工智能服务备案号</span>:\r\n <a href=\"https://www.pincaimao.com\" target=\"_blank\" rel=\"noopener noreferrer\">\r\n Hunan-PinCaiMao-202412310003\r\n </a>\r\n </p>\r\n </div>\r\n </div>\r\n )}\r\n\r\n {/* 加载状态 - 在有会话ID但聊天模态框尚未显示时展示 */}\r\n {isLoading && !this.showIframe && (\r\n <div class=\"loading-container\">\r\n <div class=\"loading-spinner\"></div>\r\n <p class=\"loading-text\">正在加载对话...</p>\r\n </div>\r\n )}\r\n\r\n {/* 聊天界面 - 在显示聊天模态框时显示 */}\r\n {this.showChatModal && (\r\n <div>\r\n <pcm-app-chat-modal\r\n isOpen={true}\r\n modalTitle={this.modalTitle}\r\n icon={this.icon}\r\n isShowHeader={this.isShowHeader}\r\n isNeedClose={this.isNeedClose}\r\n fullscreen={this.fullscreen}\r\n showWorkspaceHistory={this.showWorkspaceHistory}\r\n botId=\"45444431062634496\"\r\n conversationId={this.currentConversationId}\r\n defaultQuery={this.defaultQuery}\r\n filePreviewMode={this.filePreviewMode}\r\n closeResume={this.closeResumeChat}\r\n customInputs={{\r\n ...this.customInputs,\r\n file_url: this.customInputs?.file_url || this.uploadedFileInfo?.cos_key,\r\n file_name: this.customInputs?.file_name || this.uploadedFileInfo?.file_name,\r\n job_info: this.customInputs?.job_info || this.jobDescription,\r\n }}\r\n interviewMode=\"text\"\r\n onStreamComplete={this.handleStreamComplete}\r\n ></pcm-app-chat-modal>\r\n </div>\r\n )}\r\n {this.showIframe && (\r\n <>\r\n {/*\r\n 1. 不再通过 URL 传递 token,避免泄露。\r\n 2. 通过 ref 获取 iframe 元素,onLoad 时 postMessage 发送 token。\r\n */}\r\n <div class=\"iframe-container\">\r\n <iframe\r\n ref={el => (this._iframeEl = el as HTMLIFrameElement)}\r\n src={`${PCM_DOMAIN}/myresume?conversation_id=${this.currentConversationId}&isSdk=true`}\r\n // src={`http://localhost:3000/myresume?conversation_id=${this.currentConversationId}&isSdk=true`}\r\n frameborder=\"0\"\r\n onLoad={this.handleIframeLoad}\r\n ></iframe>\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n\r\n {/* 职位选择器弹窗 */}\r\n {this.showPositionSelector && (\r\n <div class=\"position-selector-modal-overlay\">\r\n <div class=\"position-selector-modal\">\r\n <div class=\"position-selector-modal-header\">\r\n <h3>选择职位</h3>\r\n <button class=\"position-selector-close-btn\" onClick={this.handleClosePositionSelector}>\r\n ×\r\n </button>\r\n </div>\r\n <div class=\"position-selector-modal-body\">\r\n <components-position-selector\r\n oemId={this.oemId}\r\n multiple={false}\r\n onPositionSelected={this.handlePositionSelected}\r\n ></components-position-selector>\r\n </div>\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"oem-qgqjl-modal.js","sourceRoot":"","sources":["../../../../src/components/oem-qgqjl-modal/oem-qgqjl-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAC/F,OAAO,EAAsB,YAAY,EAAE,UAAU,EAAY,MAAM,mBAAmB,CAAC;AAE3F,OAAO,EAAE,aAAa,EAAoB,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAEzD;;GAEG;AAOH,MAAM,OAAO,aAAa;IACxB;;OAEG;IACK,UAAU,GAAW,OAAO,CAAC;IAErC;;OAEG;IAC2B,KAAK,CAAU;IAE7C;;OAEG;IACsB,MAAM,GAAY,KAAK,CAAC;IAEjD;;OAEG;IACM,WAAW,CAAqB;IAEzC;;OAEG;IACK,IAAI,CAAU;IAEtB;;OAEG;IACK,MAAM,GAAY,IAAI,CAAC;IAE/B;;OAEG;IACK,YAAY,GAAY,IAAI,CAAC;IAErC;;OAEG;IACK,WAAW,GAAY,IAAI,CAAC;IAEpC;;OAEG;IACsB,cAAc,CAAU;IAEjD;;OAEG;IACK,YAAY,GAAW,SAAS,CAAC;IACzC;;OAEG;IACM,aAAa,CAAoB;IAC1C;;OAEG;IACK,gBAAgB,GAAW,Y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G;4BAClG,WAAW,EAAC,GAAG,EACf,MAAM,EAAE,IAAI,CAAC,gBAAgB,GACrB,CACN,CACL,CACJ,CACG;YAGL,IAAI,CAAC,oBAAoB,IAAI,CAC5B,WAAK,KAAK,EAAC,iCAAiC;gBAC1C,WAAK,KAAK,EAAC,yBAAyB;oBAClC,WAAK,KAAK,EAAC,gCAAgC;wBACzC,yCAAa;wBACb,cAAQ,KAAK,EAAC,6BAA6B,EAAC,OAAO,EAAE,IAAI,CAAC,2BAA2B,aAE5E,CACL;oBACN,WAAK,KAAK,EAAC,8BAA8B;wBACvC,oCACE,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,KAAK,EACf,kBAAkB,EAAE,IAAI,CAAC,sBAAsB,GACjB,CAC5B,CACF,CACF,CACP,CACG,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, State, Element, Event, EventEmitter, Watch } from '@stencil/core';\r\nimport { FileUploadResponse, verifyApiKey, PCM_DOMAIN, Position } from '../../utils/utils';\r\nimport { ConversationStartEventData, InterviewCompleteEventData, StreamCompleteEventData } from '../../components';\r\nimport { ErrorEventBus, ErrorEventDetail } from '../../utils/error-event';\r\nimport { authStore } from '../../../store/auth.store';\r\nimport { configStore } from '../../../store/config.store';\r\nimport { Message } from '../../services/message.service';\r\n\r\n/**\r\n * 千岗千简历\r\n */\r\n\r\n@Component({\r\n tag: 'oem-qgqjl-modal',\r\n styleUrls: ['oem-qgqjl-modal.css', '../../global/global.css', '../../global/host.css'],\r\n shadow: true,\r\n})\r\nexport class OemQgqjlModal {\r\n /**\r\n * 模态框标题\r\n */\r\n @Prop() modalTitle: string = '千岗千简历';\r\n\r\n /**\r\n * SDK鉴权密钥\r\n */\r\n @Prop({ attribute: 'token' }) token!: string;\r\n\r\n /**\r\n * 是否显示聊天模态框\r\n */\r\n @Prop({ mutable: true }) isOpen: boolean = false;\r\n\r\n /**\r\n * 当点击模态框关闭时触发\r\n */\r\n @Event() modalClosed: EventEmitter<void>;\r\n\r\n /**\r\n * 应用图标URL\r\n */\r\n @Prop() icon?: string;\r\n\r\n /**\r\n * 聊天框的页面层级\r\n */\r\n @Prop() zIndex?: number = 1000;\r\n\r\n /**\r\n * 是否展示顶部标题栏\r\n */\r\n @Prop() isShowHeader: boolean = true;\r\n\r\n /**\r\n * 是否展示右上角的关闭按钮\r\n */\r\n @Prop() isNeedClose: boolean = true;\r\n\r\n /**\r\n * 会话ID,传入继续对话,否则创建新会话\r\n */\r\n @Prop({ mutable: true }) conversationId?: string;\r\n\r\n /**\r\n * 默认查询文本\r\n */\r\n @Prop() defaultQuery: string = '请帮我优化简历';\r\n /**\r\n * 获取简历数据事件(用户点击导出简历json数据后触发)\r\n */\r\n @Event() getResumeData: EventEmitter<any>;\r\n /**\r\n * 导出按钮的文本\r\n */\r\n @Prop() exportButtonText: string = '导出简历json数据';\r\n\r\n /**\r\n * 是否以全屏模式打开,移动端建议设置为true\r\n */\r\n @Prop() fullscreen: boolean = false;\r\n\r\n /**\r\n * 自定义输入参数,传入customInputs.job_info时,JD输入区域不可修改<br>\r\n * 传入customInputs.file_url时,简历上传区域不可修改。<br>\r\n */\r\n @Prop() customInputs: Record<string, string> = {};\r\n\r\n /**\r\n * 是否显示工作区历史会话按钮\r\n */\r\n @Prop() showWorkspaceHistory: boolean = false;\r\n\r\n /**\r\n * OEM ID,用于获取职位列表\r\n */\r\n @Prop() oemId?: string;\r\n\r\n /**\r\n * 上传成功事件\r\n */\r\n @Event() uploadSuccess: EventEmitter<FileUploadResponse>;\r\n\r\n /**\r\n * 流式输出完成事件\r\n */\r\n @Event() streamComplete: EventEmitter<StreamCompleteEventData>;\r\n\r\n /**\r\n * 新会话开始的回调,只会在一轮对话开始时触发一次\r\n */\r\n @Event() conversationStart: EventEmitter<ConversationStartEventData>;\r\n\r\n /**\r\n * 当聊天完成时触发\r\n */\r\n @Event() interviewComplete: EventEmitter<InterviewCompleteEventData>;\r\n\r\n /**\r\n * SDK密钥验证失败事件\r\n */\r\n @Event() tokenInvalid: EventEmitter<void>;\r\n\r\n /**\r\n * 错误事件\r\n */\r\n @Event() someErrorEvent: EventEmitter<ErrorEventDetail>;\r\n\r\n /**\r\n * 附件预览模式\r\n * 'drawer': 在右侧抽屉中预览\r\n * 'window': 在新窗口中打开\r\n */\r\n @Prop() filePreviewMode: 'drawer' | 'window' = 'window';\r\n\r\n @State() isUploading: boolean = false;\r\n @State() uploadedFileInfo: FileUploadResponse | null = null;\r\n @State() showChatModal: boolean = false;\r\n @State() showIframe: boolean = false;\r\n\r\n // 使用 @Element 装饰器获取组件的 host 元素\r\n @Element() hostElement: HTMLElement;\r\n\r\n @State() jobDescription: string = '';\r\n @State() isSubmitting: boolean = false;\r\n\r\n // 职位选择器相关状态\r\n @State() showPositionSelector: boolean = false;\r\n\r\n // 内部会话ID状态,用于保存流式输出返回的会话ID\r\n @State() private _internalConversationId?: string;\r\n /**\r\n * iframe DOM 引用\r\n */\r\n private _iframeEl?: HTMLIFrameElement;\r\n\r\n private tokenInvalidListener: () => void;\r\n private removeErrorListener: () => void;\r\n private pcmUploadRef;\r\n\r\n @Watch('token')\r\n handleTokenChange(newToken: string) {\r\n // 当传入的 token 变化时,更新 authStore 中的 token\r\n if (newToken && newToken !== authStore.getToken()) {\r\n authStore.setToken(newToken);\r\n }\r\n }\r\n\r\n @Watch('isOpen')\r\n async handleIsOpenChange(newValue: boolean) {\r\n if (!newValue) {\r\n // 重置状态\r\n this.showChatModal = false;\r\n this.showIframe = false;\r\n this.jobDescription = '';\r\n this._internalConversationId = undefined;\r\n this.uploadedFileInfo = null;\r\n this.isUploading = false;\r\n this.isSubmitting = false;\r\n this.showPositionSelector = false;\r\n } else {\r\n await verifyApiKey(this.token);\r\n\r\n // 如果有会话ID直接显示聊天模态框\r\n if (this.currentConversationId) {\r\n this.showChatModal = true;\r\n this.showIframe = false;\r\n }\r\n }\r\n }\r\n\r\n componentWillLoad() {\r\n // 将 zIndex 存入配置缓存\r\n if (this.zIndex) {\r\n configStore.setItem('modal-zIndex', this.zIndex);\r\n }\r\n\r\n // 初始化时设置 token,但不验证(验证在 @Watch('isOpen') 中处理)\r\n if (this.token) {\r\n authStore.setToken(this.token);\r\n }\r\n\r\n // 添加全局token无效事件监听器\r\n this.tokenInvalidListener = () => {\r\n this.tokenInvalid.emit();\r\n };\r\n // 添加全局错误监听\r\n this.removeErrorListener = ErrorEventBus.addErrorListener(errorDetail => {\r\n this.someErrorEvent.emit(errorDetail);\r\n });\r\n document.addEventListener('pcm-token-invalid', this.tokenInvalidListener);\r\n }\r\n\r\n /**\r\n * 获取当前应该使用的会话ID\r\n * 优先使用外部传入的conversationId,否则使用内部保存的_internalConversationId\r\n */\r\n private get currentConversationId(): string | undefined {\r\n return this.conversationId || this._internalConversationId;\r\n }\r\n\r\n /**\r\n * 处理流式响应完成事件\r\n */\r\n private handleStreamComplete = (event: CustomEvent<StreamCompleteEventData>) => {\r\n // 保存会话ID到内部状态,用于后续的iframe URL\r\n this._internalConversationId = event.detail.conversation_id;\r\n };\r\n\r\n componentDidLoad() {\r\n // 监听来自 iframe 的消息\r\n window.addEventListener('message', this.handleIframeMessage);\r\n }\r\n\r\n disconnectedCallback() {\r\n // 组件销毁时移除事件监听器\r\n document.removeEventListener('pcm-token-invalid', this.tokenInvalidListener);\r\n // 移除错误监听器\r\n if (this.removeErrorListener) {\r\n this.removeErrorListener();\r\n }\r\n window.removeEventListener('message', this.handleIframeMessage);\r\n }\r\n\r\n private handleClose = () => {\r\n this.modalClosed.emit();\r\n };\r\n\r\n\r\n // 生成简历\r\n private closeResumeChat = () => {\r\n this.showIframe = true;\r\n this.showChatModal = false;\r\n };\r\n /**\r\n * 处理 iframe 加载完成(不再直接发送 token)\r\n * 由 iframe 主动 postMessage { type: 'iframeReady' } 通知父页面后再发送 token\r\n */\r\n private handleIframeLoad = () => {\r\n console.log(this._iframeEl, 'this._iframeEl');\r\n // 不再直接发送 token,等待 iframeReady 消息\r\n };\r\n /**\r\n * 处理来自 iframe 的消息\r\n * 支持 iframe 调用父组件方法,也支持握手机制\r\n */\r\n private handleIframeMessage = (event: MessageEvent) => {\r\n // 允许本地和线上环境\r\n const allowedOrigins = ['http://localhost:3000', PCM_DOMAIN];\r\n if (!allowedOrigins.includes(event.origin)) return;\r\n const { type, value } = event.data || {};\r\n if (type === 'callParentMethod') {\r\n this.exampleMethodFromIframe(value);\r\n }\r\n // 关键:收到 iframeReady 后再发送 token\r\n if (type === 'iframeReady' && this._iframeEl?.contentWindow) {\r\n // 动态获取 targetOrigin,兼容本地和线上\r\n const targetOrigin = new URL(this._iframeEl.src).origin;\r\n // 1. 先发送 parentReady,带上父页面的 origin\r\n this._iframeEl.contentWindow.postMessage({ type: 'parentReady', origin: window.location.origin }, targetOrigin);\r\n // 2. 再发送 token\r\n this._iframeEl.contentWindow.postMessage({ type: 'setToken', token: this.token }, targetOrigin);\r\n console.log(this.exportButtonText, 'this.exportButtonText');\r\n this._iframeEl.contentWindow.postMessage(\r\n {\r\n type: 'buttonConfig',\r\n config: {\r\n hideExportButton: true,\r\n exportButtonText: this.exportButtonText,\r\n },\r\n },\r\n targetOrigin,\r\n );\r\n console.log('父组件已发送 token 给 iframe,targetOrigin:', targetOrigin);\r\n }\r\n };\r\n\r\n /**\r\n * 导出简历数据\r\n * @param value 简历数据是字符串形式\r\n */\r\n public exampleMethodFromIframe(value: string) {\r\n this.getResumeData.emit(JSON.parse(value));\r\n }\r\n\r\n\r\n\r\n private handleJobDescriptionChange = (event: Event) => {\r\n const textarea = event.target as HTMLTextAreaElement;\r\n this.jobDescription = textarea.value;\r\n };\r\n\r\n private handleOpenPositionSelector = () => {\r\n if (!this.oemId) {\r\n Message.info('未配置OEM ID,无法选择职位');\r\n return;\r\n }\r\n this.showPositionSelector = true;\r\n };\r\n\r\n private handleClosePositionSelector = () => {\r\n this.showPositionSelector = false;\r\n };\r\n\r\n private handlePositionSelected = (event: CustomEvent<Position & { formatted_text?: string }>) => {\r\n const position = event.detail;\r\n // 直接使用职位选择器组件提供的格式化文本\r\n this.jobDescription = position.formatted_text || '';\r\n this.showPositionSelector = false;\r\n Message.success('职位信息已填充');\r\n };\r\n\r\n private handleStartInterview = async () => {\r\n // 既没有预设 file_url,也没有上传文件,则提示\r\n if (!this.customInputs?.file_url && !this.uploadedFileInfo) {\r\n Message.info('请上传简历');\r\n return;\r\n }\r\n\r\n // 如果没有预设的job_info,则需要检查用户输入\r\n // if (!this.customInputs?.job_info && !this.jobDescription.trim()) {\r\n // Message.info('请输入职位描述');\r\n // return;\r\n // }\r\n\r\n // 判断文件是否正在上传\r\n if (await this.pcmUploadRef?.getIsUploading?.()) {\r\n Message.info('文件上传中,请稍后');\r\n return;\r\n }\r\n\r\n this.isSubmitting = true;\r\n this.showChatModal = true;\r\n this.isSubmitting = false;\r\n };\r\n\r\n render() {\r\n if (!this.isOpen) return null;\r\n\r\n const modalStyle = {\r\n zIndex: String(this.zIndex),\r\n };\r\n\r\n const containerClass = {\r\n 'modal-container': true,\r\n 'fullscreen': this.fullscreen,\r\n 'pc-layout': !this.showIframe,\r\n };\r\n\r\n const overlayClass = {\r\n 'modal-overlay': true,\r\n 'fullscreen-overlay': this.fullscreen,\r\n };\r\n\r\n // 显示加载状态\r\n const isLoading = this.currentConversationId && !this.showChatModal;\r\n\r\n // 判断是否禁用JD输入区域(有预设job_info时禁用)\r\n const disableJdInput = Boolean(this.customInputs && this.customInputs.job_info);\r\n\r\n // 判断是否禁用简历上传区域(有预设file_url时禁用)\r\n const disableResumeUpload = Boolean(this.customInputs && this.customInputs.file_url);\r\n\r\n return (\r\n <div class={overlayClass} style={modalStyle}>\r\n <div class={containerClass}>\r\n {this.isShowHeader && (\r\n <div class=\"modal-header\">\r\n <div class=\"header-left\">\r\n {this.icon && <img src={this.icon} class=\"header-icon\" alt=\"应用图标\" />}\r\n <div>{this.modalTitle}</div>\r\n </div>\r\n {this.isNeedClose && (\r\n <button class=\"close-button\" onClick={this.handleClose}>\r\n <span>×</span>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n\r\n {/* 输入界面 - 仅在不显示聊天模态框且没有会话ID时显示 */}\r\n {!this.showChatModal && !this.currentConversationId && (\r\n <div class=\"input-container\">\r\n {/* JD输入区域 */}\r\n <div class=\"jd-input-section\">\r\n <div class=\"label-with-button\">\r\n <label htmlFor=\"job-description\">请输入职位描述 (JD)</label>\r\n {!disableJdInput && (\r\n <div class=\"button-group\">\r\n {this.oemId && (\r\n <button\r\n class=\"position-selector-button\"\r\n onClick={this.handleOpenPositionSelector}\r\n type=\"button\"\r\n >\r\n 选择职位\r\n </button>\r\n )}\r\n <pcm-mobile-input-btn\r\n name=\"职位描述\"\r\n onOk={(e) => {\r\n this.jobDescription = e.detail;\r\n }}\r\n />\r\n </div>\r\n )}\r\n </div>\r\n <textarea\r\n id=\"job-description\"\r\n class=\"job-description-textarea\"\r\n placeholder=\"请输入职位描述,包括职责、要求等信息...\"\r\n rows={6}\r\n value={this.customInputs?.job_info || this.jobDescription}\r\n onInput={this.handleJobDescriptionChange}\r\n disabled={disableJdInput}\r\n ></textarea>\r\n </div>\r\n\r\n {/* 简历上传区域 */}\r\n <div class=\"resume-upload-section\">\r\n <label>上传简历</label>\r\n <pcm-upload\r\n ref={el => this.pcmUploadRef = el}\r\n maxFileSize={15 * 1024 * 1024}\r\n multiple={false}\r\n mobileUploadAble={true}\r\n acceptFileSuffixList={['.txt', '.md', '.pdf', '.docx', '.doc']}\r\n uploadParams={{\r\n tags: ['resume'],\r\n }}\r\n defaultFileList={this.customInputs?.file_url ? [{\r\n cos_key: this.customInputs.file_url,\r\n file_name: this.customInputs?.file_name || '预设简历',\r\n file_size: 0,\r\n ext: '',\r\n }] : undefined}\r\n disabled={disableResumeUpload}\r\n onUploadChange={(e) => {\r\n const result: FileUploadResponse[] = e.detail ?? [];\r\n this.uploadedFileInfo = result[0];\r\n this.uploadSuccess.emit(this.uploadedFileInfo);\r\n }}\r\n />\r\n </div>\r\n\r\n <button\r\n class=\"submit-button\"\r\n disabled={(!disableResumeUpload && !this.uploadedFileInfo) || this.isUploading || this.isSubmitting}\r\n onClick={this.handleStartInterview}\r\n >\r\n {this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'}\r\n </button>\r\n\r\n <div class=\"ai-disclaimer\">\r\n <p>所有内容均由AI生成仅供参考</p>\r\n <p class=\"beian-info\">\r\n <span>中央网信办生成式人工智能服务备案号</span>:\r\n <a href=\"https://www.pincaimao.com\" target=\"_blank\" rel=\"noopener noreferrer\">\r\n Hunan-PinCaiMao-202412310003\r\n </a>\r\n </p>\r\n </div>\r\n </div>\r\n )}\r\n\r\n {/* 加载状态 - 在有会话ID但聊天模态框尚未显示时展示 */}\r\n {isLoading && !this.showIframe && (\r\n <div class=\"loading-container\">\r\n <div class=\"loading-spinner\"></div>\r\n <p class=\"loading-text\">正在加载对话...</p>\r\n </div>\r\n )}\r\n\r\n {/* 聊天界面 - 在显示聊天模态框时显示 */}\r\n {this.showChatModal && (\r\n <div>\r\n <pcm-app-chat-modal\r\n isOpen={true}\r\n modalTitle={this.modalTitle}\r\n icon={this.icon}\r\n isShowHeader={this.isShowHeader}\r\n isNeedClose={this.isNeedClose}\r\n fullscreen={this.fullscreen}\r\n showWorkspaceHistory={this.showWorkspaceHistory}\r\n botId=\"45444431062634496\"\r\n conversationId={this.currentConversationId}\r\n defaultQuery={this.defaultQuery}\r\n filePreviewMode={this.filePreviewMode}\r\n closeResume={this.closeResumeChat}\r\n customInputs={{\r\n ...this.customInputs,\r\n file_url: this.customInputs?.file_url || this.uploadedFileInfo?.cos_key,\r\n file_name: this.customInputs?.file_name || this.uploadedFileInfo?.file_name,\r\n job_info: this.customInputs?.job_info || this.jobDescription,\r\n }}\r\n interviewMode=\"text\"\r\n onStreamComplete={this.handleStreamComplete}\r\n ></pcm-app-chat-modal>\r\n </div>\r\n )}\r\n {this.showIframe && (\r\n <>\r\n {/*\r\n 1. 不再通过 URL 传递 token,避免泄露。\r\n 2. 通过 ref 获取 iframe 元素,onLoad 时 postMessage 发送 token。\r\n */}\r\n <div class=\"iframe-container\">\r\n <iframe\r\n ref={el => (this._iframeEl = el as HTMLIFrameElement)}\r\n src={`${PCM_DOMAIN}/myresume?conversation_id=${this.currentConversationId}&isSdk=true`}\r\n // src={`http://localhost:3000/myresume?conversation_id=${this.currentConversationId}&isSdk=true`}\r\n frameborder=\"0\"\r\n onLoad={this.handleIframeLoad}\r\n ></iframe>\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n\r\n {/* 职位选择器弹窗 */}\r\n {this.showPositionSelector && (\r\n <div class=\"position-selector-modal-overlay\">\r\n <div class=\"position-selector-modal\">\r\n <div class=\"position-selector-modal-header\">\r\n <h3>选择职位</h3>\r\n <button class=\"position-selector-close-btn\" onClick={this.handleClosePositionSelector}>\r\n ×\r\n </button>\r\n </div>\r\n <div class=\"position-selector-modal-body\">\r\n <components-position-selector\r\n oemId={this.oemId}\r\n multiple={false}\r\n onPositionSelected={this.handlePositionSelected}\r\n ></components-position-selector>\r\n </div>\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ComponentsPositionSelector$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { C as ComponentsPositionSelector$1, d as defineCustomElement$1 } from './p-CCyryIL3.js';
|
|
2
2
|
|
|
3
3
|
const ComponentsPositionSelector = ComponentsPositionSelector$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|