ysyt-react-agent-lib 1.0.30 → 1.0.31

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.
@@ -1,6 +1,6 @@
1
- import { j as e, M as c, E as r, S as i, Y as d } from "./index-D19genfI.mjs";
1
+ import { j as e, M as c, E as r, S as i, Y as d } from "./index-BOFPSLQq.mjs";
2
2
  import { memo as m, useState as g, useEffect as x } from "react";
3
- import { M as j, T as p } from "./index-JSmbJErR.mjs";
3
+ import { M as j, T as p } from "./index-hd2L3O0_.mjs";
4
4
  const E = m(({ open: a, onCallBack: t, queryFetch: o }) => {
5
5
  const [n, l] = g([]);
6
6
  return x(() => {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DSub25BD.js"),s=require("react"),i=require("./index-Bx5QZNxJ.js"),c=s.memo(({open:n,onCallBack:r,queryFetch:x})=>{const[o,a]=s.useState([]);return s.useEffect(()=>{(async()=>{try{await x({success:t=>{a(t.data||[])}})}catch(t){console.log(t)}})()},[n]),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx(i.Modal,{open:n,title:"咨询",footer:!1,onCancel:()=>r(),children:e.jsxRuntimeExports.jsx(e.ModelBody,{children:o.length===0?e.jsxRuntimeExports.jsx(e.Empty,{image:e.Empty.PRESENTED_IMAGE_SIMPLE}):e.jsxRuntimeExports.jsx(e.Space,{wrap:!0,children:o.map(t=>e.jsxRuntimeExports.jsx(i.Tag,{color:"processing",onClick:()=>r(t.agent_no),children:e.jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[e.jsxRuntimeExports.jsx(e.YsytIconSvg,{name:"zixun"}),e.jsxRuntimeExports.jsxs("span",{style:{marginLeft:10},children:["咨询坐席: ",t.agent_name]})]})},t.agent_no))})})})})});exports.default=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BqD_BfDO.js"),s=require("react"),i=require("./index-D6wE12S5.js"),c=s.memo(({open:n,onCallBack:r,queryFetch:x})=>{const[o,a]=s.useState([]);return s.useEffect(()=>{(async()=>{try{await x({success:t=>{a(t.data||[])}})}catch(t){console.log(t)}})()},[n]),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx(i.Modal,{open:n,title:"咨询",footer:!1,onCancel:()=>r(),children:e.jsxRuntimeExports.jsx(e.ModelBody,{children:o.length===0?e.jsxRuntimeExports.jsx(e.Empty,{image:e.Empty.PRESENTED_IMAGE_SIMPLE}):e.jsxRuntimeExports.jsx(e.Space,{wrap:!0,children:o.map(t=>e.jsxRuntimeExports.jsx(i.Tag,{color:"processing",onClick:()=>r(t.agent_no),children:e.jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[e.jsxRuntimeExports.jsx(e.YsytIconSvg,{name:"zixun"}),e.jsxRuntimeExports.jsxs("span",{style:{marginLeft:10},children:["咨询坐席: ",t.agent_name]})]})},t.agent_no))})})})})});exports.default=c;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DSub25BD.js"),s=require("react"),l=require("./index-Bx5QZNxJ.js"),m=s.memo(({open:o,onCallBack:n,queryFetch:u})=>{const[a,p]=s.useState([]),[r,c]=s.useState(0),[i,d]=s.useState(""),[j,x]=s.useState(!1);return s.useEffect(()=>{(async()=>{x(!0);try{await u({success:t=>{p(t.data||[])}})}catch(t){console.log(t)}x(!1)})()},[o]),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx(l.Modal,{open:o,title:"转接",footer:!1,onCancel:()=>n(),children:e.jsxRuntimeExports.jsxs(e.ModelBody,{children:[e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx(e.Radio.Group,{options:[{label:"转接坐席",value:0},{label:"转接外线",value:1}],value:r,onChange:t=>c(t.target.value)})}),e.jsxRuntimeExports.jsx(e.Spin,{spinning:j,children:e.jsxRuntimeExports.jsxs("div",{style:{borderTop:"1px solid #eee",marginTop:10,paddingTop:10},children:[r===0&&e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:a.length===0?e.jsxRuntimeExports.jsx(e.Empty,{image:e.Empty.PRESENTED_IMAGE_SIMPLE}):e.jsxRuntimeExports.jsx(e.Space,{wrap:!0,children:a.map(t=>e.jsxRuntimeExports.jsx(l.Tag,{color:"processing",onClick:()=>n(t.agent_no,0),children:e.jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[e.jsxRuntimeExports.jsx(e.YsytIconSvg,{name:"zixun"}),e.jsxRuntimeExports.jsxs("span",{style:{marginRight:10},children:["转接坐席: ",t.agent_name]})]})},t.agent_no))})}),r===1&&e.jsxRuntimeExports.jsx(e.Input,{value:i,onChange:t=>d(t.target.value),placeholder:"请输入外线号码, 回车转接",onPressEnter:()=>{n(i,1)}})]})})]})})})});exports.default=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BqD_BfDO.js"),s=require("react"),l=require("./index-D6wE12S5.js"),m=s.memo(({open:o,onCallBack:n,queryFetch:u})=>{const[a,p]=s.useState([]),[r,c]=s.useState(0),[i,d]=s.useState(""),[j,x]=s.useState(!1);return s.useEffect(()=>{(async()=>{x(!0);try{await u({success:t=>{p(t.data||[])}})}catch(t){console.log(t)}x(!1)})()},[o]),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx(l.Modal,{open:o,title:"转接",footer:!1,onCancel:()=>n(),children:e.jsxRuntimeExports.jsxs(e.ModelBody,{children:[e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx(e.Radio.Group,{options:[{label:"转接坐席",value:0},{label:"转接外线",value:1}],value:r,onChange:t=>c(t.target.value)})}),e.jsxRuntimeExports.jsx(e.Spin,{spinning:j,children:e.jsxRuntimeExports.jsxs("div",{style:{borderTop:"1px solid #eee",marginTop:10,paddingTop:10},children:[r===0&&e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:a.length===0?e.jsxRuntimeExports.jsx(e.Empty,{image:e.Empty.PRESENTED_IMAGE_SIMPLE}):e.jsxRuntimeExports.jsx(e.Space,{wrap:!0,children:a.map(t=>e.jsxRuntimeExports.jsx(l.Tag,{color:"processing",onClick:()=>n(t.agent_no,0),children:e.jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[e.jsxRuntimeExports.jsx(e.YsytIconSvg,{name:"zixun"}),e.jsxRuntimeExports.jsxs("span",{style:{marginRight:10},children:["转接坐席: ",t.agent_name]})]})},t.agent_no))})}),r===1&&e.jsxRuntimeExports.jsx(e.Input,{value:i,onChange:t=>d(t.target.value),placeholder:"请输入外线号码, 回车转接",onPressEnter:()=>{n(i,1)}})]})})]})})})});exports.default=m;
@@ -1,6 +1,6 @@
1
- import { j as e, M as m, R as h, a as j, E as c, S as f, Y as y, I as v } from "./index-D19genfI.mjs";
1
+ import { j as e, M as m, R as h, a as j, E as c, S as f, Y as y, I as v } from "./index-BOFPSLQq.mjs";
2
2
  import { memo as E, useState as a, useEffect as T } from "react";
