PageSourceSearch

https://www.hicall.ai/callout-lite/_next/static/chunks/pages/app/discovery/task_add-5f8a10591cdc7a99.js

js hicall.ai collected 2026-10-05 14:23:22 UTC 34,197 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2014],{18617:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/app/discovery/task_add",function(){return n(22211)}])},6360:function(e,t,n){"use strict";n.d(t,{b:function(){return u}});var l=n(11527),s=n(50959),a=n(47253),r=n(24968),o=n(86509),c=n(95457),i=n(6749);let u=(0,s.memo)(e=>{let{open:t,close:n,title:s,content:u,footer:d,buttonFooter:p,height:f,submit:m,maxHeight:x,minHeight:h,cPaddingX:v,cPaddingY:g,hideClose:N,disable:E,className:T,hideTitle:w}=e,{bottomHeight:j}=(0,i.mX)();return(0,l.jsx)(a.Z,{className:T?"".concat(T," app-settings-popup"):"app-settings-popup",visible:t,onMaskClick:()=>{null==n||n()},children:(0,l.jsxs)("div",{style:{height:"string"==typeof f?f:f&&f>0?f:"auto",maxHeight:x||"auto",minHeight:h||"auto"},className:"flex flex-col",children:[!w&&(0,l.jsx)("div",{className:"px-[20px]",children:(0,l.jsxs)("div",{className:"h-[56px] flex justify-between items-center",children:[N?(0,l.jsx)("div",{onClick:()=>{null==n||n()},className:"w-[40px] h-[30px] flex justify-start items-center",children:(0,l.jsx)(o.Z,{width:22,src:"/callout-lite/imgs/goback.svg"})}):(0,l.jsx)("div",{className:"pl-[40px]"}),"string"==typeof s?(0,l.jsx)("span",{className:"app-fs-18 line-clamp-1",children:s}):(0,l.jsx)(l.Fragment,{children:s}),N?(0,l.jsx)("div",{className:"pl-[20px]"}):(0,l.jsx)("div",{onClick:()=>{null==n||n()},className:"w-[40px] h-[30px] flex justify-end items-center",children:(0,l.jsx)("div",{className:"w-[20px] h-[20px] rounded-[10px] bg-[#0000001f] flex-center",children:(0,l.jsx)(c.Z,{className:"w-[10px] text-[10px]"})})})]})}),(0,l.jsx)("div",{style:{paddingLeft:v,paddingRight:v,paddingTop:null!=g?g:8,paddingBottom:null!=g?g:8},className:"flex-1 relative overflow-x-hidden overflow-y-auto",children:"string"==typeof u?(0,l.jsx)("p",{className:"app-fs-14 text-[#000000e0]",children:u}):(0,l.jsx)(l.Fragment,{children:u})}),d?(0,l.jsx)(l.Fragment,{children:d}):p?"string"==typeof p?(0,l.jsx)("div",{className:"h-[80px] px-[32px] flex-center",children:(0,l.jsx)(r.Z,{block:!0,color:"primary",shape:"rounded",disabled:!!E,className:"w-full h-[48px]",onClick:()=>m&&m(),children:p})}):(0,l.jsx)(l.Fragment,{children:p}):null,(0,l.jsx)("div",{style:{paddingTop:j}})]})})});u.displayName="AppPopup"},56544:function(e,t,n){"use strict";n.d(t,{z:function(){return r}});var l=n(11527),s=n(86509),a=n(24968);let r=e=>{let{url:t,text:n,className:r,fill:o,textClassName:c,onClick:i,shape:u,iconSize:d,...p}=e;return(0,l.jsx)(a.Z,{block:!0,onClick:i,color:"primary",shape:u||"rounded",fill:o||"solid",className:"".concat(r||""),...p,children:(0,l.jsxs)("div",{className:"flex-center",children:[t&&(0,l.jsx)(s.Z,{width:d||24,src:t}),(0,l.jsx)("span",{className:"".concat(t?"ml-[8px]":""," app-fs-16-500 ").concat(c||""),children:n})]})})}},1432:function(e,t,n){"use strict";n.d(t,{H:function(){return a}});var l=n(11527),s=n(86509);let a=e=>{let{preIcon:t,title:n,desc:a,showLine:r,textColor:o,hiddenArrow:c,titleWeight:i,maxWidth:u,onClick:d}=e;return(0,l.jsxs)("div",{onClick:()=>{null==d||d()},className:"settings-list-item",children:["string"==typeof t?(0,l.jsx)(s.Z,{width:24,className:"mr-[8px]",src:t}):t||null,(0,l.jsxs)("div",{className:"flex-1 h-full flex-between ".concat(r?"relative harf-pixel-b-border":""),children:[(0,l.jsx)("span",{className:"app-fs-16 font-[".concat(i||600,"] line-clamp-1 mr-[8px]"),children:n}),(0,l.jsxs)("div",{className:"flex items-center",children:[a&&(0,l.jsx)("p",{className:"app-fs-14 line-clamp-1",style:{color:o||"#00000073",maxWidth:u||90},children:a}),!c&&(0,l.jsx)(s.Z,{width:16,src:"/callout-lite/imgs/app/next-step.svg"})]})]})]})}},10662:function(e,t,n){"use strict";var l,s,a,r,o,c,i,u,d,p;n.d(t,{AD:function(){return x},Bi:function(){return m},Bq:function(){return r},Dg:function(){return E},I7:function(){return T},N3:function(){return f},Py:function(){return l},TE:function(){return o},Tp:function(){return a},Z6:function(){return N},ZM:function(){return s},mM:function(){return h}});let f=["日","一","二","三","四","五","六"];(c=l||(l={}))[c.NO_REPEAT=0]="NO_REPEAT",c[c.EVERYDAY=1]="EVERYDAY",c[c.EVERYWEEK=2]="EVERYWEEK",c[c.EVERYTWOWEEKS=3]="EVERYTWOWEEKS",c[c.EVERYWORKDAY=4]="EVERYWORKDAY",(i=s||(s={}))[i.TO_ME=1]="TO_ME",i[i.TO_OTHER=2]="TO_OTHER";let m={[s.TO_ME]:"打给我",[s.TO_OTHER]:"打给其他人"};(u=a||(a={}))[u.NO_START=1]="NO_START",u[u.DOING_STARTING=2]="DOING_STARTING",u[u.DONE=4]="DONE",u[u.DOING_NOSTART=20]="DOING_NOSTART";let x={[a.NO_START]:"确认删除该任务?",[a.DOING_STARTING]:"正在通话中,请稍后再试!",[a.DONE]:"删除该任务将同时清除对应的通话记录,删除后不可恢复。",[a.DOING_NOSTART]:"任务正在进行中,删除该任务将同时清除对应的通话记录,删除后不可恢复。"},h={[l.NO_REPEAT]:"不重复",[l.EVERYDAY]:"每天重复",[l.EVERYWEEK]:"每周重复",[l.EVERYTWOWEEKS]:"每两周重复",[l.EVERYWORKDAY]:"工作日重复"};(d=r||(r={}))[d.TASK_CALLING=100200006]="TASK_CALLING",d[d.CALL_TIME_ERROR=100200007]="CALL_TIME_ERROR",d[d.VOICE_PACKET_USED=100200009]="VOICE_PACKET_USED",d[d.VOICE_AGENT_USED=100200011]="VOICE_AGENT_USED",d[d.TASK_DONE=100200012]="TASK_DONE";let v=["110","120","119"],g=[3],N=e=>!!("string"==typeof e?[e]:e).find(e=>g.includes(e.length)||v.includes(e)),E={scene:"unknown",sceneName:"自定义",sceneEnable:!0,periodicEnable:!0,template:"简单描述下你的呼叫任务,呼叫时间、拨打对象、内容等"};(p=o||(o={})).RUN="0",p.FINISH="1";let T=e=>({[o.RUN]:"进行中(".concat(e,")"),[o.FINISH]:"已完成"})},50195:function(e,t,n){"use strict";n.d(t,{Q:function(){return a}});var l=n(11527),s=n(87950);let a=e=>{let{content:t,title:n,onConfirm:a,onCancel:r,confirmText:o,cancelText:c}=e;return s.Z.confirm({closeOnMaskClick:!0,...n?{title:n}:{},content:(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.jsx)("p",{className:"w-[230px] text-center text-[16px] leading-[22px]",children:t})}),onConfirm:a,onCancel:r,confirmText:(0,l.jsx)("span",{className:"text-[16px] font-[500] text-[#1876ff]",children:o}),cancelText:(0,l.jsx)("span",{className:"text-[16px] text-[#000000e0]",children:c})})}},76605:function(e,t,n){"use strict";n.d(t,{Q:function(){return a},m:function(){return r}});var l=n(60037),s=n(26138);let a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{video:!1,audio:!0};return new Promise((t,n)=>{navigator.mediaDevices?navigator.mediaDevices.getUserMedia(e).then(e=>
1{t(void 0),e.getAudioTracks().forEach(e=>e.stop())}).catch(e=>(console.log("===debug 5==="),n(e))):(console.log("===debug 3==="),n(Error("The media function not surpported on this device.")))})},r=()=>{let e=s.Z.getValueFromUa("platform");if("android"===e)return new Promise((e,t)=>{(0,l.RM)("applyRecordPermission",{},n=>{n.isGet?e(null):(console.log("===debug 6==="),t(Error("未获取麦克风权限")))})});let t=s.Z.getValueFromUa("overseaType"),n=s.Z.getAppVersion();return"ios"===e&&("1"===t||n>501)?new Promise((e,t)=>{(0,l.RM)("applyRecordPermission",{},n=>{n.isGet?e(null):(console.log("===debug 4==="),t(Error("未获取麦克风权限")))})}):a()}},45055:function(e,t,n){"use strict";n.d(t,{A6:function(){return h},Ax:function(){return f},EQ:function(){return x},GW:function(){return r},Nd:function(){return i},S:function(){return d},cS:function(){return m},iZ:function(){return o},lp:function(){return g},nD:function(){return u},os:function(){return c},rh:function(){return v},zk:function(){return p}});var l=n(10662),s=n(5726),a=n.n(s);n(83440);let r=Array.from({length:24}).map((e,t)=>String(t).padStart(2,"0")).map(e=>({label:e,value:e})),o=()=>r.filter(e=>{let{value:t}=e;return+t>=+a()().format("HH")}),c=Array.from({length:60}).map((e,t)=>String(t).padStart(2,"0")).map(e=>({label:e,value:e})),i=e=>+e==+a()().format("HH")?c.filter(e=>{let{value:t}=e;return+t>=+a()().format("mm")}):c;function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a()(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:365,n=[],l=a()().year();for(let s=-1;s<t;s++){let t=e.add(s,"day"),r=t.year(),o=t.month()+1,c=t.date();if(-1===s){n.push({label:"立即拨打",value:"-"});continue}let i=["周日","周一","周二","周三","周四","周五","周六"],u=i[t.day()];r===l?n.push({label:"".concat(o,"月").concat(c,"日 ").concat(u),value:a()("".concat(r,"-").concat(o,"-").concat(c)).format("YYYY-M-D")}):n.push({label:"".concat(r,"年").concat(o,"月").concat(c,"日 ").concat(u),value:a()("".concat(r,"-").concat(o,"-").concat(c)).format("YYYY-M-D")})}return n}function d(e){return a()(e).locale("zh-cn").format("YYYY年MM月DD日")}function p(e){let t=a()(e),n=a()();return t.isSame(n,"day")}function f(e){let t=a()(e),n=a()();return t.isBefore(n)}let m=e=>{let t;let n=a()(a()(e).format("YYYY-MM-DD")),l=a()(a()().format("YYYY-MM-DD")),s=n.diff(l,"day");switch(s){case 0:t="今天";break;case 1:t="明天";break;case 2:t="后天";break;default:t=a()().year()===n.year()?n.format("MM月DD日"):n.format("YYYY年MM月DD日")}return t},x=e=>{let t=a()(a()().format("YYYY-MM-DD")),n=a()(a()(e).format("YYYY-MM-DD")).diff(t,"day"),s=a()(e);switch(n){case 0:return[0,"今天 ".concat(s.format("HH:mm"))];case 1:return[1,"明天 ".concat(s.format("HH:mm"))];default:if(a()().year()===s.year())return[2,"".concat(s.format("MM/DD"),"(周").concat(l.N3[s.day()],") ").concat(s.format("HH:mm"))];return[3,"".concat(s.format("YYYY/MM/DD"),"(周").concat(l.N3[s.day()],") ").concat(s.format("HH:mm"))]}};function h(e){let t=a()(e),n=t.minute();return n<30?t.set("minute",30).set("second",0).set("millisecond",0):t.add(1,"hour").set("minute",0).set("second",0).set("millisecond",0)}function v(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=a()(e),l=n.add(1===t?30:0,"day");return n.year()===l.year()?l.format("M月D日"):l.format("YYYY年M月D日")}let g=(e,t)=>{let n=a()(a()().format("YYYY-MM-DD")),l=a()(a()(e).format("YYYY-MM-DD")).diff(n,"day"),s=a()(e);return 0===l?s.format("HH:mm"):a()().year()===s.year()?s.format("MM/DD HH:mm"):s.format(t?"MMM DD, YYYY, HH:mm":"YYYY/MM/DD HH:mm")}},52824:function(e,t,n){"use strict";n.d(t,{F:function(){return p}});var l=n(57119),s=n(50629),a=n(23044),r=n(76187),o=n(38554),c=n(29062),i=n(82488),u=n(50959),d=n(54273);let p=()=>{let e=(0,l.useRouter)(),t=(0,s.TL)();(0,i.N)();let n=async()=>{let e=await c.Cw.getAudioList();(0,a.J)(e,e=>{t((0,r.Lg)(e))})},p=async n=>{let{id:l}=e.query||{};if("string"!=typeof(l=n||l))return;f(l);let s=await c.Cw.assistantDetail({id:l});(0,a.J)(s,e=>{t((0,r.Ve)(e))})},f=async e=>{let n=await c.o4.getAssistantConfig({virtualAssistantId:e});(0,a.J)(n,e=>{t((0,r.rF)(e))})};return(0,u.useEffect)(()=>{n()},[]),(0,u.useEffect)(()=>{t((0,d.xd)())},[]),(0,o.o)(p),{getAudioList:n,getAgentDetail:p}}},82488:function(e,t,n){"use strict";n.d(t,{N:function(){return c}});var l=n(50959),s=n(50629),a=n(76187),r=n(23044),o=n(52775);let c=()=>{let e=(0,s.TL)(),t=()=>{(0,r.RM)("getUserInfo",{},t=>{var n,l;console.log("getUserInfo result: ",t);let s=(null===(n=t.userInfo)||void 0===n?void 0:n.thsUserId)||(null===(l=t.userInfo)||void 0===l?void 0:l.id);console.log("=======uid======",s),document.cookie="userid=".concat(encodeURIComponent(s),";path=/"),e((0,a.gS)(t.userInfo||{}))}),(0,r.RM)("getAppInfo",{},t=>{console.log("getAppInfo result: ",t),(0,o.G)(t.appToken||""),e((0,a.pR)(t.deviceId||""))}),(0,r.RM)("supportMethod",{},t=>{console.log("supportMethod result: ",t),e((0,a.Ij)()),window.localStorage.setItem("isInNative","1"),e((0,a.iK)(t.supportedMethods||[]))})};(0,l.useEffect)(()=>{t()},[])}},22211:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return B},default:function(){return J}});var l=n(11527),s=n(50959),a=n(54458),r=n(57119),o=n(33195),c=n(2576),i=n(86509),u=n(45206),d=n(75118),p=n(1432),f=n(6749),m=n(56544),x=n(45055),h=n(5726),v=n.n(h),g=n(10662),N=n(50629),E=n(52824),T=n(38554),w=n(29062),j=n(6360);let S=e=>{let{open:t,close:n,onSelected:s}=e,{bottomHeight:a}=(0,f.mX)();return(0,l.jsx)(j.b,{hideTitle:!0,height:"45vh",open:t,close:n,footer:(0,l.jsxs)("div",{onClick:n,children:[(0,l.jsx)("div",{className:"h-[8px] bg-[#F5F5F5]"}),(0,l.jsx)("div",{className:"h-[56px] flex-center app-fs-16 text-[#000000a6]",children:"取消"}),(0,l.jsx)("div",{style:{paddingTop:a}})]}),content:(0,l.jsx)("div",{children:Object.entries(g.mM).map((e,t)=>{let[a,r]=e;return(0,l.jsx)("div",{className:"h-[56px] flex-center app-fs-16 text-[#000000e0] relative ".concat(0===t?"":"harf-pixel-t-border"),onClick:()=>{s(a),n()},children:r},t)})})})};var y=n(97146);let b=(0,s.forwardRef)((e,t)=>{let{open:n,close:a,onSubmit:r}
1=e,[o,c]=(0,s.useState)(v()().format("HH")),[i,u]=(0,s.useState)(v()().format("mm")),[d,p]=(0,s.useState)(v()().format("YYYY-M-D")),[f,m]=(0,s.useState)(!1),h=e=>{m(!1);let t=e||+new Date;p(v()(t).format("YYYY-M-D")),c(v()(t).format("HH")),u(v()(t).format("mm"))};return(0,s.useImperativeHandle)(t,()=>({initDate:h})),(0,s.useEffect)(()=>{let e=(0,x.A6)(v()());p(v()(e).format("YYYY-M-D")),c(v()(e).format("HH")),u(v()(e).format("mm"))},[]),(0,l.jsx)(j.b,{height:"52vh",open:n,title:"拨打时间",submit:()=>{null==r||r("-"===d?"立即拨打":"".concat((0,x.cS)(d)," ").concat(o,":").concat(i),f,v()("".concat(d," ").concat(o,":").concat(i)).valueOf()),a()},buttonFooter:"确定",close:a,content:(0,l.jsx)("div",{className:"px-[24px] pt-[16px]",children:(0,l.jsxs)("div",{className:"h-[246px] rounded-[16px] border-[1px] border-[#0000000F] border-solid",children:[(0,l.jsxs)("div",{className:"h-[48px] bg-[#00000005] flex-between app-fs-16-500 pl-[8px] pr-[24px]",children:[(0,l.jsx)("div",{className:"w-[180px] text-center",children:f?"立即拨打":(0,x.S)(d)}),(0,l.jsx)("div",{className:"w-[96px] text-center",children:f?"-":"".concat(o,":").concat(i)})]}),(0,l.jsx)(y.Z,{value:[d,o,i],className:"call-time-picker",style:{"--height":"198px","--item-font-size":"16px"},columns:[(0,x.nD)(),f?[{label:"-",value:"-"}]:"-"!==d&&(0,x.zk)("".concat(d))?(0,x.iZ)():x.GW,f?[{label:"-",value:"-"}]:"-"!==d&&(0,x.zk)("".concat(d))?(0,x.Nd)(o):x.os],onChange:e=>{let[t,n,l]=e;m("-"===t),p("".concat(t)),c("".concat(n)),u("".concat(l))}})]})})})});b.displayName="SelectCallTime";let M=e=>{let{open:t,close:n,onSelected:s}=e,{bottomHeight:a}=(0,f.mX)();return(0,l.jsx)(j.b,{hideTitle:!0,height:200+a,open:t,close:n,footer:(0,l.jsxs)("div",{onClick:n,children:[(0,l.jsx)("div",{className:"h-[8px] bg-[#F5F5F5]"}),(0,l.jsx)("div",{className:"h-[56px] flex-center app-fs-16 text-[#000000a6]",children:"取消"})]}),content:(0,l.jsx)("div",{children:Object.entries(g.Bi).map((e,t)=>{let[a,r]=e;return(0,l.jsx)("div",{className:"h-[56px] flex-center app-fs-16 text-[#000000e0] relative ".concat(0===t?"":"harf-pixel-t-border"),onClick:()=>{s(a),n()},children:r},t)})})})};var C=n(72960);let D=e=>{let{open:t,close:n,phoneNumber:a,phoneNumberEdit:r,onChange:o,onSave:c}=e,i=(0,s.useMemo)(()=>""===r.trim()||a===r,[r,a]),{bottomHeight:u}=(0,f.mX)();return(0,l.jsx)(j.b,{height:220+u,title:"本机号码",open:t,content:(0,l.jsx)("div",{className:"px-[32px]",children:(0,l.jsx)(C.Z,{maxLength:11,value:r,onChange:e=>{e.match(/^[0-9]*$/)&&o(e)},className:"form-address app-fs-16",placeholder:"请输入您的号码"})}),buttonFooter:"保存",close:n,disable:i,submit:()=>{c(r),n()}})};var _=n(23044);let O=e=>{let{name:t,selectedName:n,disable:s,onClick:a}=e,r=n===t;return(0,l.jsxs)("div",{onClick:()=>{s||null==a||a()},style:{border:r?"1px solid #4769ffa6":"1px solid #FFFFFF",backgroundColor:r?"#1876ff0f":"#0000000f"},className:"px-[10px] py-[6px] flex-center rounded-[12px] mr-[8px] mb-[8px] h-[32px]",children:[(0,l.jsx)("span",{className:"app-fs-14",style:{color:r?"#1876FF":s?"#00000040":"#000000a6"},children:t}),(0,l.jsx)(i.Z,{width:16,src:r?"/callout-lite/imgs/app/disc/arrow-blue.svg":s?"/callout-lite/imgs/app/disc/arrow-disable.svg":"/callout-lite/imgs/app/disc/arrow.svg"})]})};var R=n(32676),Y=n(15255),I=n(50195);n(76605);var Z=n(26138);let A=e=>{let{open:t,close:n,selectedScence:a,successCB:o,sceneList:c,onChangeScene:u}=e,[p,x]=(0,s.useState)("");(0,r.useRouter)();let{bottomHeight:h}=(0,f.mX)(),{loading:v,close:g}=(0,Y.r$)(),N=(0,s.useMemo)(()=>c.filter(e=>{let{sceneEnable:t}=e;return t}),[c]),E=(0,s.useMemo)(()=>c.filter(e=>{let{sceneEnable:t}=e;return!t}),[c]),T=async()=>{if(!p){R.Z.show("请输入任务描述");return}let e=a.scene||"";v();let t=await w.Hh.createTaskConfig({scene:"unknown"!==e?e:"",sentence:p});g(),n(),(0,_.J)(t,e=>{o(e)})};return(0,s.useEffect)(()=>{let e=document.getElementById("configInfoDom");e&&(e.placeholder=a.template)},[a]),(0,l.jsx)(j.b,{height:"92vh",open:t,title:(0,l.jsxs)("div",{className:"flex-center",children:[(0,l.jsx)(i.Z,{className:"mr-[4px]",width:20,src:"/callout-lite/imgs/app/disc/star.svg"}),(0,l.jsx)("span",{className:"app-fs-18 line-clamp-1",children:"AI生成任务配置"})]}),footer:null,close:()=>{if(p.length>0){(0,I.Q)({content:"关闭后将清空输入内容,确认是否关闭?",onConfirm:()=>{x(""),n()},confirmText:"关闭",cancelText:"取消"});return}n()},content:(0,l.jsxs)("div",{className:"h-full px-[24px] pt-[16px] flex-col flex-between",children:[(0,l.jsxs)("div",{className:"w-full",children:[(0,l.jsxs)("div",{className:"mb-[24px]",children:[(0,l.jsx)("span",{className:"app-fs-16-500 text-[#000000e0]",children:"场景示例:"}),(0,l.jsxs)("div",{className:"flex flex-wrap mt-[8px]",children:[N.map((e,t)=>{let{sceneName:n}=e;return(0,l.jsx)(O,{disable:!1,name:n,selectedName:null==a?void 0:a.sceneName,onClick:()=>{u(n)}},t)}),E.map((e,t)=>{let{sceneName:n}=e;return(0,l.jsx)(O,{name:n,disable:!0},t)}
1)]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"app-fs-16-500 text-[#000000e0]",children:"配置信息:"}),(0,l.jsx)("div",{className:"border-[1px] border-[#00000029] border-solid rounded-[16px] mt-[8px]",children:(0,l.jsx)(d.Z,{rows:8,maxLength:200,value:p,id:"configInfoDom",className:"app-fs-16 px-[12px] py-[8px] space-wrap",placeholder:a.template,onChange:e=>{e.length>=200&&R.Z.show("超出字数限制"),x(e)},onFocus:()=>{p.length>=200&&R.Z.show("超出字数限制")}})})]})]}),(0,l.jsxs)("div",{className:"w-full px-[8px]",children:[(0,l.jsx)(m.z,{text:"立即生成",disabled:0===p.length,onClick:T,textClassName:"text-[#ffffff]",className:"h-[48px]"}),(0,l.jsx)("div",{className:"pt-[24px]"}),(0,l.jsx)("div",{style:{paddingTop:h}})]})]})})};var k=n(76187),F=n(18795),H=n(56644),P=n.n(H);n(46557);let L=["Delete","Backspace"],G=[" ",";",";","Enter"],V=e=>{let{tags:t,onClick:n,saveTag:a,addTag:r}=e,[o,c]=(0,s.useState)(""),[u,d]=(0,s.useState)(-1),[p,f]=(0,s.useState)(!0),m=(0,s.useRef)(null),x=(0,s.useMemo)(()=>0===t.length&&""===o?p?"input-placeholder":"input-placeholder-andrio":"",[t,o,p]),h=e=>{d(e)},v=(e,n)=>{if(null==e||e.preventDefault(),L.includes(e.key)){let e=t.filter((e,t)=>t!==n);a([...e]),d(-1)}},g=()=>{o.length>0&&(r(o),c(""))},N=e=>{if(0===o.length&&L.includes(e.key)){null==e||e.preventDefault(),t.pop(),a([...t]),d(-1);return}if(0!==o.length){if(t.length>=5){R.Z.show("最多添加五个号码");return}console.log("InputKeys: ",e.key),G.includes(e.key)&&(null==e||e.preventDefault(),r(o),c(""))}};return(0,s.useEffect)(()=>{11===o.length&&(r(o),c(""))},[o]),(0,s.useEffect)(()=>{let e=Z.Z.getValueFromUa("platform");f("ios"===e)},[]),(0,l.jsx)("div",{className:"bg-[#ffffff] px-[8px] pb-[8px]",children:(0,l.jsxs)("div",{className:"task-tags-wrap",children:[(0,l.jsx)(P(
1),{ref:m,value:t,inputValue:o,className:"task-tags-input ".concat(x),inputProps:{placeholder:""},onChange:e=>{if(d(-1),e.length>=5){R.Z.show("最多添加五个号码");return}a(e)},onChangeInput:e=>{if(d(-1),t.length>=5){R.Z.show("最多添加五个号码");return}e.match(/^[0-9]{0,}$/)&&c(e)},renderTag:e=>{let{tag:t,key:n,getTagDisplayValue:s}=e;return(0,l.jsx)("span",{tabIndex:0,contentEditable:!0,className:"callto-tag-box line-clamp-1",suppressContentEditableWarning:!0,onClick:()=>{h(n)},onKeyDown:e=>{v(e,n)},style:{color:u===n?"#FFFFFF":"#555555",backgroundColor:u===n?"#1876FF":"#E7F1FD"},children:s(t)},n)},renderInput:e=>{let{onChange:t,addTag:n,value:s,...a}=e;return(0,l.jsx)("input",{type:"text",onChange:t,value:s,...a,onFocus:()=>{d(-1)},onKeyDown:N,onBlur:g})}}),(0,l.jsxs)("div",{onClick:n,className:"flex bg-[#ffffff] pt-[4px]",children:[(0,l.jsx)(i.Z,{className:"w-[20px] mr-[6px]",src:"/callout-lite/imgs/app/disc/contact.svg"}),(0,l.jsx)("span",{className:"app-fs-14-500 text-[#1B7CFC]",children:"从通讯录中添加"})]})]})})},W=new Map,K=new Map;var B=!0;function J(e){let[t,n]=(0,s.useState)(!1),[h,j]=(0,s.useState)(!1),[y,C]=(0,s.useState)(!1),[_,O]=(0,s.useState)(!1),[Y,H]=(0,s.useState)(!1),[P,L]=(0,s.useState)(-1),[G,B]=(0,s.use
1State)(-1),[J,U]=(0,s.useState)(""),[z,q]=(0,s.useState)(""),[X,Q]=(0,s.useState)(""),[$,ee]=(0,s.useState)(""),[et,en]=(0,s.useState)(!0),[el,es]=(0,s.useState)(null),[ea,er]=(0,s.useState)(""),[eo,ec]=(0,s.useState)(0),[ei,eu]=(0,s.useState)(!0),[ed,ep]=(0,s.useState)(!1),[ef,em]=(0,s.useState)(!1),[ex,eh]=(0,s.useState)([]),[ev,eg]=(0,s.useState)("自定义"),[eN,eE]=(0,s.useState)("unknown"),[eT,ew]=(0,s.useState)(""),[ej,eS]=(0,s.useState)([]),[ey,eb]=(0,s.useState)([]),eM=(0,s.useRef)([]),eC=(0,s.useRef)([]),eD=(0,s.useRef)([]),e_=(0,s.useRef)(""),eO=(0,r.useRouter)(),eR=(0,o.useTranslations)(),{topHeight:eY}=(0,f.e7)(),{bottomHeight:eI}=(0,f.mX)(),eZ=(0,s.useRef)(null),eA=(0,s.useRef)([]),ek=(0,s.useRef)(null),eF=(0,N.CG)(k.Io),eH=(0,N.CG)(k.TM),{loading:eP,close:eL}=(0,F.r)();(0,E.F)();let eG=(0,s.useMemo)(()=>{var e;let t=null===(e=ex.filter(e=>{let{sceneName:t}=e;return t===ev}))||void 0===e?void 0:e[0];return t||{}},[ev,ex]),eV=(0,s.useMemo)(()=>{var e;let t=null===(e=ex.filter(e=>{let{scene:t}=e;return t===eN}))||void 0===e?void 0:e[0];return t||{}},[eN,ex]),eW=(0,s.useMemo)(()=>{var e,t;return eH&&eH.length>0&&(null===(e=eH.filter)||void 0===e?void 0:null===(t=e.call(eH,e=>{let{id:t}=e;return t===$}))||void 0===t?void 0:t[0])||null},[$,eH]),eK=(0,s.useMemo)(()=>!X||!ea||-1===G||(!et||et&&(null==eV?void 0:eV.periodicEnable))&&-1===P||G===g.ZM.TO_ME&&!z||G===g.ZM.TO_OTHER&&0===ej.length||!$||!ef,[et,X,ea,G,eV,P,z,ej,$,ef]),eB=(0,s.useRef)({taskContent:"",callTime:"",repeatLabel:-1,callTo:-1,phoneNumber:"",tagPhones:[],selectId:""}),eJ=()=>{let e={taskContent:X,callTime:ea,repeatLabel:P,callTo:G,phoneNumber:z,tagPhones:ej,selectId:$};return G===g.ZM.TO_ME?(e.tagPhones=[],eB.current.tagPhones=[]):(e.phoneNumber="",eB.current.phoneNumber=""),console.log("newStatusMap==",e),console.log("snapshotRef.current==",eB.current),JSON.stringify(e)!==JSON.stringify(eB.current)},eU=async()=>{let{taskId:e,type:t,name:n,copy:l}=eO.query||{};if("string"!=typeof e||"add"===t){let e=window.localStorage.getItem("VOICE_ID");e&&(ee(e),eB.current={...eB.current,selectId:e}),eg("".concat(n)),en(!0),O(!0);return}en(!1);let s=!1;"string"==typeof l&&1==+l&&(ep(!0),s=!0),e_.current=e;let r=await w.Hh.getCalloutDetail({taskId:e});(0,a.J)(r,e=>{es(e);let t=e.nextCallTime||+new Date;if(!s||s&&t>+new Date){var n;let e=v()(t).format("HH"),l=v()(t).format("mm"),s="".concat((0,x.cS)(t)," ").concat(e,":").concat(l);er(s),ec(t),eu(!1),null===(n=eZ.current)||void 0===n||n.initDate(t),eB.current={...eB.current,callTime:s}}L(e.periodic||g.Py.NO_REPEAT),Q(e.content),B(e.callToType),ez(e.callToType,e.callTo),eB.current={...eB.current,taskContent:e.content,repeatLabel:e.periodic||g.Py.NO_REPEAT,callTo:e.callToType},ee(e.voiceId),eB.current={...eB.current,selectId:e.voiceId}})},ez=(e,t,n)=>{if(e===g.ZM.TO_ME){var l,s;q((null==t?void 0:null===(l=t[0])||void 0===l?void 0:l.phone)||(null==eF?void 0:eF.contactPhone)||""),eB.current={...eB.current,phoneNumber:(null==t?void 0:null===(s=t[0])||void 0===s?void 0:s.phone)||(null==eF?void 0:eF.contactPhone)||""}}else if(e===g.ZM.TO_OTHER){let e=(t||[]).map(e=>{var t;let{phone:l,contactId:s,contactName:a,name:r}=e,o=null===(t=(n||eA.current).filter(e=>e.id===s))||void 0===t?void 0:t[0];if(s&&o){let e="".concat(null==o?void 0:o.name,"(").concat(null==o?void 0:o.phoneNumber,")");return W.has(e)||W.set(e,null==o?void 0:o.id),e}return l&&a?"".concat(a,"(").concat(l,")"):l||a||r||""});eS(e.filter(e=>!!e)),eB.current={...eB.current,tagPhones:e.filter(e=>!!e)},(t||[]).forEach(e=>{let{contactId:t,phone:n}=e;t&&n&&!K.has(n)&&K.set(t,n)});let l=(t||[]).filter(e=>{let{contactId:t}=e;return!!t}).map(e=>{let{contactId:t}=e;return t||""});eC.current=[],e8(l);let s=(t||[]).filter(e=>{let{phone:t,contactId:n}=e;return!n&&!!t}).map(e=>{let{phone:t}=e;return t||""});eM.current=[],e4(s)}};(0,s.useEffect)(()=>{let{callTo:e,callToType:t}=el||{};ey.length>0&&e&&e.length>0&&t===g.ZM.TO_OTHER&&ez(t,e,ey)},[ey,el]);let eq=()=>{window.localStorage.setItem("SELECTED_CONTACT",JSON.stringify(eC.current))},eX=async()=>{let e=await w.Hh.getCalloutConfig();(0,a.J)(e,e=>{let{name:t}=e;em(!!t)})},eQ=()=>X?ea?(!et||et&&(null==eV?void 0:eV.periodicEnable))&&-1===P?(R.Z.show("请选择重复类型!"),!1):-1===G?(R.Z.show("请选择拨打对象!"),!1):G!==g.ZM.TO_ME||z?G===g.ZM.TO_OTHER&&0===ej.length?(R.Z.show("请输入拨打号码!"),!1):$?ef?!(G===g.ZM.TO_ME&&z&&(0,g.Z6)(z)||G===g.ZM.TO_OTHER&&ej.length>0&&(0,g.Z6)(ej))||(R.Z.show("禁止呼叫特殊服务号码"),!1):(R.Z.show("请设置短信签名!"),!1):(R.Z.show("请选声音!"),!1):(R.Z.show("请填写本机号码!"),!1):(R.Z.show("请选择拨打时间!"),!1):(R.Z.show("请输入任务内容!"),!1),e$=async e=>{if(!eQ())return;if(!e&&P===g.Py.NO_REPEAT&&!ei&&(0,x.Ax)(eo)){(0,I.Q)({content:"检测到您设置的拨打时间已过期,将自动以当前时间为您创建任务,是å
1¦ç¡®è®¤ç»§ç»­ï¼Ÿ",onConfirm:()=>{e$(!0)},confirmText:"ç»§ç»­",cancelText:"取消"});return}let t={scene:"unknown"!==eN?eN:"",content:X,callTime:eo||void 0,callImmediately:!!e||ei,periodic:P,callToType:G,voiceId:$,callTo:[]};if(G===g.ZM.TO_ME)t.callTo=[{phone:z}];else if(G===g.ZM.TO_OTHER){let e=eC.current.map(e=>{var t;let n=null===(t=(ey||eA.current).filter(t=>t.id===e))||void 0===t?void 0:t[0];return{contactId:e,phone:(null==n?void 0:n.phoneNumber)||K.get(e)||""}}),n=eM.current.filter(t=>!e.find(e=>e.phone===t));t.callTo=[...n.map(e=>({phone:e})),...e]}if(eP(),ed||et){t.periodic=(null==eV?void 0:eV.periodicEnable)?P:0;let e=await w.Hh.addTask(t);eL(),(0,a.J)(e,()=>{et&&window.localStorage.setItem("VOICE_ID",$),R.Z.show("保存成功!"),setTimeout(()=>{(0,a.de)(eO)},800)},(e,t)=>{e==g.Bq.CALL_TIME_ERROR?R.Z.show("您设置的拨打时间已过期,请重新设置!"):R.Z.show(t||"服务错误,请稍后重试!")},!0)}else{let e=await w.Hh.updateTask({...t,taskId:(null==el?void 0:el.id)||""});eL(),(0,a.J)(e,()=>{R.Z.show("更新成功!"),setTimeout(()=>{(0,a.de)(eO)},800)},(e,t)=>{e==g.Bq.CALL_TIME_ERROR?R.Z.show("您设置的拨打时间已过期,请重新设置!"):e==g.Bq.TASK_CALLING?R.Z.show("正在通话中,请稍后重试!"):e==g.Bq.TASK_DONE?R.Z.show("禁止修改已完成任务!"):R.Z.show(t||"服务错误,请稍后重试!")},!0)}},e0=e=>{let{scene:t,callTime:n,periodic:l,content:s,callToType:a,callTo:r,voiceId:o}=e;if(eE(t||"unknown"),n){var c;let e=n||+new Date,t=v()(e).format("HH"),l=v()(e).format("mm");er("".concat((0,x.cS)(e)," ").concat(t,":").concat(l)),ec(e),null===(c=eZ.current)||void 0===c||c.initDate(e)}else er(""),ec(0);eu(!1),L(l||g.Py.NO_REPEAT),Q(s||""),B(a||-1),ee(o||""),null!=a&&ez(a,r||[])},e1=async()=>{let e=await w.Hh.getCalloutScene();(0,a.J)(e,e=>{let t=[...e,g.Dg];eh(t.map((e,t)=>({...e,id:"_".concat(t)})))})},e2=()=>{let e=window.localStorage.getItem("selectVoice");if(e){let t=Z.Z.safeParse(e);ee(t.id),ew(t.name),window.localStorage.removeItem("selectVoice")}},e6=async()=>{var e;let t=window.localStorage.getItem("MESSAGE_LISTS");if(!t)return;let n=JSON.parse(t);if(window.localStorage.removeItem("MESSAGE_LISTS"),!Array.isArray(n)||(null==n?void 0:n.length)===0)return;eP();let l=(null===(e=ek.current)||void 0===e?void 0:e.scene)||"",s=await w.Hh.createTaskConfig({scene:"unknown"!==l?l:"",dialog:n});eL(),O(!1),(0,a.J)(s,e=>{e0(e)})};(0,s.useEffect)(()=>{eD.current=ej},[ej]);let e5=async()=>{let e=window.localStorage.getItem("contactLists");if(e){window.localStorage.removeItem("contactLists");let t=Z.Z.safeParse(e);if(t.length+eD.current.length>5){R.Z.show("最多添加五个号码,请重新选择!");return}let n=t.map(e=>{var t;let n=null===(t=eA.current.filter(t=>{let{id:n}=t;return n===e}))||void 0===t?void 0:t[0],l="".concat(null==n?void 0:n.name,"(").concat(null==n?void 0:n.phoneNumber,")");return W.has(l)||W.set(l,e),l});eS(e=>[...e,...n]),e8(t)}},e8=e=>{e&&e.length>0&&(eC.current=[...new Set([...eC.current,...e])])},e4=e=>{e&&e.length>0&&(eM.current=[...new Set([...eM.current,...e])])},e7=e=>{if(Array.isArray(e)){let t=[],n=[];e.forEach(e=>{W.has(e)?n.push(W.get(e)):t.push(e)}),eC.current=[...new Set(n)],eM.current=[...new Set(t)]}},e9=async()=>{let e=await w.o4.getUserContactList();(0,a.J)(e,e=>{eA.current=e,eb(e)})},e3=async()=>{let e=await w.Hh.deleteTaskById({taskId:e_.current});(0,a.J)(e,()=>{R.Z.show("删除成功!"),setTimeout(()=>{(0,a.de)(eO,2)},800)},(e,t)=>{e==g.Bq.TASK_CALLING?R.Z.show("正在通话中,请稍后重试!"):R.Z.show(t||"服务错误,请稍后重试!")},!0)};return(0,s.useEffect)(()=>{eX(),e1(),e9()},[]),(0,s.useEffect)(()=>{(null==eF?void 0:eF.contactPhone)&&q(null==eF?void 0:eF.contactPhone)},[null==eF?void 0:eF.contactPhone]),(0,T.o)(eU),(0,s.useEffect)(()=>{(0,a.RM)("pageShouldRefreshOnFocus",{shouldRefresh:!0,becomeActive:!1}),(0,a.Pk)("getData",()=>{e2(),eX(),e6(),e5()})},[]),(0,s.useEffect)(()=>{ek.current=eG},[eG]),(0,l.jsx)(c.L,{goBack:()=>{if(eJ()){(0,I.Q)({content:eR("give_up_edit"),onConfirm:()=>{(0,a.de)(eO)},confirmText:eR("give_up"),cancelText:eR("cancel")});return}(0,a.de)(eO)},bgColor:"bg-[#F2F4FA]",title:ed?"创建任务":et?"创建任务":"编辑任务",right:et||ed?(0,l.jsxs)("div",{onClick:()=>{O(!0)},className:"flex-center ai-create flex-center",children:[(0,l.jsx)(i.Z,{className:"w-[16px] mr-[4px]",src:"/callout-lite/imgs/app/disc/star.svg"}),(0,l.jsx)("span",{className:"gradient-text",children:"AI生成"})]}):(0,l.jsx)(i.Z,{onClick:()=>
1{if((null==el?void 0:el.status)===g.Tp.DOING_STARTING){R.Z.show(g.AD[(null==el?void 0:el.status)||g.Tp.DOING_STARTING]);return}(0,I.Q)({content:g.AD[(null==el?void 0:el.status)||g.Tp.NO_START],onConfirm:()=>{e3()},confirmText:"确定",cancelText:"取消"})},className:"w-[24px] h-[24px] ml-[12px] mt-[-2px]",src:"/callout-lite/imgs/app/disc/disc-delete.png"}),children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col",style:{height:"calc(100% - ".concat(eY,"px)")},children:[(0,l.jsxs)("div",{className:"flex-1 px-[16px] pt-[16px] overflow-x-hidden overflow-y-auto",children:[(0,l.jsxs)("div",{className:"py-[16px] px-[20px] bg-[#FFFFFF] rounded-[20px]",children:[(0,l.jsx)("div",{className:"mb-[8px] app-fs-16-500",children:"任务内容"}),(0,l.jsx)(d.Z,{rows:4,maxLength:200,style:u.ZD,value:X,onChange:e=>{e.length>=200&&R.Z.show("超出字数限制"),Q(e)},placeholder:"简单描述下你想创建的呼叫任务:拨打时间、拨打对象、需要Agent传达主要内容等",onFocus:()=>{X.length>=200&&R.Z.show("超出字数限制")}})]}),(0,l.jsxs)("div",{className:"rounded-[20px] mt-[16px] overflow-hidden",children:[(0,l.jsx)(p.H,{showLine:!0,maxWidth:150,titleWeight:500,title:"拨打时间",desc:ea||"请选择",onClick:()=>{n(!0)},textColor:ea?(0,x.zk)(eo)?"#FE5101":void 0:"#1876FF"}),ea&&(!et||et&&(null==eV?void 0:eV.periodicEnable))&&(0,l.jsx)(p.H,{title:"重复",titleWeight:500,onClick:()=>{j(!0)},textColor:-1===P?"#1876FF":void 0,desc:g.mM[P]||"请选择"})]}),P>g.Py.NO_REPEAT&&(eo>0||ei)&&(0,l.jsxs)("div",{className:"flex items-start mt-[12px] px-[8px]",children:[(0,l.jsx)(i.Z,{className:"mt-[2px]",width:12,src:"/callout-lite/imgs/app/instruction.svg"}),(0,l.jsxs)("span",{className:"text-[#00000073] ml-[6px] app-fs-12",children:["提醒通知类任务一个月内有效,有效期至",(0,x.rh)(eo||+new Date,1)]})]}),(0,l.jsxs)("div",{className:"rounded-[20px] mt-[16px] overflow-hidden",children:[(0,l.jsx)(p.H,{showLine:!0,title:"拨打对象",titleWeight:500,onClick:()=>{C(!0)},textColor:-1===G?"#1876FF":void 0,desc:G>-1?g.Bi[G]:"请选择"}),G>-1?G===g.ZM.TO_ME?(0,l.jsx)(p.H,{title:"本机号码",titleWeight:500,desc:z||"请填写",textColor:z?void 0:"#1876FF",onClick:()=>{H(!0),U(z)}}):(0,l.jsx)(V,{tags:ej,saveTag:e=>{eS(e),e7(e)},addTag:e=>{let t=eC.current.map(e=>{var t;let n=null===(t=(ey||eA.current).filter(t=>t.id===e))||void 0===t?void 0:t[0];return(null==n?void 0:n.phoneNumber)||""}),n=[...new Set([...eM.current,...t])];if(n.includes(e)){R.Z.show("号码已存在");return}eS(t=>[...t,e]),e4([e])},onClick:()=>{eq(),setTimeout(()=>{(0,a.eb)(eO,"/app/select_number")},300)}}):(0,l.jsx)(l.Fragment,{})]}),(0,l.jsxs)("div",{className:"rounded-[20px] mt-[16px] overflow-hidden",children:[(0,l.jsx)(p.H,{showLine:!0,titleWeight:500,title:"声音",textColor:eT||$?void 0:"#1876FF",desc:eT||$&&(null==eW?void 0:eW.name)||"请选择",onClick:()=>{(0,a.eb)(eO,"/app/voice_list",{voiceId:$})}}),(0,l.jsx)(p.H,{title:"签名设置",titleWeight:500,onClick:()=>{(0,a.eb)(eO,"/app/discovery/msg_setting")},textColor:ef?void 0:"#00000040",desc:ef?"已设置":"未设置"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"flex-center py-[8px] px-[16px]",children:(0,l.jsx)(m.z,{text:"保存",disabled:eK||!et&&!eJ(),onClick:()=>{e$()},textClassName:"text-[#ffffff]",className:"flex-1 h-[48px]"})}),(0,l.jsx)("div",{style:{paddingTop:eI}})]})]}),(0,l.jsx)(b,{ref:eZ,open:t,close:()=>{n(!1)}
1,onSubmit:(e,t,n)=>{er(e),eu(t),ec(n),-1===P&&L(g.Py.NO_REPEAT)}}),(0,l.jsx)(S,{open:h,close:()=>{j(!1)},onSelected:e=>{L(+e)}}),(0,l.jsx)(M,{open:y,close:()=>{C(!1)},onSelected:e=>{B(+e)}}),(0,l.jsx)(D,{open:Y,phoneNumber:z,phoneNumberEdit:J,close:()=>{H(!1)},onChange:e=>U(e),onSave:e=>q(e)}),(0,l.jsx)(A,{sceneList:ex,open:_,selectedScence:eG,onChangeScene:e=>{eg(e)},successCB:e0,close:()=>{O(!1)}})]})})}}},function(e){e.O(0,[3120,8102,6808,4816,2576,9774,2888,179],function(){return e(e.s=18617)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.