You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/static/js/async/3334.920f224d.js

3 lines
183 KiB

/*! For license information please see 3334.920f224d.js.LICENSE.txt */
(self.webpackChunk_coze_studio_app=self.webpackChunk_coze_studio_app||[]).push([["3334"],{49695:function(e,t,n){"use strict";var l=n(455069),o=n(805366);let r=(0,o.A)(function(e){return l.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},e),l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23 12a11 11 0 1 1-22 0 11 11 0 0 1 22 0Zm-9.5 5.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0ZM12 5a1.9 1.9 0 0 0-1.89 2l.3 5.5a1.59 1.59 0 0 0 3.17 0l.3-5.5c.07-1.09-.8-2-1.88-2Z",fill:"currentColor"}))},"alert_circle");t.Z=r},815651:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,l=Object.defineProperty,o=Object.getOwnPropertyDescriptor,r=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},i=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var l,o=t.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!r)return!1;for(l in e);return void 0===l||t.call(e,l)},a=function(e,t){l&&"__proto__"===t.name?l(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,l,o,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(t=arguments[p],null!=t)for(n in t)l=s(d,n),d!==(o=s(t,n))&&(h&&o&&(i(o)||(c=r(o)))?(c?(c=!1,u=l&&r(l)?l:[]):u=l&&i(l)?l:{},a(d,{name:n,newValue:e(h,u,o)})):void 0!==o&&a(d,{name:n,newValue:o}));return d}},377996:function(e){e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},578419:function(e,t,n){var l=n(323086);function o(e,t){var n,o,r,i=null;if(!e||"string"!=typeof e)return i;for(var a=l(e),s="function"==typeof t,c=0,u=a.length;c<u;c++)o=(n=a[c]).property,r=n.value,s?t(o,r,n):r&&(i||(i={}),i[o]=r);return i}e.exports=o,e.exports.default=o},988179:function(e,t,n){"use strict";n.d(t,{iN:()=>_,zb:()=>M,A7:()=>K,Pj:()=>Y,B5:()=>q});var l=n("808549"),o=n("151064"),r=n("455069"),i=n("354428"),a=n("336205"),s=n("659596"),c=n("775699"),u=n("486613"),d=n("479886"),p=n.n(d),f=n("287487"),h=n("388993"),m=n("707107"),g=n("214942"),v=n("178385");function _(e,t){var{botId:n}=h.G.getState(),o=f.Z.getUserInfo(),{space:{id:r,space_type:i}}=g.rY.getState(),a=i===v.Sn.Personal,s=Date.now();(0,m.Gg)(e,(0,l._)({user_id:null==o?void 0:o.user_id_str,timestamp:s,bot_id:n,workspace_id:r,workspace_type:a?"personal_workspace":"team_workspace"},t))}var b=e=>{try{if(!e)return e;var t=e.match(/timestamp:"(\d{10,13})"/);if(t){var n=null==t?void 0:t[1],l="YYYY-MM-DD HH:mm:ss",o="".concat(n).length;if(10===o)return'"'.concat(p().unix(Number(n)).format(l),'"');if(13===o)return'"'.concat(p()(Number(n)).format(l),'"')}return e}catch(t){return e}},x=n("157728"),y=()=>{var e=(0,x.useParams)(),t=e.space_id||"",n=e.bot_id||"";return{sendViewDiffEvent:()=>{(0,m.Gg)(m.Kg.bot_diff_viewdetail,{workspace_id:t,bot_id:n})},sendManualMergeEvent:e=>{(0,m.Gg)(m.Kg.bot_merge_manual,{workspace_id:t,bot_id:n,submit_or_not:e})}}},j=n("407821"),k=n.n(j),w=n("472772"),C=n.n(w),N=n("395245"),P=n.n(N),S=n("297998"),T=n.n(S),z=n("646576"),I=n.n(z),O=n("606121"),E=n.n(O),A=n("367689"),L={};L.styleTagTransform=E(),L.setAttributes=T(),L.insert=P().bind(null,"head"),L.domAPI=C(),L.insertStyleElement=I(),k()(A.Z,L);var D=A.Z&&A.Z.locals?A.Z.locals:void 0,R=e=>{try{return JSON.parse(e)}catch(e){return""}},M=e=>{var t,{left:n,right:r,node:i}=e;if((null==i?void 0:null===(t=i.diff_res)||void 0===t?void 0:t.diff_style)===u.jY.TextDetail)return(0,o.jsx)(Z,(0,l._)({},e));var a=b(n),s=b(r),d=null==a?void 0:a.includes("template_NewLine"),p=e=>(0,o.jsx)(c.ZT.Text,{className:D["multiline-text"],type:"secondary",size:"small",children:e.replaceAll("template_NewLine","\n")});return d?(0,o.jsxs)(c.ZT.Text,{className:D["multiline-container"],type:"secondary",size:"small",children:[p(null!=a?a:""),(0,o.jsx)(c.ZT.Text,{className:"mx-2",type:"secondary",size:"small",children:"->"}),p(null!=s?s:"")]}):(0,o.jsx)(c.ZT.Text,{type:"secondary",size:"small",ellipsis:{showTooltip:{opts:{content:"".concat(a," -> ").concat(s),style:{wordBreak:"break-word"}}}},children:"".concat(a," -> ").concat(s)})},Z=e=>{var t,n,l,u,{node:d,type:p="diff"}=e,f="diff"===p,[h,m]=(0,r.useState)(!1),{sendViewDiffEvent:g}=y(),v=R(null===(t=R(null==d?void 0:null===(n=d.diff_res)||void 0===n?void 0:n.origin_left))||void 0===t?void 0:t.OriginStr),_=R(null===(l=R(null==d?void 0:null===(u=d.diff_res)||void 0===u?void 0:u.origin_right))||void 0===l?void 0:l.OriginStr);return(0,o.jsxs)("div",{children:[(0,o.jsx)(c.ZT.Text,{link:!0,onClick:()=>{m(!0),g()},className:"text-xs",children:a.o.t("coze_bot_diff_btn_view_diff")}),(0,o.jsx)(s.u_,{visible:h,title:(0,o.jsx)("div",{className:"flex gap-1 items-center",children:a.o.t("coze_bot_diff_diffdetail_pagetitle")}),footer:null,width:1e3,onCancel:()=>{m(!1)},children:(0,o.jsxs)("div",{className:D["editor-container"],children:[(0,o.jsxs)("div",{className:D["editor-header"],children:[(0,o.jsx)("div",{className:D["editor-title"],children:a.o.t(f?"coze_bot_diff_diffdetail_latestversion":"coze_bot_diff_diffdetail_onlineversion")}),(0,o.jsx)(c.iz,{className:D["editor-divider"],layout:"vertical"}),(0,o.jsx)("div",{className:D["editor-title"],children:a.o.t(f?"coze_bot_diff_diffdetail_mydraft":"coze_bot_diff_diffdetail_tobereleasedversion")})]}),(0,o.jsx)("div",{className:"h-[600px]",children:(0,o.jsx)(i.DiffEditor,{theme:"light",className:D.editor,original:v,modified:_,language:"text",options:{minimap:{enabled:!1},wordWrap:"on",diffWordWrap:"on",lineNumbers:"on",readOnly:!0,scrollBeyondLastLine:!1,renderOverviewRuler:!1,enableSplitViewResizing:!1,unicodeHighlight:{ambiguousCharacters:!1},suggestLineHeight:32,lineHeight:20,fontSize:12},loading:(0,o.jsx)("div",{className:"h-[100%] w-[100%] flex items-center justify-center",children:(0,o.jsx)(c.yC,{})})})})]})})]})},B=n("252237"),U=n.n(B),F=n("675940"),V={};V.styleTagTransform=E(),V.setAttributes=T(),V.insert=P().bind(null,"head"),V.domAPI=C(),V.insertStyleElement=I(),k()(F.Z,V);var H=F.Z&&F.Z.locals?F.Z.locals:void 0,W=e=>{var{dataSource:t}=e,[n,l]=(0,r.useState)(!1),i=()=>{l(!1)};return{node:(0,o.jsx)(c.M5,{type:"info",title:a.o.t("publish_terms_title"),visible:n,centered:!0,footer:(0,o.jsx)(c.y3,{onClick:i,theme:"solid",children:a.o.t("got_it")}),onCancel:i,children:(0,o.jsx)(c.aV,{dataSource:t,renderItem:e=>(0,o.jsx)(c.aV.Item,{className:H.list,align:"center",header:(0,o.jsxs)("div",{className:"flex items-center w-full",children:[(0,o.jsx)(c.Ee,{className:"border-1",src:e.icon,width:24,height:24,preview:!1,style:{flexShrink:0}}),(0,o.jsx)(c.ZT.Text,{className:"ml-2 font-semibold ",style:{minWidth:90},ellipsis:{showTooltip:{opts:{content:e.name}}},children:e.name})]}),main:(0,o.jsxs)(c.T,{spacing:0,className:"justify-end",children:[e.privacy_policy?(0,o.jsx)(c.y3,{theme:"borderless",className:"!px-2",children:(0,o.jsx)(c.ZT.Text,{link:{href:e.privacy_policy,target:"_blank"},children:a.o.t("about_privacy_policy")})}):null,e.user_agreement?(0,o.jsx)(c.y3,{theme:"borderless",className:"!px-2",children:(0,o.jsx)(c.ZT.Text,{link:{href:e.user_agreement,target:"_blank"},children:a.o.t("terms_of_service")})}):null]})})})}),close:i,open:()=>{l(!0)}}},q=e=>{var{termServiceData:t,scene:n="bot",className:l}=e,{node:r,open:i}=W({dataSource:t});return(0,o.jsxs)(o.Fragment,{children:[r,(0,o.jsx)(s.ZT.Text,{className:U()("py-[12px] coz-fg-primary leading-[16px]",l),children:a.o.t("bot"===n?"bot_publish_select_desc_compliance_new":"project_publish_select_desc_compliance_new",{publish_terms_title:(0,o.jsx)(s.ZT.Text,{link:!0,onClick:i,className:"!coz-fg-hglt !font-normal",children:a.o.t("publish_terms_title")})})})]})},K=20,Y=8},601477:function(e,t,n){"use strict";n.d(t,{S:function(){return f}});var l=n(808549),o=n(120454),r=n(151064),i=n(336205),a=n(659596),s=n(707107),c=n(775699),u=n(178385),d=n(49695),p=n(150500),f=e=>{var{status:t,id:n,agentType:f="bot",channelName:h,revokeSuccess:m,origin:g,authInfo:v,isMouseIn:_=!0,isV2:b=!1,v2ButtonProps:x={color:"highlight",size:"small"},onBeforeAuthRedirect:y}=e,j=[u._6.Configured,u._6.Configuring].includes(t),k=()=>{if(!(0,p.Tn)(v)){(0,p.ci)();return}("publish"===g&&t===u._6.NotConfigured||"setting"===g&&t===u.tD.Unauthorized)&&((0,s.Gg)("publish"===g?s.Kg.publish_oauth_button_click:s.Kg.settings_oauth_button_click,{action:"授权",channel_name:h}),null==y||y({id:n,authInfo:v,origin:g}),(0,p.OF)({id:n,authInfo:v,origin:g})),("publish"===g&&j||"setting"===g&&t===u.tD.Authorized)&&((0,s.Gg)("publish"===g?s.Kg.publish_oauth_button_click:s.Kg.settings_oauth_button_click,{action:"解除授权",channel_name:h}),N())},{revokeLoading:w,runRevoke:C}=(0,p.To)({id:n,onRevokeSuccess:m,onRevokeFinally:()=>P()}),{open:N,close:P,modal:S,visible:T}=(0,c.q0)({confirmLoading:w,type:"info",title:i.o.t("user_revoke_authorization_title"),onOk:C,okText:i.o.t("Confirm"),cancelText:i.o.t("Cancel"),icon:(0,r.jsx)(d.Z,{style:{color:"var(--semi-color-danger)"},size:"extra-large"}),onCancel:()=>{P()},okButtonProps:{type:"danger"}}),z=i.o.t(j?"bot_publish_columns_action_revoke_authorize":"bot_publish_columns_action_authorize"),I=b?(0,r.jsx)(a.zx,(0,o._)((0,l._)({onClick:k},x),{children:z})):(0,r.jsx)(c.y3,{onClick:k,theme:"borderless",children:z});return t===u._6.Configured?(0,r.jsxs)(r.Fragment,{children:[_||T?I:null,S("project"===f?(0,r.jsx)(c.ZT.Text,{type:"secondary",children:i.o.t("project_release_cancel1_desc")}):null)]}):I}},493278:function(e,t,n){"use strict";n.d(t,{T:function(){return p}});var l=n(151064),o=n(336205),r=n(775699),i=n(486613),a=n(988179),s=n(561641),c=n(269087),u=n(841622),d={[i.sv.Add]:"devops_publish_multibranch_changeset_add",[i.sv.Delete]:"devops_publish_multibranch_changeset_delete",[i.sv.Modify]:"devops_publish_multibranch_changeset_modify",[i.sv.Remove]:"devops_publish_multibranch_changeset_remove"},p=e=>{var{diffData:t,hasError:n}=e;return(0,l.jsx)("div",{className:u.Z.container,children:(null==t?void 0:t.length)>0?t.map(e=>{var t;return(0,l.jsxs)("div",{className:u.Z["info-block"],children:[(0,l.jsx)("div",{className:u.Z["info-title"],children:e.display_name}),(null==e?void 0:null===(t=e.sub_nodes)||void 0===t?void 0:t.length)?(0,l.jsx)(f,{blockDiffData:e.sub_nodes}):null]},e.display_name)}):(0,l.jsxs)("div",{className:u.Z["empty-container"],children:[(0,l.jsx)("img",{src:c.Z}),(0,l.jsx)(r.ZT.Text,{className:u.Z["empty-info"],children:o.o.t(n?"devops_publish_multibranch_NetworkError":"devops_publish_multibranch_nodiff")})]})})},f=e=>{var{blockDiffData:t}=e,n=[{title:o.o.t("devops_publish_multibranch_property"),width:280,render:e=>(0,l.jsxs)(r.ZT.Text,{ellipsis:{showTooltip:{opts:{content:e.display_name,className:u.Z["property-tooltip"]}}},className:u.Z["cell-span"],children:[e.level>0?(0,l.jsx)(r.ZT.Text,{style:{marginLeft:a.Pj+a.A7*(e.level-1),marginRight:8},children:"-"}):null,e.display_name]})},{title:o.o.t("devops_publish_multibranch_changetype"),render:e=>{var t;return e.diff_res&&(null===(t=e.diff_res)||void 0===t?void 0:t.action)!==i.sv.Unknown?(0,l.jsx)(r.fS,{className:u.Z["tag-".concat(e.diff_res.action)],children:o.o.t(d[e.diff_res.action])}):""},width:120},{title:o.o.t("devops_publish_multibranch_changes"),render:e=>{var t,n,o;return(null==e?void 0:null===(t=e.diff_res)||void 0===t?void 0:t.action)===i.sv.Modify?(0,l.jsx)(a.zb,{node:e,left:(null==e?void 0:null===(n=e.diff_res)||void 0===n?void 0:n.display_left)||"",right:(null==e?void 0:null===(o=e.diff_res)||void 0===o?void 0:o.display_right)||""}):""},ellipsis:!0}];return t?(0,l.jsx)(r.iA,{dataSource:(0,s.pX)(t),columns:n,pagination:!1,onRow:()=>({className:u.Z["table-row"]}),className:u.Z["diff-table"]}):null}},714393:function(e,t,n){"use strict";n.d(t,{LH:function(){return p}});var l=n(151064),o=n(336205),r=n(775699),i=n(486613),a=n(988179),s=n(561641),c=n(269087),u=n(841622),d={[i.sv.Add]:"devops_publish_multibranch_changeset_add",[i.sv.Delete]:"devops_publish_multibranch_changeset_delete",[i.sv.Modify]:"devops_publish_multibranch_changeset_modify",[i.sv.Remove]:"devops_publish_multibranch_changeset_remove"},p=e=>{var{diffData:t,hasError:n,type:i="diff"}=e;return(0,l.jsxs)("div",{className:u.Z.container,children:[(null==t?void 0:t.length)>0?t.map(e=>{var t,n;return(0,l.jsxs)("div",{className:u.Z["info-block"],children:[(0,l.jsx)("div",{className:u.Z["info-title"],children:e.display_name}),(null==e?void 0:null===(t=e.sub_nodes)||void 0===t?void 0:t.length)?null==e?void 0:null===(n=e.sub_nodes)||void 0===n?void 0:n.map((e,t)=>(0,l.jsx)(f,{node:e,type:i},t)):null]},e.display_name)}):(0,l.jsxs)("div",{className:u.Z["empty-container"],children:[(0,l.jsx)("img",{src:c.Z}),(0,l.jsx)(r.ZT.Text,{className:u.Z["empty-info"],children:o.o.t(n?"devops_publish_multibranch_NetworkError":"devops_publish_multibranch_nodiff")})]}),(0,l.jsx)("div",{className:"h-[32px]"}),(0,l.jsx)("div",{className:u.Z.mask})]})},f=e=>{var t,{node:n,type:o="diff"}=e,{display_name:r}=n;return(0,l.jsxs)("div",{children:[r?(0,l.jsx)("div",{className:u.Z["info-subtitle"],children:r}):(0,l.jsx)(l.Fragment,{}),(null==n?void 0:null===(t=n.sub_nodes)||void 0===t?void 0:t.length)?(0,l.jsx)(h,{blockDiffData:null==n?void 0:n.sub_nodes,type:o}):null]})},h=e=>{var{blockDiffData:t,type:n="diff"}=e;if(!t)return null;var c=e=>(0,l.jsxs)(r.ZT.Text,{ellipsis:{showTooltip:{opts:{content:e.display_name,className:u.Z["property-tooltip"]}}},className:u.Z["property-title"],children:[e.level>0?(0,l.jsx)(r.ZT.Text,{style:{marginLeft:a.Pj+a.A7*(e.level-1),marginRight:8},children:"-"}):null,e.display_name]}),p=e=>{var t;return e.diff_res&&(null===(t=e.diff_res)||void 0===t?void 0:t.action)!==i.sv.Unknown?(0,l.jsx)(r.fS,{className:u.Z["tag-".concat(e.diff_res.action)],children:o.o.t(d[e.diff_res.action])}):""},f=e=>{var t,o,r;return(null==e?void 0:null===(t=e.diff_res)||void 0===t?void 0:t.action)===i.sv.Modify?(0,l.jsx)(a.zb,{left:(null==e?void 0:null===(o=e.diff_res)||void 0===o?void 0:o.display_left)||"",right:(null==e?void 0:null===(r=e.diff_res)||void 0===r?void 0:r.display_right)||"",node:e,type:n}):""};return(0,l.jsx)(r.aV,{dataSource:(0,s.pX)(t),bordered:!0,className:u.Z.list,renderItem:e=>(0,l.jsx)(r.aV.Item,{children:(0,l.jsxs)("div",{className:u.Z["list-item"],children:[c(e),(0,l.jsxs)("div",{children:[" ",p(e)]}),f(e)]})})})}},243238:function(e,t,n){"use strict";n.d(t,{S:()=>ea,O:()=>eb});var l,o=n("151064"),r=n("336205"),i=n("659596"),a=n("775699"),s=n("178385"),c=n("157728"),u=n("825955"),d=n("808549"),p=n("120454"),f=n("455069"),h=n("735114"),m=n("499283");var g=((l={})[l.NotQuery=0]="NotQuery",l[l.GetBindConnectorConfig=1]="GetBindConnectorConfig",l[l.SaveBindConnectorConfig=2]="SaveBindConnectorConfig",l[l.BindConnector=3]="BindConnector",l[l.UnBindConnector=4]="UnBindConnector",l),v=n("382534"),_=n("39663"),b=n("978028"),x=n("475759"),y=e=>{var t,n,l,o,r,i,{botId:a,origin:s="bot",schemaPages:d,onNextStepSuccess:p,onNextStepError:m}=e,[_,b]=(0,f.useState)(0),{space_id:x=""}=(0,c.useParams)(),y="bot"===s?0:1,j=null!==(i=null==d?void 0:null===(r=d[_])||void 0===r?void 0:r.api_action)&&void 0!==i?i:g.BindConnector;var k={[g.NotQuery]:(0,u._)(function*(){return yield Promise.resolve()}),[g.GetBindConnectorConfig]:(t=(0,u._)(function*(e){var t,n;return yield v.nA.GetBindConnectorConfig({connector_id:null!==(t=null==e?void 0:e.connectorId)&&void 0!==t?t:"",detail:null!==(n=null==e?void 0:e.assignFormValue)&&void 0!==n?n:{},agent_type:y,bot_id:a,space_id:x})}),function(e){return t.apply(this,arguments)}),[g.SaveBindConnectorConfig]:(n=(0,u._)(function*(e){var t,n;return yield v.nA.SaveBindConnectorConfig({connector_id:null!==(t=null==e?void 0:e.connectorId)&&void 0!==t?t:"",detail:null!==(n=null==e?void 0:e.assignFormValue)&&void 0!==n?n:{},agent_type:y,bot_id:a,space_id:x})}),function(e){return n.apply(this,arguments)}),[g.BindConnector]:(l=(0,u._)(function*(e){var t,n;return yield v.nA.BindConnector({connector_id:null!==(t=null==e?void 0:e.connectorId)&&void 0!==t?t:"",connector_info:null!==(n=null==e?void 0:e.assignFormValue)&&void 0!==n?n:{},agent_type:y,bot_id:a,space_id:x},{__disableErrorToast:!0})}),function(e){return l.apply(this,arguments)})};var{run:w,loading:C}=(0,h.Z)((o=(0,u._)(function*(e){return yield k[j](e)}),function(e){return o.apply(this,arguments)}),{manual:!0,ready:Object.keys(k).includes(String(j)),onSuccess:e=>{null==p||p({data:e,action:j})},onError:e=>{m(e)}});return{run:w,loading:C,step:_,setStep:b}},j=n("484782"),k=n("407821"),w=n.n(k),C=n("472772"),N=n.n(C),P=n("395245"),S=n.n(P),T=n("297998"),z=n.n(T),I=n("646576"),O=n.n(I),E=n("606121"),A=n.n(E),L=n("642801"),D={};D.styleTagTransform=A(),D.setAttributes=z(),D.insert=S().bind(null,"head"),D.domAPI=N(),D.insertStyleElement=O(),w()(L.Z,D);var R=L.Z&&L.Z.locals?L.Z.locals:void 0,M=e=>{var t,{copyLinkAreaInfo:n={},agentType:l="bot",botId:r="",initValue:i={}}=e,s=e=>{var t=null!=e?e:"";return t&&(t=(t="project"===l?t.replace(/{project_id}/g,r):t.replace(/{bot_id}/g,r)).replace(/{hostname}/g,window.location.hostname).replace(/{corp_id}/g,i.corp_id)),t};return(0,o.jsxs)("div",{className:R["link-area"],children:[(null==n?void 0:n.title_text)?(0,o.jsxs)(a.T,{spacing:12,align:"start",children:[(0,o.jsx)("span",{className:R["step-order"],children:n.step_order||1}),(0,o.jsx)("div",{className:R["step-content"],children:(0,o.jsx)("div",{className:R["step-title"],children:n.title_text})})]}):null,(null==n?void 0:n.description)?(0,o.jsx)(j.D,{skipHtml:!0,className:R.markdown,children:n.description}):null,(null==n?void 0:null===(t=n.link_list)||void 0===t?void 0:t.length)?(0,o.jsx)("div",{className:R["link-list"],children:null==n?void 0:n.link_list.map(e=>(0,o.jsxs)("div",{style:{marginBottom:32},children:[(0,o.jsx)(a.ZT.Title,{className:R.title,children:e.title}),(0,o.jsx)(a.ZT.Text,{className:R.link,copyable:!0,children:s(e.link)})]},e.link))}):null]})},Z=n("783915"),B={};B.styleTagTransform=A(),B.setAttributes=z(),B.insert=S().bind(null,"head"),B.domAPI=N(),B.insertStyleElement=O(),w()(Z.Z,B);var U=Z.Z&&Z.Z.locals?Z.Z.locals:void 0,F=e=>{var{connectorConfigInfo:t={}}=e;return(0,o.jsxs)("div",{className:U.guide,children:[(null==t?void 0:t.start_text)?(0,o.jsx)(j.D,{skipHtml:!0,linkTarget:"_blank",className:U.markdown,children:null==t?void 0:t.start_text}):null,(null==t?void 0:t.guide_link_url)&&(null==t?void 0:t.guide_link_text)?(0,o.jsx)("div",{children:(0,o.jsx)(a.ZT.Text,{link:{href:null==t?void 0:t.guide_link_url},className:U["config-link"],children:null==t?void 0:t.guide_link_text})}):null]})},V=n("61279"),H=n("297158"),W=n("873183"),q=n("298203"),K=n("293758"),Y={};Y.styleTagTransform=A(),Y.setAttributes=z(),Y.insert=S().bind(null,"head"),Y.domAPI=N(),Y.insertStyleElement=O(),w()(K.Z,Y);var Q=K.Z&&K.Z.locals?K.Z.locals:void 0,G=e=>{var{formItemSchema:t,isReadOnly:n,initValue:l}=e,s=null==l?void 0:l[t.name];if(n){;return(0,o.jsxs)("div",{className:Q["disable-field"],children:[(0,o.jsx)("div",{className:Q.title,children:t.title}),"array"===t.type?(0,o.jsx)(i.QS,{tagList:(u=s,p=t.enums,(f=(0,q.f5)(u))?f.map(e=>{var t,n;return{children:null!==(n=null==p?void 0:null===(t=p.find(t=>t.value===e))||void 0===t?void 0:t.label)&&void 0!==n?n:e}}):[])}):(0,o.jsx)(a.ZT.Text,{style:{width:"100%"},ellipsis:{showTooltip:{opts:{content:s,style:{wordBreak:"break-word"}}}},children:s})]})}function c(e){var t,n,l=(null!==(t=e.rules)&&void 0!==t?t:[]).map(t=>{var n=t.message?r.o.t(t.message,{field:e.name}):void 0;return(0,d._)({},t,n&&{message:n})});return l.push({required:e.required,message:r.o.t("bot_publish_field_placeholder",{field:null!==(n=e.title)&&void 0!==n?n:""})}),l}if(!t.name)return null;switch(t.component){case"Input":if("array"===t.type){var u,p,f,h,m=[];try{m=JSON.parse(s)}catch(e){H.kg.error({error:e}),m=[]}return!m.length&&m.push(""),(0,o.jsx)(i.OF,{field:t.name,initValue:m,children:e=>{var{arrayFields:n,add:l}=e;return(0,o.jsxs)(o.Fragment,{children:[n.map((e,l)=>{var i,{key:s,field:u,remove:d}=e;return(0,o.jsx)(a.K9,{placeholder:r.o.t("bot_publish_field_placeholder",{field:null!==(i=t.title)&&void 0!==i?i:""}),field:u,label:t.title,noLabel:l>0,required:t.required,rules:c(t),fieldClassName:Q.input,suffix:n.length<=1?null:(0,o.jsx)(W.dVD,{onClick:d})},s)}),(0,o.jsx)(i.zx,{className:Q["link-button"],color:"highlight",size:"small",icon:(0,o.jsx)(W.PwN,{}),onClick:l,children:r.o.t("binding_add_card")})]})}})}return(0,o.jsx)(a.K9,{placeholder:r.o.t("bot_publish_field_placeholder",{field:null!==(h=t.title)&&void 0!==h?h:""}),field:t.name,label:t.title,required:t.required,showClear:!0,rules:c(t),initValue:s},t.name);case"Select":var g="array"===t.type,v=g?(0,q.f5)(s):s;return(0,o.jsx)(a.l0.Select,{placeholder:"Enter ".concat(t.title),field:t.name,label:t.title,optionList:t.enums,multiple:g,rules:c(t),initValue:v},t.name);default:return null}},X=n("205136"),J={};J.styleTagTransform=A(),J.setAttributes=z(),J.insert=S().bind(null,"head"),J.domAPI=N(),J.insertStyleElement=O(),w()(X.Z,J);var $=X.Z&&X.Z.locals?X.Z.locals:void 0,ee=(0,f.forwardRef)((e,t)=>{var n,l,r,i,{schemaAreaInfo:s,initValue:c,getFormDisable:d,isReadOnly:p,setErrorMessage:h}=e,m=(0,f.useRef)(),g=(0,V.Z)();(0,f.useImperativeHandle)(t,()=>({submit:(0,u._)(function*(){var e,t=yield null===(e=m.current)||void 0===e?void 0:e.validate();return Object.fromEntries(Object.entries(null!=t?t:{}).map(e=>{var[t,n]=e;return[t,Array.isArray(n)?JSON.stringify(n):n]}))}),reset:()=>{var e;return null===(e=m.current)||void 0===e?void 0:e.reset()}})),(0,f.useEffect)(()=>{g()},[s]);var v=(null==s?void 0:null===(n=s.schema_list)||void 0===n?void 0:n.filter(e=>e.required).some(e=>{var t,n=null===(t=m.current)||void 0===t?void 0:t.getValue(e.name);return Array.isArray(n)?!n.length||1===n.length&&!n[0]:!n}))||!(null==s?void 0:null===(l=s.schema_list)||void 0===l?void 0:l.length);return(0,f.useEffect)(()=>{d(v)},[v]),(0,o.jsxs)("div",{children:[(null==s?void 0:s.title_text)?(0,o.jsxs)(a.T,{spacing:12,align:"start",children:[(0,o.jsx)("span",{className:$["step-order"],children:s.step_order||2}),(0,o.jsx)("div",{className:$["step-content"],children:(0,o.jsx)("div",{className:$["step-title"],children:s.title_text})})]}):null,(null==s?void 0:s.description)?(0,o.jsx)(j.D,{skipHtml:!0,className:$.markdown,children:null==s?void 0:s.description}):null,(null==s?void 0:null===(r=s.schema_list)||void 0===r?void 0:r.length)?(0,o.jsx)(a.l0,{initValues:c,className:$["config-form"],onValueChange:()=>{g(),h(void 0)},getFormApi:e=>m.current=e,autoScrollToError:!0,allowEmpty:!0,children:null==s?void 0:null===(i=s.schema_list)||void 0===i?void 0:i.map(e=>(0,o.jsx)(G,{initValue:c,formItemSchema:e,isReadOnly:p},e.name))}):null]})}),et=n("434414"),en={};en.styleTagTransform=A(),en.setAttributes=z(),en.insert=S().bind(null,"head"),en.domAPI=N(),en.insertStyleElement=O(),w()(et.Z,en);var el=et.Z&&et.Z.locals?et.Z.locals:void 0,eo=e=>{var t,n,{errorMessage:l}=e,i=null!==(n=null==l?void 0:l.raw)&&void 0!==n?n:{};return(0,o.jsx)(a.l0.ErrorMessage,{error:(t=i,["bind_bot_id","bind_bot_name","bind_space_id"].every(e=>e in t))?(0,o.jsx)("div",{className:el["error-link"],children:r.o.t("bot_publish_bind_error",{bot_name:(0,o.jsx)(a.ZT.Text,{className:el["error-link-underline"],link:{href:"/space/".concat(i.bind_space_id,"/").concat(1===i.bind_agent_type?"project-ide":"bot","/").concat(i.bind_bot_id)},ellipsis:{showTooltip:{opts:{content:i.bind_bot_name}}},children:i.bind_bot_name}),key_name:"token"})}):null==l?void 0:l.msg,className:el["error-container"]})},er=e=>{var t,n,l,i,c,j,k,{botId:w,origin:C="bot",onSuccess:N,onUnbind:P}=e,S=(0,f.useRef)(null),[T,z]=(0,f.useState)(),{initValue:I}=null!=T?T:{},[O,E]=(0,f.useState)(),[A,L]=(0,f.useState)(!1),[D,R]=(0,f.useState)(),Z=(0,f.useRef)(""),B=()=>{var e;E(void 0),$(0),R(void 0),null===(e=S.current)||void 0===e||e.reset(),ea()},U=()=>{B(),P?P():N((0,p._)((0,d._)({},I),{bind_info:{},bind_id:""})),a.O$.success(r.o.t("bot_publish_disconnect_success"))},[V,H]=(0,f.useState)(),W=(0,f.useRef)(),{loading:q}=(0,h.Z)((0,u._)(function*(){var e;return yield v.nA.QuerySchemaList({connector_id:null!==(e=null==I?void 0:I.id)&&void 0!==e?e:"",scene:C})}),{ready:!!(null==I?void 0:I.id),refreshDeps:[null==I?void 0:I.id],onBefore:()=>{(null==I?void 0:I.id)!==W.current&&(W.current=null==I?void 0:I.id,H({}))},onSuccess:e=>{var t;!(null===(t=e.schema_area_pages)||void 0===t?void 0:t.length)&&(e.schema_area_pages=[{schema_area:e.schema_area,copy_link_area:e.copy_link_area}]),H(e)},onError:()=>{H({})}}),{schema_area_pages:K=[]}=null!=V?V:{},Y=e=>{if((null==I?void 0:I.bind_type)===s.P0.KvAuthBind&&((null==e?void 0:e.client_id)||(null==e?void 0:e.auth_params)))(0,_.HL)({navigatePath:"".concat(location.pathname).concat(location.search),type:"oauth",extra:{origin:"publish",encrypt_state:null==e?void 0:e.encrypt_state}},(null==I?void 0:I.id)||"",(0,d._)((0,p._)((0,d._)({},null==I?void 0:I.auth_login_info),{client_id:null==e?void 0:e.client_id}),e.auth_params));else{var t;Z.current=null!==(t=null==e?void 0:e.bind_id)&&void 0!==t?t:""}},Q=()=>{J===(null==K?void 0:K.length)-1?(I&&N((0,p._)((0,d._)({},I),{bind_info:(0,d._)({},D),bind_id:Z.current})),B()):$(J+1)},{loading:G,run:X,step:J,setStep:$}=y({botId:w,origin:C,schemaPages:K,onNextStepSuccess:e=>{if(e.action===g.BindConnector&&Y(e.data),e.action===g.GetBindConnectorConfig){var t;R((0,d._)({},D,null===(t=e.data.config)||void 0===t?void 0:t.detail))}Q()},onNextStepError:e=>{(0,m.k0)(e)&&E(e)}}),{node:et,open:en}=(0,x.O)({botId:w,origin:C,platformInfo:I,onUnbind:()=>{U()}});var el=(t=(0,u._)(function*(){var e,t,n=yield null===(e=S.current)||void 0===e?void 0:e.submit();R((0,d._)({},D,n)),X({connectorId:null!==(t=null==I?void 0:I.id)&&void 0!==t?t:"",assignFormValue:(0,d._)({},D,n)})}),function(){return t.apply(this,arguments)});var{modal:er,open:ei,close:ea}=(0,a.q0)({type:"action-small",footer:(null==I?void 0:I.bind_id)?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.y3,{theme:"light",type:"tertiary",onClick:()=>{ea(),$(0)},children:r.o.t("Cancel")}),(0,o.jsx)(a.y3,{theme:"solid",type:"danger",onClick:en,children:r.o.t("bot_publish_disconnect",{platform:null!==(i=null==I?void 0:I.name)&&void 0!==i?i:""})})]}):(0,o.jsxs)(o.Fragment,{children:[(null==K?void 0:K.length)&&0!==J&&(null===(n=K[J])||void 0===n?void 0:n.api_action)!==g.NotQuery?(0,o.jsx)(a.y3,{theme:"solid",onClick:()=>{E(void 0),$(J-1)},children:r.o.t("Previous_1")}):null,(0,o.jsx)(a.y3,{theme:"solid",onClick:el,disabled:A,loading:G,children:J===(null!==(c=null==K?void 0:K.length)&&void 0!==c?c:0)-1?(null===(l=K[J])||void 0===l?void 0:l.api_action)!==g.NotQuery?r.o.t("Save"):r.o.t("Complete"):r.o.t("Next_1")})]}),onCancel:B,title:null==V?void 0:V.title_text}),es=(e,t)=>(0,o.jsxs)(o.Fragment,{children:[e?(0,o.jsx)(M,{copyLinkAreaInfo:e,agentType:C,botId:w,initValue:(0,d._)({},null==I?void 0:I.bind_info,D)}):null,t?(0,o.jsx)(ee,{schemaAreaInfo:t,initValue:(0,d._)({},null==I?void 0:I.bind_info,D),ref:S,getFormDisable:e=>L(e),isReadOnly:!!(null==I?void 0:I.bind_id),setErrorMessage:E}):null,O?(0,o.jsx)(eo,{errorMessage:O}):null]});return{node:er((0,o.jsxs)(a.yC,{wrapperClassName:b.Z["config-area"],spinning:q,children:[(0,o.jsx)(F,{connectorConfigInfo:V}),(null==K?void 0:K.length)&&!(null==I?void 0:I.bind_id)?(0,o.jsx)("div",{children:es(null===(j=K[J])||void 0===j?void 0:j.copy_link_area,null===(k=K[J])||void 0===k?void 0:k.schema_area)}):null,(null==I?void 0:I.bind_id)&&(null==K?void 0:K.length)?(0,o.jsx)(o.Fragment,{children:null==K?void 0:K.map((e,t)=>(0,o.jsx)("div",{children:es(e.copy_link_area,e.schema_area)},t))}):null,et]})),open:e=>{z(e),ei()},close:ea}},ei=n("561641"),ea=e=>{var{setDataSource:t,setSelectedPlatforms:n,record:l,bindSuccessCallback:u,unbindCallback:d,origin:p="bot",originId:f}=e,{bot_id:h="",project_id:m=""}=(0,c.useParams)(),{node:g,open:v}=er({botId:null!=f?f:"bot"===p?h:m,origin:p,onSuccess:e=>{if(u){u(e);return}null==t||t(t=>{var n,l=t.find(t=>t.id===(null==e?void 0:e.id));if(l){if(l.id===ei.zW&&!(null==e?void 0:e.bind_id))return t.filter(e=>e.id!==ei.zW);l.bind_id=null==e?void 0:e.bind_id,l.bind_info=null!==(n=null==e?void 0:e.bind_info)&&void 0!==n?n:{},l.config_status=(null==e?void 0:e.bind_id)?s._6.Configured:s._6.NotConfigured}return[...t]}),!(null==e?void 0:e.bind_id)&&(null==n||n(t=>t.filter(t=>t!==(null==e?void 0:e.id))))},onUnbind:d}),_=()=>v({initValue:l}),b=r.o.t("bot_publish_action_configure");return(0,o.jsxs)(o.Fragment,{children:["project"===p?(0,o.jsx)(i.zx,{onClick:_,size:"small",color:"primary",children:b}):(0,o.jsx)(a.y3,{onClick:_,theme:"borderless",children:b}),g]})},es=n("707107"),ec=n("44172"),eu=n("988179"),ed=n("391962"),ep=n("458620"),ef=n("189284"),eh=n("486613"),em=n("714393"),eg=n("493278"),ev=(0,ep.z)({eventName:ep.b.getBotDiffError}),e_=()=>{var e,t,[n,l]=(0,f.useState)(),i=(0,c.useParams)(),[s]=(0,ef.V)(),d=!!(null==s?void 0:s["bot.devops.merge_prompt_diff"]);var{data:p,loading:m,run:g,mutate:_,error:x}=(0,h.Z)((e=(0,u._)(function*(e){var{bot_id:t="",space_id:n="",commit_version:l}=i;return(yield v.bV.BotDiff({space_id:n,bot_id:t,left:{branch:eh.I0.Publish,connector_id:e.id},template_key:d?"diff_template_when_publish_v2":"",right:{branch:eh.I0.Base,version_id:l}})).data}),function(t){return e.apply(this,arguments)}),{manual:!0,onBefore:()=>{ev.start()},onSuccess:e=>{ev.success()},onError:e=>{ev.error({reason:"get publish diff error",error:e})}}),y=()=>{_({origin_bot_dl:"",diff_display_node:[]}),w()},{modal:j,open:k,close:w}=(0,a.q0)({type:"info",okText:r.o.t("devops_publish_multibranch_done"),okType:"tertiary",okButtonProps:{className:"semi-button-light"},hasCancel:!1,className:b.Z["diff-modal"],onCancel:y,onOk:y,title:r.o.t("devops_publish_multibranch_diffwithin",{connectorName:null!==(t=null==n?void 0:n.name)&&void 0!==t?t:""})});return{node:j((0,o.jsx)("div",{className:b.Z["diff-modal-container"],children:m?(0,o.jsx)(a.yC,{}):d?(0,o.jsx)(em.LH,{diffData:(null==p?void 0:p.diff_display_node)||[],hasError:void 0!==x,type:"publish"}):(0,o.jsx)(eg.T,{diffData:(null==p?void 0:p.diff_display_node)||[],hasError:void 0!==x})})),open:e=>{l(e),g(e),k()},close:w}},eb=e=>{var{record:t,isMouseIn:n}=e,{open:l,node:i}=e_(),s=(0,ed.R)(e=>e.isCollaboration),c=e=>{(0,eu.iN)(es.Kg.bot_publish_difference,{platform_type:e.name}),l(e)};return(0,o.jsxs)(o.Fragment,{children:[n&&s?(0,o.jsx)(a.u,{content:r.o.t("devops_publish_multibranch_viewdiff"),children:(0,o.jsx)(a._3,{onClick:()=>{c(t)},icon:(0,o.jsx)(ec.k8G,{color:"#4D53E8"})})}):null,i]})}},150500:function(e,t,n){"use strict";n.d(t,{OF:function(){return g},Tn:function(){return v},To:function(){return m},ci:function(){return _}});var l,o=n(825955),r=n(808549),i=n(788637),a=n(735114),s=n(947578),c=n(297158),u=n(336205),d=n(727914),p=n(382534),f=n(39663),h=n(659596),m=e=>{var{id:t,onRevokeSuccess:n,onRevokeFinally:l}=e,{loading:r,runAsync:i}=(0,a.Z)((0,o._)(function*(){return yield p.nA.CancelUserAuth({connector_id:t})}),{manual:!0,onSuccess:()=>{null==n||n(t)},onFinally:()=>{null==l||l()}});return{revokeLoading:r,runRevoke:i}};var g=(l=(0,o._)(function*(e){var t,n,{id:l,authInfo:o,origin:i}=e,a=yield p.nA.GetConnectorAuthState({connector_id:l}),s=null!==(n=null==a?void 0:null===(t=a.data)||void 0===t?void 0:t.state)&&void 0!==n?n:{};(0,f.HL)({navigatePath:location.pathname,type:"oauth",extra:(0,r._)({origin:i},s)},l,o)}),function(e){return l.apply(this,arguments)}),v=e=>!(0,i.Z)(e)&&!!(null==e?void 0:e.authorize_url),_=()=>{c.kg.error({message:"connection_missing_oauth_info",error:new d.sH("normal_error","Connection missing oauth information")}),h.FN.error({content:(0,s.u)(u.o.t("error"))})}},561641:function(e,t,n){"use strict";n.d(t,{EK:function(){return c},dj:function(){return d},pX:function(){return i},vh:function(){return u},zW:function(){return s},zs:function(){return a}});var l=n(808549),o=n(120454);n(336205),n(775699);var r=n(178385);n(298203),n(150500);var i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return null==e||e.forEach(e=>{e.level=t,n.push(e),e.sub_nodes&&n.push(...i(e.sub_nodes,t+1))}),n},a=()=>{var e=document.body.style,t=document.getElementsByTagName("html")[0].style;e.minHeight="600px",t.minHeight="600px",e.minWidth="1680px",t.minWidth="1680px"},s="10000114",c="10000122",u=(e,t)=>(null==t?void 0:t.length)?t.map(t=>{var n,i,a,s,c,u,d,p=null!==(a=null==e?void 0:e[t.id])&&void 0!==a?a:{};return(0,o._)((0,l._)({},t),{publish_status:null!==(s=p.publish_result_status)&&void 0!==s?s:r.an.Failed,fail_text:null!==(c=p.msg)&&void 0!==c?c:"",share_link:null!==(u=null===(n=p.connector)||void 0===n?void 0:n.share_link)&&void 0!==u?u:"",bind_info:null!==(d=null===(i=p.connector)||void 0===i?void 0:i.bind_info)&&void 0!==d?d:t.bind_info})}):[],d=e=>{try{return JSON.parse(e)}catch(e){return""}}},189284:function(e,t,n){"use strict";n.d(t,{V:function(){return i}});var l=n(455069),o=n(864114),r=n(839974),i=()=>{var e=(0,r.L)(),[,t]=(0,l.useState)(0);return(0,l.useEffect)(()=>{var e=()=>{t(Date.now())};return o.l.on("change",e),()=>{o.l.off("change",e)}},[]),[e]}},486613:function(e,t,n){"use strict";n.d(t,{I0:function(){return c},Ll:function(){return h},Xb:function(){return p},_g:function(){return f},jY:function(){return d},sv:function(){return u}});var l,o,r,i,a,s,c=((l={})[l.Undefined=0]="Undefined",l[l.PersonalDraft=1]="PersonalDraft",l[l.Base=2]="Base",l[l.Publish=3]="Publish",l);var u=((o={})[o.Unknown=0]="Unknown",o[o.Add=1]="Add",o[o.Delete=2]="Delete",o[o.Modify=3]="Modify",o[o.Remove=4]="Remove",o[o.Remain=5]="Remain",o);var d=((r={})[r.Default=0]="Default",r[r.TextDetail=1]="TextDetail",r);var p=((i={})[i.Online=1]="Online",i[i.Submit=2]="Submit",i[i.Draft=3]="Draft",i);var f=((a={})[a.Bot=1]="Bot",a[a.Workflow=2]="Workflow",a);var h=((s={})[s.AgentFlow=1]="AgentFlow",s[s.Agent=2]="Agent",s[s.Workflow=3]="Workflow",s)},178626:function(e,t,n){"use strict";n.r(t),n.d(t,{md2html:()=>h,ZoneDelta:()=>d,LazyEditorFullInputInner:()=>j,LazyEditorFullInput:()=>y,DEFAULT_ZONE:()=>u,DeltaSetOptions:()=>i.DeltaSetOptions,Text:()=>_,ToolbarItemEnum:()=>c,normalizeSchema:()=>v,checkAndGetMarkdown:()=>g,DeltaSet:()=>p,ToolbarButton:()=>b,delta2md:()=>m,Plugin:()=>x,IApplyMetadata:()=>i.IApplyMetadata,EditorEventType:()=>f,displayType:()=>s});var l,o,r,i={};n.r(i),n.d(i,{S2:()=>u,uN:()=>p,rp:()=>f,_l:()=>c,If:()=>d,v:()=>s});var a=n("455069");var s=((l={}).inline="inline",l.block="block",l);var c=((o={}).Bold="Bold",o.Italic="Italic",o.Underline="Underline",o.Undo="Undo",o.Redo="Redo",o.Strikethrough="Strikethrough",o.Blockquote="Blockquote",o.UnorderedList="UnorderedList",o.OrderedList="OrderedList",o.Checkbox="Checkbox",o.Indent="Indent",o.H1="H1",o.H2="H2",o.H3="H3",o.AlignCenter="AlignCenter",o.AlignLeft="AlignLeft",o.AlignRight="AlignRight",o.HorizontalLine="HorizontalLine",o.Hyperlink="Hyperlink",o.Image="Image",o.Table="Table",o.CodeBlock="CodeBlock",o.Video="Video",o.DIVIDER="DIVIDER",o.ColorPicker="ColorPicker",o.FontSizeDropdown="FontSizeDropdown",o.AlignDropdown="AlignDropdown",o.HeadingDropdown="HeadingDropdown",o.FontFamilyDropdown="FontFamilyDropdown",o),u="0",d={};class p{constructor(e){this.deltas=e,this.deltas=e}}var f=((r={}).DID_PASTE="didPaste",r.RESIZE="resize",r.RECT_CHANGE="rectchange",r.SELECTION_CHANGE="selectionchange",r.SELECTION_CHANGE_AND_DOM_UPDATE="editorUpdateDomSelection",r.CONTENT_WILL_CHANGE="contentWillChange",r.CONTENT_CHANGE="contentchange",r.EDITABLE_CHANGE="editablechange",r.PAINT="paint",r.COPY="copy",r.CUT="cut",r.PASTE="paste",r.WILL_DELETE_FROM_CUT="willDeleteFromCut",r.INPUT="input",r.BEFORE_INPUT="beforeinput",r.KEYDOWN="keydown",r.KEYPRESS="keypress",r.KEYUP="keyup",r.EXEC_COMMAND="execCommand",r.ERROR="error",r.DELETE_KEY="keyDelete",r.FOCUS="focus",r.BLUR="blur",r.SCROLL_END="scrollend",r.SCROLL="scroll",r.KEYBAORDCHANGE="keyboardchange",r.COMPOSITION_END="compositionend",r.COMPOSITION_START="compositionstart",r.COMPOSITION_UPDATE="compositionupdate",r.REACT_CONTEXT_UPDATE="reactContextUpdate",r.BEFORE_DOM_RENDERER_RECONCILE="beforeDomRendererReconcile",r.AFTER_DOM_RENDERER_RECONCILE="afterDomRendererReconcile",r.UNDO_DID_INIT="undoDidInit",r),h=e=>e,m=function(e,t){return arguments.length>2&&void 0!==arguments[2]&&arguments[2],{markdown:e.insert,images:[],links:[],mentions:[],codeblocks:[]}},g=e=>{var{editor:t}=e;return{content:t.getText(),images:[],links:[]}},v=e=>{var t,n,l;return{0:{zoneType:null===(t=e[0])||void 0===t?void 0:t.zoneType,zoneId:null===(n=e[0])||void 0===n?void 0:n.zoneId,ops:null===(l=e[0])||void 0===l?void 0:l.ops}}},_=()=>null,b=()=>null;class x{}var y=(0,a.lazy)(()=>n.e("9258").then(n.bind(n,172374)).then(e=>({default:e.EditorInput}))),j=(0,a.lazy)(()=>n.e("9258").then(n.bind(n,172374)).then(e=>({default:e.EditorFullInputInner})))},616405:function(e,t,n){"use strict";n.d(t,{kt:()=>u});var l=n("151064"),o=n("336205");n.p;var r=n("122206");r.g.Unknown,o.o.t("coze_premium_credits_cycle_4"),r.g.Never,o.o.t("coze_premium_credits_cycle_4"),r.g.Day,o.o.t("coze_premium_credits_cycle_1"),r.g.Week,o.o.t("coze_premium_credits_cycle_2"),r.g.Month,o.o.t("coze_premium_credits_cycle_3");var i=n("252237"),a=n.n(i),s=n("873183"),c=n("659596");function u(e){var{className:t,monetizeConfig:n,supportPlatforms:r}=e,i=r.map(e=>e.name).join(", ");return(0,l.jsxs)("div",{className:a()("flex justify-end items-center gap-[12px]",t),children:[(0,l.jsxs)("div",{className:"flex items-center gap-[4px]",children:[(0,l.jsx)("span",{className:"font-medium coz-fg-plus",children:"".concat(o.o.t("monetization"),": ").concat(n.is_enable?o.o.t("monetization_publish_on"):o.o.t("monetization_publish_off"))}),(0,l.jsx)(c.u,{content:(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("div",{children:n.is_enable?o.o.t("monetization_on_des"):o.o.t("monetization_off_des")}),n.is_enable?(0,l.jsx)("div",{className:"mt-[8px] pt-[8px] border-0 border-t border-solid coz-stroke-primary",children:"".concat(o.o.t("free_chat_allowance")," : ").concat(n.free_chat_allowance_count)}):null]}),children:(0,l.jsx)(s.L03,{className:"w-[16px] h-[16px] coz-fg-secondary"})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-[4px]",children:[(0,l.jsxs)("span",{className:"font-normal coz-fg-tertiary",children:[o.o.t("monetization_support"),":"]}),(0,l.jsx)("span",{className:"flex items-center gap-[4px]",children:r.map(e=>(0,l.jsx)(c.qE,{className:"h-[16px] w-[16px] rounded-[4px]",size:"extra-extra-small",shape:"square",src:e.icon},e.id))}),(0,l.jsx)(c.u,{content:"".concat(o.o.t("monetization_support_tips"),": ").concat(i),children:(0,l.jsx)(s.L03,{className:"w-[16px] h-[16px] coz-fg-secondary"})})]})]})}},319276:function(e,t,n){"use strict";n.d(t,{a2:function(){return o},bQ:function(){return r},pl:function(){return l}});var l="https://lf3-static.bytednsdoc.com/obj/eden-cn/rkzild_lgvj/ljhwZthlaukjlkulzlp/",o="undefined"!=typeof location?location.origin:"https://api.xxx.com",r=e=>""},177001:function(e,t,n){"use strict";n.d(t,{oK:()=>f,CZ:()=>c,I4:()=>a,Qv:()=>p,zv:()=>d,ej:()=>s});var l,o,r=n("151064"),i=()=>{console.log("unImplement void func")};function a(e){return{node:(0,r.jsx)(r.Fragment,{}),open:i,close:i}}var s=((l={})[l.AddSpace=0]="AddSpace",l[l.NewModel=1]="NewModel",l[l.ProTemplate=2]="ProTemplate",l[l.AddSpaceMember=3]="AddSpaceMember",l[l.Collaborate=4]="Collaborate",l[l.CopyResourceCrossSpace=5]="CopyResourceCrossSpace",l[l.API=6]="API",l[l.AddVoice=7]="AddVoice",l[l.RTC=8]="RTC",l[l.ExportLog=9]="ExportLog",l[l.FilterLog=10]="FilterLog",l);function c(e){return!0}var u=()=>{console.log("unImplement void func")};function d(e){return{node:(0,r.jsx)(r.Fragment,{}),open:u,close:u}}var p=((o={})[o.Knowledge=0]="Knowledge",o[o.Token=1]="Token",o);function f(e){return(0,r.jsx)(r.Fragment,{})}n("193177"),n("873291")},76313:function(e,t,n){"use strict";n.d(t,{N:()=>a});var l=n("825955"),o=n("455069"),r=n("735114"),i=n("382534"),a=e=>{var{type:t,intelligenceId:n,spaceId:a,enable:s}=e,[c,u]=(0,o.useState)(!1),d=(0,r.Z)((0,l._)(function*(){var e,l;return null===(l=(yield i.sD.PublishIntelligenceList({space_id:a,intelligence_type:t,intelligence_ids:[n],size:1},{__disableErrorToast:!0})).data)||void 0===l?void 0:null===(e=l.intelligences)||void 0===e?void 0:e[0]}),{manual:!0,ready:s,pollingInterval:6e4,pollingErrorRetryCount:3,onSuccess:e=>{e&&d.cancel()},onFinally:()=>{u(!0)}});return(0,o.useEffect)(()=>(u(!1),d.run(),d.cancel),[t,n,a,s]),{inited:c,ready:!!d.data}}},174470:function(e,t,n){"use strict";n.r(t),n.d(t,{usePublishStatus:()=>tX,useBizConnectorAnchor:()=>eZ,PublishButton:()=>t$,ProjectPublish:()=>tY});var l,o,r,i,a,s,c,u,d,p=n("151064"),f=n("455069"),h=n("664319"),m=n("297158"),g=n("659596"),v=n("157728"),_=n("808549"),b=n("120454"),x=n("479910"),y=n("598208"),j=n("61111"),k="10000129",w={connectorList:[],connectorUnionMap:{},selectedConnectorIds:[],showPublishResult:!1,lastVersionNumber:"",versionNumber:"",versionDescription:"",connectorPublishConfig:{},socialPlatformChatflow:{},templateConfigured:!0,connectors:{},unions:{},publishRecordDetail:{},pageLoading:!1},C=(0,y.Ue)()((0,x.mW)((e,t)=>{var n;return(0,b._)((0,_._)({},w),{reset:()=>{e(w)},setMonetizeConfig:t=>e({monetizeConfig:t}),setConnectorList:t=>{e({connectorList:t})},setSelectedConnectorIds:t=>{e({selectedConnectorIds:t})},updateSelectedConnectorIds:t=>{e(e=>({selectedConnectorIds:t(e.selectedConnectorIds)}))},setShowPublishResult:t=>{e({showPublishResult:t})},setProjectPublishInfo:(n=e,(e,t)=>{(null==t?void 0:t.replace)?n(e):n(t=>(0,_._)({},t,e))}),setProjectPublishInfoByImmer:n=>{e({connectorPublishConfig:(0,j.Uy)(t().connectorPublishConfig,n)},!1,"setProjectPublishInfoByImmer")},setPublishRecordDetail:t=>e(e=>({publishRecordDetail:(0,_._)({},e.publishRecordDetail,t)})),resetProjectPublishInfo:()=>{e(w)},exportDraft:e=>{var{versionNumber:n,versionDescription:l,selectedConnectorIds:o,connectorPublishConfig:r,unions:i,socialPlatformChatflow:a}=t();return{projectId:e,versionNumber:n,versionDescription:l,selectedConnectorIds:o,unions:i,sdkConfig:r["999"],socialPlatformConfig:a}}})},{enabled:!1,name:"botStudio.projectPublishStore"})),N=n("298203"),P="coz_project_publish_draft",S=n("825955");var T=((l={})[l.NoBindRequired=1]="NoBindRequired",l[l.AuthBind=2]="AuthBind",l[l.KvBind=3]="KvBind",l[l.KvAuthBind=4]="KvAuthBind",l[l.ApiBind=5]="ApiBind",l[l.WebSDKBind=6]="WebSDKBind",l[l.StoreBind=7]="StoreBind",l[l.AuthAndConfig=8]="AuthAndConfig",l[l.TemplateBind=9]="TemplateBind",l);var z=((o={})[o.APIOrSDK=1]="APIOrSDK",o[o.SocialPlatform=2]="SocialPlatform",o[o.Coze=3]="Coze",o[o.MiniProgram=4]="MiniProgram",o[o.CozeSpaceExtensionLibrary=5]="CozeSpaceExtensionLibrary",o);var I=((r={})[r.Normal=0]="Normal",r[r.InReview=1]="InReview",r[r.Offline=2]="Offline",r),O=n("382534"),E=e=>e.replace(/(\d+)\.(\d+)\.(\d+)/g,(e,t,n,l)=>{var o=parseInt(String(l),10)+1;return"".concat(t,".").concat(n,".").concat(o)}),A=e=>{var{lastPublishVersionNumber:t,draftVersionNumber:n,defaultVersionNumber:l}=e;return t&&!n?E(t):n?n:l};var L=((i={})[i.Configured=1]="Configured",i[i.NotConfigured=2]="NotConfigured",i[i.Disconnected=3]="Disconnected",i[i.Configuring=4]="Configuring",i[i.NeedReconfiguring=5]="NeedReconfiguring",i);var D=((a={})[a.Default=0]="Default",a[a.Auditing=1]="Auditing",a[a.Success=2]="Success",a[a.Failed=3]="Failed",a[a.Disable=4]="Disable",a);var R=((s={})[s.Packing=0]="Packing",s[s.PackFailed=1]="PackFailed",s[s.Auditing=2]="Auditing",s[s.AuditNotPass=3]="AuditNotPass",s[s.ConnectorPublishing=4]="ConnectorPublishing",s[s.PublishDone=5]="PublishDone",s),M=e=>{var{bind_type:t,config_status:n}=e;return[T.KvBind,T.AuthBind,T.KvAuthBind,T.TemplateBind].includes(t)&&n===L.NotConfigured},Z=e=>{var{allow_publish:t}=e,n=M(e);return n||!t};function B(){return(B=(0,S._)(function*(e,t,n){var{setProjectPublishInfo:l,setSelectedConnectorIds:o,setMonetizeConfig:r}=C.getState();l({pageLoading:!0});try{var i,a,s=function(e){var t=d.find(t=>t.id===e);if(!t||Z(t))return"continue";t.connector_union_id?g.push(t.connector_union_id):g.push(t.id),v[t.id]=t.bind_info},[c,u]=yield Promise.all([O.sD.PublishConnectorList({project_id:e}),Promise.resolve(void 0)]),{connector_list:d=[],last_publish_info:p={},connector_union_info_map:f={}}=null!==(S=c.data)&&void 0!==S?S:{},{connector_ids:h=[],connector_publish_config:m={}}=p,g=[],v={};for(var _ of h)s(_);var b={};for(var[x,y]of Object.entries(f))b[x]=null!==(I=null===(T=y.connector_options.find(e=>h.includes(e.connector_id)))||void 0===T?void 0:T.connector_id)&&void 0!==I?I:y.connector_options[0].connector_id;if(null==n?void 0:null===(w=n.socialPlatformConfig)||void 0===w?void 0:null===(k=w.selected_workflows)||void 0===k?void 0:k[0].workflow_id)E=n.socialPlatformConfig;else for(var j of d){if(!!g.includes(j.id)&&j.connector_classification===z.SocialPlatform){var k,w,N,P,S,T,I,E,L,D=m[j.id];if(null==D?void 0:null===(L=D.selected_workflows)||void 0===L?void 0:L[0].workflow_id){E=D;break}}}(null==n?void 0:null===(P=n.sdkConfig)||void 0===P?void 0:null===(N=P.selected_workflows)||void 0===N?void 0:N[0].workflow_id)&&(m["999"]=n.sdkConfig),o(null!==(i=null==n?void 0:n.selectedConnectorIds)&&void 0!==i?i:g);var R=p.version_number,M=A({lastPublishVersionNumber:R,draftVersionNumber:null==n?void 0:n.versionNumber,defaultVersionNumber:"v0.0.1"});l({lastVersionNumber:R,versionNumber:M,versionDescription:null==n?void 0:n.versionDescription,connectorPublishConfig:m,connectorList:d,connectorUnionMap:f,connectors:v,unions:null!==(a=null==n?void 0:n.unions)&&void 0!==a?a:b,socialPlatformChatflow:E}),r(null==u?void 0:u.data)}catch(e){t(e)}finally{l({pageLoading:!1})}})).apply(this,arguments)}var U=n("59955"),F=n("735114"),V=n("336205"),H=n("873183");function W(e){var t,n,l=e.publish_status===R.PackFailed||e.publish_status===R.AuditNotPass,o=null!==(n=null===(t=e.connector_publish_result)||void 0===t?void 0:t.every(e=>e.connector_publish_status===D.Auditing||e.connector_publish_status===D.Failed||e.connector_publish_status===D.Success))&&void 0!==n&&n;return l||o}var q=(0,f.createContext)({getContainerRef:()=>null,publishHeaderHeight:0,setPublishHeaderHeight:()=>0}),K=()=>(0,f.useContext)(q);function Y(){var e,t,n=(0,v.useNavigate)(),l=(0,g.XQ)(),{space_id:o="",project_id:r=""}=(0,v.useParams)(),i=()=>n("/space/".concat(o,"/project-ide/").concat(r)),{connectorList:a,showPublishResult:s,setShowPublishResult:c,versionDescription:u,versionNumber:d,connectors:m,unions:_,connectorPublishConfig:b,socialPlatformChatflow:x,selectedConnectorIds:y,setPublishRecordDetail:j}=C((0,h.N)(e=>({connectorList:e.connectorList,showPublishResult:e.showPublishResult,setShowPublishResult:e.setShowPublishResult,versionNumber:e.versionNumber,versionDescription:e.versionDescription,connectors:e.connectors,unions:e.unions,connectorPublishConfig:e.connectorPublishConfig,socialPlatformChatflow:e.socialPlatformChatflow,selectedConnectorIds:e.selectedConnectorIds,setPublishRecordDetail:e.setPublishRecordDetail}))),[k,w]=(0,f.useState)(!1),{publishHeaderHeight:N,setPublishHeaderHeight:P}=K();var{run:T,cancel:I}=(0,F.Z)((e=(0,S._)(function*(e){return yield O.sD.GetPublishRecordDetail(e)}),function(t){return e.apply(this,arguments)}),{pollingInterval:3e3,pollingWhenHidden:!1,pollingErrorRetryCount:3,manual:!0,onSuccess:e=>{(null==e?void 0:e.data)?(j(e.data),W(e.data)&&I(),!s&&c(!0)):I()},onError:()=>{I()}});var E=(t=(0,S._)(function*(){if(s)i();else try{if(w(!0),yield l.validate(),!y.length){g.FN.error(V.o.t("publish_tooltip_select_platform"));return}var e={},t={};y.forEach(n=>{var l,o,r,i=null!==(o=_[n])&&void 0!==o?o:n;e[i]=null!==(r=m[i])&&void 0!==r?r:{},(null===(l=a.find(e=>e.id===i))||void 0===l?void 0:l.connector_classification)===z.SocialPlatform?t[i]=x:b[i]&&(t[i]=b[i])});var{data:n}=yield O.sD.PublishProject({project_id:r,version_number:d,description:u,connectors:e,connector_publish_config:t});j({publish_monetization_result:null==n?void 0:n.publish_monetization_result}),(null==n?void 0:n.publish_record_id)&&T({publish_record_id:n.publish_record_id,project_id:r})}catch(e){"string"==typeof Object.values(e)[0]&&g.FN.error(Object.values(e)[0])}finally{w(!1)}}),function(){return t.apply(this,arguments)});return(0,p.jsxs)("div",{className:"sticky top-0 z-[100] coz-bg-primary overflow-y-hidden",style:{height:N},children:[(0,p.jsx)(U.q,{children:(0,p.jsx)("title",{children:V.o.t("Publish")})}),(0,p.jsxs)("div",{className:"flex p-[16px] justify-between items-center coz-stroke-primary border-b border-x-0 border-t-0 border-solid pl-2",children:[(0,p.jsxs)("div",{className:"flex items-center",children:[(0,p.jsx)(g.hU,{icon:(0,p.jsx)(H.$1i,{className:"h-[18px] w-[18px]"}),color:"secondary",iconSize:"large",onClick:i}),(0,p.jsx)("span",{className:"ml-[8px] font-medium text-[20px]",children:V.o.t("Publish")})]}),(0,p.jsx)(g.zx,{onClick:E,loading:k,"data-testid":"project.publish",children:s?V.o.t("bot_publish_success_back"):V.o.t("Publish")})]}),(0,p.jsx)(g.jL,{type:"info",description:V.o.t("project_release_notify"),onClose:()=>{P(65)}})]})}var Q=n("252237"),G=n.n(Q),X=n("28260"),J=n("189284"),$=n("76313");var ee=((c={})[c.Plugin=1]="Plugin",c[c.Workflow=2]="Workflow",c[c.Imageflow=3]="Imageflow",c[c.Knowledge=4]="Knowledge",c[c.UI=5]="UI",c[c.Prompt=6]="Prompt",c[c.Database=7]="Database",c[c.Variable=8]="Variable",c),et=n("319276"),en=n("193893"),el=n("407821"),eo=n.n(el),er=n("472772"),ei=n.n(er),ea=n("395245"),es=n.n(ea),ec=n("297998"),eu=n.n(ec),ed=n("646576"),ep=n.n(ed),ef=n("606121"),eh=n.n(ef),em=n("727683"),eg={};eg.styleTagTransform=eh(),eg.setAttributes=eu(),eg.insert=es().bind(null,"head"),eg.domAPI=ei(),eg.insertStyleElement=ep(),eo()(em.Z,eg);var ev=em.Z&&em.Z.locals?em.Z.locals:void 0;function e_(e){var{index:t}=e;return(0,p.jsx)("div",{className:"w-[20px] h-[20px] rounded-full inline-flex items-center justify-center mr-[4px] coz-mg-primary",children:(0,p.jsx)("span",{className:"font-medium coz-fg-secondary",children:t})})}function eb(){var[e,t]=(0,f.useState)(!1),[n,l]=(0,f.useState)(""),o=()=>t(!1);return{node:(0,p.jsxs)(g.u_,{title:V.o.t("app_publish_sdk_title"),closable:!0,visible:e,width:640,onCancel:o,footer:(0,p.jsx)(g.zx,{onClick:o,children:V.o.t("app_publish_sdk_confirm")}),zIndex:2e3,children:[(0,p.jsxs)(g.ZT.Paragraph,{className:"font-medium mb-[8px]",children:[(0,p.jsx)(e_,{index:1}),V.o.t("app_publish_sdk_step_1",{doc_link:(0,p.jsx)(g.ZT.Text,{link:{href:"/docs/developer_guides/oauth_apps",target:"_blank"},children:V.o.t("app_publish_sdk_step_1_doc")})})]}),(0,p.jsxs)(g.ZT.Paragraph,{className:"font-medium mb-[8px]",children:[(0,p.jsx)(e_,{index:2}),V.o.t("app_publish_sdk_step_2")]}),(0,p.jsx)(en.HK,{className:ev["web-sdk-guide"],markDown:n}),(0,p.jsxs)(g.ZT.Paragraph,{className:"font-medium mb-[8px]",children:[(0,p.jsx)(e_,{index:3}),V.o.t("app_publish_sdk_step_3")]})]}),show:e=>{l(function(e){var{projectId:t,workflowId:n,version:l="<version>"}=e;return"```html\n<script type=\"text/javascript\">\nvar webSdkScript = document.createElement('script');\nwebSdkScript.src = '".concat((0,et.bQ)(l),'\';\ndocument.head.appendChild(webSdkScript);\nwebSdkScript.onload = function () {\n new CozeWebSDK.WebChatClient({\n "config": {\n "type": "app",\n "appInfo": {\n "appId": "').concat(t,'",\n "workflowId": "').concat(n,'"\n }\n },\n "auth": {\n "type": "token",\n "token": "pat_********",\n onRefreshToken: function () {\n return "pat_********"\n }\n }\n });\n}\n<\/script>\n',"```")}(e)),t(!0)}}}function ex(e){var{title:t,tag:n,color:l}=e;return(0,p.jsxs)("div",{className:"flex items-center gap-[4px]",children:[(0,p.jsx)(g.ZT.Text,{className:"leading-[20px] font-normal","data-testid":"project.publish.result",children:t}),"string"==typeof n?(0,p.jsx)(g.Vp,{size:"mini",color:l,children:n}):null]})}function ey(e){var{status:t}=e,n={width:"16px",height:"16px"};switch(t){case"wait":return(0,p.jsx)(H.kSS,(0,_._)({className:"coz-fg-secondary"},n));case"process":return(0,p.jsx)(H.gO2,(0,_._)({className:"coz-fg-hglt"},n));case"finish":return(0,p.jsx)(H.G70,(0,_._)({className:"coz-fg-hglt-green"},n));case"warn":return(0,p.jsx)(H.UoC,(0,_._)({className:"coz-fg-hglt-yellow"},n));case"error":return(0,p.jsx)(H.AYy,(0,_._)({className:"coz-fg-hglt-red"},n));default:return null}}var ej={[D.Default]:{color:"brand",text:"project_releasing"},[D.Auditing]:{color:"brand",text:"under_review"},[D.Failed]:{color:"red",text:"project_release_failed"},[D.Success]:{color:"green",text:"project_release_success"},[D.Disable]:null};function ek(e){var t,n,l,o,{result:r,showTag:i,onShowWebSdkGuide:a}=e,s=ej[null!==(o=r.connector_publish_status)&&void 0!==o?o:0],c="999"===r.connector_id&&r.connector_publish_status===D.Success,u=null===(l=r.connector_publish_config)||void 0===l?void 0:null===(n=l.selected_workflows)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.workflow_id;return(0,p.jsxs)("div",{className:"h-[40px] flex items-center border-0 border-b border-solid coz-stroke-primary last:border-none",children:[(0,p.jsx)(g.EZ,{size:"small",type:"platform",className:"mr-[8px] rounded-[6px] shrink-0",src:r.connector_icon_url}),(0,p.jsx)(g.ZT.Text,{weight:500,className:"whitespace-nowrap",ellipsis:{showTooltip:!0},children:r.connector_name}),!1!==i&&s?(0,p.jsx)(g.Vp,{size:"mini",color:s.color,className:"!px-[4px] ml-[4px] shrink-0",children:V.o.t(s.text)}):null,(0,p.jsxs)("div",{className:"px-[8px] ml-auto max-w-[206px]",children:[r.connector_publish_status_msg?(0,p.jsx)(g.ZT.Text,{type:"secondary",fontSize:"14px",ellipsis:{showTooltip:{type:"tooltip",opts:{theme:"dark",style:{maxWidth:200}}}},children:r.connector_publish_status_msg}):null,c?(0,p.jsx)(g.ZT.Text,{fontSize:"14px",link:!0,onClick:()=>null==a?void 0:a(null!=u?u:""),children:V.o.t("project_release_guide")}):null,r.download_link?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(g.ZT.Text,{fontSize:"14px",link:{href:r.download_link,target:"_blank"},children:V.o.t("project_release_download_code")}),(0,p.jsx)(g.ZT.Text,{className:"ml-[12px]",fontSize:"14px",link:{href:function(e){switch(e){case"10000130":return"/docs/guides/publish_app_to_douyin_microapp";case"10000131":return"/docs/guides/publish_app_to_wechat_mini_program";default:return""}}(r.connector_id),target:"_blank"},children:V.o.t("project_release_guide")})]}):null,r.share_link?(0,p.jsx)(g.ZT.Text,{fontSize:"14px",link:{href:r.share_link,target:"_blank"},children:V.o.t("project_release_open_in_store")}):null]})]},r.connector_id)}function ew(e){return{icon:(0,p.jsx)(ey,{status:"wait"}),title:(0,p.jsx)(ex,{title:e})}}function eC(e){var t,n=(0,f.useRef)(null),[l,o]=(0,f.useState)(void 0),r=function(e,t,n){var l=V.o.t("project_release_package");if("number"!=typeof e.publish_status)return ew(l);switch(e.publish_status){case R.Packing:return{icon:(0,p.jsx)(ey,{status:"process"}),title:(0,p.jsx)(ex,{title:l,tag:V.o.t("project_release_in_progress"),color:"brand"})};case R.PackFailed:var o,r,i=null===(r=e.publish_status_detail)||void 0===r?void 0:null===(o=r.pack_failed_detail)||void 0===o?void 0:o.map(e=>({tagKey:e.entity_id,className:"pack-status-tag",prefixIcon:e.entity_type===ee.Workflow?(0,p.jsx)(H.eTH,{}):(0,p.jsx)(H.QWX,{}),children:e.entity_name}));return{icon:(0,p.jsx)(ey,{status:"error"}),title:(0,p.jsx)(ex,{title:l,tag:V.o.t("project_release_package_failed"),color:"red"}),description:i?(0,p.jsxs)("div",{ref:t,children:[(0,p.jsx)(g.ZT.Paragraph,{className:"coz-fg-secondary mb-[4px]",children:V.o.t("project_release_pack_fail_reason")}),(0,p.jsx)(g.QS,{tagList:i,maxTagCount:n,showPopover:!0,popoverProps:{position:"top",style:{padding:8,maxWidth:800}}})]}):null};default:return{icon:(0,p.jsx)(ey,{status:"finish"}),title:(0,p.jsx)(ex,{title:l,tag:V.o.t("project_release_finish"),color:"green"})}}}(e.record,n,l);return(0,f.useLayoutEffect)(()=>{if(!n.current)return;var e=n.current.getElementsByClassName("pack-status-tag");if(!(e.length<=0))for(var t=-1,l=0,r=0;r<e.length;r++){var i=e[r].offsetTop;if(t!==i&&(t=i,++l>=3)){o(r);break}}},[null===(t=e.record.publish_status_detail)||void 0===t?void 0:t.pack_failed_detail]),(0,p.jsx)(g.Rg.Step,(0,_._)({},r))}function eN(e){var t,n,l,o,r,{project_id:i=""}=(0,v.useParams)(),{node:a,show:s}=eb();var c=(t=e.record,n=t=>{var n,l,o;return s({projectId:i,workflowId:t,version:null===(o=e.record.connector_publish_result)||void 0===o?void 0:null===(l=o.find(e=>"999"===e.connector_id))||void 0===l?void 0:null===(n=l.connector_bind_info)||void 0===n?void 0:n.sdk_version})},r=V.o.t("project_release_channel"),"number"!=typeof t.publish_status?ew(r):t.publish_status<R.ConnectorPublishing?(0,b._)((0,_._)({},ew(r)),{description:null===(o=t.connector_publish_result)||void 0===o?void 0:o.map(e=>(0,p.jsx)(ek,{result:e,showTag:!1}))}):{icon:(0,p.jsx)(ey,{status:function(e){var t,n=null!==(t=e.connector_publish_result)&&void 0!==t?t:[];if(n.length<=0)return"wait";var l=n.filter(e=>e.connector_publish_status===D.Failed).length;return l>0?l===n.length?"error":"warn":n.filter(e=>e.connector_publish_status===D.Default||e.connector_publish_status===D.Auditing).length>0?"process":"finish"}(t)}),title:(0,p.jsx)(ex,(0,_._)({title:r},!1)),description:null===(l=t.connector_publish_result)||void 0===l?void 0:l.map(e=>(0,p.jsx)(ek,{result:e,onShowWebSdkGuide:n}))});return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(g.Rg.Step,(0,_._)({},c)),a]})}function eP(e){var{record:t}=e;return(0,p.jsxs)(g.Rg,{type:"basic",direction:"vertical",size:"small",children:[(0,p.jsx)(eC,{record:t}),(0,p.jsx)(g.Rg.Step,(0,_._)({},function(e){var t=V.o.t("project_release_coze_audit");if("number"!=typeof e.publish_status)return ew(t);switch(e.publish_status){case R.Packing:case R.PackFailed:return ew(t);case R.Auditing:return{status:"process",icon:(0,p.jsx)(ey,{status:"process"}),title:(0,p.jsx)(ex,{title:t,tag:V.o.t("project_release_in_progress"),color:"brand"})};case R.AuditNotPass:return{status:"error",icon:(0,p.jsx)(ey,{status:"error"}),title:(0,p.jsx)(ex,{title:t,tag:V.o.t("project_release_not_pass"),color:"red"})};default:return{status:"finish",icon:(0,p.jsx)(ey,{status:"finish"}),title:(0,p.jsx)(ex,{title:t,tag:V.o.t("project_release_pass"),color:"green"})}}}(t))),(0,p.jsx)(eN,{record:t})]})}var eS=e=>{var{projectId:t,spaceId:n}=e,{publishRecordDetail:l}=C((0,h.N)(e=>({publishRecordDetail:e.publishRecordDetail}))),[o]=(0,J.V)(),{ready:r,inited:i}=(0,$.N)({type:X.jH.Project,spaceId:n,intelligenceId:t,enable:o["bot.studio.publish_management"]&&!1});return(0,p.jsxs)("div",{children:[(0,p.jsxs)("div",{className:"my-[32px] p-[16px] flex flex-col items-center",children:[(0,p.jsx)(H.G70,{className:"text-[48px] coz-fg-dim"}),(0,p.jsx)("div",{className:"text-[16px] font-medium mt-[8px] leading-[22px]",children:V.o.t("project_release_already_released")}),(0,p.jsx)("div",{className:"text-[12px] coz-fg-dim leading-[16px]",children:V.o.t("project_release_already_released_desc")}),(o["bot.studio.publish_management"],null)]}),(0,p.jsx)("div",{className:"rounded-[12px] w-[480px] coz-stroke-primary coz-bg-max border border-solid px-[24px] pt-[16px] m-auto mb-[48px]",children:(0,p.jsx)(eP,{record:l})})]})};n("616405");var eT=n("988179"),ez=n("998600"),eI=()=>({[z.APIOrSDK]:(0,f.useRef)(null),[z.MiniProgram]:(0,f.useRef)(null),[z.SocialPlatform]:(0,f.useRef)(null),[z.Coze]:(0,f.useRef)(null),[z.CozeSpaceExtensionLibrary]:(0,f.useRef)(null)}),eO=e=>{var{containerScrollTop:t,connectorRefMap:n,connectorBarHeight:l,publishHeaderHeight:o}=e,r=Object.entries(n).map(e=>{var[,t]=e;return t.current}).filter(e=>!!e).map(e=>({offsetTop:e.offsetTop-t-o-l,target:e})).sort((e,t)=>e.offsetTop-t.offsetTop),i=r.filter(e=>e.offsetTop<=0),a=i.length?i.at(-1):r.at(0);return null==a?void 0:a.target},eE=()=>{var[e,t]=(0,f.useState)(),n=(0,f.useRef)(null),{getContainerRef:l}=K(),o=eI(),{publishHeaderHeight:r}=K(),[i,a]=(0,f.useState)({[z.APIOrSDK]:!1,[z.MiniProgram]:!1,[z.SocialPlatform]:!1,[z.Coze]:!1,[z.CozeSpaceExtensionLibrary]:!1}),s=(0,f.useRef)(!1),c=()=>{s.current=!0},u=()=>{s.current=!1},d=(0,ez.Z)(u,{wait:300}),p=(0,ez.Z)(u,{wait:300});(0,f.useEffect)(()=>{var e,i=null===(e=l())||void 0===e?void 0:e.current,a=n.current;if(!!i&&!!a){var c=()=>{if(!s.current)t(eO({containerScrollTop:i.scrollTop,connectorRefMap:o,connectorBarHeight:a.offsetHeight,publishHeaderHeight:r}))};c();var u=()=>{p.cancel(),d.run(),c()};return i.addEventListener("scroll",u),()=>{i.removeEventListener("scroll",u)}}},[l,o,r]);var h=e=>{a(t=>(0,b._)((0,_._)({},t),{[e]:!0}))};return{connectorRefMap:o,activeConnectorTarget:e,connectorBarRef:n,scrollToConnector:e=>{var i,a=n.current,s=null===(i=l())||void 0===i?void 0:i.current,u=o[e].current;if(!!a&&!!s&&!!u)s.scrollTo({behavior:"smooth",top:u.offsetTop-r-a.offsetHeight}),h(e),t(u),c(),p.run()},closeAnimation:e=>{a(t=>(0,b._)((0,_._)({},t),{[e]:!1}))},animationStateMap:i}},eA=n("378925"),eL=n("670324"),eD=eL.z.object({projectId:eL.z.string(),connectorIdBeforeRedirect:eL.z.string()}),eR=eL.z.record(eD),eM=new class e{constructor(){this.PUBLISH_ANCHOR_KEY="coz_project_publish_anchor",this.anchorValues={},this.load=()=>{try{var e=localStorage.getItem(this.PUBLISH_ANCHOR_KEY),t=(0,N.f5)(e),n=eR.parse(t);this.anchorValues=n}catch(e){this.anchorValues={}}},this.save=()=>{localStorage.setItem(this.PUBLISH_ANCHOR_KEY,JSON.stringify(this.anchorValues))},this.setAnchor=e=>{var{userId:t,projectId:n,connectorId:l}=e;this.anchorValues=(0,j.Uy)(this.anchorValues,e=>{e[t]={projectId:n,connectorIdBeforeRedirect:l}}),this.save()},this.getAnchor=e=>{var{userId:t,projectId:n}=e,l=this.anchorValues[t];if((null==l?void 0:l.projectId)===n)return l},this.removeAnchor=e=>{var{userId:t,projectId:n}=e;if(!!this.getAnchor({userId:t,projectId:n}))delete this.anchorValues[t],this.save()},this.clearAll=()=>{localStorage.removeItem(this.PUBLISH_ANCHOR_KEY),this.anchorValues={}},this.load()}},eZ=()=>{var e,t=null===(e=(0,eA.Pc)())||void 0===e?void 0:e.user_id_str,n=(0,v.useParams)().project_id;return{setAnchor:e=>{if(!!t&&!!n)return eM.setAnchor({projectId:n,userId:t,connectorId:e})},getAnchor:()=>{if(!!t&&!!n)return eM.getAnchor({userId:t,projectId:n})},removeAnchor:()=>{if(!!t&&!!n)return eM.removeAnchor({userId:t,projectId:n})}}},eB=e=>{var{connectorGroupList:t,connectorRefMap:n}=e,{getAnchor:l,removeAnchor:o}=eZ(),{getContainerRef:r}=K();(0,f.useEffect)(()=>{var e,i,a,s=l();if(!s)return;var c=t.find(e=>e.connectors.some(e=>e.id===s.connectorIdBeforeRedirect));if(!!c){var u=n[c.type],{updateSelectedConnectorIds:d}=C.getState();d(e=>e.some(e=>e===s.connectorIdBeforeRedirect)?e:e.concat(s.connectorIdBeforeRedirect)),null===(a=r())||void 0===a||null===(i=a.current)||void 0===i||i.scrollTo({top:null===(e=u.current)||void 0===e?void 0:e.offsetTop,behavior:"smooth"}),o()}},[t,n])},eU=n("567282");function eF(e){var t=void 0!==e,{space_id:n="",project_id:l=""}=(0,v.useParams)(),{data:o,loading:r}=(0,F.Z)((0,S._)(function*(){var o;return null===(o=(yield O.OH.GetWorkFlowList({space_id:n,project_id:l,flow_mode:eU.wz.ChatFlow,page:1,size:100,checker:t?[e]:void 0})).data.workflow_list)||void 0===o?void 0:o.map(n=>{var l,o,r,i;return{label:n.name,value:n.workflow_id,disabled:!!t&&(null===(o=n.check_result)||void 0===o?void 0:null===(l=o.find(t=>t.type===e))||void 0===l?void 0:l.is_pass)!==!0,tooltip:null===(i=n.check_result)||void 0===i?void 0:null===(r=i.find(t=>t.type===e))||void 0===r?void 0:r.reason}})}));return{chatflowOptions:o,loading:r}}function eV(e){var{option:t,tooltip:n,children:l}=e,o=(0,p.jsxs)("div",{className:G()("coz-select-option-item p-[8px] gap-x-[8px] items-center",{"!cursor-not-allowed":t.disabled}),onClick:t.onClick,children:[(0,p.jsx)("div",{className:"w-[16px] h-[16px] shrink-0",children:t.selected?(0,p.jsx)(H.P03,{className:"coz-fg-hglt"}):null}),null!=l?l:(0,p.jsx)(g.ZT.Text,{className:"leading-[16px]",disabled:t.disabled,children:t.label})]});return n?(0,p.jsx)(g.u,{theme:"dark",position:"right",trigger:"hover",content:n,children:o}):o}var eH=e=>{var t,n,{className:l}=e,{connectorList:o,selectedConnectorIds:r,socialPlatformChatflow:i,setProjectPublishInfo:a}=C((0,h.N)(e=>({connectorList:e.connectorList,selectedConnectorIds:e.selectedConnectorIds,socialPlatformChatflow:e.socialPlatformChatflow,setProjectPublishInfo:e.setProjectPublishInfo}))),s=o.some(e=>r.includes(e.id)&&e.connector_classification===z.SocialPlatform),{chatflowOptions:c}=eF(eU.gf.SocialPublish),u=e=>{a({socialPlatformChatflow:{selected_workflows:[{workflow_id:e.value,workflow_name:e.label}]}})};return(0,p.jsx)("div",{className:G()("w-[50%] pr-[6px]",l),children:(0,p.jsx)(g.ih,{field:"social_platform_chatflow",noLabel:!0,label:V.o.t("project_release_chatflow2"),placeholder:V.o.t("project_release_chatflow_choose"),optionList:c,initValue:null==i?void 0:null===(n=i.selected_workflows)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.workflow_id,className:"w-full mb-[4px]",renderOptionItem:e=>(0,p.jsx)(eV,{option:e,tooltip:e.tooltip}),onSelect:(e,t)=>u(t),rules:[{required:s},{validator:(e,t)=>{if(!s)return!0;var n=null==c?void 0:c.find(e=>e.value===t);return n?!n.disabled||Error(n.tooltip):Error(V.o.t("project_release_chatflow3"))}}]})})},eW=n("960878"),eq={};eq.styleTagTransform=eh(),eq.setAttributes=eu(),eq.insert=es().bind(null,"head"),eq.domAPI=ei(),eq.insertStyleElement=ep(),eo()(eW.Z,eq);var eK=eW.Z&&eW.Z.locals?eW.Z.locals:void 0,eY=e=>{var{onClick:t,isActive:n,children:l,selectedConnectorCount:o}=e;return(0,p.jsxs)(g.zx,{onClick:t,color:n?"highlight":"secondary",className:"!px-8px !font-medium",children:[l,o>0?(0,p.jsx)(g.Ct,{countClassName:G()(!n&&"!coz-mg-plus !coz-fg-secondary","!font-medium"),className:"ml-4px",count:o,type:"alt"}):null]})},eQ=(0,f.forwardRef)((e,t)=>{var{className:n,style:l,children:o}=e;return(0,p.jsx)("div",{ref:t,className:G()("flex items-center gap-x-8px h-[80px] relative",eK.mask,n),style:l,children:o})}),eG=n("177001"),eX=n("801210"),eJ={};eJ.styleTagTransform=eh(),eJ.setAttributes=eu(),eJ.insert=es().bind(null,"head"),eJ.domAPI=ei(),eJ.insertStyleElement=ep(),eo()(eX.Z,eJ);var e$=eX.Z&&eX.Z.locals?eX.Z.locals:void 0;function e0(e){var{label:t,tooltipContent:n,showTooltipInfo:l,isHighlight:o,type:r,onAnimationEnd:i}=e,a=r===z.APIOrSDK,s=(0,eG.CZ)({scene:eG.ej.API}),{node:c,open:u}=(0,eG.zv)({scene:eG.ej.API});return(0,p.jsxs)("div",{className:G()("mb-8px px-2px coz-fg-secondary flex items-center gap-x-4px",o&&e$.highlight),onAnimationEnd:i,children:[(0,p.jsx)("p",{className:"text-[14px] font-[500] leading-[20px]",children:t}),a&&!s?(0,p.jsxs)(g.T,{className:"text-[12px] ml-[8px]",spacing:2,children:[(0,p.jsx)(H.sWZ,{className:"coz-fg-hglt"}),V.o.t("coze_quota_exemption_notice",{link:(0,p.jsx)("div",{className:"coz-fg-hglt cursor-pointer",onClick:u,children:V.o.t("coze_upgrade_package")})})]}):null,l?(0,p.jsx)(g.u,{theme:"dark",trigger:"hover",content:n,children:(0,p.jsx)(H.L03,{className:"text-xxl"})}):null,c]})}var e1=n("484782"),e2=n("966140"),e4=e=>{var{category_id:t,display_screen:n}={category_id:"category_id",display_screen:"display_screen"};return!!e[t]&&!!e[n]},e3=n("808914"),e5=n("653894"),e6=n("61910"),e8=n("963246"),e9=n("904896"),e7=(0,e6.Z)(function(e){return(0,e8.Z)((0,e5.Z)(e,1,e9.Z,!0))}),te=n("311807"),tt=n("974235"),tn=e=>{var t,n,l,{record:o}=e,[r,i]=(0,f.useState)(!1),[a,s]=(0,f.useState)(""),[c,u]=(0,f.useState)([]),{space_id:d="",project_id:m=""}=(0,v.useParams)(),{connectorPublishConfig:x,setProjectPublishInfo:y,connectorList:j,selectedConnectorIds:k}=C((0,h.N)(e=>({connectorPublishConfig:e.connectorPublishConfig,setProjectPublishInfo:e.setProjectPublishInfo,connectorList:e.connectorList,selectedConnectorIds:e.selectedConnectorIds}))),w=(0,f.useRef)(null);var{loading:N,data:P,loadingMore:T}=(0,tt.Z)((t=(0,S._)(function*(e){var t,n,l,o,r,i=yield O.OH.GetWorkFlowList({space_id:d,project_id:m,flow_mode:eU.wz.All,checker:[eU.gf.MCPPublish],size:15,page:null!==(l=null==e?void 0:e.nextPageIndex)&&void 0!==l?l:1,name:a});return{list:null!==(o=null===(t=i.data)||void 0===t?void 0:t.workflow_list)&&void 0!==o?o:[],total:Number(null!==(r=null===(n=i.data)||void 0===n?void 0:n.total)&&void 0!==r?r:0),nextPageIndex:((null==e?void 0:e.nextPageIndex)||1)+1}}),function(e){return t.apply(this,arguments)}),{target:w,reloadDeps:[a],isNoMore:e=>!!(!(null==e?void 0:e.total)||(e.nextPageIndex-1)*15>=e.total)}),z=null==P?void 0:null===(n=P.list)||void 0===n?void 0:n.filter(e=>{var t;return null===(t=(0,e3.Z)(null==e?void 0:e.check_result,{type:eU.gf.MCPPublish}))||void 0===t?void 0:t.is_pass}),I=c.length>0&&c.length<((null==z?void 0:z.length)||0),E=c.length===((null==z?void 0:z.length)||0),A=()=>{i(!1)};return{open:()=>{i(!0);var e,t,n=null==x?void 0:null===(e=x[o.id])||void 0===e?void 0:e.selected_workflows;u(null!==(t=null==n?void 0:n.map(e=>{var t;return null!==(t=e.workflow_id)&&void 0!==t?t:""}))&&void 0!==t?t:[])},close:A,node:(0,p.jsxs)(g.u_,{title:V.o.t("app_publish_connector_space_mcp_config_dialog_title"),size:"large",visible:r,onCancel:A,okButtonProps:{loading:N,disabled:!c.length},okText:V.o.t("app_publish_connector_space_mcp_config_dialog_confirm"),cancelText:V.o.t("app_publish_connector_space_mcp_config_dialog_cancel"),onOk:()=>{y({connectorPublishConfig:(0,b._)((0,_._)({},x),{[o.id]:{selected_workflows:c.map(e=>{var t=(0,e3.Z)(null==P?void 0:P.list,{workflow_id:e});return{workflow_id:null==t?void 0:t.workflow_id,workflow_name:null==t?void 0:t.name}})}}),connectorList:j.map(e=>e.id===o.id?(0,b._)((0,_._)({},e),{config_status:L.Configured}):e),selectedConnectorIds:e7(k,[o.id])}),A()},children:[(0,p.jsx)("div",{className:"text-[12px]",children:V.o.t("app_publish_connector_space_mcp_config_dialog_desc")}),(0,p.jsxs)(g.T,{className:"mb-[16px]",spacing:4,children:[(0,p.jsx)("div",{className:"text-[12px]",children:V.o.t("app_publish_connector_space_mcp_config_dialog_desc2")}),(0,p.jsx)(g.u,{position:"top",content:(0,p.jsx)("div",{className:"whitespace-pre-line",children:V.o.t("app_publish_connector_space_mcp_config_dialog_hover_wf_constraints")}),children:(0,p.jsx)(H.L03,{className:"text-[14px]"})})]}),(0,p.jsxs)("div",{className:"font-[500] mb-[12px]",children:[V.o.t("app_publish_connector_space_mcp_config_dialog_choose_wf"),(0,p.jsx)("span",{className:"coz-fg-hglt-red",children:"*"})]}),(0,p.jsxs)("div",{className:"border border-solid coz-stroke-primary rounded py-[12px]",children:[(0,p.jsx)("div",{className:"mx-[12px]",children:(0,p.jsx)(g.ol,{className:"!w-full",placeholder:V.o.t("app_publish_connector_space_mcp_config_dialog_search_placeholder"),value:a,onSearch:(0,te.Z)(e=>{s(e)},500)})}),(0,p.jsx)(g.iz,{className:"my-[8px]"}),(0,p.jsxs)("div",{className:"mx-[12px]",children:[(null==P?void 0:P.list.length)?(0,p.jsx)(g.XZ,{className:"my-[8px] px-[4px]",indeterminate:I,checked:E,onChange:e=>{u(e.target.checked&&(null==z?void 0:z.map(e=>e.workflow_id||""))||[])},children:V.o.t("app_publish_connector_space_mcp_config_dialog_filter_all")}):null,(0,p.jsxs)("div",{ref:w,className:"max-h-[300px] overflow-x-hidden overflow-y-auto",children:[(0,p.jsx)(g.XZ.Group,{className:"gap-[4px]",value:c,onChange:u,children:null==P?void 0:null===(l=P.list)||void 0===l?void 0:l.map(e=>{var t=(0,e3.Z)(null==e?void 0:e.check_result,{type:eU.gf.MCPPublish});return(0,p.jsx)(g.XZ,{className:"p-[4px]",value:e.workflow_id,disabled:!(null==t?void 0:t.is_pass),children:(null==t?void 0:t.is_pass)?e.name:(0,p.jsx)(g.u,{position:"top",content:null==t?void 0:t.reason,children:e.name})},e.workflow_id)})}),T&&(null==P?void 0:P.list.length)?(0,p.jsx)("div",{className:"text-center",children:(0,p.jsx)(g.yC,{size:"small"})}):null,(null==P?void 0:P.list.length)?null:(0,p.jsx)(g.ub,{className:"my-[80px] mx-auto",icon:(0,p.jsx)(H.nL$,{}),title:V.o.t("app_publish_connector_space_mcp_config_dialog_no_results_found")})]})]})]})]})}},tl=e=>{var{record:t}=e,{node:n,open:l}=tn({record:t});return(0,p.jsxs)("div",{className:"basis-full self-end",onClick:e=>{e.stopPropagation()},children:[(0,p.jsx)(g.zx,{color:"primary",size:"small",onClick:()=>{l()},children:t.config_status===L.Configured?V.o.t("enterprise_sso_seetings_page_desc_button1"):V.o.t("bot_publish_action_configure")}),n]})},to=n("44172"),tr=e=>{var t,n,l,{record:o}=e,{connectorUnionMap:r,unions:i,setProjectPublishInfo:a}=C((0,h.N)(e=>({connectorUnionMap:e.connectorUnionMap,unions:e.unions,setProjectPublishInfo:e.setProjectPublishInfo}))),s=null!==(n=o.connector_union_id)&&void 0!==n?n:"",c=(null!==(l=null===(t=r[s])||void 0===t?void 0:t.connector_options)&&void 0!==l?l:[]).map(e=>({label:e.show_name,value:e.connector_id})),u=e=>{a({unions:(0,b._)((0,_._)({},i),{[s]:e})})};return(0,p.jsx)("div",{className:"flex",onClick:e=>e.stopPropagation(),children:(0,p.jsx)(g.ih,{noLabel:!0,field:"union_select_".concat(s),fieldClassName:"w-[172px]",className:"w-full",optionList:c,initValue:i[s],arrowIcon:(0,p.jsx)(to.Wdl,{}),onSelect:e=>u(e)})})},ti=n("243238"),ta=n("601477");function ts(e){var t,n,l,{checked:o,record:r,onClick:i}=e,{connectorPublishConfig:a,setProjectPublishInfo:s}=C((0,h.N)(e=>({connectorPublishConfig:e.connectorPublishConfig,setProjectPublishInfo:e.setProjectPublishInfo}))),c=null==a?void 0:null===(l=a[r.id])||void 0===l?void 0:null===(n=l.selected_workflows)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.workflow_id,{chatflowOptions:u}=eF(),d=e=>{s({connectorPublishConfig:(0,b._)((0,_._)({},a),{[r.id]:{selected_workflows:[{workflow_id:e.value,workflow_name:e.label}]}})})},f=()=>{C.getState().setProjectPublishInfoByImmer(e=>{var t=e[r.id];if(!!(null==t?void 0:t.selected_workflows))delete t.selected_workflows})};return(0,p.jsx)("div",{className:G()("flex mt-auto"),onClick:i,children:(0,p.jsx)(g.ih,{field:"sdk_chatflow",noLabel:!0,showClear:!0,noErrorMessage:!0,fieldClassName:"w-[172px]",className:"w-full",placeholder:V.o.t("project_release_Please_select"),initValue:c,optionList:u,renderOptionItem:e=>(0,p.jsx)(eV,{option:e,tooltip:e.tooltip}),onChange:e=>{if(void 0===e)f()},onSelect:(e,t)=>d(t),rules:[{required:o,message:V.o.t("project_release_Please_select")},{validator:(e,t)=>{if(!o)return!0;var n=null==u?void 0:u.find(e=>e.value===t);return n?!n.disabled||Error(n.tooltip):Error(V.o.t("project_release_chatflow3"))}}]})})}var tc=n("117140");function tu(e){var t={disabled:!1===e.available,tooltip:e.unavailable_reason};return e.ui_channel===tc.T9.Web.toString()?(0,_._)({value:"web",label:V.o.t("builder_canvas_tools_pc")},t):(0,_._)({value:"mobile",label:V.o.t("builder_canvas_tools_phone")},t)}function td(e){var t,n,l,o;return{title:e.name,cover_uri:null!==(l=null===(n=e.covers)||void 0===n?void 0:null===(t=n[0].response)||void 0===t?void 0:t.uri)&&void 0!==l?l:"",description:e.description,readme:e.readme,display_screen:e.preview_type,category_id:null!==(o=e.category)&&void 0!==o?o:""}}var tp=n("178626"),tf=n("902845");var th=(u=(0,S._)(function*(e){var{fileInstance:t,onProgress:n,onSuccess:l,onError:o}=e;try{if(!t)throw Error("no file to upload");var r,i=yield O.yF.PublicUploadImage({data:yield(r=t,new Promise((e,t)=>{var n=new FileReader;n.onload=n=>{var l,o=null===(l=n.target)||void 0===l?void 0:l.result;"string"==typeof o?e(o.slice(o.indexOf(",")+1)):t(Error("readAsDataURL failed"))},n.readAsDataURL(r)}))},{onUploadProgress:e=>{var l;return n({total:null!==(l=e.total)&&void 0!==l?l:t.size,loaded:e.loaded})}});l(i.data)}catch(e){o(e instanceof tf.d7?e.request:{})}}),function(e){return u.apply(this,arguments)});var tm=(d=(0,S._)(function*(e){var{fileInstance:t,onProgress:n,onSuccess:l,onError:o}=e;try{if(!t)throw Error("no file to upload");var r,i=yield(0,N.fr)({biz:"store",file:t,fileType:"image",getUploadAuthToken:(0,S._)(function*(){var{data:e}=yield O.yF.PublicGetImageUploadToken();return{data:{service_id:(null==e?void 0:e.service_id)||"",upload_host:(null==e?void 0:e.upload_host)||"",auth:{current_time:(null==e?void 0:e.current_time)||"",expired_time:(null==e?void 0:e.expired_time)||"",session_token:(null==e?void 0:e.session_token)||"",access_key_id:(null==e?void 0:e.access_key_id)||"",secret_access_key:(null==e?void 0:e.secret_access_key)||""}}}}),getProgress:e=>{n({total:t.size,loaded:e})}}),a=yield O.yF.PublicGetImageURL({uri:i});l({uri:i,url:null===(r=a.data)||void 0===r?void 0:r.url})}catch(e){o(e instanceof tf.d7?e.request:{})}}),function(e){return d.apply(this,arguments)});function tg(e){var{data:t,loading:n}=(0,F.Z)((0,S._)(function*(){var t,n;return null===(n=(yield O.yF.PublicGetProductCategoryList({need_empty_category:!0,entity_type:e})).data)||void 0===n?void 0:null===(t=n.categories)||void 0===t?void 0:t.map(e=>({label:e.name,value:e.id}))}));return{categoryOptions:t,loading:n}}var tv=n("824113");function t_(e){var{userInfo:t,cover:n,name:l,description:o}=e,r=(null==t?void 0:t.user_label)?{name:t.user_label.label_name,icon:t.user_label.icon_url,href:t.user_label.jump_link}:void 0;return(0,p.jsxs)("div",{className:"flex flex-col overflow-hidden p-[12px] pb-[16px] rounded-[16px] border border-solid coz-stroke-primary coz-bg-max coz-shadow-small",children:[(0,p.jsx)("div",{className:"relative w-full h-[140px] rounded-[8px] overflow-hidden",children:(0,p.jsx)(g.Ee,{preview:!1,src:n,className:"w-full h-full",imgCls:"w-full h-full object-cover object-center",placeholder:(0,p.jsx)(H.Q2$,{className:"w-[32px] h-[32px]"})})}),(0,p.jsxs)("div",{className:"mt-[8px] px-[4px] grow flex flex-col",children:[(0,p.jsx)("div",{className:"flex items-center gap-[8px] overflow-hidden",children:(0,p.jsx)(g.ZT.Text,{className:"!font-medium text-[16px] leading-[22px] coz-fg-primary !max-w-[180px]",ellipsis:{showTooltip:!0,rows:1},children:null!=l?l:V.o.t("project_release_template_info_name")})}),(0,p.jsx)(tv.gj,{className:"mt-[4px]",avatar:null==t?void 0:t.avatar_url,name:null==t?void 0:t.name,username:null==t?void 0:t.user_name,label:r}),(0,p.jsx)("div",{className:"mt-[8px] flex flex-col justify-between grow",children:(0,p.jsx)(g.ZT.Text,{className:"min-h-[44px] leading-[20px] coz-fg-secondary",ellipsis:{showTooltip:!0,rows:2},children:null!=o?o:V.o.t("project_release_template_info_desc")})})]})]})}var tb=n("903979"),tx={};tx.styleTagTransform=eh(),tx.setAttributes=eu(),tx.insert=es().bind(null,"head"),tx.domAPI=ei(),tx.insertStyleElement=ep(),eo()(tb.Z,tx);var ty=tb.Z&&tb.Z.locals?tb.Z.locals:void 0;function tj(e){return[{required:!0,message:V.o.t("project_release_template_info_not",{template_info_type:V.o.t(e)})}]}var tk=(0,f.forwardRef)((e,t)=>{var n,l,o,r,{record:i,userInfo:a}=e,[s]=(0,J.V)(),c=s["bot.studio.project_publish_imagex"]?tm:th,u=null!==(r=null===(n=i.UIOptions)||void 0===n?void 0:n.map(tu))&&void 0!==r?r:[],d=(0,f.useRef)(null),[h,m]=(0,f.useState)({}),v=(0,f.useRef)(),{categoryOptions:b}=tg(tc._J.TemplateCommon);(0,f.useImperativeHandle)(t,()=>({fillInitialValues:e=>{var t,n,l=null===(t=d.current)||void 0===t?void 0:t.formApi;if(!!l){l.setValues(e,{isOverride:!0});var o=(0,N.f5)(e.readme);o&&(null===(n=v.current)||void 0===n||n.setContent(new tp.DeltaSet((0,tp.normalizeSchema)(o)))),Object.keys(e).forEach(e=>l.setError(e,null))}},validate:()=>{var e,t;return null===(t=d.current)||void 0===t?void 0:null===(e=t.formApi)||void 0===e?void 0:e.validate()}}));var x=V.o.language.startsWith("zh");return(0,p.jsxs)(g.l0,{ref:d,className:G()("flex gap-[24px]",ty["template-form"]),onValueChange:e=>m((0,_._)({},e)),children:[(0,p.jsxs)("div",{className:"w-[320px] absolute flex flex-col h-full justify-center",children:[(0,p.jsx)(t_,{userInfo:a,cover:null==h?void 0:null===(o=h.covers)||void 0===o?void 0:null===(l=o[0])||void 0===l?void 0:l.url,name:null==h?void 0:h.name,description:null==h?void 0:h.description}),(0,p.jsx)(g.l0.Checkbox,{field:"agreement",noLabel:!0,className:"mt-[16px]",rules:[{validator:(e,t)=>!0===t,message:V.o.t("template_buy_paid_agreement_toast")}],children:(0,p.jsxs)(g.ZT.Text,{children:[V.o.t("template_buy_paid_agreement_action"),(0,p.jsx)(g.ZT.Text,{className:"ml-[4px]",link:{href:"/docs/guides/terms_of_template",target:"_blank"},children:V.o.t("template_buy_paid_agreement_detail")})]})})]}),(0,p.jsx)("div",{className:"w-[320px] shrink-0"}),(0,p.jsxs)("div",{className:"grow",children:[(0,p.jsx)(g.yt,{field:"name",label:V.o.t("project_release_template_info_name"),maxLength:x?10:30,rules:tj("project_release_template_info_name")}),(0,p.jsx)(g.l0.Upload,{field:"covers",label:V.o.t("project_release_template_info_poster"),listType:"picture",accept:".jpeg,.jpg,.png,.webp",limit:1,maxSize:5120,action:"",customRequest:c,picWidth:80,picHeight:80,rules:[...tj("project_release_template_info_poster"),{validator:(e,t)=>(null==t?void 0:t.every(e=>!e._sizeInvalid&&"success"===e.status))===!0,message:""}],children:(0,p.jsx)(H.PwN,{className:"w-[24px] h-[24px] coz-fg-primary"})}),(0,p.jsx)(g.yt,{field:"description",label:V.o.t("project_release_template_info_desc"),maxLength:x?100:300,rules:tj("project_release_template_info_desc")}),(0,p.jsx)(f.Suspense,{fallback:null,children:(0,p.jsx)(tp.LazyEditorFullInput,{field:"readme_text",label:V.o.t("project_release_template_info_info"),className:G()("h-[132px]",ty["editor-container"]),maxCount:x?1e3:3e3,getEditor:e=>{v.current=e,e.on(tp.EditorEventType.CONTENT_CHANGE,t=>{var n,l;null===(l=d.current)||void 0===l||null===(n=l.formApi)||void 0===n||n.setValue("readme",JSON.stringify(e.getContent().deltas))})},rules:tj("project_release_template_info_info")})}),(0,p.jsx)(g.ih,{field:"preview_type",label:V.o.t("project_release_template_info_display"),optionList:u,renderOptionItem:e=>(0,p.jsx)(eV,{option:e,tooltip:e.tooltip}),fieldClassName:"w-full",className:"w-full",rules:tj("project_release_template_info_display")}),(0,p.jsx)(g.ih,{field:"category",label:V.o.t("project_release_template_info_category"),optionList:b,fieldClassName:"w-full",className:"w-full",rules:tj("project_release_template_info_category")})]})]})});function tw(e){var t,n,{record:l,onClick:o}=e,[r,i]=(0,f.useState)(!1),[a,s]=(0,f.useState)(),c=(0,f.useRef)(null),[u,d]=(0,f.useState)(),{connectors:m,setProjectPublishInfo:x}=C((0,h.N)(e=>({connectors:e.connectors,setProjectPublishInfo:e.setProjectPublishInfo}))),{project_id:y=""}=(0,v.useParams)();var j=(t=(0,S._)(function*(){var e=yield O.yF.PublicGetProductEntityInfo({entity_id:y,entity_type:tc._J.ProjectTemplate});if(null===(h=e.data.meta_info)||void 0===h?void 0:h.name){var t,n,o,r,i,a,c,u,p,f,h,g,v,j=(t=e.data,n=null===(v=l.UIOptions)||void 0===v?void 0:v.find(e=>e.available),c=V.o.language.startsWith("zh"),f={agreement:(u=null!==(a=t.meta_info)&&void 0!==a?a:{}).status!==tc.Pt.NeverListed||""!==u.readme,name:u.name,covers:null===(o=u.covers)||void 0===o?void 0:o.map(e=>({url:e.url,response:e,status:"success",_sizeInvalid:!1})),description:null===(r=u.description)||void 0===r?void 0:r.substring(0,c?100:300),readme:u.readme||((p=u.description)?'{"0":{"ops":[{"insert":"'.concat(p,'\\n"}],"zoneId":"0","zoneType":"Z"}}'):""),category:null===(i=u.category)||void 0===i?void 0:i.id},n&&(f.preview_type=tu(n).value),f);d(j),x({templateConfigured:!0===j.agreement,connectors:(0,b._)((0,_._)({},m),{[l.id]:td(j)})})}(null===(g=e.data.meta_info)||void 0===g?void 0:g.user_info)&&s(e.data.meta_info.user_info)}),function(){return t.apply(this,arguments)});(0,f.useEffect)(()=>{j()},[]);var k=()=>{i(!1)};var w=(n=(0,S._)(function*(){var e,t=yield null===(e=c.current)||void 0===e?void 0:e.validate();if(!!t)d(t),x({templateConfigured:!0,connectors:(0,b._)((0,_._)({},m),{[l.id]:td(t)})}),k()}),function(){return n.apply(this,arguments)});return(0,p.jsxs)("div",{className:G()("h-full flex items-end",{hidden:!l.allow_publish}),onClick:o,children:[(0,p.jsx)(g.zx,{size:"small",color:"primary",onClick:()=>{var e;null===(e=c.current)||void 0===e||e.fillInitialValues(null!=u?u:{}),i(!0)},children:V.o.t("project_release_template_info")}),(0,p.jsx)(g.u_,{title:V.o.t("project_release_template_info"),width:800,visible:r,closable:!0,onCancel:k,onOk:w,okText:V.o.t("prompt_submit"),lazyRender:!1,keepDOM:!0,children:(0,p.jsx)(tk,{ref:c,record:l,userInfo:a})})]})}var tC=e=>{var t,{checked:n,record:l,onClick:o}=e,{bind_info:r,id:i="",UIOptions:a}=l,s=null!==(t=null==a?void 0:a.map(tu))&&void 0!==t?t:[],c=null==r?void 0:r.display_screen,{connectors:u,setProjectPublishInfo:d}=C((0,h.N)(e=>({connectors:e.connectors,setProjectPublishInfo:e.setProjectPublishInfo}))),{categoryOptions:f}=tg(tc._J.Bot),m=(e,t)=>{d({connectors:(0,b._)((0,_._)({},u),{[i]:(0,b._)((0,_._)({},r,u[i]),{[e]:t})})})};return(0,p.jsxs)("div",{className:G()("flex w-full gap-[6px] mt-auto"),onClick:o,children:[(0,p.jsx)(g.ih,{noLabel:!0,field:"store_display_screen",insetLabel:V.o.t("project_release_display_label"),fieldClassName:"w-[50%]",className:"w-full",initValue:c,optionList:s,renderOptionItem:e=>(0,p.jsx)(eV,{option:e,tooltip:e.tooltip}),rules:[{required:n}],onSelect:e=>m("display_screen",e)}),(0,p.jsx)(g.ih,{noLabel:!0,field:"store_category_id",insetLabel:V.o.t("mkpl_bots_category"),fieldClassName:"w-[50%]",className:"w-full",placeholder:V.o.t("select_category"),initValue:null==r?void 0:r.category_id,optionList:f,rules:[{required:n,message:V.o.t("select_category")}],onSelect:e=>m("category_id",e)})]})};function tN(e){var t,n,{record:l,checked:o,authActionWrapperClassName:r}=e,{setProjectPublishInfo:i,connectorList:a,selectedConnectorIds:s}=C((0,h.N)(e=>({setProjectPublishInfo:e.setProjectPublishInfo,connectorList:e.connectorList,selectedConnectorIds:e.selectedConnectorIds}))),{setAnchor:c}=eZ(),u=e=>{e.stopPropagation()};switch(l.bind_type){case T.KvBind:case T.KvAuthBind:return(0,p.jsx)("div",{className:G()("basis-full self-end",r),children:(0,p.jsx)("div",{className:"inline-flex",onClick:u,children:(0,p.jsx)(ti.S,{record:l,bindSuccessCallback:e=>{if(e){var t=!e.bind_id,n=(0,b._)((0,_._)({},e),{config_status:t?L.NotConfigured:L.Configured,connector_status:t?I.Normal:e.connector_status});i({connectorList:a.map(t=>t.id===e.id?n:t)})}},origin:"project"})})});case T.AuthBind:return(0,p.jsx)("div",{className:G()("basis-full self-end",r),children:(0,p.jsx)("div",{className:"inline-flex",onClick:u,children:(0,p.jsx)(ta.S,{origin:"publish",id:l.id,agentType:"project",channelName:l.name,status:null!==(t=l.config_status)&&void 0!==t?t:L.NotConfigured,onBeforeAuthRedirect:e=>{var{id:t}=e;c(t)},revokeSuccess:()=>{i({connectorList:a.map(e=>e.id===l.id?(0,b._)((0,_._)({},e),{config_status:L.NotConfigured}):e),selectedConnectorIds:s.filter(e=>e!==l.id)})},authInfo:null!==(n=null==l?void 0:l.auth_login_info)&&void 0!==n?n:{},isV2:!0,v2ButtonProps:{color:"primary",size:"small"}})})});case T.WebSDKBind:return(0,p.jsx)(ts,{checked:o,record:l,onClick:u});case T.StoreBind:return(0,p.jsx)(tC,{checked:o,record:l,onClick:u});case T.TemplateBind:if(l.id===k)return(0,p.jsx)(tw,{record:l,onClick:u});return null;default:return null}}var tP=e=>{var{bind_type:t}=e;return t===T.KvBind||t===T.KvAuthBind||t===T.TemplateBind?tS(e):tT(e)},tS=e=>{var{config_status:t=L.Configured}=e,n=t===L.Configured;return{text:({[L.Configured]:V.o.t("bot_publish_columns_status_configured"),[L.NotConfigured]:V.o.t("bot_publish_columns_status_not_configured"),[L.Configuring]:"",[L.Disconnected]:"",[L.NeedReconfiguring]:""})[t],color:n?"green":"primary"}},tT=e=>{var{config_status:t=L.Configured}=e,n=t===L.Configured;return{text:({[L.Configured]:V.o.t("bot_publish_columns_status_authorized"),[L.NotConfigured]:V.o.t("bot_publish_columns_status_unauthorized"),[L.Configuring]:V.o.t("publish_douyin_config_ing"),[L.Disconnected]:"",[L.NeedReconfiguring]:""})[t],color:n?"green":"primary"}},tz=e=>{var{showText:t,tip:n,tagProps:l}=e;return(0,p.jsx)(g.u,{content:n,children:t?(0,p.jsxs)(g.Vp,(0,b._)((0,_._)({color:"yellow"},l),{size:"mini",className:"font-[500]",children:[t,(0,p.jsx)(H.L03,{})]})):(0,p.jsx)(H.L03,{})})},tI=[z.SocialPlatform,z.MiniProgram,z.CozeSpaceExtensionLibrary],tO=e=>{var{record:t}=e;if(!tI.includes(t.connector_classification)||t.bind_type===T.NoBindRequired)return null;var{text:n,color:l}=tP(t);return(0,p.jsxs)("div",{className:"flex gap-[6px]",children:[(0,p.jsx)(g.Vp,{color:l,size:"mini",className:"font-[500]",children:n}),(null==t?void 0:t.connector_status)===I.Normal?null:(0,p.jsx)(tz,{showText:(null==t?void 0:t.connector_status)===I.InReview?V.o.t("bot_publish_columns_status_in_review"):V.o.t("bot_publish_columns_status_offline"),tip:(null==t?void 0:t.connector_status)===I.InReview?V.o.t("bot_publish_in_review_notice"):V.o.t("bot_publish_offline_notice_no_certain_time",{platform:null==t?void 0:t.name})})]})},tE=e=>{var{bindId:t,checked:n,connectorId:l,className:o,onClick:r}=e,{space_id:i="",project_id:a=""}=(0,v.useParams)(),{setProjectPublishInfo:s,selectedConnectorIds:c,connectorList:u}=C((0,h.N)(e=>({selectedConnectorIds:e.selectedConnectorIds,setProjectPublishInfo:e.setProjectPublishInfo,connectorList:e.connectorList})));return t&&n?(0,p.jsx)(g.zx,{onClick:e=>{r(e),g.u_.confirm({title:V.o.t("project_release_cancel1"),content:V.o.t("project_release_cancel1_desc"),okText:V.o.t("project_release_cancel"),okButtonColor:"red",cancelText:V.o.t("Cancel"),onOk:(0,S._)(function*(){yield O.nA.UnBindConnector({bind_id:t,agent_type:1,space_id:i,bot_id:a,connector_id:l}),s({selectedConnectorIds:c.filter(e=>e!==l),connectorList:u.map(e=>e.id===l?(0,b._)((0,_._)({},e),{bind_id:""}):e)})})})},size:"small",color:"primary",className:G()("w-max",o),children:V.o.t("project_release_cancel")}):null};function tA(e){var t,n,l,{connectorInfo:o,checked:r,onCheckedChange:i,onShowWebSdkGuide:a}=e,{id:s,name:c,description:u,bind_id:d=""}=o,{templateConfigured:m,socialPlatformChatflow:v,connectorPublishConfig:x,connectors:y}=C((0,h.N)(e=>({templateConfigured:e.templateConfigured,socialPlatformChatflow:e.socialPlatformChatflow,connectorPublishConfig:e.connectorPublishConfig,connectors:e.connectors}))),j=(0,f.useRef)(null),w=(0,e2.Z)(j.current),P=function(e){var t,n,l,{connector:o,socialPlatformConfig:r,templateConfigured:i,connectorPublishConfig:a,connectorConfigMap:s}=e;if(o.connector_classification===z.SocialPlatform&&!(null==r?void 0:null===(n=r.selected_workflows)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.workflow_id))return{reason:0,text:V.o.t("project_release_chatflow4")};var c={reason:1,text:V.o.t("project_release_set_desc")};if(M(o))return c;if(!o.allow_publish&&o.not_allow_publish_reason)return{reason:2,text:o.not_allow_publish_reason};if(o.id===k&&!i)return{reason:3,text:V.o.t("project_release_template_info")};var u=o.connector_classification===z.APIOrSDK&&o.bind_type===T.WebSDKBind,d=!!(null===(l=a[o.id])||void 0===l?void 0:l.selected_workflows);if(u&&!d)return c;var p=o.connector_classification===z.Coze&&o.bind_type===T.StoreBind,f=s[o.id];if(p&&(!f||!e4(f)))return c}({connector:o,socialPlatformConfig:v,templateConfigured:m,connectorPublishConfig:x,connectorConfigMap:y}),S=(null==P?void 0:P.reason)===0,I=null!==(l=(0,N.f5)(o.description_extra))&&void 0!==l?l:{};(0,f.useEffect)(()=>{r&&P&&i(!1)},[r,P]);var O=(0,p.jsx)(g.XZ,{checked:r,onChange:()=>{!P&&i(!r)},"data-testid":"project.publish.select.connector",disabled:!!P}),E=e=>{e.stopPropagation()};var A=(t=[T.KvBind,T.KvAuthBind,T.AuthBind].includes(o.bind_type),n=o.config_status===L.Configured,!t||!n||n&&w),D=(0,p.jsxs)("div",{ref:j,className:G()("w-full min-h-[132px] rounded-[8px] coz-stroke-primary border border-solid coz-mg-card p-[12px] flex",S||P?"cursor-not-allowed":"cursor-pointer",w&&"coz-shadow-default"),onClick:()=>{!P&&i(!r)},children:[(0,p.jsxs)("div",{className:G()("h-full w-full flex flex-col",{"opacity-30 pointer-events-none":S}),children:[(0,p.jsxs)("div",{className:"flex gap-[6px] items-center font-medium",children:[(0,p.jsx)("img",{src:o.icon_url,className:"w-[24px] h-[24px] rounded-[6px] coz-stroke-primary border-[0.5px] border-solid border-solid"}),I.text?(0,p.jsx)(g.u,{theme:"dark",style:{minWidth:"240px",textAlign:"center"},content:(0,p.jsx)(e1.D,{skipHtml:!0,linkTarget:"_blank",components:{img:e=>(0,p.jsx)("img",(0,b._)((0,_._)({},e),{className:"max-w-[224px] max-h-[208px]"}))},children:I.text}),children:(0,p.jsx)("div",{className:"coz-fg-primary cursor-default",children:c})}):(0,p.jsx)("div",{className:"coz-fg-primary cursor-default",children:c}),(0,p.jsx)(tO,{record:o})]}),(0,p.jsx)("div",{className:"mt-[4px] mb-[8px]",children:u?(0,p.jsx)(e1.D,{skipHtml:!0,transformLinkUri:!1,components:{p:e=>(0,p.jsx)(g.ZT.Paragraph,{type:"secondary",fontSize:"12px",children:e.children}),a:e=>{var t="coze://web-sdk-guide"===e.href?{link:!0,onClick:e=>{E(e),a()}}:{link:{href:e.href,target:"_blank",onClick:E}};return(0,p.jsx)(g.ZT.Text,(0,b._)((0,_._)({fontSize:"12px"},t),{children:e.children}))}},children:u}):null}),(0,p.jsxs)("div",{className:"flex flex-wrap grow gap-[6px]",children:[o.connector_union_id?(0,p.jsx)(tr,{record:o}):null,(0,p.jsx)(tN,{record:o,checked:r,authActionWrapperClassName:G()(!A&&"hidden")}),o.connector_classification===z.APIOrSDK?(0,p.jsx)(tE,{bindId:d,checked:r,connectorId:s,className:G()(!A&&"hidden","mt-auto"),onClick:E}):null,o.connector_classification===z.CozeSpaceExtensionLibrary&&o.bind_type===T.TemplateBind&&(0,p.jsx)(tl,{record:o})]})]}),(0,p.jsx)("div",{children:P&&!S?(0,p.jsx)(g.u,{theme:"dark",content:P.text,children:O}):O})]});return(0,p.jsx)(g.u,{theme:"dark",visible:S&&w,content:null==P?void 0:P.text,trigger:"custom",children:D})}var tL=n("788504"),tD={};tD.styleTagTransform=eh(),tD.setAttributes=eu(),tD.insert=es().bind(null,"head"),tD.domAPI=ei(),tD.insertStyleElement=ep(),eo()(tL.Z,tD);var tR=tL.Z&&tL.Z.locals?tL.Z.locals:void 0,tM=e=>e.filter(e=>e.privacy_policy||e.user_agreement).map(e=>({name:e.name,icon:e.icon_url,privacy_policy:e.privacy_policy,user_agreement:e.user_agreement}));function tZ(){var{project_id:e=""}=(0,v.useParams)(),{connectorList:t,connectorUnionMap:n,monetizeConfig:l,selectedConnectorIds:o,connectorPublishConfig:r,unions:i,updateSelectedConnectorIds:a}=C((0,h.N)(e=>({connectorList:e.connectorList,connectorUnionMap:e.connectorUnionMap,monetizeConfig:e.monetizeConfig,selectedConnectorIds:e.selectedConnectorIds,connectorPublishConfig:e.connectorPublishConfig,unions:e.unions,updateSelectedConnectorIds:e.updateSelectedConnectorIds}))),s=(0,f.useMemo)(()=>tM(t),[t]),c=(0,f.useMemo)(()=>(function(e,t,n){var l=function(l){var r=o.find(e=>e.type===l.connector_classification);if(!r)return"continue";if(l.connector_union_id){var i=l.connector_union_id;if(r.connectors.some(e=>e.connector_union_id===i))return"continue";var a=l,s=e.find(e=>e.id===n[i]);if(s)a=s;else{var c=t[i].connector_options[0].connector_id,u=e.find(e=>e.id===c);u&&(a=u)}var d=t[i];r.connectors.push((0,b._)((0,_._)({},a),{name:d.name,description:d.description,icon_url:d.icon_url}))}else r.connectors.push(l)},o=[{type:z.APIOrSDK,label:V.o.t("project_release_api1"),desc:V.o.t("project_release_api_sdk_desc"),connectors:[]},{type:z.MiniProgram,label:V.o.t("project_release_miniprogram1"),desc:V.o.t("project_release_h5_desc"),connectors:[]},{type:z.SocialPlatform,label:V.o.t("project_release_social1"),desc:V.o.t("project_release_social_desc1"),connectors:[]},{type:z.Coze,label:V.o.t("project_release_coze1"),desc:V.o.t("project_release_ts_desc"),connectors:[]},{type:z.CozeSpaceExtensionLibrary,label:V.o.t("app_publish_connector_mcp"),desc:V.o.t("app_publish_connector_mcp"),connectors:[]}];for(var r of e)l(r);return o})(t,n,i).filter(e=>e.connectors.length>0),[t,n,i]),{publishHeaderHeight:u}=K(),{connectorRefMap:d,activeConnectorTarget:m,connectorBarRef:x,scrollToConnector:y,closeAnimation:j,animationStateMap:k}=eE();eB({connectorGroupList:c,connectorRefMap:d});var w=e=>{var t;return o.includes(null!==(t=e.connector_union_id)&&void 0!==t?t:e.id)},N=(e,t)=>{var n,l=null!==(n=e.connector_union_id)&&void 0!==n?n:e.id;t?a(e=>e.concat(l)):a(e=>e.filter(e=>e!==l))},P=e=>{var t=c.find(t=>t.type===e);return t?t.connectors.filter(e=>{var t;return o.includes(null!==(t=e.connector_union_id)&&void 0!==t?t:e.id)}):[]},{node:S,show:T}=eb(),I=()=>{var n,l,o,i,a,s=t.find(e=>"999"===e.id),c=r["999"];T({projectId:e,workflowId:null!==(i=null==c?void 0:null===(l=c.selected_workflows)||void 0===l?void 0:null===(n=l[0])||void 0===n?void 0:n.workflow_id)&&void 0!==i?i:"",version:null!==(a=null==s?void 0:null===(o=s.bind_info)||void 0===o?void 0:o.sdk_version)&&void 0!==a?a:""})};return(0,p.jsxs)("div",{className:"flex flex-col mt-[24px] w-full coz-bg-plus rounded-md p-24px",children:[(0,p.jsxs)("div",{className:"flex items-center justify-between",children:[(0,p.jsx)(g.l0.Label,{required:!0,className:"text-20px font-medium leading-[24px]",children:V.o.t("bot_publish_select_title")}),null]}),s.length?(0,p.jsx)(eT.B5,{scene:"project",termServiceData:s,className:"mt-8px py-0 coz-fg-secondary"}):null,(0,p.jsx)(eQ,{className:"sticky",ref:x,style:{top:u,zIndex:1},children:c.map(e=>(0,p.jsx)(eY,{selectedConnectorCount:P(e.type).length,isActive:m===d[e.type].current,onClick:()=>y(e.type),children:e.label},e.type))}),c.map((e,t)=>{var n=e.type===z.SocialPlatform;return(0,p.jsxs)("div",{ref:d[e.type],style:{marginTop:0===t?0:24},children:[(0,p.jsx)(e0,{label:e.label,tooltipContent:e.desc,showTooltipInfo:n,isHighlight:k[e.type],type:e.type,onAnimationEnd:()=>{j(e.type)}}),n?(0,p.jsx)(eH,{className:"mb-8px"}):null,(0,p.jsx)("div",{className:G()("grid grid-cols-2 gap-[12px]",tR["publish-cards"]),children:e.connectors.map(e=>(0,p.jsx)(tA,{connectorInfo:e,checked:w(e),onCheckedChange:t=>N(e,t),onShowWebSdkGuide:I},e.id))})]},e.type)}),t.length?null:(0,p.jsxs)("div",{className:"flex flex-col justify-center items-center w-full h-full gap-[4px]",children:[(0,p.jsx)(H.nL$,{className:"w-[32px] h-[32px] coz-fg-dim"}),(0,p.jsx)("div",{className:"text-[14px] font-medium coz-fg-primary",children:V.o.t("publish_page_no_channel_status_title")}),(0,p.jsx)("div",{className:"text-[12px] coz-fg-primary",children:V.o.t("publish_page_no_channel_status_desc")})]}),S]})}function tB(){return(tB=(0,S._)(function*(e,t){if(!e)return V.o.t("project_release_example2");var{data:n}=yield O.sD.CheckProjectVersionNumber({project_id:t,version_number:e});return(null==n?void 0:n.is_duplicate)?V.o.t("project_release_example3"):""})).apply(this,arguments)}var tU=n("473980"),tF=n("793828"),tV={};tV.styleTagTransform=eh(),tV.setAttributes=eu(),tV.insert=es().bind(null,"head"),tV.domAPI=ei(),tV.insertStyleElement=ep(),eo()(tF.Z,tV);var tH=tF.Z&&tF.Z.locals?tF.Z.locals:void 0,tW=(0,g.Q2)(e=>{var{inputClassName:t,textAreaClassName:n,wrapperClassName:l,textAreaStyle:o}=e,r=(0,tU._)(e,["inputClassName","textAreaClassName","wrapperClassName","textAreaStyle"]),[i,a]=(0,f.useState)("input"),s=(0,f.useRef)(null);return((0,f.useEffect)(()=>{var e,t=s.current;if("textarea"!==i||!t)return;var n=null===(e=r.value)||void 0===e?void 0:e.length;if(t.focus(),!!n)t.setSelectionRange(n,n)},[i]),"input"===i)?(0,p.jsx)(g.II,(0,b._)((0,_._)({},r),{className:G()(tH["desc-input"],t),onFocus:()=>{a("textarea")}})):(0,p.jsx)("div",{className:l,children:(0,p.jsx)(g.Kx,(0,b._)((0,_._)({},r),{ref:s,className:n,style:o,autoFocus:!0,autosize:{minRows:1,maxRows:10},onBlur:()=>{a("input")}}))})});function tq(){var{project_id:e=""}=(0,v.useParams)(),{lastVersionNumber:t,versionNumber:n,versionDescription:l,setProjectPublishInfo:o}=C((0,h.N)(e=>({lastVersionNumber:e.lastVersionNumber,versionNumber:e.versionNumber,versionDescription:e.versionDescription,setProjectPublishInfo:e.setProjectPublishInfo})));return(0,p.jsxs)("div",{className:"flex flex-col gap-[8px] w-full coz-bg-plus rounded-md p-24px",children:[(0,p.jsx)("div",{className:"text-[20px] coz-fg-plus font-[500] leading-[28px]",children:V.o.t("project_release_version_info")}),(0,p.jsxs)("div",{className:"flex gap-x-12px",children:[(0,p.jsx)(g.l0.Input,{field:"version_num",fieldClassName:"!p-0 flex-[1]",label:(0,p.jsx)("span",{className:"text-14px font-medium",children:V.o.t("builder_publish_version_label")}),placeholder:t?V.o.t("project_release_example1",{version:t}):V.o.t("project_release_example"),initValue:n,className:"bg-transparent coz-stroke-plus",rules:[{required:!0,message:V.o.t("project_release_example2")}],onChange:e=>{o({versionNumber:e})},validate:t=>(function(e,t){return tB.apply(this,arguments)})(t,e),trigger:"blur",maxLength:20}),(0,p.jsx)(tW,{field:"version_desc",fieldClassName:"!p-0 !overflow-visible flex-[1]",label:(0,p.jsx)("span",{className:"text-14px font-medium",children:V.o.t("builder_publish_changelog_label")}),placeholder:V.o.t("builder_publish_changelog_placeholder"),initValue:l,maxLength:800,maxCount:800,wrapperClassName:"relative overflow-visible",inputClassName:"",textAreaClassName:G()("","absolute","top-0","left-0","!coz-bg-max"),textAreaStyle:{zIndex:2},onChange:e=>{o({versionDescription:e})}})]})]})}var tK=e=>{var{children:t}=e,n=(0,f.useRef)(null),[l,o]=(0,f.useState)(97);return(0,p.jsx)(q.Provider,{value:{getContainerRef:()=>n,publishHeaderHeight:l,setPublishHeaderHeight:o},children:(0,p.jsx)("div",{ref:n,className:"flex-[1] w-full h-full overflow-x-hidden coz-bg-primary",children:t})})};function tY(){var{project_id:e="",space_id:t=""}=(0,v.useParams)(),{showPublishResult:n,pageLoading:l,resetProjectPublishInfo:o,exportDraft:r}=C((0,h.N)(e=>({showPublishResult:e.showPublishResult,pageLoading:e.pageLoading,resetProjectPublishInfo:e.resetProjectPublishInfo,exportDraft:e.exportDraft}))),i=(0,m.UQ)();return(0,f.useEffect)(()=>{var t=()=>{var t;t=r(e),localStorage.setItem(P,JSON.stringify(t))};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}},[r,e]),(0,f.useEffect)(()=>(!function(e,t,n){B.apply(this,arguments)}(e,i,function(e){var t=localStorage.getItem(P);if(localStorage.removeItem(P),!!t){var n=(0,N.f5)(t);if((null==n?void 0:n.projectId)===e)return n}}(e)),()=>{o()}),[]),l?(0,p.jsx)(g.yC,{spinning:!0,wrapperClassName:"flex justify-center h-full w-full items-center"}):(0,p.jsx)(tK,{children:(0,p.jsxs)(g.l0,{className:tR.project,showValidateIcon:!1,children:[(0,p.jsx)(Y,{}),n?(0,p.jsx)(eS,{projectId:e,spaceId:t}):(0,p.jsx)("div",{className:"flex justify-center pt-[32px] pb-[48px] coz-bg-primary",children:(0,p.jsxs)("div",{className:"w-[800px]",children:[(0,p.jsx)(tq,{}),(0,p.jsx)(tZ,{})]})})]})})}var tQ=n("942185"),tG={0:{prefixIcon:(0,p.jsx)(H.kSS,{}),color:"brand",text:"project_releasing"},1:{prefixIcon:(0,p.jsx)(H.AYy,{}),color:"red",text:"project_release_failed"},2:{prefixIcon:(0,p.jsx)(H.G70,{}),color:"green",text:"project_release_success"}};function tX(e){var t,n,{spaceId:l,projectId:o,defaultRecordID:r}=e,[i,a]=(0,f.useState)(),[s,c]=(0,f.useState)(),[u,d]=(0,f.useState)([]),[h,m]=(0,f.useState)(r),[v,_]=(0,f.useState)(),[b,x]=(0,f.useState)(!1),y=(0,F.Z)(()=>O.sD.GetPublishRecordDetail({project_id:o}),{manual:!0,pollingInterval:5e3,pollingWhenHidden:!1,pollingErrorRetryCount:3,onSuccess:e=>{var t,n=e.data;if(!n||"number"!=typeof n.publish_status){y.cancel();return}a(function(e){var t,n,l,o,r=e.publish_status===R.PackFailed||e.publish_status===R.AuditNotPass,i=null!==(l=null===(t=e.connector_publish_result)||void 0===t?void 0:t.some(e=>e.connector_publish_status===D.Failed))&&void 0!==l&&l;if(r||i)return 1;var a=e.publish_status===R.Packing||e.publish_status===R.Auditing||e.publish_status===R.ConnectorPublishing,s=null!==(o=null===(n=e.connector_publish_result)||void 0===n?void 0:n.some(e=>e.connector_publish_status===D.Default||e.connector_publish_status===D.Auditing))&&void 0!==o&&o;return a||s?0:2}(n)),c(n),h?h===n.publish_record_id&&_(n):(d([{value:n.publish_record_id,label:n.version_number}]),m(null!==(t=n.publish_record_id)&&void 0!==t?t:"")),W(n)&&y.cancel()}}),j=(0,F.Z)(()=>O.sD.GetPublishRecordList({project_id:o}),{manual:!0,onSuccess:e=>{var t,n;d(null!==(n=null===(t=e.data)||void 0===t?void 0:t.map(e=>({value:e.publish_record_id,label:e.version_number})))&&void 0!==n?n:[])}}),k=(0,tQ.Qb)(tQ.PL.PUBLISH,o,l);(0,f.useEffect)(()=>{if(!!k&&!r)y.run()},[k,r]);var w=(0,F.Z)(e=>O.sD.GetPublishRecordDetail({project_id:o,publish_record_id:e}),{manual:!0,onSuccess:e=>{var t=e.data;_(t),(null==t?void 0:t.publish_record_id)===(null==s?void 0:s.publish_record_id)&&c(t)}}),C=tG[null!=i?i:1],N=null!=v?v:s;var P=(t=(0,S._)(function*(){yield j.runAsync(),r&&(yield T(r)),x(!0)}),function(){return t.apply(this,arguments)});var T=(n=(0,S._)(function*(e){m(e),yield w.run(e)}),function(e){return n.apply(this,arguments)});return{latestVersion:s,currentVersion:u.find(e=>e.value===h),open:P,close:()=>{x(!1)},modal:(0,p.jsx)(g.u_,{title:V.o.t("project_release_stage"),visible:b,footer:null,onCancel:()=>x(!1),children:(0,p.jsxs)("div",{className:"flex flex-col gap-[16px]",children:[(0,p.jsx)(g.Ph,{className:"w-full",optionList:u,value:h,onSelect:e=>{"string"==typeof e&&T(e)}}),N?(0,p.jsx)(eP,{record:N}):null]})}),tag:(0,p.jsx)(g.Vp,{size:"mini",prefixIcon:C.prefixIcon,color:C.color,className:"flex !px-[3px] font-medium",children:V.o.t(C.text)})}}var tJ=()=>new URLSearchParams(location.search).has("devBlock"),t$=e=>{var{spaceId:t,projectId:n,hasPublished:l}=e,o=(0,v.useNavigate)(),{modal:r,tag:i,latestVersion:a,open:s}=tX({spaceId:t,projectId:n}),c=(0,tQ.Qb)(tQ.PL.PUBLISH,n,t),{removeAnchor:u}=eZ(),d=(0,f.useCallback)(()=>{u(),o("/space/".concat(t,"/project-ide/").concat(n,"/publish"))},[t,n,u]),h=(0,tQ.kc)(n),[m]=(0,J.V)(),{ready:_,inited:b}=(0,$.N)({type:X.jH.Project,intelligenceId:n,spaceId:t,enable:(m["bot.studio.publish_management"]&&l&&h.length,!1)});return(V.o.t("analytics_page_title"),H.O84,V.o.t("release_management_trace"),H.da8,V.o.t("release_management_trigger"),H.VGH,c)?l?(0,p.jsxs)(p.Fragment,{children:[r,(0,p.jsx)(g.J2,{trigger:"click",zIndex:999,content:(0,p.jsxs)("div",{className:"px-[4px] py-[8px] rounded-[12px] w-[244px] flex flex-col gap-[12px]",children:[(null==a?void 0:a.version_number)?(0,p.jsxs)("div",{className:"flex justify-between items-center h-[32px] px-[4px] cursor-pointer",onClick:()=>s(),children:[(0,p.jsx)("span",{className:"flex-grow mr-[8px]",children:"".concat(V.o.t("app_ide_publish_modal_recent_publication")," ").concat(null==a?void 0:a.version_number)}),i,(0,p.jsx)(g.hU,{size:"small",className:"ml-[4px]",icon:(0,p.jsx)(H.x5d,{}),color:"secondary"})]}):null,(0,p.jsx)("div",{className:"px-[8px] w-full",children:(0,p.jsx)(g.iz,{})}),(m["bot.studio.publish_management"],null),(0,p.jsx)("div",{className:"px-[4px] w-full",children:(0,p.jsx)(g.zx,{className:"w-full",onClick:d,disabled:tJ(),"data-testid":"project.goto.publish-button",children:V.o.t("app_ide_publish_modal_publish_button")})})]}),children:(0,p.jsxs)(g.zx,{children:[(0,p.jsx)("span",{className:"mr-[4px]",children:V.o.t("project_ide_frame_publish")}),(0,p.jsx)(H.Wdl,{})]})})]}):(0,p.jsx)(g.zx,{onClick:d,disabled:tJ(),"data-testid":"project.goto.publish-button",children:V.o.t("project_ide_frame_publish")}):null}},841622:function(e,t,n){"use strict";var l=n(407821),o=n.n(l),r=n(472772),i=n.n(r),a=n(395245),s=n.n(a),c=n(297998),u=n.n(c),d=n(646576),p=n.n(d),f=n(606121),h=n.n(f),m=n(854385),g={};g.styleTagTransform=h(),g.setAttributes=u(),g.insert=s().bind(null,"head"),g.domAPI=i(),g.insertStyleElement=p(),o()(m.Z,g),t.Z=m.Z&&m.Z.locals?m.Z.locals:void 0},269087:function(e,t,n){"use strict";n(151064),n(455069),t.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04LjMzMzk4IDIuOTk5OTJDOC4zMzM5OCAxLjUyNzE2IDkuNTI3ODkgMC4zMzMyNTIgMTEuMDAwNyAwLjMzMzI1MkgyNy4wMDA2QzI4LjQ3MzQgMC4zMzMyNTIgMjkuNjY3MyAxLjUyNzE2IDI5LjY2NzMgMi45OTk5MlYxOC45OTk5QzI5LjY2NzMgMjAuNDcyNyAyOC40NzM0IDIxLjY2NjYgMjcuMDAwNiAyMS42NjY2SDIxLjY2NzNWMjYuOTk5OUMyMS42NjczIDI4LjQ3MjcgMjAuNDczNCAyOS42NjY2IDE5LjAwMDcgMjkuNjY2NkgzLjAwMDY1QzEuNTI3ODkgMjkuNjY2NiAwLjMzMzk4NCAyOC40NzI3IDAuMzMzOTg0IDI2Ljk5OTlWMTAuOTk5OUMwLjMzMzk4NCA5LjUyNzE2IDEuNTI3ODkgOC4zMzMyNSAzLjAwMDY1IDguMzMzMjVIOC4zMzM5OFYyLjk5OTkyWk04LjMzMzk4IDEwLjk5OTlIMy4wMDA2NVYyNi45OTk5SDE5LjAwMDdWMjEuNjY2NkgxMS4wMDA3QzkuNTI3ODkgMjEuNjY2NiA4LjMzMzk4IDIwLjQ3MjcgOC4zMzM5OCAxOC45OTk5VjEwLjk5OTlaTTE5LjAwMDcgMTguOTk5OUgxMS4wMDA3VjEwLjk5OTlIMTkuMDAwN1YxOC45OTk5Wk0yMS42NjczIDE4Ljk5OTlWMTAuOTk5OUMyMS42NjczIDkuNTI3MTYgMjAuNDczNCA4LjMzMzI1IDE5LjAwMDcgOC4zMzMyNUgxMS4wMDA3VjIuOTk5OTJIMjcuMDAwNlYxOC45OTk5SDIxLjY2NzNaIiBmaWxsPSIjMUQxQzIzIiBmaWxsLW9wYWNpdHk9IjAuMzUiLz4KPC9zdmc+Cg=="},873291:function(e,t,n){"use strict";n(151064),n(455069)},193177:function(e,t,n){"use strict";n(151064),n(455069)},367689:function(e,t,n){"use strict";var l=n(125161),o=n.n(l),r=n(404442),i=n.n(r)()(o());i.push([e.id,'.multiline-text-GVNO_v{word-break:break-word;white-space:pre-wrap}.multiline-container-uIOXgz{flex:1;grid-template-columns:100px 36px 100px;display:grid;overflow:hidden}.editor-container-YQ76sR{border:1px solid var(--Stroke-COZ-stroke-primary,rgba(6,7,9,.1));border-radius:8px;min-height:400px;margin-top:20px;overflow:hidden}.editor-header-rVNsYI{border-bottom:1px solid var(--Stroke-COZ-stroke-primary,rgba(6,7,9,.1));width:100%;display:flex}.editor-title-TtUkQu{color:var(--Fg-COZ-fg-primary,rgba(6,7,9,.8));flex:1;padding:12px;font-size:14px;font-weight:500;overflow:hidden}.editor-divider-sAapKP{width:1px;height:46px;color:var(--Stroke-COZ-stroke-primary,rgba(6,7,9,.1))}.editor-cj3RsF{background-color:transparent;min-height:400px;max-height:600px}.editor-cj3RsF .monaco-editor-background{background-color:#f9f9f9!important}.editor-cj3RsF .monaco-editor .vertical{box-shadow:0 0 0 0 var(--guide-color)inset!important}.editor-cj3RsF .margin{background-color:#f9f9f9!important}.editor-cj3RsF .monaco-diff-editor.side-by-side .editor.modified{border-left:1px solid var(--Stroke-COZ-stroke-primary,rgba(6,7,9,.1));box-shadow:none!important}.editor-cj3RsF .mtk1{color:var(--Fg-COZ-fg-dim,rgba(6,7,9,.6))}.editor-cj3RsF .margin-view-overlays .line-numbers{color:var(--Fg-COZ-fg-dim,rgba(6,7,9,.3));width:24px!important}.editor-cj3RsF .monaco-editor .diagonal-fill{background-size:8px 8px;background-image:linear-gradient(-45deg,rgba(34,34,34,.1) 12.5%,transparent 12.5%,transparent 50%,rgba(34,34,34,.1) 50%,rgba(34,34,34,.1) 62.5%,transparent 62.5%,transparent 100%)!important}.editor-cj3RsF .margin-view-overlays:after{pointer-events:none;background:var(--Stroke-COZ-stroke-primary,rgba(6,7,9,.1));width:1px;position:absolute;top:0;bottom:0;right:3px;content:" "!important}.editor-cj3RsF .line-numbers.active-line-number{color:var(--Fg-COZ-fg-primary,rgba(6,7,9,.8))!important}.editor-cj3RsF .monaco-editor .delete-sign{color:var(--Fg-COZ-fg-dim,rgba(6,7,9,.3))!important;font-size:8px!important;font-weight:900!important;left:29px!important}.editor-cj3RsF .monaco-editor .insert-sign{color:var(--Fg-COZ-fg-dim,rgba(6,7,9,.3))!important;font-size:8px!important;font-weight:900!important;left:29px!important}.editor-cj3RsF .monaco-editor .view-overlays .current-line{border:0!important}.editor-cj3RsF .monaco-scrollable-element>.scrollbar>.slider{background:var(--Fg-COZ-fg-dim,rgba(6,7,9,.3));border-radius:3px;width:8px!important}.editor-cj3RsF .decorationsOverviewRuler{display:none!important}.editor-cj3RsF .modified .slider{left:6px!important}.editor-cj3RsF .modified .presentation{width:12px!important;right:-4px!important}.editor-cj3RsF .original .slider{left:6px!important}.editor-cj3RsF .original .presentation{width:12px!important;left:3px!important}.editor-cj3RsF .gutter-insert{background-color:var(--vscode-diffEditor-insertedLineBackground,var(--vscode-diffEditor-insertedTextBackground))!important}.editor-cj3RsF .gutter-delete{background-color:var(--vscode-diffEditor-removedLineBackground,var(--vscode-diffEditor-removedTextBackground))!important}',""]),i.locals={"multiline-text":"multiline-text-GVNO_v",multilineText:"multiline-text-GVNO_v","multiline-container":"multiline-container-uIOXgz",multilineContainer:"multiline-container-uIOXgz","editor-container":"editor-container-YQ76sR",editorContainer:"editor-container-YQ76sR","editor-header":"editor-header-rVNsYI",editorHeader:"editor-header-rVNsYI","editor-title":"editor-title-TtUkQu",editorTitle:"editor-title-TtUkQu","editor-divider":"editor-divider-sAapKP",editorDivider:"editor-divider-sAapKP",editor:"editor-cj3RsF"},t.Z=i},675940:function(e,t,n){"use strict";var l=n(125161),o=n.n(l),r=n(404442),i=n.n(r)()(o());i.push([e.id,".list-utyqSJ{padding:.75rem 0 .75rem .75rem}.list-utyqSJ .semi-list-item-body-header{flex:1;width:0;overflow:hidden}",""]),i.locals={list:"list-utyqSJ"},t.Z=i},434414:function(e,t,n){"use strict";var l=n(125161),o=n.n(l),r=n(404442),i=n.n(r)()(o());i.push([e.id,".error-container-_IyY_2 .error-link-Pq2VWp .error-link-underline-EVkAXO{color:var(--semi-color-danger);max-width:200px;margin-left:2px;font-size:14px;text-decoration:underline}.error-container-_IyY_2 .error-link-Pq2VWp .error-link-underline-EVkAXO a{color:var(--semi-color-danger)}",""]),i.locals={"error-container":"error-container-_IyY_2",errorContainer:"error-container-_IyY_2","error-link":"error-link-Pq2VWp",errorLink:"error-link-Pq2VWp","error-link-underline":"error-link-underline-EVkAXO",errorLinkUnderline:"error-link-underline-EVkAXO"},t.Z=i},293758:function(e,t,n){"use strict";var l=n(125161),o=n.n(l),r=n(404442),i=n.n(r)()(o());i.push([e.id,".disable-field-jMLuez{padding:12px 0 24px}.disable-field-jMLuez .title-s26PF2{margin-bottom:8px;font-size:14px;font-weight:600}.input-XYeEI3.input-XYeEI3{padding-top:4px}.input-XYeEI3 .semi-input-suffix{cursor:pointer;padding:8px}.link-button-tWRlPA.link-button-tWRlPA.link-button-tWRlPA{background-color:transparent}",""]),i.locals={"disable-field":"disable-field-jMLuez",disableField:"disable-field-jMLuez",title:"title-s26PF2",input:"input-XYeEI3","link-button":"link-button-tWRlPA",linkButton:"link-button-tWRlPA"},t.Z=i},205136:function(e,t,n){"use strict";var l=n(125161),o=n.n(l),r=n(404442),i=n.n(r)()(o());i.push([e.id,".step-order-La7ARW{background:var(--light-color-brand-brand-5,#4d53e8);width:16px;height:16px;color:var(--light-color-white-white,#fff);border-radius:50%;justify-content:center;align-items:center;margin-top:2px;font-size:10px;font-weight:600;display:flex}.step-title-vWRtVL{color:#000;margin-bottom:8px;font-size:14px;font-weight:600;line-height:22px}.markdown-qLZ0zo{color:var(--light-usage-text-color-text-0,#1d1c23);font-size:14px;line-height:22px}",""]),i.locals={"step-order":"step-order-La7ARW",stepOrder:"step-order-La7ARW","step-title":"step-title-vWRtVL",stepTitle:"step-title-vWRtVL",markdown:"markdown-qLZ0zo"},t.Z=i},783915:function(e,t,n){"use strict";var l=n(125161),o=n.n(l),r=n(404442),i=n.n(r)()(o());i.push([e.id,".start-text-pXfZ2p{color:var(--light-usage-text-color-text-0,#1d1c23);font-size:14px;line-height:22px}.config-link-HEiJGW{color:var(--light-color-brand-brand-5,#4d53e8);font-size:12px;line-height:16px}.markdown-PFR8kZ{color:var(--light-usage-text-color-text-0,#1d1c23);font-size:14px;line-height:22px}.guide-XLqN5c{margin-bottom:32px}",""]),i.locals={"start-text":"start-text-pXfZ2p",startText:"start-text-pXfZ2p","config-link":"config-link-HEiJGW",configLink:"config-link-HEiJGW",markdown:"markdown-PFR8kZ",guide:"guide-XLqN5c"},t.Z=i},642801:function(e,t,n){"use strict";var l=n(125161),o=n.n(l),r=n(404442),i=n.n(r)()(o());i.push([e.id,".step-order-kS8rzB{background:var(--light-color-brand-brand-5,#4d53e8);width:16px;height:16px;color:var(--light-color-white-white,#fff);border-radius:50%;justify-content:center;align-items:center;margin-top:2px;font-size:10px;font-weight:600;display:flex}.step-title-fbaFcC{color:#000;margin-bottom:8px;font-size:14px;font-weight:600;line-height:22px}.markdown-ihOOii{color:var(--light-usage-text-color-text-0,#1d1c23);font-size:14px;line-height:22px}.link-area-yqpTLT .link-list-hCIt6h{margin-top:16px}.link-area-yqpTLT .link-list-hCIt6h .title-HQq6si{color:var(--light-usage-text-color-text-0,#1d1c23);font-size:14px;font-weight:600;line-height:22px}.link-area-yqpTLT .link-list-hCIt6h .link-zMA1OB{word-break:break-word}.link-area-yqpTLT .link-list-hCIt6h .semi-form-field-error-message-ig2k1h{position:absolute}",""]),i.locals={"step-order":"step-order-kS8rzB",stepOrder:"step-order-kS8rzB","step-title":"step-title-fbaFcC",stepTitle:"step-title-fbaFcC",markdown:"markdown-ihOOii","link-area":"link-area-yqpTLT",linkArea:"link-area-yqpTLT","link-list":"link-list-hCIt6h",linkList:"link-list-hCIt6h",title:"title-HQq6si",link:"link-zMA1OB","semi-form-field-error-message":"semi-form-field-error-message-ig2k1h",semiFormFieldErrorMessage:"semi-form-field-error-message-ig2k1h"},t.Z=i},854385:function(e,t,n){"use strict";var l=n(125161),o=n.n(l),r=n(404442),i=n.n(r)()(o());i.push([e.id,".info-title-hM03fu{margin-bottom:8px;font-size:16px;font-weight:600}.info-subtitle-xJLDxa{margin-top:12px;margin-bottom:8px;font-size:14px;font-weight:500}.container-LF_kv1{width:100%;height:100%}.diff-table-tF4K3Z{margin-bottom:24px}.diff-table-tF4K3Z .semi-table-row-head{border-bottom:1px solid var(--semi-color-border);font-size:12px;background-color:rgba(46,46,56,.04)!important;padding:4px 8px!important}.diff-table-tF4K3Z .semi-table-row-cell{font-size:12px;padding:10px 8px!important}.cell-span-H_nQzL{word-break:break-word;font-weight:400;font-size:12px!important}.property-tooltip-ji9W4V{word-break:break-word}.empty-container-YLcORh{flex-direction:column;justify-content:center;align-items:center;height:100%;min-height:200px;display:flex}.empty-info-q193R7{margin-top:4px}.list-BE2Xcy{border-radius:8px;border:1px solid var(--Stroke-COZ-stroke-plus,rgba(6,7,9,.15))!important;background-color:#fff!important}.list-BE2Xcy .semi-list-item{border-bottom:1px solid var(--Stroke-COZ-stroke-plus,rgba(6,7,9,.15))!important}.list-BE2Xcy .semi-list-item:last-child{border-bottom:none!important}.list-item-vLj8Sw{grid-template-columns:280px 120px 1fr;align-items:center;display:grid}.tag-1-aqUUN6{color:#3ec254;background-color:#d2f3d5}.tag-2-CdvW0P,.tag-4-MC5w82{color:#ff441e;background-color:#ffe0d2}.tag-3-KTmcm_{color:#ff9600;background-color:#fff1cc}.property-title-Tuf6E1{color:var(--Fg-COZ-fg-primary,rgba(6,7,9,.8));font-size:12px;font-weight:500}.info-block-s33QB0:not(:first-child){margin-top:24px}.mask-U3tgbz{pointer-events:none;background:linear-gradient(to top,rgba(var(--coze-bg-2),1)0,rgba(var(--coze-bg-2),0)100%);width:100%;height:32px;position:absolute;bottom:80px}",""]),i.locals={"info-title":"info-title-hM03fu",infoTitle:"info-title-hM03fu","info-subtitle":"info-subtitle-xJLDxa",infoSubtitle:"info-subtitle-xJLDxa",container:"container-LF_kv1","diff-table":"diff-table-tF4K3Z",diffTable:"diff-table-tF4K3Z","cell-span":"cell-span-H_nQzL",cellSpan:"cell-span-H_nQzL","property-tooltip":"property-tooltip-ji9W4V",propertyTooltip:"property-tooltip-ji9W4V","empty-container":"empty-container-YLcORh",emptyContainer:"empty-container-YLcORh","empty-info":"empty-info-q193R7",emptyInfo:"empty-info-q193R7",list:"list-BE2Xcy","list-item":"list-item-vLj8Sw",listItem:"list-item-vLj8Sw","tag-1":"tag-1-aqUUN6",tag1:"tag-1-aqUUN6","tag-2":"tag-2-CdvW0P",tag2:"tag-2-CdvW0P","tag-4":"tag-4-MC5w82",tag4:"tag-4-MC5w82","tag-3":"tag-3-KTmcm_",tag3:"tag-3-KTmcm_","property-title":"property-title-Tuf6E1",propertyTitle:"property-title-Tuf6E1","info-block":"info-block-s33QB0",infoBlock:"info-block-s33QB0",mask:"mask-U3tgbz"},t.Z=i},903979:function(e,t,n){"use strict";var l=n(125161),o=n.n(l),r=n(404442),i=n.n(r)()(o());i.push([e.id,".template-form-kind2m .editor-container-v9qzn_{border:1px solid rgba(var(--coze-stroke-6),var(--coze-stroke-6-alpha))}.template-form-kind2m .editor-container-v9qzn_:focus-within{border-color:var(--semi-color-focus-border)}.template-form-kind2m .semi-form-field{padding-top:0}.template-form-kind2m .semi-upload-picture .semi-upload-picture-add{border:1px solid rgba(var(--coze-stroke-6),var(--coze-stroke-6-alpha));background-color:transparent}.template-form-kind2m .semi-upload-picture .semi-upload-picture-file-card-error{outline-offset:-1px}.template-form-kind2m .coz-single-select .semi-radio{margin-top:3px;margin-bottom:3px}.template-form-kind2m .coz-single-select .semi-radio .semi-radio-addon-buttonRadio{border-radius:6px}.template-form-kind2m .coz-input-number.semi-input-number .semi-input-wrapper{border-color:rgba(var(--coze-stroke-6),var(--coze-stroke-6-alpha))}.template-form-kind2m .coz-input-number.semi-input-number .semi-input-wrapper-focus{border-color:var(--semi-color-focus-border)}.template-form-kind2m .coz-input-number.semi-input-number .semi-input-suffix{margin-right:30px;font-size:12px;font-weight:400}",""]),i.locals={"template-form":"template-form-kind2m",templateForm:"template-form-kind2m","editor-container":"editor-container-v9qzn_",editorContainer:"editor-container-v9qzn_"},t.Z=i},801210:function(e,t,n){"use strict";var l=n(125161),o=n.n(l),r=n(404442),i=n.n(r)()(o());i.push([e.id,".highlight-EyZl50{border-radius:4px;animation:3s forwards highlight-animation-FUji_T}@keyframes highlight-animation-FUji_T{0%{background-color:rgba(var(--coze-brand-0),var(--coze-brand-0-alpha))}to{background-color:transparent}}",""]),i.locals={highlight:"highlight-EyZl50","highlight-animation":"highlight-animation-FUji_T",highlightAnimation:"highlight-animation-FUji_T"},t.Z=i},960878:function(e,t,n){"use strict";var l=n(125161),o=n.n(l),r=n(404442),i=n.n(r)()(o());i.push([e.id,".mask-B9qkmd{background:linear-gradient(180deg,rgba(var(--coze-bg-2),var(--coze-bg-2-alpha))0 85%,transparent 100%)}",""]),i.locals={mask:"mask-B9qkmd"},t.Z=i},793828:function(e,t,n){"use strict";var l=n(125161),o=n.n(l),r=n(404442),i=n.n(r)()(o());i.push([e.id,".desc-input-ty8_FN>input{text-overflow:ellipsis}",""]),i.locals={"desc-input":"desc-input-ty8_FN",descInput:"desc-input-ty8_FN"},t.Z=i},788504:function(e,t,n){"use strict";var l=n(125161),o=n.n(l),r=n(404442),i=n.n(r)()(o());i.push([e.id,'.publish-collapse-VlVg4U .semi-collapse-item{border-bottom:1px solid var(--coz-stroke-primary);position:relative}.publish-collapse-VlVg4U .semi-collapse-item:hover{border-color:var(--coz-bg-primary)}.publish-collapse-VlVg4U .semi-collapse-header:hover:before{content:"";background-color:var(--coz-bg-primary);width:100%;height:1px;position:absolute;top:-1px;left:0}.publish-collapse-VlVg4U .semi-collapse-header{border-radius:0;margin:0;padding:8px 0}.publish-collapse-VlVg4U .semi-collapse-header:hover{background:var(--coz-mg-secondary-hovered);border-radius:8px}.publish-collapse-VlVg4U .semi-collapse-header:active{background:var(--coz-mg-secondary-pressed)}.publish-collapse-VlVg4U .semi-collapse-header-icon{margin:4px}.publish-collapse-VlVg4U .semi-collapse-content{padding:4px 0 16px}.publish-collapse-VlVg4U .semi-collapse-item:last-child{border:none}.publish-collapse-VlVg4U .semi-form-field-label{line-height:20px}.publish-cards-cgmQMc .semi-select.coz-select{border-radius:var(--small,6px);height:24px}.publish-cards-cgmQMc .semi-select.coz-select .semi-select-inset-label{color:var(--coz-fg-secondary);margin:0 4px;font-size:12px;font-weight:400}.publish-cards-cgmQMc .semi-select.coz-select .semi-select-selection .semi-select-selection-text{font-size:12px}.publish-cards-cgmQMc .semi-select.coz-select .semi-select-arrow{width:22px}.publish-cards-cgmQMc .semi-select.coz-select .semi-select-content-wrapper-empty{margin-left:0}.publish-cards-cgmQMc .semi-select.coz-select .semi-select-content-wrapper-collapse{align-items:center;gap:2px;line-height:normal}.publish-cards-cgmQMc .semi-select.coz-select .semi-select-content-wrapper-collapse .semi-overflow-list-item{display:flex}.publish-cards-cgmQMc .semi-select.coz-select .semi-select-content-wrapper-collapse .semi-overflow-list-overflow{display:flex}.publish-cards-cgmQMc .semi-select.coz-select .semi-tag{background:var(--coz-mg_primary,rgba(6,7,9,.08));border-radius:2px;height:16px;padding:2px}.publish-cards-cgmQMc .semi-select-error{border:1px solid var(--coz-stroke-hglt-red)}.publish-cards-cgmQMc .coz-checkbox.semi-checkbox-unChecked .semi-checkbox-inner-display{border-color:var(--coz-stroke-plus)}.project-vxjogy .semi-form-field-error-message{color:var(--coz-fg-hglt-red);font-size:12px;line-height:16px}.project-vxjogy .semi-input{border-radius:8px}.project-vxjogy .semi-form-field{padding:0}.project-vxjogy .semi-input-textarea{height:72px}',""]),i.locals={"publish-collapse":"publish-collapse-VlVg4U",publishCollapse:"publish-collapse-VlVg4U","publish-cards":"publish-cards-cgmQMc",publishCards:"publish-cards-cgmQMc",project:"project-vxjogy"},t.Z=i},727683:function(e,t,n){"use strict";var l=n(125161),o=n.n(l),r=n(404442),i=n.n(r)()(o());i.push([e.id,".web-sdk-guide-_xvOoZ ol li::marker{color:var(--coz-fg-secondary);font-weight:500}.web-sdk-guide-_xvOoZ [class^=code-block-element]{height:160px}.web-sdk-guide-_xvOoZ [class^=code-block-element] [class^=content]{flex-shrink:1;overflow:auto}.web-sdk-guide-_xvOoZ [class^=code-block-element] [class^=content] pre{overflow:visible}",""]),i.locals={"web-sdk-guide":"web-sdk-guide-_xvOoZ",webSdkGuide:"web-sdk-guide-_xvOoZ"},t.Z=i},354428:function(e,t,n){"use strict";n.r(t),n.d(t,{useMonaco:()=>Y,DiffEditor:()=>K,Editor:()=>X,loader:()=>D,default:()=>J});function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,l)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){var l,o,r;l=e,o=t,r=n[t],o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,l=Array(t);n<t;n++)l[n]=e[n];return l}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,l)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){var l,o,r;l=e,o=t,r=n[t],o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function s(e){return function t(){for(var n=this,l=arguments.length,o=Array(l),r=0;r<l;r++)o[r]=arguments[r];return o.length>=e.length?e.apply(this,o):function(){for(var e=arguments.length,l=Array(e),r=0;r<e;r++)l[r]=arguments[r];return t.apply(n,[].concat(o,l))}}}function c(e){return({}).toString.call(e).includes("Object")}function u(e){return"function"==typeof e}var d,p,f,h=s(function(e,t){throw Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),m=function(e,t){return!c(t)&&h("changeType"),Object.keys(t).some(function(t){var n,l;return n=e,l=t,!Object.prototype.hasOwnProperty.call(n,l)})&&h("changeField"),t},g=function(e){!u(e)&&h("selectorType")},v=function(e){!(u(e)||c(e))&&h("handlerType"),c(e)&&Object.values(e).some(function(e){return!u(e)})&&h("handlersType")},_=function(e){if(!e&&h("initialIsRequired"),!c(e)&&h("initialType"),!Object.keys(e).length)h("initialContent")};function b(e,t){return u(t)?t(e.current):t}function x(e,t){return e.current=a(a({},e.current),t),t}function y(e,t,n){return u(t)?t(e.current):Object.keys(n).forEach(function(n){var l;return null===(l=t[n])||void 0===l?void 0:l.call(t,e.current[n])}),n}var j={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "};var k=(d=function(e,t){throw Error(e[t]||e.default)},function e(){for(var t=this,n=arguments.length,l=Array(n),o=0;o<n;o++)l[o]=arguments[o];return l.length>=d.length?d.apply(this,l):function(){for(var n=arguments.length,o=Array(n),r=0;r<n;r++)o[r]=arguments[r];return e.apply(t,[].concat(l,o))}})(j),w=function(e){var t;if(!e&&k("configIsRequired"),t=e,!({}).toString.call(t).includes("Object"))k("configType");return e.urls?(function(){console.warn(j.deprecation)}(),{paths:{vs:e.urls.monacoBase}}):e},C=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}},N={type:"cancelation",msg:"operation is manually canceled"},P=function(e){var t=!1,n=new Promise(function(n,l){e.then(function(e){return t?l(N):n(e)}),e.catch(l)});return n.cancel=function(){return t=!0},n};var S=(f=2,function(e){if(Array.isArray(e))return e}(p=({create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_(e),v(t);var n={current:e},l=s(y)(n,t),o=s(x)(n),r=s(m)(e),i=s(b)(n);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return g(e),e(n.current)},function(e){(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}})(l,o,r,i)(e)}]}}).create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}))||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],l=!0,o=!1,r=void 0;try{for(var i,a=e[Symbol.iterator]();!(l=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);l=!0);}catch(e){o=!0,r=e}finally{try{!l&&null!=a.return&&a.return()}finally{if(o)throw r}}return n}}(p,2)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}}(p,f)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),T=S[0],z=S[1];function I(e){return document.body.appendChild(e)}function O(e){var t,n,l=T(function(e){return{config:e.config,reject:e.reject}});var o=(t="".concat(l.config.paths.vs,"/loader.js"),n=document.createElement("script"),t&&(n.src=t),n);return o.onload=function(){return e()},o.onerror=l.reject,o}function E(){var e=T(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){A(t),e.resolve(t)},function(t){e.reject(t)})}function A(e){!T().monaco&&z({monaco:e})}var L=new Promise(function(e,t){return z({resolve:e,reject:t})}),D={config:function(e){var t=w(e),n=t.monaco,l=function(e,t){if(null==e)return{};var n,l,o=function(e,t){if(null==e)return{};var n,l,o={},r=Object.keys(e);for(l=0;l<r.length;l++)n=r[l],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(l=0;l<r.length;l++){if(n=r[l],!(t.indexOf(n)>=0))Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}(t,["monaco"]);z(function(e){return{config:function e(t,n){return Object.keys(n).forEach(function(l){n[l]instanceof Object&&t[l]&&Object.assign(n[l],e(t[l],n[l]))}),o(o({},t),n)}(e.config,l),monaco:n}})},init:function(){var e=T(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(z({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),P(L);if(window.monaco&&window.monaco.editor)return A(window.monaco),e.resolve(window.monaco),P(L);C(I,O)(E)}return P(L)},__getMonacoInstance:function(){return T(function(e){return e.monaco})}},R=n("455069"),M={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Z={display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"},B=function({children:e}){return R.createElement("div",{style:Z},e)},U=(0,R.memo)(function({width:e,height:t,isEditorReady:n,loading:l,_ref:o,className:r,wrapperProps:i}){return R.createElement("section",{style:{...M.wrapper,width:e,height:t},...i},!n&&R.createElement(B,null,l),R.createElement("div",{ref:o,style:{...M.fullWidth,...!n&&M.hide},className:r}))}),F=function(e){(0,R.useEffect)(e,[])},V=function(e,t,n=!0){let l=(0,R.useRef)(!0);(0,R.useEffect)(l.current||!n?()=>{l.current=!1}:e,t)};function H(){}function W(e,t,n,l){return function(e,t){return e.editor.getModel(q(e,t))}(e,l)||function(e,t,n,l){return e.editor.createModel(t,n,l?q(e,l):void 0)}(e,t,n,l)}function q(e,t){return e.Uri.parse(t)}var K=(0,R.memo)(function({original:e,modified:t,language:n,originalLanguage:l,modifiedLanguage:o,originalModelPath:r,modifiedModelPath:i,keepCurrentOriginalModel:a=!1,keepCurrentModifiedModel:s=!1,theme:c="light",loading:u="Loading...",options:d={},height:p="100%",width:f="100%",className:h,wrapperProps:m={},beforeMount:g=H,onMount:v=H}){let[_,b]=(0,R.useState)(!1),[x,y]=(0,R.useState)(!0),j=(0,R.useRef)(null),k=(0,R.useRef)(null),w=(0,R.useRef)(null),C=(0,R.useRef)(v),N=(0,R.useRef)(g),P=(0,R.useRef)(!1);F(()=>{let e=D.init();return e.then(e=>(k.current=e)&&y(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>j.current?function(){let e=j.current?.getModel();a||e?.original?.dispose(),s||e?.modified?.dispose(),j.current?.dispose()}():e.cancel()}),V(()=>{if(j.current&&k.current){let t=j.current.getOriginalEditor(),o=W(k.current,e||"",l||n||"text",r||"");o!==t.getModel()&&t.setModel(o)}},[r],_),V(()=>{if(j.current&&k.current){let e=j.current.getModifiedEditor(),l=W(k.current,t||"",o||n||"text",i||"");l!==e.getModel()&&e.setModel(l)}},[i],_),V(()=>{let e=j.current.getModifiedEditor();e.getOption(k.current.editor.EditorOption.readOnly)?e.setValue(t||""):t!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),e.pushUndoStop())},[t],_),V(()=>{j.current?.getModel()?.original.setValue(e||"")},[e],_),V(()=>{let{original:e,modified:t}=j.current.getModel();k.current.editor.setModelLanguage(e,l||n||"text"),k.current.editor.setModelLanguage(t,o||n||"text")},[n,l,o],_),V(()=>{k.current?.editor.setTheme(c)},[c],_),V(()=>{j.current?.updateOptions(d)},[d],_);let S=(0,R.useCallback)(()=>{if(!k.current)return;N.current(k.current);let a=W(k.current,e||"",l||n||"text",r||""),s=W(k.current,t||"",o||n||"text",i||"");j.current?.setModel({original:a,modified:s})},[n,t,o,e,l,r,i]),T=(0,R.useCallback)(()=>{!P.current&&w.current&&(j.current=k.current.editor.createDiffEditor(w.current,{automaticLayout:!0,...d}),S(),k.current?.editor.setTheme(c),b(!0),P.current=!0)},[d,c,S]);return(0,R.useEffect)(()=>{_&&C.current(j.current,k.current)},[_]),(0,R.useEffect)(()=>{x||_||T()},[x,_,T]),R.createElement(U,{width:f,height:p,isEditorReady:_,loading:u,_ref:w,className:h,wrapperProps:m})}),Y=function(){let[e,t]=(0,R.useState)(D.__getMonacoInstance());return F(()=>{let n;return e||(n=D.init()).then(e=>{t(e)}),()=>n?.cancel()}),e},Q=function(e){let t=(0,R.useRef)();return(0,R.useEffect)(()=>{t.current=e},[e]),t.current},G=new Map,X=(0,R.memo)(function({defaultValue:e,defaultLanguage:t,defaultPath:n,value:l,language:o,path:r,theme:i="light",line:a,loading:s="Loading...",options:c={},overrideServices:u={},saveViewState:d=!0,keepCurrentModel:p=!1,width:f="100%",height:h="100%",className:m,wrapperProps:g={},beforeMount:v=H,onMount:_=H,onChange:b,onValidate:x=H}){let[y,j]=(0,R.useState)(!1),[k,w]=(0,R.useState)(!0),C=(0,R.useRef)(null),N=(0,R.useRef)(null),P=(0,R.useRef)(null),S=(0,R.useRef)(_),T=(0,R.useRef)(v),z=(0,R.useRef)(),I=(0,R.useRef)(l),O=Q(r),E=(0,R.useRef)(!1),A=(0,R.useRef)(!1);F(()=>{let e=D.init();return e.then(e=>(C.current=e)&&w(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>N.current?function(){z.current?.dispose(),p?d&&G.set(r,N.current.saveViewState()):N.current.getModel()?.dispose(),N.current.dispose()}():e.cancel()}),V(()=>{let i=W(C.current,e||l||"",t||o||"",r||n||"");i!==N.current?.getModel()&&(d&&G.set(O,N.current?.saveViewState()),N.current?.setModel(i),d&&N.current?.restoreViewState(G.get(r)))},[r],y),V(()=>{N.current?.updateOptions(c)},[c],y),V(()=>{N.current&&void 0!==l&&(N.current.getOption(C.current.editor.EditorOption.readOnly)?N.current.setValue(l):l===N.current.getValue()||(A.current=!0,N.current.executeEdits("",[{range:N.current.getModel().getFullModelRange(),text:l,forceMoveMarkers:!0}]),N.current.pushUndoStop(),A.current=!1))},[l],y),V(()=>{let e=N.current?.getModel();e&&o&&C.current?.editor.setModelLanguage(e,o)},[o],y),V(()=>{void 0!==a&&N.current?.revealLine(a)},[a],y),V(()=>{C.current?.editor.setTheme(i)},[i],y);let L=(0,R.useCallback)(()=>{if(!(!P.current||!C.current)&&!E.current){T.current(C.current);let s=r||n,p=W(C.current,l||e||"",t||o||"",s||"");N.current=C.current?.editor.create(P.current,{model:p,automaticLayout:!0,...c},u),d&&N.current.restoreViewState(G.get(s)),C.current.editor.setTheme(i),void 0!==a&&N.current.revealLine(a),j(!0),E.current=!0}},[e,t,n,l,o,r,c,u,d,i,a]);return(0,R.useEffect)(()=>{y&&S.current(N.current,C.current)},[y]),(0,R.useEffect)(()=>{k||y||L()},[k,y,L]),I.current=l,(0,R.useEffect)(()=>{y&&b&&(z.current?.dispose(),z.current=N.current?.onDidChangeModelContent(e=>{A.current||b(N.current.getValue(),e)}))},[y,b]),(0,R.useEffect)(()=>{if(y){let e=C.current.editor.onDidChangeMarkers(e=>{let t=N.current.getModel()?.uri;if(t&&e.find(e=>e.path===t.path)){let e=C.current.editor.getModelMarkers({resource:t});x?.(e)}});return()=>{e?.dispose()}}return()=>{}},[y,x]),R.createElement(U,{width:f,height:h,isEditorReady:y,loading:s,_ref:P,className:m,wrapperProps:g})}),J=X},889514:function(e,t,n){"use strict";function l(e,t){let n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}n.d(t,{P:function(){return l}})},808914:function(e,t,n){"use strict";n.d(t,{Z:()=>s});var l=n("457437"),o=n("250737"),r=n("213148"),i=n("333991"),a=Math.max,s=(0,l.Z)(function(e,t,n){var l=null==e?0:e.length;if(!l)return -1;var s=null==n?0:(0,i.Z)(n);return s<0&&(s=a(l+s,0)),(0,o.Z)(e,(0,r.Z)(t,3),s)})},484782:function(e,t,n){"use strict";n.d(t,{D:()=>ew});var l={};n.r(l),n.d(l,{boolean:()=>D,booleanish:()=>R,commaOrSpaceSeparated:()=>F,commaSeparated:()=>U,number:()=>Z,overloadedBoolean:()=>M,spaceSeparated:()=>B});var o=n("455069"),r=n("830644"),i=n("812579"),a=n("651088"),s=n("930602");function c(e){let t=[],n=-1,l=0,o=0;for(;++n<e.length;){let r=e.charCodeAt(n),i="";if(37===r&&(0,s.H$)(e.charCodeAt(n+1))&&(0,s.H$)(e.charCodeAt(n+2)))o=2;else if(r<128)!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(r))&&(i=String.fromCharCode(r));else if(r>55295&&r<57344){let t=e.charCodeAt(n+1);r<56320&&t>56319&&t<57344?(i=String.fromCharCode(r,t),o=1):i="<22>"}else i=String.fromCharCode(r);i&&(t.push(e.slice(l,n),encodeURIComponent(i)),l=n+o+1,i=""),o&&(n+=o,o=0)}return t.join("")+e.slice(l)}var u=n("527678");let d=f("start"),p=f("end");function f(e){return function(t){let n=t&&t.position&&t.position[e]||{};return{line:n.line||null,column:n.column||null,offset:n.offset>-1?n.offset:null}}}let h={}.hasOwnProperty;function m(e){return String(e||"").toUpperCase()}function g(e,t){let n;let l=String(t.identifier).toUpperCase(),o=c(l.toLowerCase()),r=e.footnoteOrder.indexOf(l);-1===r?(e.footnoteOrder.push(l),e.footnoteCounts[l]=1,n=e.footnoteOrder.length):(e.footnoteCounts[l]++,n=r+1);let i=e.footnoteCounts[l],a={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+o,id:e.clobberPrefix+"fnref-"+o+(i>1?"-"+i:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,a);let s={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,s),e.applyData(t,s)}function v(e,t){let n=t.referenceType,l="]";if("collapsed"===n?l+="[]":"full"===n&&(l+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return{type:"text",value:"!["+t.alt+l};let o=e.all(t),r=o[0];r&&"text"===r.type?r.value="["+r.value:o.unshift({type:"text",value:"["});let i=o[o.length-1];return i&&"text"===i.type?i.value+=l:o.push({type:"text",value:l}),o}function _(e){let t=e.spread;return null==t?e.children.length>1:t}function b(e,t,n){let l=0,o=e.length;if(t){let t=e.codePointAt(l);for(;9===t||32===t;)l++,t=e.codePointAt(l)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>l?e.slice(l,o):""}let x={blockquote:function(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){let n=t.value?t.value+"\n":"",l=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,o={};l&&(o.className=["language-"+l]);let r={type:"element",tagName:"code",properties:o,children:[{type:"text",value:n}]};return t.meta&&(r.data={meta:t.meta}),e.patch(t,r),r={type:"element",tagName:"pre",properties:{},children:[r=e.applyData(t,r)]},e.patch(t,r),r},delete:function(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:g,footnote:function(e,t){let n=e.footnoteById,l=1;for(;l in n;)l++;let o=String(l);return n[o]={type:"footnoteDefinition",identifier:o,children:[{type:"paragraph",children:t.children}],position:t.position},g(e,{type:"footnoteReference",identifier:o,position:t.position})},heading:function(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.dangerous){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null},imageReference:function(e,t){let n=e.definition(t.identifier);if(!n)return v(e,t);let l={src:c(n.url||""),alt:t.alt};null!==n.title&&void 0!==n.title&&(l.title=n.title);let o={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){let n={src:c(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);let l={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,l),e.applyData(t,l)},inlineCode:function(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let l={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,l),e.applyData(t,l)},linkReference:function(e,t){let n=e.definition(t.identifier);if(!n)return v(e,t);let l={href:c(n.url||"")};null!==n.title&&void 0!==n.title&&(l.title=n.title);let o={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){let n={href:c(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);let l={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)},listItem:function(e,t,n){let l=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let n=e.children,l=-1;for(;!t&&++l<n.length;)t=_(n[l])}return t}(n):_(t),r={},i=[];if("boolean"==typeof t.checked){let e;let n=l[0];n&&"element"===n.type&&"p"===n.tagName?e=n:(e={type:"element",tagName:"p",properties:{},children:[]},l.unshift(e)),e.children.length>0&&e.children.unshift({type:"text",value:" "}),e.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),r.className=["task-list-item"]}let a=-1;for(;++a<l.length;){let e=l[a];(o||0!==a||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?i.push(e):i.push(...e.children)}let s=l[l.length-1];s&&(o||"element"!==s.type||"p"!==s.tagName)&&i.push({type:"text",value:"\n"});let c={type:"element",tagName:"li",properties:r,children:i};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){let n={},l=e.all(t),o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<l.length;){let e=l[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let r={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(l,!0)};return e.patch(t,r),e.applyData(t,r)},paragraph:function(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){let n=e.all(t),l=n.shift(),o=[];if(l){let n={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){let l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},r=d(t.children[1]),i=p(t.children[t.children.length-1]);r.line&&i.line&&(l.position={start:r,end:i}),o.push(l)}let r={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,r),e.applyData(t,r)},tableCell:function(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){let l=n?n.children:void 0,o=0===(l?l.indexOf(t):1)?"th":"td",r=n&&"table"===n.type?n.align:void 0,i=r?r.length:t.children.length,a=-1,s=[];for(;++a<i;){let n=t.children[a],l={},i=r?r[a]:void 0;i&&(l.align=i);let c={type:"element",tagName:o,properties:l,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(t,c)),s.push(c)}let c={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){let n={type:"text",value:function(e){let t=String(e),n=/\r?\n|\r/g,l=n.exec(t),o=0,r=[];for(;l;)r.push(b(t.slice(o,l.index),o>0,!0),l[0]),o=l.index+l[0].length,l=n.exec(t);return r.push(b(t.slice(o),o>0,!1)),r.join("")}(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:y,yaml:y,definition:y,footnoteDefinition:y};function y(){return null}let j={}.hasOwnProperty;function k(e,t){if(e.position){var n;t.position={start:d(n=e),end:p(n)}}}function w(e,t){let n=t;if(e&&e.data){let t=e.data.hName,l=e.data.hChildren,o=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:[]}),"element"===n.type&&o&&(n.properties={...n.properties,...o}),"children"in n&&n.children&&null!=l&&(n.children=l)}return n}function C(e,t,n){let l=t&&t.type;if(!l)throw Error("Expected node, got `"+t+"`");return j.call(e.handlers,l)?e.handlers[l](e,t,n):e.passThrough&&e.passThrough.includes(l)?"children"in t?{...t,children:N(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,n):function(e,t){let n=t.data||{},l="value"in t&&!(j.call(n,"hProperties")||j.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:N(e,t)};return e.patch(t,l),e.applyData(t,l)}(e,t)}function N(e,t){let n=[];if("children"in t){let l=t.children,o=-1;for(;++o<l.length;){let r=C(e,l[o],t);if(r){if(o&&"break"===l[o-1].type&&(!Array.isArray(r)&&"text"===r.type&&(r.value=r.value.replace(/^\s+/,"")),!Array.isArray(r)&&"element"===r.type)){let e=r.children[0];e&&"text"===e.type&&(e.value=e.value.replace(/^\s+/,""))}Array.isArray(r)?n.push(...r):n.push(r)}}}return n}function P(e,t){let n=[],l=-1;for(t&&n.push({type:"text",value:"\n"});++l<e.length;)l&&n.push({type:"text",value:"\n"}),n.push(e[l]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function S(e,t){let n=function(e,t){let n=t||{},l=n.allowDangerousHtml||!1,o={};return i.dangerous=l,i.clobberPrefix=void 0===n.clobberPrefix||null===n.clobberPrefix?"user-content-":n.clobberPrefix,i.footnoteLabel=n.footnoteLabel||"Footnotes",i.footnoteLabelTagName=n.footnoteLabelTagName||"h2",i.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},i.footnoteBackLabel=n.footnoteBackLabel||"Back to content",i.unknownHandler=n.unknownHandler,i.passThrough=n.passThrough,i.handlers={...x,...n.handlers},i.definition=function(e){let t=Object.create(null);if(!e||!e.type)throw Error("mdast-util-definitions expected node");return(0,u.Vn)(e,"definition",e=>{let n=m(e.identifier);n&&!h.call(t,n)&&(t[n]=e)}),function(e){let n=m(e);return n&&h.call(t,n)?t[n]:null}}(e),i.footnoteById=o,i.footnoteOrder=[],i.footnoteCounts={},i.patch=k,i.applyData=w,i.one=function(e,t){return C(i,e,t)},i.all=function(e){return N(i,e)},i.wrap=P,i.augment=r,(0,u.Vn)(e,"footnoteDefinition",e=>{let t=String(e.identifier).toUpperCase();!j.call(o,t)&&(o[t]=e)}),i;function r(e,t){if(e&&"data"in e&&e.data){let n=e.data;n.hName&&("element"!==t.type&&(t={type:"element",tagName:"",properties:{},children:[]}),t.tagName=n.hName),"element"===t.type&&n.hProperties&&(t.properties={...t.properties,...n.hProperties}),"children"in t&&t.children&&n.hChildren&&(t.children=n.hChildren)}if(e){var n;let l="type"in e?e:{position:e};if(!(!(n=l)||!n.position||!n.position.start||!n.position.start.line||!n.position.start.column||!n.position.end||!n.position.end.line||!n.position.end.column))t.position={start:d(l),end:p(l)}}return t}function i(e,t,n,l){return Array.isArray(n)&&(l=n,n={}),r(e,{type:"element",tagName:t,properties:n||{},children:l||[]})}}(e,t),l=n.one(e,null),o=function(e){let t=[],n=-1;for(;++n<e.footnoteOrder.length;){let l=e.footnoteById[e.footnoteOrder[n]];if(!l)continue;let o=e.all(l),r=String(l.identifier).toUpperCase(),i=c(r.toLowerCase()),a=0,s=[];for(;++a<=e.footnoteCounts[r];){let t={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};a>1&&t.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),s.length>0&&s.push({type:"text",value:" "}),s.push(t)}let u=o[o.length-1];if(u&&"element"===u.type&&"p"===u.tagName){let e=u.children[u.children.length-1];e&&"text"===e.type?e.value+=" ":u.children.push({type:"text",value:" "}),u.children.push(...s)}else o.push(...s);let d={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+i},children:e.wrap(o,!0)};e.patch(l,d),t.push(d)}if(0!==t.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:"\n"}]}}(n);return o&&l.children.push({type:"text",value:"\n"},o),Array.isArray(l)?{type:"root",children:l}:l}var T=function(e,t){return e&&"run"in e?function(e,t){return(n,l,o)=>{e.run(S(n,t),l,e=>{o(e)})}}(e,t):function(e){return t=>S(t,e)}(e||t)},z=n("274325");class I{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function O(e,t){let n={},l={},o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(l,e[o].normal);return new I(n,l,t)}function E(e){return e.toLowerCase()}I.prototype.property={},I.prototype.normal={},I.prototype.space=null;class A{constructor(e,t){this.property=e,this.attribute=t}}A.prototype.space=null,A.prototype.boolean=!1,A.prototype.booleanish=!1,A.prototype.overloadedBoolean=!1,A.prototype.number=!1,A.prototype.commaSeparated=!1,A.prototype.spaceSeparated=!1,A.prototype.commaOrSpaceSeparated=!1,A.prototype.mustUseProperty=!1,A.prototype.defined=!1;let L=0,D=V(),R=V(),M=V(),Z=V(),B=V(),U=V(),F=V();function V(){return 2**++L}let H=Object.keys(l);class W extends A{constructor(e,t,n,o){let r=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",o),"number"==typeof n)for(;++r<H.length;){let e=H[r];(function(e,t,n){n&&(e[t]=n)})(this,H[r],(n&l[e])===l[e])}}}function q(e,t,n){n&&(e[t]=n)}W.prototype.defined=!0;let K={}.hasOwnProperty;function Y(e){let t;let n={},l={};for(t in e.properties)if(K.call(e.properties,t)){let o=e.properties[t],r=new W(t,e.transform(e.attributes||{},t),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(t)&&(r.mustUseProperty=!0),n[t]=r,l[E(t)]=t,l[E(r.attribute)]=t}return new I(n,l,e.space)}let Q=Y({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),G=Y({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function X(e,t){return t in e?e[t]:t}function J(e,t){return X(e,t.toLowerCase())}let $=Y({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:J,properties:{xmlns:null,xmlnsXLink:null}}),ee=Y({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:R,ariaAutoComplete:null,ariaBusy:R,ariaChecked:R,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:B,ariaCurrent:null,ariaDescribedBy:B,ariaDetails:null,ariaDisabled:R,ariaDropEffect:B,ariaErrorMessage:null,ariaExpanded:R,ariaFlowTo:B,ariaGrabbed:R,ariaHasPopup:null,ariaHidden:R,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:B,ariaLevel:Z,ariaLive:null,ariaModal:R,ariaMultiLine:R,ariaMultiSelectable:R,ariaOrientation:null,ariaOwns:B,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:R,ariaReadOnly:R,ariaRelevant:null,ariaRequired:R,ariaRoleDescription:B,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:R,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null}}),et=Y({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:J,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:U,acceptCharset:B,accessKey:B,action:null,allow:null,allowFullScreen:D,allowPaymentRequest:D,allowUserMedia:D,alt:null,as:null,async:D,autoCapitalize:null,autoComplete:B,autoFocus:D,autoPlay:D,blocking:B,capture:null,charSet:null,checked:D,cite:null,className:B,cols:Z,colSpan:null,content:null,contentEditable:R,controls:D,controlsList:B,coords:Z|U,crossOrigin:null,data:null,dateTime:null,decoding:null,default:D,defer:D,dir:null,dirName:null,disabled:D,download:M,draggable:R,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:D,formTarget:null,headers:B,height:Z,hidden:D,high:Z,href:null,hrefLang:null,htmlFor:B,httpEquiv:B,id:null,imageSizes:null,imageSrcSet:null,inert:D,inputMode:null,integrity:null,is:null,isMap:D,itemId:null,itemProp:B,itemRef:B,itemScope:D,itemType:B,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:D,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:D,muted:D,name:null,nonce:null,noModule:D,noValidate:D,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:D,optimum:Z,pattern:null,ping:B,placeholder:null,playsInline:D,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:D,referrerPolicy:null,rel:B,required:D,reversed:D,rows:Z,rowSpan:Z,sandbox:B,scope:null,scoped:D,seamless:D,selected:D,shadowRootClonable:D,shadowRootDelegatesFocus:D,shadowRootMode:null,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:R,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:D,useMap:null,value:R,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:B,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:D,declare:D,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:D,noHref:D,noShade:D,noWrap:D,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:R,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:D,disableRemotePlayback:D,prefix:null,property:null,results:Z,security:null,unselectable:null}}),en=Y({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:X,properties:{about:F,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:B,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:D,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:U,g2:U,glyphName:U,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:F,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:B,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:F,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:F,rev:F,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:F,requiredFeatures:F,requiredFonts:F,requiredFormats:F,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:F,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:F,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:F,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),el=O([G,Q,$,ee,et],"html"),eo=O([G,Q,$,ee,en],"svg");function er(e){if(e.allowedElements&&e.disallowedElements)throw TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{(0,u.Vn)(t,"element",(t,n,l)=>{let o;if(e.allowedElements?o=!e.allowedElements.includes(t.tagName):e.disallowedElements&&(o=e.disallowedElements.includes(t.tagName)),!o&&e.allowElement&&"number"==typeof n&&(o=!e.allowElement(t,n,l)),o&&"number"==typeof n)return e.unwrapDisallowed&&t.children?l.children.splice(n,1,...t.children):l.children.splice(n,1),n})}}var ei=n("339922");let ea=/^data[-\w.:]+$/i,es=/-[a-z]/g,ec=/[A-Z]/g;function eu(e){return"-"+e.toLowerCase()}function ed(e){return e.charAt(1).toUpperCase()}let ep={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var ef=n("263055"),eh=n("889514"),em=n("578419"),eg=n("657285");let ev={}.hasOwnProperty,e_=new Set(["table","thead","tbody","tfoot","tr"]);function eb(e,t){let n;let l=[],r=-1;for(;++r<t.children.length;)"element"===(n=t.children[r]).type?l.push(function(e,t,n,l){let r;let i=e.options,a=void 0===i.transformLinkUri?eg.A:i.transformLinkUri,s=e.schema,c=t.tagName,u={},d=s;if("html"===s.space&&"svg"===c&&(d=eo,e.schema=d),t.properties)for(r in t.properties)ev.call(t.properties,r)&&function(e,t,n,l){let o=function(e,t){let n=E(t),l=t,o=A;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&ea.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(es,ed);l="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!es.test(e)){let n=e.replace(ec,eu);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=W}return new o(l,t)}(l.schema,t),r=n;if(null!=r&&r==r)Array.isArray(r)&&(r=o.commaSeparated?(0,eh.P)(r):(0,ef.P)(r)),"style"===o.property&&"string"==typeof r&&(r=function(e){let t={};try{em(e,function(e,n){t[("-ms-"===e.slice(0,4)?`ms-${e.slice(4)}`:e).replace(/-([a-z])/g,ey)]=n})}catch{}return t}(r)),o.space&&o.property?e[ev.call(ep,o.property)?ep[o.property]:o.property]=r:o.attribute&&(e[o.attribute]=r)}(u,r,t.properties[r],e);("ol"===c||"ul"===c)&&e.listDepth++;let p=eb(e,t);("ol"===c||"ul"===c)&&e.listDepth--,e.schema=s;let f=t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},h=i.components&&ev.call(i.components,c)?i.components[c]:c,m="string"==typeof h||h===o.Fragment;if(!ei.isValidElementType(h))throw TypeError(`Component for name \`${c}\` not defined or is not renderable`);if(u.key=n,"a"===c&&i.linkTarget&&(u.target="function"==typeof i.linkTarget?i.linkTarget(String(u.href||""),t.children,"string"==typeof u.title?u.title:null):i.linkTarget),"a"===c&&a&&(u.href=a(String(u.href||""),t.children,"string"==typeof u.title?u.title:null)),!m&&"code"===c&&"element"===l.type&&"pre"!==l.tagName&&(u.inline=!0),!m&&("h1"===c||"h2"===c||"h3"===c||"h4"===c||"h5"===c||"h6"===c)&&(u.level=Number.parseInt(c.charAt(1),10)),"img"===c&&i.transformImageUri&&(u.src=i.transformImageUri(String(u.src||""),String(u.alt||""),"string"==typeof u.title?u.title:null)),!m&&"li"===c&&"element"===l.type){let e=function(e){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if("element"===n.type&&"input"===n.tagName)return n}return null}(t);u.checked=e&&e.properties?!!e.properties.checked:null,u.index=ex(l,t),u.ordered="ol"===l.tagName}return!m&&("ol"===c||"ul"===c)&&(u.ordered="ol"===c,u.depth=e.listDepth),("td"===c||"th"===c)&&(u.align&&(!u.style&&(u.style={}),u.style.textAlign=u.align,delete u.align),!m&&(u.isHeader="th"===c)),!m&&"tr"===c&&"element"===l.type&&(u.isHeader="thead"===l.tagName),i.sourcePos&&(u["data-sourcepos"]=function(e){return[e.start.line,":",e.start.column,"-",e.end.line,":",e.end.column].map(String).join("")}(f)),!m&&i.rawSourcePos&&(u.sourcePosition=t.position),!m&&i.includeElementIndex&&(u.index=ex(l,t),u.siblingCount=ex(l)),!m&&(u.node=t),p.length>0?o.createElement(h,u,p):o.createElement(h,u)}(e,n,r,t)):"text"===n.type?("element"!==t.type||!e_.has(t.tagName)||!function(e){let t=e&&"object"==typeof e&&"text"===e.type?e.value||"":e;return"string"==typeof t&&""===t.replace(/[ \t\n\f\r]/g,"")}(n))&&l.push(n.value):"raw"===n.type&&!e.options.skipHtml&&l.push(n.value);return l}function ex(e,t){let n=-1,l=0;for(;++n<e.children.length&&e.children[n]!==t;){;"element"===e.children[n].type&&l++}return l}function ey(e,t){return t.toUpperCase()}let ej={}.hasOwnProperty,ek={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function ew(e){for(let t in ek)if(ej.call(ek,t)&&ej.call(e,t)){let e=ek[t];console.warn(`[react-markdown] Warning: please ${e.to?`use \`${e.to}\` instead of`:"remove"} \`${t}\` (see <https://github.com/remarkjs/react-markdown/blob/main/changelog.md#${e.id}> for more info)`),delete ek[t]}let t=(0,i.l)().use(a.Z).use(e.remarkPlugins||[]).use(T,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(er,e),n=new r.k;"string"==typeof e.children?n.value=e.children:void 0!==e.children&&null!==e.children&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);let l=t.runSync(t.parse(n),n);if("root"!==l.type)throw TypeError("Expected a `root` node");let s=o.createElement(o.Fragment,{},eb({options:e,schema:el,listDepth:0},l));return e.className&&(s=o.createElement("div",{className:e.className},s)),s}ew.propTypes={children:z.string,className:z.string,allowElement:z.func,allowedElements:z.arrayOf(z.string),disallowedElements:z.arrayOf(z.string),unwrapDisallowed:z.bool,remarkPlugins:z.arrayOf(z.oneOfType([z.object,z.func,z.arrayOf(z.oneOfType([z.bool,z.string,z.object,z.func,z.arrayOf(z.any)]))])),rehypePlugins:z.arrayOf(z.oneOfType([z.object,z.func,z.arrayOf(z.oneOfType([z.bool,z.string,z.object,z.func,z.arrayOf(z.any)]))])),sourcePos:z.bool,rawSourcePos:z.bool,skipHtml:z.bool,includeElementIndex:z.bool,transformLinkUri:z.oneOfType([z.func,z.bool]),linkTarget:z.oneOfType([z.func,z.string]),transformImageUri:z.func,components:z.object}},657285:function(e,t,n){"use strict";n.d(t,{A:function(){return o}});let l=["http","https","mailto","tel"];function o(e){let t=(e||"").trim(),n=t.charAt(0);if("#"===n||"/"===n)return t;let o=t.indexOf(":");if(-1===o)return t;let r=-1;for(;++r<l.length;){let e=l[r];if(o===e.length&&t.slice(0,e.length).toLowerCase()===e)return t}return -1!==(r=t.indexOf("?"))&&o>r||-1!==(r=t.indexOf("#"))&&o>r?t:"javascript:void(0)"}},651088:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var l=n(174434);function o(e){Object.assign(this,{Parser:t=>{let n=this.data("settings");return(0,l.V)(t,Object.assign({},n,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}},263055:function(e,t,n){"use strict";function l(e){return e.join(" ").trim()}n.d(t,{P:function(){return l}})},812579:function(e,t,n){"use strict";function l(e){if(e)throw e}n.d(t,{l:()=>s});var o=n("377996"),r=n("815651");function i(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var a=n("830644");let s=(function e(){let t;let n=function(){let e=[],t={run:function(...t){let n=-1,l=t.pop();if("function"!=typeof l)throw TypeError("Expected function as last argument, not "+l);(function o(r,...i){let a=e[++n],s=-1;if(r){l(r);return}for(;++s<t.length;)(null===i[s]||void 0===i[s])&&(i[s]=t[s]);t=i,a?(function(e,t){let n;return function(...t){let r;let i=e.length>t.length;i&&t.push(l);try{r=e.apply(this,t)}catch(e){if(i&&n)throw e;return l(e)}!i&&(r&&r.then&&"function"==typeof r.then?r.then(o,l):r instanceof Error?l(r):o(r))};function l(e,...o){!n&&(n=!0,t(e,...o))}function o(e){l(null,e)}})(a,o)(...i):l(null,...i)})(null,...t)},use:function(n){if("function"!=typeof n)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}(),a=[],s={},v=-1;return _.data=function(e,n){if("string"==typeof e)return 2==arguments.length?(f("data",t),s[e]=n,_):c.call(s,e)&&s[e]||null;return e?(f("data",t),s=e,_):s},_.Parser=void 0,_.Compiler=void 0,_.freeze=function(){if(t)return _;for(;++v<a.length;){let[e,...t]=a[v];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let l=e.call(_,...t);"function"==typeof l&&n.use(l)}return t=!0,v=Number.POSITIVE_INFINITY,_},_.attachers=a,_.use=function(e,...n){let l;if(f("use",t),null==e);else if("function"==typeof e)u(e,...n);else if("object"==typeof e)Array.isArray(e)?c(e):o(e);else throw TypeError("Expected usable value, not `"+e+"`");return l&&(s.settings=Object.assign(s.settings||{},l)),_;function o(e){c(e.plugins),e.settings&&(l=Object.assign(l||{},e.settings))}function c(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;)!function(e){if("function"==typeof e)u(e);else if("object"==typeof e){if(Array.isArray(e)){let[t,...n]=e;u(t,...n)}else o(e)}else throw TypeError("Expected usable value, not `"+e+"`")}(e[t]);else throw TypeError("Expected a list of plugins, not `"+e+"`")}function u(e,t){let n,l=-1;for(;++l<a.length;)if(a[l][0]===e){n=a[l];break}n?(i(n[1])&&i(t)&&(t=r(!0,n[1],t)),n[1]=t):a.push([...arguments])}},_.parse=function(e){_.freeze();let t=g(e),n=_.Parser;return(d("parse",n),u(n,"parse"))?new n(String(t),t).parse():n(String(t),t)},_.stringify=function(e,t){_.freeze();let n=g(t),l=_.Compiler;return(p("stringify",l),h(e),u(l,"compile"))?new l(e,n).compile():l(e,n)},_.run=function(e,t,l){if(h(e),_.freeze(),!l&&"function"==typeof t&&(l=t,t=void 0),!l)return new Promise(o);function o(o,r){n.run(e,g(t),function(t,n,i){n=n||e,t?r(t):o?o(n):l(null,n,i)})}o(null,l)},_.runSync=function(e,t){let n,o;return _.run(e,t,function(e,t){l(e),n=t,o=!0}),m("runSync","run",o),n},_.process=function(e,t){if(_.freeze(),d("process",_.Parser),p("process",_.Compiler),!t)return new Promise(n);function n(n,l){let r=g(e);function i(e,o){e||!o?l(e):n?n(o):t(null,o)}_.run(_.parse(r),r,(e,t,n)=>{if(!e&&t&&n){let l=_.stringify(t,n);null==l||(function(e){return"string"==typeof e||o(e)}(l)?n.value=l:n.result=l),i(e,n)}else i(e)})}n(null,t)},_.processSync=function(e){let t;_.freeze(),d("processSync",_.Parser),p("processSync",_.Compiler);let n=g(e);return _.process(n,function(e){t=!0,l(e)}),m("processSync","process",t),n},_;function _(){let t=e(),n=-1;for(;++n<a.length;)t.use(...a[n]);return t.data(r(!0,{},s)),t}})().freeze(),c={}.hasOwnProperty;function u(e,t){return"function"==typeof e&&e.prototype&&(function(e){let t;for(t in e)if(c.call(e,t))return!0;return!1}(e.prototype)||t in e.prototype)}function d(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `Parser`")}function p(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `Compiler`")}function f(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function h(e){if(!i(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function m(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function g(e){return function(e){return!!(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new a.k(e)}},830644:function(e,t,n){"use strict";n.d(t,{k:()=>d});var l=n("377996"),o=n("395937");class r extends Error{constructor(e,t,n){let l=[null,null],r={start:{line:null,column:null},end:{line:null,column:null}};if(super(),"string"==typeof t&&(n=t,t=void 0),"string"==typeof n){let e=n.indexOf(":");-1===e?l[1]=n:(l[0]=n.slice(0,e),l[1]=n.slice(e+1))}t&&("type"in t||"position"in t?t.position&&(r=t.position):"start"in t||"end"in t?r=t:("line"in t||"column"in t)&&(r.start=t)),this.name=(0,o.y)(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="","object"==typeof e&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.fatal,this.line=r.start.line,this.column=r.start.column,this.position=r,this.source=l[0],this.ruleId=l[1],this.file,this.actual,this.expected,this.url,this.note}}r.prototype.file="",r.prototype.name="",r.prototype.reason="",r.prototype.message="",r.prototype.stack="",r.prototype.fatal=null,r.prototype.column=null,r.prototype.line=null,r.prototype.source=null,r.prototype.ruleId=null,r.prototype.position=null;let i={basename:function(e,t){let n;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');a(e);let l=0,o=-1,r=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;r--;)if(47===e.charCodeAt(r)){if(n){l=r+1;break}}else o<0&&(n=!0,o=r+1);return o<0?"":e.slice(l,o)}if(t===e)return"";let i=-1,s=t.length-1;for(;r--;)if(47===e.charCodeAt(r)){if(n){l=r+1;break}}else i<0&&(n=!0,i=r+1),s>-1&&(e.charCodeAt(r)===t.charCodeAt(s--)?s<0&&(o=r):(s=-1,o=i));return l===o?o=i:o<0&&(o=e.length),e.slice(l,o)},dirname:function(e){let t;if(a(e),0===e.length)return".";let n=-1,l=e.length;for(;--l;)if(47===e.charCodeAt(l)){if(t){n=l;break}}else!t&&(t=!0);return n<0?47===e.charCodeAt(0)?"/":".":1===n&&47===e.charCodeAt(0)?"//":e.slice(0,n)},extname:function(e){let t;a(e);let n=e.length,l=-1,o=0,r=-1,i=0;for(;n--;){let a=e.charCodeAt(n);if(47===a){if(t){o=n+1;break}continue}l<0&&(t=!0,l=n+1),46===a?r<0?r=n:1!==i&&(i=1):r>-1&&(i=-1)}return r<0||l<0||0===i||1===i&&r===l-1&&r===o+1?"":e.slice(r,l)},join:function(...e){let t,n=-1;for(;++n<e.length;)a(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){a(e);let t=47===e.charCodeAt(0),n=function(e,t){let n,l,o="",r=0,i=-1,a=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.charCodeAt(s);else if(47===n)break;else n=47;if(47===n){if(i===s-1||1===a);else if(i!==s-1&&2===a){if(o.length<2||2!==r||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2)){if(o.length>2){if((l=o.lastIndexOf("/"))!==o.length-1){l<0?(o="",r=0):r=(o=o.slice(0,l)).length-1-o.lastIndexOf("/"),i=s,a=0;continue}}else if(o.length>0){o="",r=0,i=s,a=0;continue}}t&&(o=o.length>0?o+"/..":"..",r=2)}else o.length>0?o+="/"+e.slice(i+1,s):o=e.slice(i+1,s),r=s-i-1;i=s,a=0}else 46===n&&a>-1?a++:a=-1}return o}(e,!t);return 0===n.length&&!t&&(n="."),n.length>0&&47===e.charCodeAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},sep:"/"};function a(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}let s=function(){return"/"};function c(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}let u=["history","path","basename","stem","extname","dirname"];class d{constructor(e){let t,n;t=e?"string"==typeof e||function(e){return l(e)}(e)?{value:e}:c(e)?{path:e}:e:{},this.data={},this.messages=[],this.history=[],this.cwd=s(),this.value,this.stored,this.result,this.map;let o=-1;for(;++o<u.length;){let e=u[o];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)!u.includes(n)&&(this[n]=t[n])}get path(){return this.history[this.history.length-1]}set path(e){c(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!c(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){let e=TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,n=-1;for(;++n<t.length;)if(37===t.charCodeAt(n)&&50===t.charCodeAt(n+1)){let e=t.charCodeAt(n+2);if(70===e||102===e){let e=TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),f(e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return"string"==typeof this.path?i.dirname(this.path):void 0}set dirname(e){h(this.basename,"dirname"),this.path=i.join(e||"",this.basename)}get basename(){return"string"==typeof this.path?i.basename(this.path):void 0}set basename(e){f(e,"basename"),p(e,"basename"),this.path=i.join(this.dirname||"",e)}get extname(){return"string"==typeof this.path?i.extname(this.path):void 0}set extname(e){if(p(e,"extname"),h(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw Error("`extname` must start with `.`");if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=i.join(this.dirname,this.stem+(e||""))}get stem(){return"string"==typeof this.path?i.basename(this.path,this.extname):void 0}set stem(e){f(e,"stem"),p(e,"stem"),this.path=i.join(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e||void 0)}message(e,t,n){let l=new r(e,t,n);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}info(e,t,n){let l=this.message(e,t,n);return l.fatal=null,l}fail(e,t,n){let l=this.message(e,t,n);throw l.fatal=!0,l}}function p(e,t){if(e&&e.includes(i.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+i.sep+"`")}function f(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function h(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}}}]);
//# sourceMappingURL=3334.920f224d.js.map