3
- import { M, T as S } from "./index-JSmbJErR.mjs";
3
+ import { M, T as S } from "./index-hd2L3O0_.mjs";
4
4
  const _ = E(({ open: r, onCallBack: n, queryFetch: d }) => {
5
5
  const [l, g] = a([]), [t, p] = a(0), [o, u] = a(""), [x, i] = a(!1);
6
6
  return T(() => {
@@ -4317,7 +4317,7 @@ const QM = (e) => {
4317
4317
  floatButtonGroup: aA,
4318
4318
  variant: mA,
4319
4319
  inputNumber: IA,
4320
- treeSelect: Ce
4320
+ treeSelect: ve
4321
4321
  } = e, Le = c.useCallback((ZA, D) => {
4322
4322
  const {
4323
4323
  prefixCls: sA
@@ -4405,7 +4405,7 @@ const QM = (e) => {
4405
4405
  floatButtonGroup: aA,
4406
4406
  variant: mA,
4407
4407
  inputNumber: IA,
4408
- treeSelect: Ce
4408
+ treeSelect: ve
4409
4409
  };
4410
4410
  process.env.NODE_ENV !== "production" && gt("ConfigProvider")(!("autoInsertSpaceInButton" in e), "deprecated", "`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.");
4411
4411
  const BA = Object.assign({}, q);
@@ -4963,7 +4963,7 @@ function xM() {
4963
4963
  function IA(D) {
4964
4964
  return typeof D == "object" && D !== null && D.$$typeof === A;
4965
4965
  }
4966
- function Ce() {
4966
+ function ve() {
4967
4967
  {
4968
4968
  if (me.current) {
4969
4969
  var D = S(me.current.type);
@@ -4981,7 +4981,7 @@ Check the render method of \`` + D + "`.";
4981
4981
  var Qe = {};
4982
4982
  function qe(D) {
4983
4983
  {
4984
- var sA = Ce();
4984
+ var sA = ve();
4985
4985
  if (!sA) {
4986
4986
  var dA = typeof D == "string" ? D : D.displayName || D.name;
4987
4987
  dA && (sA = `
@@ -5068,7 +5068,7 @@ Check the top-level render call using <` + dA + ">.");
5068
5068
  var ie = "";
5069
5069
  (D === void 0 || typeof D == "object" && D !== null && Object.keys(D).length === 0) && (ie += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
5070
5070
  var Ne = Le();
5071
- Ne ? ie += Ne : ie += Ce();
5071
+ Ne ? ie += Ne : ie += ve();
5072
5072
  var he;
5073
5073
  D === null ? he = "null" : kA(D) ? he = "array" : D !== void 0 && D.$$typeof === A ? (he = "<" + (S(D.type) || "Unknown") + " />", ie = " Did you accidentally export a JSX literal instead of a component?") : he = typeof D, I("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", he, ie);
5074
5074
  }
@@ -10021,14 +10021,14 @@ class aC {
10021
10021
  n && n.forEach((r) => r(t));
10022
10022
  }
10023
10023
  }
10024
- var at, En, ve, mn, gA, ke, it;
10024
+ var at, En, Ce, mn, gA, ke, it;
10025
10025
  (function(e) {
10026
10026
  e[e.IDLE = 1] = "IDLE", e[e.BUSY = 2] = "BUSY", e[e.RINGING = 3] = "RINGING", e[e.OFFLINE = 0] = "OFFLINE";
10027
10027
  })(at || (at = {})), function(e) {
10028
10028
  e.OUTGOING = "outgoing", e.INCOMING = "incoming", e.CONSULT = "consult", e.MEETING = "meeting", e.TRANSFER = "transfer";
10029
10029
  }(En || (En = {})), function(e) {
10030
10030
  e[e.OUT_CALL = 100] = "OUT_CALL", e[e.AGENT_STATE = 101] = "AGENT_STATE", e[e.OUT_CALL_INCOMING_CALL = 102] = "OUT_CALL_INCOMING_CALL", e[e.OUT_CALL_RINGING = 103] = "OUT_CALL_RINGING", e[e.OUT_CALL_ANSWER = 104] = "OUT_CALL_ANSWER", e[e.CALL_HOLD = 105] = "CALL_HOLD", e[e.CALL_UNHOLD = 106] = "CALL_UNHOLD", e[e.OUT_CALL_END = 107] = "OUT_CALL_END", e[e.CONSULT_REQUEST = 108] = "CONSULT_REQUEST", e[e.CONSULT_RINGING = 109] = "CONSULT_RINGING", e[e.CONSULT_ANSWER = 110] = "CONSULT_ANSWER", e[e.CONSULT_FAIL = 111] = "CONSULT_FAIL", e[e.MUTE = 112] = "MUTE", e[e.UNMUTE = 113] = "UNMUTE", e[e.CONSULT_CALL_IN = 114] = "CONSULT_CALL_IN", e[e.CONSULT_CALL_IN_SUCCESS = 115] = "CONSULT_CALL_IN_SUCCESS", e[e.CONSULT_RETURN_CALL = 125] = "CONSULT_RETURN_CALL", e[e.CONSULT_RETURN_CALL_SUCCESS = 126] = "CONSULT_RETURN_CALL_SUCCESS", e[e.CONSULT_TRANSFER = 116] = "CONSULT_TRANSFER", e[e.CONSULT_TRANSFER_FAILED = 118] = "CONSULT_TRANSFER_FAILED", e[e.CONSULT_TRANSFER_OFF_HOOK = 117] = "CONSULT_TRANSFER_OFF_HOOK", e[e.INCOMING_CALL = 119] = "INCOMING_CALL", e[e.INCOMING_CALL_OFF_HOOK = 120] = "INCOMING_CALL_OFF_HOOK", e[e.INCOMING_CALL_END = 121] = "INCOMING_CALL_END", e[e.SATISFACTION_EVALUATION = 122] = "SATISFACTION_EVALUATION", e[e.CONSULT_THREE_WAY = 123] = "CONSULT_THREE_WAY", e[e.CONSULT_THREE_WAY_RESULT = 124] = "CONSULT_THREE_WAY_RESULT", e[e.TRANSFER = 127] = "TRANSFER", e[e.TRANSFER_FAILED = 128] = "TRANSFER_FAILED", e[e.TRANSFER_INCOMING_CALL = 129] = "TRANSFER_INCOMING_CALL", e[e.TRANSFER_OFF_HOOK = 130] = "TRANSFER_OFF_HOOK", e[e.AGENT_HANGUP = 131] = "AGENT_HANGUP", e[e.KICK_OFFLINE = 132] = "KICK_OFFLINE";
10031
- }(ve || (ve = {})), function(e) {
10031
+ }(Ce || (Ce = {})), function(e) {
10032
10032
  e.WEB_RTC_CONNECTING = "connecting", e.WEB_RTC_CONNECTED = "connected", e.WEB_RTC_DISCONNECTING = "disconnecting", e.WEB_RTC_DISCONNECTED = "disconnected", e.WEB_RTC_REGISTERED = "registered", e.WEB_RTC_UNREGISTERED = "unregistered", e.WEB_RTC_TERMINATED = "terminated", e.WEB_RTC_REGISTER_FAILED = "register_failed", e.WEB_RTC_ANSWER_FAILED = "answer_failed", e.WEB_RTC_SEND_DTMF = "send_dtmf";
10033
10033
  }(mn || (mn = {})), function(e) {
10034
10034
  e.CUSTOMER_INFO = "customer_info", e.CALL_PROGRESS = "call_progress", e.OUT_INCOMING_CALL = "out_call_incoming_call", e.OUT_SUCCESS = "out_call_success", e.OUT_FAILED = "out_call_failed", e.OUT_RINGING = "out_call_ringing", e.OUT_OFF_ANSWER = "out_call_answer", e.HOLD_SUCCESS = "hold_success", e.HOLD_FAILED = "hold_failed", e.UNHOLD_SUCCESS = "unhold_success", e.UNHOLD_FAILED = "unhold_failed", e.OUT_HANGUP = "out_call_hangup", e.CONSULT_RINGING = "consult_ringing", e.CONSULT_OFF_HOOK = "consult_off_hook", e.CONSULT_FAILED = "consult_failed", e.CONSULT_INCOMING = "consult_incoming", e.CONSULT_CALL_IN_SUCCESS = "consult_call_in_success", e.CONSULT_RETURN_CALL_SUCCESS = "consult_return_call_success", e.OTHER_SIDE_CONSULT_HANGUP = "other_side_consult_hangup", e.OUR_SIDE_CONSULT_HANGUP = "our_side_consult_hangup", e.AGENT_STATE = "agent_state", e.MUTE_SUCCESS = "mute_success", e.MUTE_FAILED = "mute_failed", e.UNMUTE_SUCCESS = "unmute_success", e.UNMUTE_FAILED = "unmute_failed", e.CONSULT_TRANSFER_SUCCESS = "consult_transfer_success", e.CONSULT_TRANSFER_FAILED = "consult_transfer_failed", e.CONSULT_TRANSFER_OFF_HOOK = "consult_transfer_off_hook", e.INCOMING_CALL = "incoming_call", e.INCOMING_CALL_OFF_HOOK = "incoming_call_off_hook", e.INCOMING_CALL_END = "incoming_call_end", e.SATISFACTION_EVALUATION_SUCCESS = "satisfaction_evaluation_success", e.SATISFACTION_EVALUATION_FAILED = "satisfaction_evaluation_failed", e.CONSULT_THREE_WAY_SUCCESS = "consult_three_way_success", e.CONSULT_THREE_WAY_FAILED = "consult_three_way_failed", e.THREE_WAY_OUR_SIDE_HANGUP = "three_way_our_side_hangup", e.TRANSFER_FAILED = "transfer_failed", e.TRANSFER_PROGRESS = "transfer_progress", e.TRANSFER_INCOMING_CALL = "transfer_incoming_call", e.TRANSFER_OFF_HOOK = "transfer_off_hook", e.TRANSFER_END = "transfer_end";
@@ -12862,25 +12862,25 @@ class Qt {
12862
12862
  this.sendMessage({ type: 0 }), this.startHeartbeat();
12863
12863
  }, this.ws.onmessage = (t) => {
12864
12864
  const n = JSON.parse(t.data), { type: r, data: i, code: o, msg: a } = n;
12865
- if (r !== 0 && Nh("%cWebSocket 收到消息:", "color: blue; font-weight: bold;", n), r === ve.OUT_CALL && (o !== 0 ? (AA.reset(), bA.emit(gA.OUT_FAILED, a), bA.emit(ke.FAIL_NOTIFICATION, a), setTimeout(() => {
12865
+ if (r !== 0 && Nh("%cWebSocket 收到消息:", "color: blue; font-weight: bold;", n), r === Ce.OUT_CALL && (o !== 0 ? (AA.reset(), bA.emit(gA.OUT_FAILED, a), bA.emit(ke.FAIL_NOTIFICATION, a), setTimeout(() => {
12866
12866
  bA.emit(gA.CUSTOMER_INFO, void 0);
12867
- }, 500), this.stateIdleChange()) : o === 0 && bA.emit(gA.OUT_SUCCESS, { customer_phone: this.outNumber })), r === ve.AGENT_STATE) {
12867
+ }, 500), this.stateIdleChange()) : o === 0 && bA.emit(gA.OUT_SUCCESS, { customer_phone: this.outNumber })), r === Ce.AGENT_STATE) {
12868
12868
  vA.stateObject.state !== at.IDLE && vA.stateObject.state !== at.BUSY || (vA.stateBeforeChange = vA.stateObject);
12869
12869
  const { state: s, state_name: l } = i;
12870
12870
  vA.stateObject = { state: s, state_name: l }, l === "振铃中" && AA.updateDisplayText(it.AGENT_RINGING), bA.emit(gA.AGENT_STATE, { state: s, state_name: l });
12871
12871
  }
12872
- if (r === ve.OUT_CALL_INCOMING_CALL && (bA.emit(gA.OUT_INCOMING_CALL), vA.sessionId = i.session_id, AA.updateActionConfigs(Nw)), r === ve.OUT_CALL_END && (AA.updateDisplayText(""), i.device_type === 1 && i.agent_no === vA.agentInfo.agent_no ? (this.putAgentState(), AA.reset(), bA.emit(gA.OUT_HANGUP, i), AA.updateActionConfigs(Tn)) : i.device_type === 2 && i.agent_no === vA.agentInfo.agent_no ? (AA.reset(), bA.emit(gA.OUR_SIDE_CONSULT_HANGUP, i), this.putAgentState(), AA.updateActionConfigs(Tn)) : i.device_type === 2 && i.agent_no !== vA.agentInfo.agent_no ? (AA.updateDisplayText(it.CALLING), bA.emit(gA.OTHER_SIDE_CONSULT_HANGUP, i), AA.updateActionConfigs(Mi)) : i.device_type === 3 && i.agent_no === vA.agentInfo.agent_no ? (this.putAgentState(), AA.reset(), bA.emit(gA.THREE_WAY_OUR_SIDE_HANGUP, i), AA.updateActionConfigs(Tn)) : i.device_type === 4 && i.agent_no === vA.agentInfo.agent_no && (this.putAgentState(), AA.reset(), bA.emit(gA.TRANSFER_END, i), AA.updateActionConfigs(Tn))), r === ve.OUT_CALL_RINGING && i.type === 1 && (bA.emit(gA.OUT_RINGING, i), AA.updateDisplayText(it.RINGING)), r === ve.OUT_CALL_ANSWER && (bA.emit(gA.OUT_OFF_ANSWER), AA.updateOutCallIsAnswer(!0), AA.updateDisplayText(it.CALLING), AA.updateActionConfigs(Mi)), r === ve.CONSULT_RINGING && (bA.emit(gA.CONSULT_RINGING), AA.updateDisplayText(it.AGENT_RINGING), AA.updateActionConfigs([])), r === ve.CONSULT_ANSWER && (bA.emit(gA.CONSULT_OFF_HOOK, i), AA.updateConsultIsAnswer(!0), AA.updateDisplayText(it.CONSULTING), AA.updateActionConfigs(Zw)), r === ve.CONSULT_FAIL && (bA.emit(gA.CONSULT_FAILED, { custom_reason: i.custom_reason }), AA.updateDisplayText(it.CALLING), AA.updateActionConfigs(Mi)), r === ve.CONSULT_CALL_IN && (bA.emit(gA.CONSULT_INCOMING, i), AA.updateIsCalling(!0), AA.updateDirection(En.CONSULT), AA.updateDisplayText(it.CONSULT_CALL_IN), AA.updateActionConfigs(Qc), vA.enableBrowserAlert && ea.show("📞 咨询来电", `坐席 [${i.agent_name}] 正在咨询...`, () => {
12872
+ if (r === Ce.OUT_CALL_INCOMING_CALL && (bA.emit(gA.OUT_INCOMING_CALL), vA.sessionId = i.session_id, AA.updateActionConfigs(Nw)), r === Ce.OUT_CALL_END && (AA.updateDisplayText(""), i.device_type === 1 && i.agent_no === vA.agentInfo.agent_no ? (this.putAgentState(), AA.reset(), bA.emit(gA.OUT_HANGUP, i), AA.updateActionConfigs(Tn)) : i.device_type === 2 && i.agent_no === vA.agentInfo.agent_no ? (AA.reset(), bA.emit(gA.OUR_SIDE_CONSULT_HANGUP, i), this.putAgentState(), AA.updateActionConfigs(Tn)) : i.device_type === 2 && i.agent_no !== vA.agentInfo.agent_no ? (AA.updateDisplayText(it.CALLING), bA.emit(gA.OTHER_SIDE_CONSULT_HANGUP, i), AA.updateActionConfigs(Mi)) : i.device_type === 3 && i.agent_no === vA.agentInfo.agent_no ? (this.putAgentState(), AA.reset(), bA.emit(gA.THREE_WAY_OUR_SIDE_HANGUP, i), AA.updateActionConfigs(Tn)) : i.device_type === 4 && i.agent_no === vA.agentInfo.agent_no && (this.putAgentState(), AA.reset(), bA.emit(gA.TRANSFER_END, i), AA.updateActionConfigs(Tn))), r === Ce.OUT_CALL_RINGING && i.type === 1 && (bA.emit(gA.OUT_RINGING, i), AA.updateDisplayText(it.RINGING)), r === Ce.OUT_CALL_ANSWER && (bA.emit(gA.OUT_OFF_ANSWER), AA.updateOutCallIsAnswer(!0), AA.updateDisplayText(it.CALLING), AA.updateActionConfigs(Mi)), r === Ce.CONSULT_RINGING && (bA.emit(gA.CONSULT_RINGING), AA.updateDisplayText(it.AGENT_RINGING), AA.updateActionConfigs([])), r === Ce.CONSULT_ANSWER && (bA.emit(gA.CONSULT_OFF_HOOK, i), AA.updateConsultIsAnswer(!0), AA.updateDisplayText(it.CONSULTING), AA.updateActionConfigs(Zw)), r === Ce.CONSULT_FAIL && (bA.emit(gA.CONSULT_FAILED, { custom_reason: i.custom_reason }), AA.updateDisplayText(it.CALLING), AA.updateActionConfigs(Mi)), r === Ce.CONSULT_CALL_IN && (bA.emit(gA.CONSULT_INCOMING, i), AA.updateIsCalling(!0), AA.updateDirection(En.CONSULT), AA.updateDisplayText(it.CONSULT_CALL_IN), AA.updateActionConfigs(Qc), vA.enableBrowserAlert && ea.show("📞 咨询来电", `坐席 [${i.agent_name}] 正在咨询...`, () => {
12873
12873
  bA.emit(ke.NOTIFICATION_CLICK, { agent_mane: i.agent_name, agent_no: i.agent_no });
12874
- })), r === ve.CONSULT_CALL_IN_SUCCESS && (vA.sessionId = i.session_id, bA.emit(gA.CONSULT_CALL_IN_SUCCESS), AA.updateConsultIsAnswer(!0), AA.updateDisplayText(it.CALLING), AA.updateActionConfigs(Kw)), r === ve.CONSULT_RETURN_CALL_SUCCESS && (i.status === "success" ? (AA.updateConsultIsAnswer(!1), bA.emit(gA.CONSULT_RETURN_CALL_SUCCESS), AA.updateDisplayText(it.CALLING), bA.emit(gA.OTHER_SIDE_CONSULT_HANGUP), AA.updateActionConfigs(Mi)) : bA.emit(ke.FAIL_NOTIFICATION, "媒体失败")), r === ve.MUTE && (o === 0 ? (AA.updateIsMuted(!0), bA.emit(gA.MUTE_SUCCESS), AA.updateDisplayText(it.MUTING)) : (bA.emit(gA.MUTE_FAILED, a), bA.emit(ke.FAIL_NOTIFICATION, a))), r === ve.UNMUTE && (o === 0 ? (AA.updateIsMuted(!1), bA.emit(gA.UNMUTE_SUCCESS), AA.updateDisplayText(it.CALLING)) : (bA.emit(gA.UNMUTE_FAILED, a), bA.emit(ke.FAIL_NOTIFICATION, a))), r === ve.CALL_HOLD && (o === 0 ? (AA.updateIsHold(!0), AA.updateDisplayText(it.HOLDING), bA.emit(gA.HOLD_SUCCESS)) : (bA.emit(gA.HOLD_FAILED, a), bA.emit(ke.FAIL_NOTIFICATION, a))), r === ve.CALL_UNHOLD && (o === 0 ? (AA.updateDisplayText(it.CALLING), AA.updateIsHold(!1), bA.emit(gA.UNHOLD_SUCCESS)) : (bA.emit(gA.UNHOLD_FAILED, a), bA.emit(ke.FAIL_NOTIFICATION, a))), r === ve.CONSULT_TRANSFER && (o === 0 ? bA.emit(gA.CONSULT_TRANSFER_SUCCESS) : (bA.emit(gA.CONSULT_TRANSFER_FAILED, a), bA.emit(ke.FAIL_NOTIFICATION, a))), r === ve.CONSULT_TRANSFER_FAILED && bA.emit(gA.CONSULT_TRANSFER_FAILED, i.status), r === ve.CONSULT_TRANSFER_OFF_HOOK && (AA.updateDirection(En.INCOMING), AA.updateDisplayText(it.CALLING), bA.emit(gA.CONSULT_TRANSFER_OFF_HOOK), AA.updateActionConfigs(ns), AA.updateIncomingIsAnswer(!0), AA.updateConsultIsAnswer(!1)), r === ve.INCOMING_CALL && (vA.sessionId = i.session_id, AA.updateIsCalling(!0), AA.updateDirection(En.INCOMING), AA.updateDisplayText(it.INCOMING_CALL), bA.emit(gA.INCOMING_CALL, { customer_phone: i.customer_phone }), AA.updateActionConfigs(Qc), this.getCustomerInfo(i.customer_phone), vA.enableBrowserAlert && ea.show("📞 客户来电", `客户 [${i.customer_phone}] 正在呼入...`, () => {
12874
+ })), r === Ce.CONSULT_CALL_IN_SUCCESS && (vA.sessionId = i.session_id, bA.emit(gA.CONSULT_CALL_IN_SUCCESS), AA.updateConsultIsAnswer(!0), AA.updateDisplayText(it.CALLING), AA.updateActionConfigs(Kw)), r === Ce.CONSULT_RETURN_CALL_SUCCESS && (i.status === "success" ? (AA.updateConsultIsAnswer(!1), bA.emit(gA.CONSULT_RETURN_CALL_SUCCESS), AA.updateDisplayText(it.CALLING), bA.emit(gA.OTHER_SIDE_CONSULT_HANGUP), AA.updateActionConfigs(Mi)) : bA.emit(ke.FAIL_NOTIFICATION, "媒体失败")), r === Ce.MUTE && (o === 0 ? (AA.updateIsMuted(!0), bA.emit(gA.MUTE_SUCCESS), AA.updateDisplayText(it.MUTING)) : (bA.emit(gA.MUTE_FAILED, a), bA.emit(ke.FAIL_NOTIFICATION, a))), r === Ce.UNMUTE && (o === 0 ? (AA.updateIsMuted(!1), bA.emit(gA.UNMUTE_SUCCESS), AA.updateDisplayText(it.CALLING)) : (bA.emit(gA.UNMUTE_FAILED, a), bA.emit(ke.FAIL_NOTIFICATION, a))), r === Ce.CALL_HOLD && (o === 0 ? (AA.updateIsHold(!0), AA.updateDisplayText(it.HOLDING), bA.emit(gA.HOLD_SUCCESS)) : (bA.emit(gA.HOLD_FAILED, a), bA.emit(ke.FAIL_NOTIFICATION, a))), r === Ce.CALL_UNHOLD && (o === 0 ? (AA.updateDisplayText(it.CALLING), AA.updateIsHold(!1), bA.emit(gA.UNHOLD_SUCCESS)) : (bA.emit(gA.UNHOLD_FAILED, a), bA.emit(ke.FAIL_NOTIFICATION, a))), r === Ce.CONSULT_TRANSFER && (o === 0 ? bA.emit(gA.CONSULT_TRANSFER_SUCCESS) : (bA.emit(gA.CONSULT_TRANSFER_FAILED, a), bA.emit(ke.FAIL_NOTIFICATION, a))), r === Ce.CONSULT_TRANSFER_FAILED && bA.emit(gA.CONSULT_TRANSFER_FAILED, i.status), r === Ce.CONSULT_TRANSFER_OFF_HOOK && (AA.updateDirection(En.INCOMING), AA.updateDisplayText(it.CALLING), bA.emit(gA.CONSULT_TRANSFER_OFF_HOOK), AA.updateActionConfigs(ns), AA.updateIncomingIsAnswer(!0), AA.updateConsultIsAnswer(!1)), r === Ce.INCOMING_CALL && (vA.sessionId = i.session_id, AA.updateIsCalling(!0), AA.updateDirection(En.INCOMING), AA.updateDisplayText(it.INCOMING_CALL), bA.emit(gA.INCOMING_CALL, { customer_phone: i.customer_phone }), AA.updateActionConfigs(Qc), this.getCustomerInfo(i.customer_phone), vA.enableBrowserAlert && ea.show("📞 客户来电", `客户 [${i.customer_phone}] 正在呼入...`, () => {
12875
12875
  bA.emit(ke.NOTIFICATION_CLICK, { customer_phone: i.customer_phone });
12876
- })), r === ve.INCOMING_CALL_OFF_HOOK && (AA.updateIncomingIsAnswer(!0), bA.emit(gA.INCOMING_CALL_OFF_HOOK), AA.updateActionConfigs(ns), AA.updateDisplayText(it.CALLING)), r === ve.INCOMING_CALL_END && (AA.updateDisplayText(""), i.device_type === 1 && i.agent_no === vA.agentInfo.agent_no ? (this.putAgentState(), AA.reset(), bA.emit(gA.INCOMING_CALL_END), AA.updateActionConfigs(Tn)) : i.device_type === 2 && i.agent_no === vA.agentInfo.agent_no ? (AA.reset(), bA.emit(gA.OUR_SIDE_CONSULT_HANGUP, i), this.putAgentState(), AA.updateActionConfigs(Tn)) : i.device_type === 2 && i.agent_no !== vA.agentInfo.agent_no ? (AA.updateDisplayText(it.CALLING), bA.emit(gA.OTHER_SIDE_CONSULT_HANGUP, i), AA.updateActionConfigs(Mi)) : i.device_type === 3 && i.agent_no === vA.agentInfo.agent_no ? (this.putAgentState(), AA.reset(), bA.emit(gA.THREE_WAY_OUR_SIDE_HANGUP), AA.updateActionConfigs(Tn)) : i.device_type === 4 && i.agent_no === vA.agentInfo.agent_no && (this.putAgentState(), AA.reset(), bA.emit(gA.TRANSFER_END), AA.updateActionConfigs(Tn))), r === ve.SATISFACTION_EVALUATION && (o === 0 ? bA.emit(gA.SATISFACTION_EVALUATION_SUCCESS) : (bA.emit(gA.SATISFACTION_EVALUATION_FAILED, a), bA.emit(ke.FAIL_NOTIFICATION, a))), r === ve.CONSULT_THREE_WAY && (o !== 0 ? (bA.emit(gA.CONSULT_THREE_WAY_FAILED, a), bA.emit(ke.FAIL_NOTIFICATION, a)) : o === 0 && AA.updateIsMeeting(!0)), r === ve.CONSULT_THREE_WAY_RESULT && (i.status === "success" ? (AA.updateDirection(En.MEETING), AA.updateDisplayText(it.MEETING), AA.updateActionConfigs(jw), bA.emit(gA.CONSULT_THREE_WAY_SUCCESS)) : (bA.emit(gA.CONSULT_THREE_WAY_FAILED, { conf_name: i.conf_name }), AA.updateIsMeeting(!1))), r === ve.TRANSFER_INCOMING_CALL && (i.agent_no === vA.agentInfo.agent_no ? (AA.updateDisplayText(it.TRANSFERRING), bA.emit(gA.TRANSFER_PROGRESS), AA.updateActionConfigs([]), AA.updateTransferIsAnswer(!0)) : (bA.emit(gA.TRANSFER_INCOMING_CALL, { agent_no: i.agent_no }), AA.updateIsCalling(!0), AA.updateDirection(En.TRANSFER), AA.updateDisplayText(it.TRANSFER_INCOMING_CALL), AA.updateActionConfigs(Qc), vA.enableBrowserAlert && ea.show("📞 转接来电", `坐席 [${i.agent_no}] 正在转接...`, () => {
12876
+ })), r === Ce.INCOMING_CALL_OFF_HOOK && (AA.updateIncomingIsAnswer(!0), bA.emit(gA.INCOMING_CALL_OFF_HOOK), AA.updateActionConfigs(ns), AA.updateDisplayText(it.CALLING)), r === Ce.INCOMING_CALL_END && (AA.updateDisplayText(""), i.device_type === 1 && i.agent_no === vA.agentInfo.agent_no ? (this.putAgentState(), AA.reset(), bA.emit(gA.INCOMING_CALL_END), AA.updateActionConfigs(Tn)) : i.device_type === 2 && i.agent_no === vA.agentInfo.agent_no ? (AA.reset(), bA.emit(gA.OUR_SIDE_CONSULT_HANGUP, i), this.putAgentState(), AA.updateActionConfigs(Tn)) : i.device_type === 2 && i.agent_no !== vA.agentInfo.agent_no ? (AA.updateDisplayText(it.CALLING), bA.emit(gA.OTHER_SIDE_CONSULT_HANGUP, i), AA.updateActionConfigs(Mi)) : i.device_type === 3 && i.agent_no === vA.agentInfo.agent_no ? (this.putAgentState(), AA.reset(), bA.emit(gA.THREE_WAY_OUR_SIDE_HANGUP), AA.updateActionConfigs(Tn)) : i.device_type === 4 && i.agent_no === vA.agentInfo.agent_no && (this.putAgentState(), AA.reset(), bA.emit(gA.TRANSFER_END), AA.updateActionConfigs(Tn))), r === Ce.SATISFACTION_EVALUATION && (o === 0 ? bA.emit(gA.SATISFACTION_EVALUATION_SUCCESS) : (bA.emit(gA.SATISFACTION_EVALUATION_FAILED, a), bA.emit(ke.FAIL_NOTIFICATION, a))), r === Ce.CONSULT_THREE_WAY && (o !== 0 ? (bA.emit(gA.CONSULT_THREE_WAY_FAILED, a), bA.emit(ke.FAIL_NOTIFICATION, a)) : o === 0 && AA.updateIsMeeting(!0)), r === Ce.CONSULT_THREE_WAY_RESULT && (i.status === "success" ? (AA.updateDirection(En.MEETING), AA.updateDisplayText(it.MEETING), AA.updateActionConfigs(jw), bA.emit(gA.CONSULT_THREE_WAY_SUCCESS)) : (bA.emit(gA.CONSULT_THREE_WAY_FAILED, { conf_name: i.conf_name }), AA.updateIsMeeting(!1))), r === Ce.TRANSFER_INCOMING_CALL && (i.agent_no === vA.agentInfo.agent_no ? (AA.updateDisplayText(it.TRANSFERRING), bA.emit(gA.TRANSFER_PROGRESS), AA.updateActionConfigs([]), AA.updateTransferIsAnswer(!0)) : (bA.emit(gA.TRANSFER_INCOMING_CALL, { agent_no: i.agent_no }), AA.updateIsCalling(!0), AA.updateDirection(En.TRANSFER), AA.updateDisplayText(it.TRANSFER_INCOMING_CALL), AA.updateActionConfigs(Qc), vA.enableBrowserAlert && ea.show("📞 转接来电", `坐席 [${i.agent_no}] 正在转接...`, () => {
12877
12877
  bA.emit(ke.NOTIFICATION_CLICK, { agent_no: i.agent_no });
12878
- }))), r === ve.TRANSFER_OFF_HOOK && (vA.sessionId = i.session_id, bA.emit(gA.TRANSFER_OFF_HOOK, { session_id: i.session_id }), AA.updateTransferIsAnswer(!1), AA.updateDisplayText(it.CALLING), AA.updateActionConfigs(ns)), r === ve.TRANSFER_FAILED && i.status === "failed") {
12878
+ }))), r === Ce.TRANSFER_OFF_HOOK && (vA.sessionId = i.session_id, bA.emit(gA.TRANSFER_OFF_HOOK, { session_id: i.session_id }), AA.updateTransferIsAnswer(!1), AA.updateDisplayText(it.CALLING), AA.updateActionConfigs(ns)), r === Ce.TRANSFER_FAILED && i.status === "failed") {
12879
12879
  bA.emit(gA.TRANSFER_FAILED, "未知原因");
12880
12880
  const s = AA.get("direction");
12881
12881
  s === En.OUTGOING ? AA.updateActionConfigs(Mi) : s === En.INCOMING && AA.updateActionConfigs(ns);
12882
12882
  }
12883
- r === ve.KICK_OFFLINE && bA.emit(ke.KICK_OFF);
12883
+ r === Ce.KICK_OFFLINE && bA.emit(ke.KICK_OFF);
12884
12884
  }, this.ws.onclose = () => {
12885
12885
  this.stopHeartbeat(), this.manualClose || setTimeout(() => this.initWebSocket(), this.reconnectDelay);
12886
12886
  }, this.ws.onerror = () => {
@@ -12939,7 +12939,7 @@ class zw {
12939
12939
  if (t) {
12940
12940
  if (!AA.get("actionConfigs").includes("hold")) throw new Error(JSON.stringify({ code: 1, msg: "当前状态请勿保持" }));
12941
12941
  if (A) throw new Error(JSON.stringify({ code: 1, msg: "当前已处于保持状态" }));
12942
- Qt.__internalSend({ type: ve.CALL_HOLD, data: { session_id: t } });
12942
+ Qt.__internalSend({ type: Ce.CALL_HOLD, data: { session_id: t } });
12943
12943
  }
12944
12944
  }
12945
12945
  unholdCall() {
@@ -12948,7 +12948,7 @@ class zw {
12948
12948
  if (!AA.get("actionConfigs").includes("unhold")) throw new Error(JSON.stringify({ code: 1, msg: "当前状态请勿取消保持" }));
12949
12949
  if (t) {
12950
12950
  if (!A) throw new Error(JSON.stringify({ code: 1, msg: "当前未处于保持状态" }));
12951
- Qt.__internalSend({ type: ve.CALL_UNHOLD, data: { session_id: t } });
12951
+ Qt.__internalSend({ type: Ce.CALL_UNHOLD, data: { session_id: t } });
12952
12952
  }
12953
12953
  }
12954
12954
  sendDTMF(A) {
@@ -12961,7 +12961,7 @@ class zw {
12961
12961
  cancelCall() {
12962
12962
  if (!AA.get("isCalling")) throw new Error(JSON.stringify({ code: 1, msg: "当前没有通话" }));
12963
12963
  const A = vA.sessionId;
12964
- Qt.__internalSend({ type: ve.AGENT_HANGUP, data: { session_id: A } });
12964
+ Qt.__internalSend({ type: Ce.AGENT_HANGUP, data: { session_id: A } });
12965
12965
  }
12966
12966
  async consultCall(A) {
12967
12967
  this.roleMute();
@@ -12970,7 +12970,7 @@ class zw {
12970
12970
  if (r) throw new Error(JSON.stringify({ code: 1, msg: "当前正在咨询" }));
12971
12971
  if (!(t || n || i)) throw new Error(JSON.stringify({ code: 1, msg: "当前没有通话" }));
12972
12972
  if (!o) throw new Error(JSON.stringify({ code: 1, msg: "sessionId不存在" }));
12973
- Qt.__internalSend({ type: ve.CONSULT_REQUEST, data: { session_id: o, consultation_agent_no: A } });
12973
+ Qt.__internalSend({ type: Ce.CONSULT_REQUEST, data: { session_id: o, consultation_agent_no: A } });
12974
12974
  }
12975
12975
  async answerCall() {
12976
12976
  if (AA.get("answerDevice") !== 1) throw new Error(JSON.stringify({ code: 1, msg: "当前设备不支持此功能" }));
@@ -12979,57 +12979,57 @@ class zw {
12979
12979
  async makeCall(A) {
12980
12980
  const t = AA.get("isCalling"), n = AA.get("selectOutNumber") || "";
12981
12981
  if (t) throw new Error(JSON.stringify({ code: 1, msg: "正在呼叫中,请勿重复点击" }));
12982
- AA.updateIsCalling(!0), AA.updateDirection(En.OUTGOING), Qt.__internalSend({ type: ve.OUT_CALL, data: { customer_phone: A, caller: n } });
12982
+ AA.updateIsCalling(!0), AA.updateDirection(En.OUTGOING), Qt.__internalSend({ type: Ce.OUT_CALL, data: { customer_phone: A, caller: n } });
12983
12983
  }
12984
12984
  async hangup() {
12985
12985
  if (!AA.get("isCalling")) throw new Error(JSON.stringify({ code: 1, msg: "当前没有通话" }));
12986
12986
  const A = vA.sessionId;
12987
- Qt.__internalSend({ type: ve.AGENT_HANGUP, data: { session_id: A } });
12987
+ Qt.__internalSend({ type: Ce.AGENT_HANGUP, data: { session_id: A } });
12988
12988
  }
12989
12989
  mute() {
12990
12990
  this.roleMute();
12991
12991
  const A = AA.get("actionConfigs"), t = AA.get("isMuted"), n = vA.sessionId;
12992
12992
  if (t) throw new Error(JSON.stringify({ code: 1, msg: "当前未处于静音状态" }));
12993
12993
  if (!A.includes("mute")) throw new Error(JSON.stringify({ code: 1, msg: "当前状态请勿调用静音" }));
12994
- Qt.__internalSend({ type: ve.MUTE, data: { session_id: n } });
12994
+ Qt.__internalSend({ type: Ce.MUTE, data: { session_id: n } });
12995
12995
  }
12996
12996
  unmute() {
12997
12997
  this.roleMute();
12998
12998
  const A = AA.get("actionConfigs"), t = AA.get("isMuted"), n = vA.sessionId;
12999
12999
  if (!t) throw new Error(JSON.stringify({ code: 1, msg: "当前未处于未静音状态" }));
13000
13000
  if (!A.includes("unmute")) throw new Error(JSON.stringify({ code: 1, msg: "当前状态请勿调用静音" }));
13001
- Qt.__internalSend({ type: ve.UNMUTE, data: { session_id: n } });
13001
+ Qt.__internalSend({ type: Ce.UNMUTE, data: { session_id: n } });
13002
13002
  }
13003
13003
  consultTransfer() {
13004
13004
  this.roleMute();
13005
13005
  const A = AA.get("consultIsAnswer"), t = vA.sessionId;
13006
13006
  if (!AA.get("actionConfigs").includes("consult_transfer")) throw new Error(JSON.stringify({ code: 1, msg: "当前状态请勿调用咨询转移" }));
13007
13007
  if (!A) throw new Error(JSON.stringify({ code: 1, msg: "当前未处于咨询中" }));
13008
- Qt.__internalSend({ type: ve.CONSULT_TRANSFER, data: { session_id: t } });
13008
+ Qt.__internalSend({ type: Ce.CONSULT_TRANSFER, data: { session_id: t } });
13009
13009
  }
13010
13010
  satisfactionEvaluation() {
13011
13011
  this.roleMute();
13012
13012
  const A = vA.sessionId;
13013
13013
  if (!AA.get("actionConfigs").includes("satisfaction")) throw new Error(JSON.stringify({ code: 1, msg: "当前状态请勿调用满意度评价" }));
13014
- Qt.__internalSend({ type: ve.SATISFACTION_EVALUATION, data: { session_id: A } });
13014
+ Qt.__internalSend({ type: Ce.SATISFACTION_EVALUATION, data: { session_id: A } });
13015
13015
  }
13016
13016
  startConference() {
13017
13017
  if (this.roleMute(), !AA.get("actionConfigs").includes("conference")) throw new Error(JSON.stringify({ code: 1, msg: "当前状态请勿调用三方会议" }));
13018
13018
  const A = vA.sessionId;
13019
13019
  if (!AA.get("consultIsAnswer")) throw new Error(JSON.stringify({ code: 1, msg: "当前未处于咨询中" }));
13020
- Qt.__internalSend({ type: ve.CONSULT_THREE_WAY, data: { session_id: A } });
13020
+ Qt.__internalSend({ type: Ce.CONSULT_THREE_WAY, data: { session_id: A } });
13021
13021
  }
13022
13022
  consultRetrieve() {
13023
13023
  if (this.roleMute(), !AA.get("actionConfigs").includes("consult_retrieve")) throw new Error(JSON.stringify({ code: 1, msg: "当前状态请勿取回通话" }));
13024
13024
  const A = vA.sessionId;
13025
13025
  if (!AA.get("consultIsAnswer")) throw new Error(JSON.stringify({ code: 1, msg: "当前未处于咨询中" }));
13026
- Qt.__internalSend({ type: ve.CONSULT_RETURN_CALL, data: { session_id: A } });
13026
+ Qt.__internalSend({ type: Ce.CONSULT_RETURN_CALL, data: { session_id: A } });
13027
13027
  }
13028
13028
  async transferAgent(A) {
13029
13029
  if (this.roleMute(), !AA.get("actionConfigs").includes("transfer")) throw new Error(JSON.stringify({ code: 1, msg: "当前状态请勿转接" }));
13030
13030
  const { transferIsAnswer: t } = AA.getState(), n = vA.sessionId;
13031
13031
  if (t) throw new Error(JSON.stringify({ code: 1, msg: "当前正在转接" }));
13032
- Qt.__internalSend({ type: ve.TRANSFER, data: { session_id: n, transfer_type: 0, transfer_dest: A } });
13032
+ Qt.__internalSend({ type: Ce.TRANSFER, data: { session_id: n, transfer_type: 0, transfer_dest: A } });
13033
13033
  }
13034
13034
  async transferOutline(A) {
13035
13035
  if (this.roleMute(), !AA.get("actionConfigs").includes("transfer")) throw new Error(JSON.stringify({ code: 1, msg: "当前状态请勿转接" }));
@@ -13038,7 +13038,7 @@ class zw {
13038
13038
  const { transferIsAnswer: t } = AA.getState(), n = vA.sessionId;
13039
13039
  if (t) throw new Error(JSON.stringify({ code: 1, msg: "当前正在转接" }));
13040
13040
  if (t) throw new Error(JSON.stringify({ code: 1, msg: "当前正在转接" }));
13041
- Qt.__internalSend({ type: ve.TRANSFER, data: { session_id: n, transfer_type: 2, transfer_dest: A } });
13041
+ Qt.__internalSend({ type: Ce.TRANSFER, data: { session_id: n, transfer_type: 2, transfer_dest: A } });
13042
13042
  }
13043
13043
  }
13044
13044
  var Cn, Xn, ut, eo, Gr, Qa, to, Vl, dl, CC;
@@ -26339,7 +26339,7 @@ function PD(e, A, t, n, r, i, o) {
26339
26339
  return;
26340
26340
  var YA = T.offset, $A = T.targetOffset, Ve = Jf(k, YA), Ae = W(Ve, 2), xA = Ae[0], wA = Ae[1], ae = Jf(G, $A), se = W(ae, 2), me = se[0], Te = se[1];
26341
26341
  G.x -= me, G.y -= Te;
26342
- var aA = T.points || [], mA = W(aA, 2), IA = mA[0], Ce = mA[1], Le = Pf(Ce), Qe = Pf(IA), qe = bi(G, Le), PA = bi(k, Qe), te = O({}, T), BA = qe.x - PA.x + xA, le = qe.y - PA.y + wA, ye = hn(BA, le), FA = hn(BA, le, uA), CA = bi(G, ["t", "l"]), JA = bi(k, ["t", "l"]), WA = bi(G, ["b", "r"]), ZA = bi(k, ["b", "r"]), D = T.overflow || {}, sA = D.adjustX, dA = D.adjustY, GA = D.shiftX, LA = D.shiftY, ce = function(sr) {
26342
+ var aA = T.points || [], mA = W(aA, 2), IA = mA[0], ve = mA[1], Le = Pf(ve), Qe = Pf(IA), qe = bi(G, Le), PA = bi(k, Qe), te = O({}, T), BA = qe.x - PA.x + xA, le = qe.y - PA.y + wA, ye = hn(BA, le), FA = hn(BA, le, uA), CA = bi(G, ["t", "l"]), JA = bi(k, ["t", "l"]), WA = bi(G, ["b", "r"]), ZA = bi(k, ["b", "r"]), D = T.overflow || {}, sA = D.adjustX, dA = D.adjustY, GA = D.shiftX, LA = D.shiftY, ce = function(sr) {
26343
26343
  return typeof sr == "boolean" ? sr : sr >= 0;
26344
26344
  }, XA, ie, Ne, he;
26345
26345
  Ii();
@@ -26488,7 +26488,7 @@ function $D() {
26488
26488
  return (It == null ? void 0 : It.contains(zA)) || ((fe = Al(It)) === null || fe === void 0 ? void 0 : fe.host) === zA || zA === It || (KA == null ? void 0 : KA.contains(zA)) || ((nt = Al(KA)) === null || nt === void 0 ? void 0 : nt.host) === zA || zA === KA || Object.values(OA.current).some(function(lt) {
26489
26489
  return (lt == null ? void 0 : lt.contains(zA)) || zA === lt;
26490
26490
  });
26491
- }), aA = jf(i, L, eA, J), mA = jf(i, z, iA, nA), IA = c.useState(d || !1), Ce = W(IA, 2), Le = Ce[0], Qe = Ce[1], qe = V ?? Le, PA = ot(function(zA) {
26491
+ }), aA = jf(i, L, eA, J), mA = jf(i, z, iA, nA), IA = c.useState(d || !1), ve = W(IA, 2), Le = ve[0], Qe = ve[1], qe = V ?? Le, PA = ot(function(zA) {
26492
26492
  V === void 0 && Qe(zA);
26493
26493
  });
26494
26494
  tt(function() {
@@ -27189,14 +27189,14 @@ function ET(e, A) {
27189
27189
  registerSize: wA,
27190
27190
  display: te <= MA
27191
27191
  }));
27192
- }, Ce = {
27192
+ }, ve = {
27193
27193
  order: Te ? MA : Number.MAX_SAFE_INTEGER,
27194
27194
  className: "".concat(EA, "-rest"),
27195
27195
  registerSize: ae,
27196
27196
  display: Te
27197
27197
  }, Le = C || vT, Qe = f ? /* @__PURE__ */ c.createElement(il.Provider, {
27198
- value: O(O({}, mA), Ce)
27199
- }, f(YA)) : /* @__PURE__ */ c.createElement(ia, UA({}, mA, Ce), typeof Le == "function" ? Le(YA) : Le), qe = /* @__PURE__ */ c.createElement(w, UA({
27198
+ value: O(O({}, mA), ve)
27199
+ }, f(YA)) : /* @__PURE__ */ c.createElement(ia, UA({}, mA, ve), typeof Le == "function" ? Le(YA) : Le), qe = /* @__PURE__ */ c.createElement(w, UA({
27200
27200
  className: tA(!ee && n, h),
27201
27201
  style: d,
27202
27202
  ref: A
@@ -27984,18 +27984,18 @@ var tF = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items
27984
27984
  se(pe), oA == null || oA(pe);
27985
27985
  }
27986
27986
  Me ? ru(Fe) : Fe();
27987
- }, Te = c.useState(ae), aA = W(Te, 2), mA = aA[0], IA = aA[1], Ce = c.useRef(!1), Le = c.useMemo(function() {
27987
+ }, Te = c.useState(ae), aA = W(Te, 2), mA = aA[0], IA = aA[1], ve = c.useRef(!1), Le = c.useMemo(function() {
27988
27988
  return (f === "inline" || f === "vertical") && q ? ["vertical", q] : [f, !1];
27989
27989
  }, [f, q]), Qe = W(Le, 2), qe = Qe[0], PA = Qe[1], te = qe === "inline", BA = c.useState(qe), le = W(BA, 2), ye = le[0], FA = le[1], CA = c.useState(PA), JA = W(CA, 2), WA = JA[0], ZA = JA[1];
27990
27990
  c.useEffect(function() {
27991
- FA(qe), ZA(PA), Ce.current && (te ? se(mA) : me($r));
27991
+ FA(qe), ZA(PA), ve.current && (te ? se(mA) : me($r));
27992
27992
  }, [qe, PA]);
27993
27993
  var D = c.useState(0), sA = W(D, 2), dA = sA[0], GA = sA[1], LA = dA >= SA.length - 1 || ye !== "horizontal" || w;
27994
27994
  c.useEffect(function() {
27995
27995
  te && IA(ae);
27996
27996
  }, [ae]), c.useEffect(function() {
27997
- return Ce.current = !0, function() {
27998
- Ce.current = !1;
27997
+ return ve.current = !0, function() {
27998
+ ve.current = !1;
27999
27999
  };
28000
28000
  }, []);
28001
28001
  var ce = DT(), XA = ce.registerPath, ie = ce.unregisterPath, Ne = ce.refreshOverflowKeys, he = ce.isSubPathKey, we = ce.getKeyPath, fA = ce.getKeys, QA = ce.getSubPathKeys, ue = c.useMemo(function() {
@@ -31815,14 +31815,14 @@ var tO = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction"
31815
31815
  return y;
31816
31816
  var NA = (Se = u[0]) === null || Se === void 0 ? void 0 : Se.value;
31817
31817
  return typeof NA == "string" || typeof NA == "number" ? String(NA) : "";
31818
- }, [y, f, u]), me = f === "combobox" && typeof w == "function" && w() || null, Te = typeof B == "function" && B(), aA = pi(ee, Te == null || (t = Te.props) === null || t === void 0 ? void 0 : t.ref), mA = c.useState(!1), IA = W(mA, 2), Ce = IA[0], Le = IA[1];
31818
+ }, [y, f, u]), me = f === "combobox" && typeof w == "function" && w() || null, Te = typeof B == "function" && B(), aA = pi(ee, Te == null || (t = Te.props) === null || t === void 0 ? void 0 : t.ref), mA = c.useState(!1), IA = W(mA, 2), ve = IA[0], Le = IA[1];
31819
31819
  tt(function() {
31820
31820
  Le(!0);
31821
31821
  }, []);
31822
31822
  var Qe = Ft(!1, {
31823
31823
  defaultValue: g,
31824
31824
  value: M
31825
- }), qe = W(Qe, 2), PA = qe[0], te = qe[1], BA = Ce ? PA : !1, le = !m && d;
31825
+ }), qe = W(Qe, 2), PA = qe[0], te = qe[1], BA = ve ? PA : !1, le = !m && d;
31826
31826
  (q || le && BA && f === "combobox") && (BA = !1);
31827
31827
  var ye = le ? !1 : BA, FA = c.useCallback(function(Se) {
31828
31828
  var NA = Se !== void 0 ? Se : !BA;
@@ -32633,11 +32633,11 @@ function mO(e, A) {
32633
32633
  return yq(wA.width, C);
32634
32634
  }, [wA.width, C]), mA = c.useMemo(function() {
32635
32635
  return yq(wA.height, jA);
32636
- }, [wA.height, jA]), IA = jA - i, Ce = RA(IA);
32637
- Ce.current = IA;
32636
+ }, [wA.height, jA]), IA = jA - i, ve = RA(IA);
32637
+ ve.current = IA;
32638
32638
  function Le(fA) {
32639
32639
  var QA = fA;
32640
- return Number.isNaN(Ce.current) || (QA = Math.min(QA, Ce.current)), QA = Math.max(QA, 0), QA;
32640
+ return Number.isNaN(ve.current) || (QA = Math.min(QA, ve.current)), QA = Math.max(QA, 0), QA;
32641
32641
  }
32642
32642
  var Qe = eA <= 0, qe = eA >= IA, PA = VA <= 0, te = VA >= C, BA = _v(Qe, qe, PA, te), le = function() {
32643
32643
  return {
@@ -33302,9 +33302,9 @@ var tE = /* @__PURE__ */ c.forwardRef(function(e, A) {
33302
33302
  Z ? ZA : ZA[0]
33303
33303
  );
33304
33304
  }
33305
- }, ae = c.useState(null), se = W(ae, 2), me = se[0], Te = se[1], aA = c.useState(0), mA = W(aA, 2), IA = mA[0], Ce = mA[1], Le = v !== void 0 ? v : n !== "combobox", Qe = c.useCallback(function(FA, CA) {
33305
+ }, ae = c.useState(null), se = W(ae, 2), me = se[0], Te = se[1], aA = c.useState(0), mA = W(aA, 2), IA = mA[0], ve = mA[1], Le = v !== void 0 ? v : n !== "combobox", Qe = c.useCallback(function(FA, CA) {
33306
33306
  var JA = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, WA = JA.source, ZA = WA === void 0 ? "keyboard" : WA;
33307
- Ce(CA), o && n === "combobox" && FA !== null && ZA === "keyboard" && Te(String(FA));
33307
+ ve(CA), o && n === "combobox" && FA !== null && ZA === "keyboard" && Te(String(FA));
33308
33308
  }, [o, n]), qe = function(CA, JA, WA) {
33309
33309
  var ZA = function() {
33310
33310
  var he, we = SA(CA);
@@ -34251,7 +34251,7 @@ const vk = {
34251
34251
  consult_transfer: "咨询转接",
34252
34252
  consult_retrieve: "取回通话",
34253
34253
  conference: "三方会议"
34254
- }, Ik = Tq(() => import("./ConsultModel-CwH6TEZj.mjs")), yk = Tq(() => import("./TransferModel-CucIFdnh.mjs")), Pk = (e) => {
34254
+ }, Ik = Tq(() => import("./ConsultModel-CgStzcdo.mjs")), yk = Tq(() => import("./TransferModel-SOAQcriV.mjs")), Pk = (e) => {
34255
34255
  var se, me, Te;
34256
34256
  const {
34257
34257
  style: A,
@@ -34317,7 +34317,7 @@ const vk = {
34317
34317
  var aA, mA;
34318
34318
  (aA = h.current) == null || aA.on(ke.EVENT_ALL, ({
34319
34319
  event: IA,
34320
- data: Ce
34320
+ data: ve
34321
34321
  }) => {
34322
34322
  switch (IA) {
34323
34323
  // 播放等待音
@@ -34325,7 +34325,7 @@ const vk = {
34325
34325
  case gA.OUT_SUCCESS:
34326
34326
  case gA.CONSULT_RINGING: {
34327
34327
  IA === gA.OUT_SUCCESS && (a == null || a(gA.OUT_SUCCESS, {
34328
- customer_phone: Ce.customer_phone
34328
+ customer_phone: ve.customer_phone
34329
34329
  })), oA(C);
34330
34330
  return;
34331
34331
  }
@@ -34345,7 +34345,7 @@ const vk = {
34345
34345
  case gA.TRANSFER_INCOMING_CALL:
34346
34346
  case gA.INCOMING_CALL: {
34347
34347
  (IA === gA.CONSULT_INCOMING || IA === gA.TRANSFER_INCOMING_CALL) && (a == null || a(IA, {
34348
- agent_no: Ce.agent_no
34348
+ agent_no: ve.agent_no
34349
34349
  })), oA(q);
34350
34350
  return;
34351
34351
  }
@@ -34354,7 +34354,7 @@ const vk = {
34354
34354
  case gA.TRANSFER_OFF_HOOK:
34355
34355
  case gA.CONSULT_CALL_IN_SUCCESS:
34356
34356
  case gA.INCOMING_CALL_OFF_HOOK: {
34357
- console.log(IA, Ce), rA(q);
34357
+ console.log(IA, ve), rA(q);
34358
34358
  return;
34359
34359
  }
34360
34360
  // 挂机停止所有声音
@@ -34362,7 +34362,7 @@ const vk = {
34362
34362
  case gA.THREE_WAY_OUR_SIDE_HANGUP:
34363
34363
  case gA.OUR_SIDE_CONSULT_HANGUP:
34364
34364
  case gA.INCOMING_CALL_END: {
34365
- console.log(IA, Ce), rA(q), rA(C);
34365
+ a == null || a(IA), rA(q), rA(C);
34366
34366
  return;
34367
34367
  }
34368
34368
  default:
@@ -34379,12 +34379,12 @@ const vk = {
34379
34379
  }).on(ke.AGENT_INIT_STATUS, (IA) => {
34380
34380
  if (IA) {
34381
34381
  const {
34382
- default_device: Ce,
34382
+ default_device: ve,
34383
34383
  init_state: Le,
34384
34384
  out_display_select_switch: Qe,
34385
34385
  out_display_data: qe
34386
34386
  } = h.current.getAgentData();
34387
- k(Qe === 1), Qe === 1 && Z((qe || "").split("#")), b(Ce), R(Le === 1 ? "空闲" : "忙碌"), OA();
34387
+ k(Qe === 1), Qe === 1 && Z((qe || "").split("#")), b(ve), R(Le === 1 ? "空闲" : "忙碌"), OA();
34388
34388
  }
34389
34389
  }).on(ke.SELECT_EXTERNAL_NUMBER, (IA) => {
34390
34390
  L(IA);
@@ -34410,9 +34410,9 @@ const vk = {
34410
34410
  }));
34411
34411
  } catch (IA) {
34412
34412
  const {
34413
- msg: Ce
34413
+ msg: ve
34414
34414
  } = JSON.parse(IA.message);
34415
- rt.warning(Ce);
34415
+ rt.warning(ve);
34416
34416
  }
34417
34417
  }, MA = async (aA, mA) => {
34418
34418
  var IA;
@@ -34426,10 +34426,10 @@ const vk = {
34426
34426
  R(mA), p((/* @__PURE__ */ new Date()).getTime()), rt.success("切换状态成功");
34427
34427
  }
34428
34428
  }));
34429
- } catch (Ce) {
34429
+ } catch (ve) {
34430
34430
  const {
34431
34431
  msg: Le
34432
- } = JSON.parse(Ce.message);
34432
+ } = JSON.parse(ve.message);
34433
34433
  rt.warning(Le);
34434
34434
  }
34435
34435
  }, pA = async (aA) => {
@@ -34445,9 +34445,9 @@ const vk = {
34445
34445
  }));
34446
34446
  } catch (IA) {
34447
34447
  const {
34448
- msg: Ce
34448
+ msg: ve
34449
34449
  } = JSON.parse(IA.message);
34450
- rt.warning(Ce);
34450
+ rt.warning(ve);
34451
34451
  }
34452
34452
  }, OA = async () => {
34453
34453
  var aA;
@@ -34469,9 +34469,9 @@ const vk = {
34469
34469
  await ((mA = h.current) == null ? void 0 : mA.call_api.makeCall(aA));
34470
34470
  } catch (IA) {
34471
34471
  const {
34472
- msg: Ce
34472
+ msg: ve
34473
34473
  } = JSON.parse(IA.message);
34474
- rt.warning(Ce);
34474
+ rt.warning(ve);
34475
34475
  }
34476
34476
  }, kA = async () => {
34477
34477
  var aA;
@@ -34522,9 +34522,9 @@ const vk = {
34522
34522
  await ((mA = h.current) == null ? void 0 : mA.call_api.consultCall(aA));
34523
34523
  } catch (IA) {
34524
34524
  const {
34525
- msg: Ce
34525
+ msg: ve
34526
34526
  } = JSON.parse(IA.message);
34527
- rt.warning(Ce);
34527
+ rt.warning(ve);
34528
34528
  }
34529
34529
  }, re = async () => {
34530
34530
  var aA;
@@ -34592,9 +34592,9 @@ const vk = {
34592
34592
  await ((mA = h.current) == null ? void 0 : mA.call_api.transferAgent(aA));
34593
34593
  } catch (IA) {
34594
34594
  const {
34595
- msg: Ce
34595
+ msg: ve
34596
34596
  } = JSON.parse(IA.message);
34597
- rt.warning(Ce);
34597
+ rt.warning(ve);
34598
34598
  }
34599
34599
  }, wA = async (aA) => {
34600
34600
  var mA;
@@ -34602,9 +34602,9 @@ const vk = {
34602
34602
  await ((mA = h.current) == null ? void 0 : mA.call_api.transferOutline(aA));
34603
34603
  } catch (IA) {
34604
34604
  const {
34605
- msg: Ce
34605
+ msg: ve
34606
34606
  } = JSON.parse(IA.message);
34607
- rt.warning(Ce);
34607
+ rt.warning(ve);
34608
34608
  }
34609
34609
  };
34610
34610
  _e(() => (ck({