PageSourceSearch

https://www.octoparse.com/_next/static/chunks/pages/data-hub/console/developer/onboard-cc2b7feca3e378a0.js

js octoparse.com collected 2026-09-24 08:39:59 UTC 18,553 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9991],{37515:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/data-hub/console/developer/onboard",function(){return r(34300)}])},33369:function(e,t,r){"use strict";r.d(t,{Zb:function(){return n},vZ:function(){return a},yG:function(){return l}});var o=r(11527),s=r(32506),d=r.n(s);let l=e=>{let{title:t,desc:r,extra:s}=e;return(0,o.jsxs)("div",{className:"mb-6 flex items-center justify-between gap-6",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h1",{className:"text-2xl font-semibold leading-8 text-[#1f1f1f]",children:t}),r&&(0,o.jsx)("p",{className:"mt-1.5 text-sm leading-[22px] text-[#8c8c8c]",children:r})]}),s]})},n=e=>{let{children:t,className:r=""}=e;return(0,o.jsx)("section",{className:"rounded-2xl bg-white p-7 ".concat(r),children:t})},a=e=>{let{title:t,desc:r,action:s}=e;return(0,o.jsxs)("div",{className:"flex min-h-[280px] flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-[#e2e5eb] bg-[#fcfcfd] p-6 text-center",children:[(0,o.jsx)("b",{className:"text-sm font-semibold text-[#595959]",children:t}),(0,o.jsx)("span",{className:"max-w-[440px] text-xs leading-[19px] text-[#8c8c8c]",children:r}),s&&(0,o.jsx)(d(),{href:s.href,className:"mt-1.5 rounded-lg border border-[#e2e5eb] bg-white px-5 py-2 text-sm text-[#1f1f1f] hover:border-[#c2c8d2] hover:text-primary",children:s.text})]})}},34300:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return D}});var o=r(11527),s=r(62592),d=r(33369),l=r(46211),n=r(97333),a=r(59354),i=r(17888),c=r.n(i),p=r(51875),x=r(32506),m=r.n(x),b=r(50959);let u=[{title:"developer.onboard.pledges.publicOnlyTitle",desc:"developer.onboard.pledges.publicOnlyDesc"},{title:"developer.onboard.pledges.piiMaskedTitle",desc:"developer.onboard.pledges.piiMaskedDesc"},{title:"developer.onboard.pledges.traceableTitle",desc:"developer.onboard.pledges.traceableDesc"},{title:"developer.onboard.pledges.agreementTitle",desc:"developer.onboard.pledges.agreementDesc"}],f=/^[^@\s]+@[^@\s]+\.[^@\s]+$/,v=e=>e?c()(e).format("YYYY-MM-DD HH:mm"):"—";function h(e){let{current:t}=e,{t:r}=(0,p.$G)("open-platform"),s=[r("developer.onboard.steps.subject"),r("developer.onboard.steps.pledges"),r("developer.onboard.steps.review"),r("developer.onboard.steps.done")];return(0,o.jsx)("div",{className:"mb-9 flex items-center",children:s.map((e,r)=>{let d=r+1,l=d===t,n=d<t;return(0,o.jsxs)("div",{className:"flex flex-1 items-center",children:[(0,o.jsxs)("div",{className:"flex items-center gap-2.5 text-sm ".concat(l?"font-semibold text-[#1f1f1f]":"text-[#8c8c8c]"),children:[(0,o.jsx)("i",{className:"grid h-[26px] w-[26px] place-items-center rounded-full text-[13px] font-semibold not-italic ".concat(l?"bg-primary text-white":n?"bg-[#dcfce7] text-[#15803d]":"bg-[#eceef2] text-[#8c8c8c]"),children:n?"✓":d}),e]}),r<s.length-1&&(0,o.jsx)("div",{className:"mx-4 h-px flex-1 bg-[#e6e8ee]"})]},e)})})}function g(e){let{label:t,required:r,tip:s,children:d}=e;return(0,o.jsxs)("div",{className:"mb-5",children:[(0,o.jsxs)("label",{className:"mb-2 block text-[13px] font-medium text-[#1f1f1f]",children:[t,r&&(0,o.jsx)("em",{className:"ml-0.5 not-italic text-[#ff4d4f]",children:"*"})]}),d,s&&(0,o.jsx)("div",{className:"mt-1.5 text-xs leading-[18px] text-[#8c8c8c]",children:s})]})}let j=e=>null==e?"":e<1024?"".concat(e," B"):e<1048576?"".concat(Math.round(e/1024)," KB"):"".concat((e/1024/1024).toFixed(1)," MB");function N(e){var t;let{doc:r}=e;if(!r.id)return(0,o.jsx)("span",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-md bg-[#eef2f8] text-xs text-[#bfbfbf]",children:"—"});let s=(0,l.X_)(r.id);return(null===(t=r.content_type)||void 0===t?void 0:t.startsWith("image/"))?(0,o.jsx)("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"shrink-0",children:(0,o.jsx)("img",{src:s,alt:r.filename,className:"h-10 w-10 rounded-md object-cover"})}):(0,o.jsx)("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"grid h-10 w-10 shrink-0 place-items-center rounded-md bg-[#eef2f8] text-xs text-[#8c8c8c] hover:text-primary",children:"PDF"})}let y="w-full min-h-[40px] rounded-lg border border-[#e2e5eb] bg-white px-3 text-sm text-[#1f1f1f] outline-none focus:border-primary focus:shadow-[0_0_0_3px_rgba(52,112,255,.1)]",k="".concat(y," cursor-pointer appearance-none pr-8"),w=()=>(0,o.jsx)("span",{"aria-hidden":"true",className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-[10px] text-[#8
1c8c8c]",children:"▾"});function _(e){var t,r,s,d,i,c,x;let{profile:v,onSubmitted:_}=e,{t:T}=(0,p.$G)("open-platform"),[C,D]=(0,b.useState)(1),[S,E]=(0,b.useState)(null!==(t=null==v?void 0:v.subject_type)&&void 0!==t?t:"enterprise"),[P,M]=(0,b.useState)(null!==(r=null==v?void 0:v.name)&&void 0!==r?r:""),[A,B]=(0,b.useState)(null!==(s=null==v?void 0:v.credential_type)&&void 0!==s?s:""),[G,F]=(0,b.useState)(""),{data:L,error:O,mutate:Y}=(0,n.us)(),q=(0,b.useMemo)(()=>null!==(d=null==L?void 0:L.items.filter(e=>e.subject_type===S))&&void 0!==d?d:[],[L,S]);(0,b.useEffect)(()=>{L&&B(e=>e&&q.some(t=>t.slug===e)?e:1===q.length?q[0].slug:"")},[L,q]);let I=q.find(e=>e.slug===A),R=null!==(i=null==I?void 0:I.label)&&void 0!==i?i:"enterprise"===S?T("developer.onboard.form.uscc"):T("developer.onboard.form.idNumber"),[$,Z]=(0,b.useState)(null!==(c=null==v?void 0:v.contact_email)&&void 0!==c?c:""),[z,H]=(0,b.useState)(()=>{var e;return null!==(x=null==v?void 0:null===(e=v.documents)||void 0===e?void 0:e.filter(e=>e.id))&&void 0!==x?x:[]}),[W,X]=(0,b.useState)(0),[K,U]=(0,b.useState)(u.map(()=>!1)),[V,J]=(0,b.useState)(!1),Q=(0,b.useMemo)(()=>!!(P.trim()&&A&&G.trim()&&f.test($.trim())),[P,A,G,$]),ee=K.every(Boolean),et=async e=>{if(!(null==e?void 0:e.length))return;let t=Array.from(e);for(let e of(X(e=>e+t.length),t))try{if(e.size>l.rD)throw Error(T("developer.onboard.upload.overLimit",{mb:l.rD/1024/1024}));let t=await (0,l.OY)(e);H(e=>[...e,t])}catch(r){let t=r instanceof l.n||r instanceof Error?r.message:T("developer.onboard.upload.unknownError");a.y.error(T("developer.onboard.upload.failed",{name:e.name,reason:t}))}finally{X(e=>e-1)}},er=async()=>{J(!0);try{await (0,l.ZM)({subject_type:S,name:P.trim(),credential_type:A,credential_no:G.trim(),contact_email:$.trim(),document_ids:z.map(e=>e.id).filter(e=>!!e)}),a.y.success(T("developer.onboard.submit.success")),_()}catch(e){if(e instanceof l.n&&"CREDENTIAL_TYPE_INVALID"===e.code){Y(),D(1),a.y.error(T("developer.onboard.submit.credentialTypeInvalid"));return}a.y.error(e instanceof l.n||e instanceof Error?T("developer.onboard.submit.failedWithReason",{reason:e.message}):T("developer.onboard.submit.failed"))}finally{J(!1)}};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(h,{current:C}),1===C?(0,o.jsxs)("div",{className:"max-w-[620px]",children:[(0,o.jsx)(g,{label:T("developer.onboard.form.subjectType"),required:!0,children:(0,o.jsx)("div",{className:"flex gap-2.5",children:[{key:"enterprise",title:T("developer.onboard.form.enterprise"),sub:T("developer.onboard.form.enterpriseSub")},{key:"individual",title:T("developer.onboard.form.individual"),sub:T("developer.onboard.form.individualSub")}].map(e=>(0,o.jsxs)("button",{type:"button",onClick:()=>E(e.key),className:"min-h-[56px] flex-1 rounded-lg border px-4 text-left text-sm ".concat(S===e.key?"border-primary bg-[#f5f8ff] shadow-[inset_0_0_0_1px_#3470ff]":"border-[#e2e5eb] bg-white"),children:[(0,o.jsx)("b",{className:"block font-semibold ".concat(S===e.key?"text-[#2557d6]":"text-[#1f1f1f]"),children:e.title}),(0,o.jsx)("small",{className:"mt-0.5 block text-xs text-[#8c8c8c]",children:e.sub})]},e.key))})}),(0,o.jsx)(g,{label:"enterprise"===S?T("developer.onboard.form.orgName"):T("developer.onboard.form.realName"),required:!0,tip:T("developer.onboard.form.nameTip"),children:(0,o.jsx)("input",{className:y,value:P,placeholder:"enterprise"===S?T("developer.onboard.form.orgNamePlaceholder"):T("developer.onboard.form.realNamePlaceholder"),onChange:e=>M(e.target.value)})}),(0,o.jsx)(g,{label:T("developer.onboard.form.credentialType"),required:!0,children:O&&0===q.length?(0,o.jsxs)("div",{className:"flex min-h-[40px] items-center justify-between gap-3 rounded-lg border border-[#ffd591] bg-[#fff7e6] px-3 text-[13px] text-[#c2650a]",children:[T("developer.onboard.form.credentialTypeLoadFailed"),(0,o.jsx)("button",{type:"button",className:"shrink-0 text-primary hover:text-[#2557d6]",onClick:()=>void Y(),children:T("common.retry")})]}):(0,o.jsxs)("div",{className:"relative",children:[(0,o.jsxs)("select",{className:k,value:A,onChange:e=>B(e.target.value),children:[(0,o.jsx)("option",{value:"",disabled:!0,children:L?T("developer.onboard.form.credentialTypePlaceholder"):T("common.loading")}),q.map(e=>(0,o.jsx)("option",{value:e.slug,children:e.label},e.slug))]}),(0,o.jsx)(w,{})]})}),(0,o.jsx)(g,{label:R,required:!0,tip:"enterprise"===S?T("developer.onboard.form.usccTip"):T("developer.onboard.form.idNumberTip"),children:(0,o.jsx)("input",{className:y,value:G,placeholder:I?T("developer.onboard.form.credentialNoPlaceholder",{label:I.label}):T("developer.onboard.form.credentialNoPlaceholderNoType"),onChange:e=>F(e.target.value)})}),(0,o.jsx)(g,{label:T("developer.onboard.form.contactEmail"),required:!0,children:(0,o.jsx)("input",{className:y,value:$,placeholder:T("developer.onboard.form.contactEmailPlaceholder"),onChange:e=>Z(e.target.value)})}),(0,o.jsxs)(g,{label:"enterprise"===S?T("developer.onboard.form.docBusinessLicense"):T("developer.onboard.form.docIdPhotos"),tip:T("developer.onboard.form.docT
1ip"),children:[(0,o.jsxs)("label",{className:"flex cursor-pointer items-center gap-3.5 rounded-[10px] border border-dashed border-[#e2e5eb] bg-[#fcfcfd] p-4 transition-colors hover:border-primary hover:bg-[#f7faff]",children:[(0,o.jsx)("span",{className:"grid h-[38px] w-[38px] shrink-0 place-items-center rounded-lg bg-[#eef2f8] text-lg text-[#8c8c8c]",children:"+"}),(0,o.jsxs)("span",{children:[(0,o.jsx)("b",{className:"block text-[13px] font-medium text-[#1f1f1f]",children:T("developer.onboard.form.pickFile")}),(0,o.jsx)("span",{className:"mt-0.5 block text-xs text-[#8c8c8c]",children:T("developer.onboard.form.pickFileHint",{mb:l.rD/1024/1024})})]}),(0,o.jsx)("input",{type:"file",hidden:!0,multiple:!0,accept:l.xy,onChange:e=>{et(e.target.files),e.target.value=""}})]}),(z.length>0||W>0)&&(0,o.jsxs)("ul",{className:"mt-2 space-y-1.5",children:[z.map(e=>(0,o.jsxs)("li",{className:"flex items-center gap-3 rounded-[10px] border border-[#e2e5eb] bg-[#f7f8fb] px-4 py-2.5 text-[13px]",children:[(0,o.jsx)(N,{doc:e}),(0,o.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.filename}),(0,o.jsx)("span",{className:"shrink-0 text-xs text-[#8c8c8c]",children:j(e.size)}),(0,o.jsx)("button",{type:"button",className:"shrink-0 text-xs text-[#8c8c8c] hover:text-[#ff4d4f]",onClick:()=>H(t=>t.filter(t=>t.id!==e.id)),children:T("developer.onboard.form.removeDoc")})]},e.id)),W>0&&(0,o.jsx)("li",{className:"rounded-[10px] border border-[#e2e5eb] bg-[#f7f8fb] px-4 py-2.5 text-[13px] text-[#8c8c8c]",children:T("developer.onboard.form.uploadingCount",{num:W})})]})]}),(0,o.jsxs)("div",{className:"mt-7 flex items-center gap-3 border-t border-[#eef1f5] pt-6",children:[(0,o.jsx)("button",{type:"button",disabled:!Q,onClick:()=>D(2),className:"inline-flex min-h-[40px] items-center justify-center rounded-lg border border-primary bg-primary px-[22px] text-sm font-medium text-white disabled:cursor-not-allowed disabled:opacity-45",children:T("developer.onboard.form.next")}),(0,o.jsx)(m(),{href:"/data-hub/console",className:"inline-flex min-h-[40px] items-center justify-center rounded-lg border border-[#e2e5eb] bg-white px-5 text-sm text-[#1f1f1f] hover:border-[#c2c8d2]",children:T("developer.onboard.form.skip")})]})]}):(0,o.jsxs)("div",{className:"max-w-[620px]",children:[(0,o.jsx)("div",{className:"mb-3 text-xs leading-[18px] text-[#8c8c8c]",children:T("developer.onboard.form.pledgeNote")}),u.map((e,t)=>(0,o.jsx)("div",{className:"mb-3 rounded-[10px] border border-[#edeef1] px-4 py-3.5",children:(0,o.jsxs)("label",{className:"flex cursor-pointer items-start gap-2.5",children:[(0,o.jsx)("input",{type:"checkbox",className:"mt-0.5 h-[15px] w-[15px] shrink-0 accent-primary",checked:K[t],onChange:e=>U(r=>r.map((r,o)=>o===t?e.target.checked:r))}),(0,o.jsxs)("span",{children:[(0,o.jsx)("b",{className:"block text-[13px] font-semibold text-[#1f1f1f]",children:T(e.title)}),(0,o.jsx)("span",{className:"mt-0.5 block text-xs leading-[18px] text-[#8c8c8c]",children:T(e.desc)})]})]})},e.title)),(0,o.jsxs)("div",{className:"mt-7 flex items-center gap-3 border-t border-[#eef1f5] pt-6",children:[(0,o.jsx)("button",{type:"button",disabled:!ee||V,onClick:er,className:"inline-flex min-h-[40px] items-center justify-center rounded-lg border border-primary bg-primary px-[22px] text-sm font-medium text-white disabled:cursor-not-allowed disabled:opacity-45",children:V?T("developer.onboard.form.submitting"):T("developer.onboard.form.submit")}),(0,o.jsx)("button",{type:"button",onClick:()=>D(1),className:"inline-flex min-h-[40px] items-center justify-center rounded-lg border border-[#e2e5eb] bg-white px-5 text-sm text-[#1f1f1f] hover:border-[#c2c8d2]",children:T("developer.onboard.form.prev")})]})]})]})}function T(e){var t,r,s,d,l;let{profile:n,onRevise:a}=e,{t:i}=(0,p.$G)("open-platform"),c="rejected"===n.status?[{k:i("developer.onboard.status.reviewStatus"),v:(0,o.jsx)("span",{className:"text-[#cf1322]",children:i("developer.onboard.status.rejected")})},{k:i("developer.onboard.status.rejectReason"),v:n.reject_reason||"—"},{k:i("developer.onboard.status.reviewedAt"),v:v(n.reviewed_at)}]:"revoked"===n.status?[{k:i("developer.onboard.status.certStatus"),v:(0,o.jsx)("span",{className:"text-[#6b7280]",children:i("developer.onboard.status.revokedBadge")})},{k:i("developer.onboard.status.revokeReason"),v:n.revoke_reason||"—"},{k:i("developer.onboard.status.revokedAt"),v:v(null!==(t=n.revoked_at)&&void 0!==t?t:null)}]:"pending"===n.status?[{k:i("developer.onboard.status.reviewStatus"),v:(0,o.jsx)("span",{className:"text-[#c2650a]",children:i("developer.onboard.status.pendingBadge")})},{k:i("developer.onboard.status.subject"),v:"".concat(i("enterprise"===n.subject_type?"developer.onboard.status.enterprise":"developer.onboard.status.individual")," \xb7 ").concat(null!==(r=n.name)&&void 0!==r?r:"—")},{k:i("developer.onboard.status.submittedAt"),v:v(n.submitted_at)},{k:i("developer.onboard.status.notifyTo"),v:null!==(s=n.contact_email)&&void 0!==s?s:"—"}]:[{k:i("developer.onboard.status.subject"),v:"".concat(i("enterprise"===n.subject_type?"developer.onboard.status.enterprise":"developer.onboard.status.individual")," \xb7 ").concat(null!==(d=n.name)&&void 0!==d?d:"—")},{k:i("developer.onboard.status.approvedAt"),v:v(n.reviewed_at)}],x="rejected"===n.status?{icon:"!",iconCls:"bg-[#fff1f0] text-[#cf1322]",title:i("developer.onboard.status.rejected"),desc:i("developer.onboard.status.rejectedDesc")}:"revoked"===n.status?{icon:"⊘",iconCls:"bg-[#f2f3f5] text-[#6b7280]",title:i("developer.onboard.status.revokedTitle"),desc:i("developer.onboard.status.revokedDesc")}:"pending"===n.status?{icon:"⏱",iconCls:"bg-[#fff7e6] text-[#c2650a]",title:i("developer.onboard.status.pendingTitle"),desc:i("developer.onboard.status.pendingDesc")}:{icon:"✓",iconCls:"bg-[#dcfce7] text-[#15803d]",title:i("developer.onboard.status.approvedTitle"),desc:i("developer.onboard.status.approvedDesc")};return(0,o.jsxs)("div",{className:"mx-auto max-w-[620px] py-5 text-center",children:[(0,o.jsx)("div",{className:"mx-auto mb-5 grid h-14 w-14 place-items-center rounded-full text-[28px] ".concat(x.iconCls),children:x.icon}),(0,o.jsx)("h2",{className:"text-xl font-semibold text-[#1f1f1f]",children:x.title}),(0,o.jsx)("p",{className:"mt-2 text-sm leading-[22px] text-[#8
1c8c8c]",children:x.desc}),(0,o.jsxs)("div",{className:"my-6 rounded-xl bg-[#f7f8fb] p-5 text-left",children:[c.map((e,t)=>(0,o.jsxs)("div",{className:"flex items-center justify-between gap-3 py-2 ".concat(t?"border-t border-[#edeef1]":""),children:[(0,o.jsx)("span",{className:"text-xs text-[#8c8c8c]",children:e.k}),(0,o.jsx)("span",{className:"text-[13px] text-[#1f1f1f]",children:e.v})]},e.k)),n.documents.length>0&&(0,o.jsxs)("div",{className:"border-t border-[#edeef1] pt-3",children:[(0,o.jsx)("div",{className:"mb-2 text-xs text-[#8c8c8c]",children:i("developer.onboard.status.submittedDocs")}),(0,o.jsx)("ul",{className:"space-y-1.5",children:n.documents.map((e,t)=>(0,o.jsxs)("li",{className:"flex items-center gap-3 text-[13px]",children:[(0,o.jsx)(N,{doc:e}),(0,o.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.filename}),(0,o.jsx)("span",{className:"shrink-0 text-xs text-[#8c8c8c]",children:j(e.size)})]},null!==(l=e.id)&&void 0!==l?l:"".concat(e.filename,"-").concat(t)))})]})]}),(0,o.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[("rejected"===n.status||"revoked"===n.status)&&(0,o.jsx)("button",{type:"button",onClick:a,className:"inline-flex min-h-[40px] items-center justify-center rounded-lg border border-primary bg-primary px-[22px] text-sm font-medium text-white hover:border-[#2557d6] hover:bg-[#2557d6]",children:i("developer.onboard.status.resubmit")}),"approved"===n.status&&(0,o.jsx)(m(),{href:"/data-hub/console/developer",className:"inline-flex min-h-[40px] items-center justify-center rounded-lg border border-primary bg-primary px-[22px] text-sm font-medium text-white hover:border-[#2557d6] hover:bg-[#2557d6]",children:i("developer.onboard.status.goWorkbench")}),(0,o.jsx)(m(),{href:"/data-hub/console",className:"inline-flex min-h-[40px] items-center justify-center rounded-lg border border-[#e2e5eb] bg-white px-5 text-sm text-[#1f1f1f] hover:border-[#c2c8d2]",children:i("developer.onboard.status.backOverview")})]})]})}let C=()=>{let{t:e}=(0,p.$G)("open-platform"),{data:t,isLoading:r,mutate:s}=(0,n.TU)(),[l,a]=(0,b.useState)(!1),i=!r&&(l||!t||"not_submitted"===t.status);return(0,o.jsxs)("div",{children:[(0,o.jsx)(d.yG,{title:e("developer.onboard.pageTitle"),desc:e("developer.onboard.pageDesc")}),(0,o.jsx)(d.Zb,{children:r?(0,o.jsx)("div",{className:"flex min-h-[200px] items-center justify-center text-sm text-[#8c8c8c]",children:e("common.loading")}):i?(0,o.jsx)(_,{profile:t,onSubmitted:()=>{a(!1),s()}}):(0,o.jsx)(T,{profile:t,onRevise:()=>a(!0)})})]})};C.getLayout=s.G;var D=!0;t.default=C}},function(e){e.O(0,[6841,6120,3765,9759,3953,9257,9157,2592,9774,2888,179],function(){return e(e.s=37515)}),_N_E=e.O()}]);

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