1"use strict";(globalThis.webpackChunkipe_frontend=globalThis.webpackChunkipe_frontend||[]).push([[5308],{95308(e,t,a){a.r(t),a.d(t,{default:()=>O});var s=a(65043),o=a(96972),l=a(13553),c=a(85060),r=a(8483),i=a(16032),n=a(94690),d=a(78506),p=a(98996),u=a(12229),m=a(66594),h=a(90365),y=a(97954),b=a(36651),f=a(98365),g=a(76353),v=a(70264),x=a(60117),j=a(22417),N=a(63296),S=a(62439),T=a(94834),w=a(67277),A=a(69726),C=a(42428),k=(a(38048),a(70579));function E(e){var t;return String(null!==(t=null===e||void 0===e?void 0:e.id)&&void 0!==t?t:"")}function O(){const e=(0,g.Lc)(),{toast:t,showSuccess:a,showError:O,closeToast:_}=(0,x.O)(),{shopType:$}=(0,w.Ay)(),{categories:I,leafOptions:D,loading:L}=(0,A.A)($),[B,M]=(0,s.useState)(""),[z,P]=(0,s.useState)(""),[R,F]=(0,s.useState)(""),[J,H]=(0,s.useState)(""),[q,G]=(0,s.useState)(""),[Q,U]=(0,s.useState)(""),[V,K]=(0,s.useState)(""),[W,X]=(0,s.useState)("createdAt"),[Y,Z]=(0,s.useState)(""),[ee,te]=(0,s.useState)(""),[ae,se]=(0,s.useState)("createdAt"),[oe,le]=(0,s.useState)(""),[ce,re]=(0,s.useState)(""),[ie,ne]=(0,s.useState)(0),[de,pe]=(0,s.useState)(1),[ue,me]=(0,s.useState)(o.hl),[he,ye]=(0,s.useState)(0),[be,fe]=(0,s.useState)([]),[ge,ve]=(0,s.useState)(!1),[xe,je]=(0,s.useState)(!1),[Ne,Se]=(0,s.useState)(null),[Te,we]=(0,s.useState)(null),[Ae,Ce]=(0,s.useState)(()=>new Set),[ke,Ee]=(0,s.useState)(()=>new Set),Oe=(0,s.useRef)(new Map),[_e,$e]=(0,s.useState)(!1),[Ie,De]=(0,s.useState)(null),[Le,Be]=(0,s.useState)(!1),[Me,ze]=(0,s.useState)(!1),[Pe,Re]=(0,s.useState)(!1),[Fe,Je]=(0,s.useState)(!1),He=(0,s.useCallback)(async()=>{ve(!0);try{const e=await f.Er.listOfficialTemuAttributeTemplates({keyword:z||void 0,styleNo:J||void 0,productTypeId:V||void 0,shopType:$,dateField:oe||ce?ae:void 0,dateFrom:oe||void 0,dateTo:ce||void 0,page:de,pageSize:ue});fe(Array.isArray(null===e||void 0===e?void 0:e.items)?e.items:[]),ye(Number(null===e||void 0===e?void 0:e.total)||0)}catch(e){fe([]),ye(0),O((null===e||void 0===e?void 0:e.message)||"\u52a0\u8f7d\u5931\u8d25")}finally{ve(!1)}},[z,J,V,ae,oe,ce,de,ue,ie,$,O]);(0,s.useEffect)(()=>{He()},[He]),(0,s.useEffect)(()=>{pe(1),Ee(new Set),M(""),P(""),F(""),H(""),G(""),U(""),K(""),X("createdAt"),Z(""),te(""),se("createdAt"),le(""),re("")},[$]),(0,s.useEffect)(()=>{const e=Oe.current;for(const t of[...e.keys()])ke.has(t)||e.delete(t);be.forEach(t=>{const a=E(t);a&&ke.has(a)&&e.set(a,t)})},[be,ke]);const qe=(0,s.useMemo)(()=>be.filter(e=>(0,y.N6)(e)).map(E).filter(Boolean),[be]),Ge=qe.length>0&&qe.every(e=>ke.has(e)),Qe=()=>{Ee(e=>(0,m.M)(e,qe,Ge))},Ue=e=>{Ee(t=>{const a=new Set(t);return a.has(e)?a.delete(e):a.add(e),a})},Ve=()=>{P(B.trim()),H(R.trim()),K(Q),se(W||"createdAt"),le(Y),re(ee),pe(1),ne(e=>e+1)},Ke=(0,s.useCallback)(()=>{const e=Oe.current,t=Array.from(ke).map(t=>e.get(t)).filter(Boolean);return t.length?t:be},[ke,be]),{porting:We,onExportCsv:Xe,onExportJson:Ye,onImportJson:Ze}=(0,d.A)({type:h.jn.productAttributes,shopId:"official",filePrefix:"\u5b98\u65b9\u5c5e\u6027\u6a21\u677f",resolveExportRows:Ke,buildCsvRows:e=>e.map(e=>{var t,a;return{"\u4f18\u5148\u7ea7":null!==(t=e.sortOrder)&&void 0!==t?t:0,"\u6b3e\u53f7":e.styleNo||"","\u6a21\u677f\u540d\u79f0":e.name||"","\u5907\u6ce8":e.remark||"","\u7c7b\u76ee":e.categoryPathLabel||e.productTypeId||"","\u81ea\u52a8\u89c4\u5219":e.autoRuleEnabled?"\u5f00":"\u5173","\u5df2\u586b\u5c5e\u6027":null!==(a=e.filledAttrCount)&&void 0!==a?a:"","\u521b\u5efa\u65f6\u95f4":(0,p.T)(e.createdAt),"\u66f4\u65b0\u65f6\u95f4":(0,p.T)(e.updatedAt),"\u521b\u5efa\u4eba":e.createdByName||"","\u66f4\u65b0\u4eba":e.updatedByName||""}}),getOne:e=>f.Er.getOfficialTemuAttributeTemplate(e).then(e=>({item:(null===e||void 0===e?void 0:e.item)||e})),listByProductType:async e=>{const t=await f.Er.listOfficialTemuAttributeTemplates({productTypeId:e||void 0,shopType:$,page:1,pageSize:200});return Array.isArray(null===t||void 0===t?void 0:t.items)?t.items:[]},createOne:e=>f.Er.createOfficialTemuAttributeTemplate({...e,shopType:$}),batchCreate:e=>f.Er.batchCreateOfficialTemuAttributeTemplates({...e,shopType:$}),importTargetLabel:"\u5b98\u65b9\u6a21\u677f",onImported:async()=>{Ee(new Set),Oe.current.clear(),pe(1),ne(e=>e+1)}}),et=(0,s.useCallback)(()=>{const e=Oe.current;return Array.from(ke).map(t=>
1e.get(t)).filter(Boolean)},[ke]),tt=xe||We||Le||Me||Pe,at=e?(0,C.H)({shopType:$,selectedCount:ke.size,onCopy:async t=>{if(!e||0===ke.size)return void O("\u8bf7\u5148\u52fe\u9009\u8981\u590d\u5236\u7684\u6a21\u677f");const s=et();if(!s.length)return void O("\u9009\u4e2d\u8bb0\u5f55\u7f3a\u5c11\u6570\u636e\uff0c\u65e0\u6cd5\u590d\u5236");const o=t||$;Be(!0);try{const e=await(0,C.h)({rows:s,runOne:e=>f.Er.copyOfficialTemuAttributeTemplate(e.id,{name:(0,u.J)(e.name),shopType:o})});a(o!==$?`\u5df2\u590d\u5236 ${e} \u6761\u5230${o}`:`\u5df2\u590d\u5236 ${e} \u6761`),Ee(new Set),Oe.current.clear(),pe(1),ne(e=>e+1)}catch(l){O((null===l||void 0===l?void 0:l.message)||"\u6279\u91cf\u590d\u5236\u5931\u8d25")}finally{Be(!1)}},onMove:async t=>{if(!e||0===ke.size||!t)return void O("\u8bf7\u5148\u52fe\u9009\u8981\u79fb\u52a8\u7684\u6a21\u677f");const s=et();if(!s.length)return void O("\u9009\u4e2d\u8bb0\u5f55\u7f3a\u5c11\u6570\u636e\uff0c\u65e0\u6cd5\u79fb\u52a8");if(await(0,c.B)({title:"\u6279\u91cf\u79fb\u52a8",message:`\u786e\u8ba4\u5c06 ${s.length} \u6761\u5c5e\u6027\u6a21\u677f\u79fb\u52a8\u5230\u300c${t}\u300d\uff1f`,confirmText:"\u79fb\u52a8"})){ze(!0);try{const e=await(0,C.h)({rows:s,runOne:e=>f.Er.moveOfficialTemuAttributeTemplate(e.id,{shopType:t})});a(`\u5df2\u79fb\u52a8 ${e} \u6761\u5230${t}`),Ee(new Set),Oe.current.clear(),pe(1),ne(e=>e+1)}catch(o){O((null===o||void 0===o?void 0:o.message)||"\u6279\u91cf\u79fb\u52a8\u5931\u8d25")}finally{ze(!1)}}},onChangeCategory:()=>{e&&0!==ke.size?et().length?Je(!0):O("\u9009\u4e2d\u8bb0\u5f55\u7f3a\u5c11\u6570\u636e\uff0c\u65e0\u6cd5\u66f4\u6362\u7c7b\u76ee"):O("\u8bf7\u5148\u52fe\u9009\u8981\u66f4\u6362\u7c7b\u76ee\u7684\u6a21\u677f")},onDelete:async()=>{if(!e||0===ke.size)return void O("\u8bf7\u5148\u52fe\u9009\u8981\u5220\u9664\u7684\u6a21\u677f");const t=[...ke].map(Number).filter(e=>Number.isFinite(e)&&e>0);if(await(0,c.B)({title:"\u6279\u91cf\u5220\u9664",message:`\u5c06\u5220\u9664 ${t.length} \u6761\u5c5e\u6027\u6a21\u677f\u3002`,tone:"danger",confirmText:"\u5220\u9664"})){je(!0);try{const e=await f.Er.batchDeleteOfficialTemuAttributeTemplates(t);a(`\u5df2\u5220\u9664 ${Number(null===e||void 0===e?void 0:e.deleted)||t.length} \u6761`),Ee(new Set),Oe.current.clear(),await He()}catch(s){O((null===s||void 0===s?void 0:s.message)||"\u6279\u91cf\u5220\u9664\u5931\u8d25")}finally{je(!1)}}},deleteDisabled:tt,changeCategoryDisabled:tt}):[],st=function(){De(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null),$e(!0)},ot=ge?"\u52a0\u8f7d\u4e2d\u2026":z||V?"\u672a\u627e\u5230\u5339\u914d\u7684\u5c5e\u6027\u6a21\u677f":"\u6682\u65e0\u6a21\u677f";return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(v.A,{toast:t,onClose:_}),(0,k.jsx)("div",{className:"admin-temu-product-templates-host",children:(0,k.jsx)("div",{className:"temu-product-ops temu-product-ops--wide","data-testid":"admin-temu-attribute-templates",children:(0,k.jsx)("div",{className:"temu-product-ops__workspace",children:(0,k.jsxs)("div",{className:"temu-product-ops__content temu-product-ops__content--flush",children:[(0,k.jsx)(r.GM,{toolbar:(0,k.jsx)(l.Ay,{selectedCount:ke.size,busy:ge||tt,batchCopying:Le,batchMoving:Me||Pe,exportLabel:"\u5bfc\u51fa",exportDisabled:ge||We||Le||Me||Pe,exportMenu:[{key:"export-csv",label:"\u5bfc\u51fa CSV\uff08\u5217\u8868\uff09",disabled:ge||We,onClick:Xe},{key:"export-json",label:"\u5bfc\u51fa JSON\uff08\u5b8c\u6574\uff09",disabled:ge||We,onClick:Ye}],batchOpsMenu:at,extraActions:[...e?[{key:"import-json",label:We?"\u5bfc\u5165\u4e2d\u2026":"\u5bfc\u5165 JSON",disabled:ge||tt,onClick:Ze},{key:"create",label:"\u65b0\u5efa\u5c5e\u6027\u6a21\u677f",tone:"primary",disabled:ge||tt,onClick:()=>st(null)}]:[]]}),children:(0,k.jsxs)("div",{className:"tpo-filter-bar",children:[(0,k.jsx)("div",{className:"tpo-filter-bar__fields",children:(0,k.jsx)(N.A,{officialShopType:$,categories:I,categoryId:q,onCategoryChange:e=>{const t=D.find(t=>String(t.categoryId)===String(e)),a=null!==t&&void 0!==t&&t.productTypeId&&"0"!==String(t.productTypeId)?String(t.productTypeId):"";G(e?String(e):""),U(a)},styleNoDraft:R,onStyleNoChange:F,nameDraft:B,onNameChange:M,onEnter:Ve,disabled:ge,catalogLoading:L,dateFieldDraft:W,onDateFieldChange:X,dateFromDraft:Y,onDateFromChange:Z,dateToDraft:ee,onDateToChange:te})}),(0,k.jsxs)("div",{className:"tpo-filter-bar__actions",children:[(0,k.jsx)("button",{type:"button",className:"tpo-btn tpo-btn--ghost tpo-btn--sm",disabled:ge,onClick:()=>{M(""),P(""),F(""),H(""),G(""),U(""),K(""),X("createdAt"),Z(""),te(""),se("createdAt"),le(""),re(""),pe(1),ne(e=>e+1)},children:"\u91cd\u7f6e"}),(0,k.jsx)("button",{type:"button",className:"tpo-btn tpo-btn--primary tpo-btn--sm",disabled:ge,onClick:Ve,children:"\u67e5\u8be2"})]})]})}),(0,k.jsxs)(r.qD,{loading:ge,loadingLabel:"\u6b63\u5728\u67e5\u8be2\u2026",children:[(0,k.jsx)(j.A,{disabled:ge,ariaLabel:"\u5c5e\u6027\u6a21\u677f\u5e97\u94fa\u7c7b\u578b"}),(0,k.jsx)("div",{className:"tpo-drafts__table-wrap tpo-certs-table-wrap",children:(0,k.jsxs)("table",{className:"tpo-publish__table tpo-drafts__table tpo-certs-table tpo-tpl-table tpo-tpl-table--attr",children:[(0,k.jsxs)("colgroup",{children:[(0,k.jsx)("col",{className:"tpo-certs-col tpo-certs-col--check"}),(0,k.jsx)("col",{className:"tpo-certs-col tpo-certs-col--order"}),(0,k.jsx)("col",{className:"tpo-certs-col tpo-certs-col--style-no"}),(0,k.jsx)("col",{className:"tpo-certs-col tpo-certs-col--name"}),(0,k.jsx)("col",{className:"tpo-certs-col tpo-certs-col--category"}),(0,k.jsx)("col",{className:"tpo-certs-col tpo-certs-col--switch"}),(0,k.jsx)("col",{className:"tpo-certs-col tpo-certs-col--switch"}),(0,k.jsx)("col",{className:"tpo-certs-col tpo-certs-col--filled"}),(0,k.jsx)("col",{className:"tpo-certs-col tpo-certs-col--createdAt"}),(0,k.jsx)("col",{className:"tpo-certs-col tpo-certs-col--updatedAt"}),(0,k.jsx)("col",{className:"tpo-certs-col tpo-certs-col--user"}),(0,k.jsx)("col",{className:"tpo-certs-col tpo-certs-col--user"}),(0,k.jsx)("col",{className:"tpo-certs-col tpo-certs-col--ops"})]}),(0,k.jsx)("thead",{children:(0,k.jsxs)("tr",{children:[(0,k.jsx)("th",{scope:"col",className:"tpo-certs-th tpo-certs-th--check",onClick:()=>{ge||0===qe.length||Qe()},children:(0,k.jsx)("input",{type:"checkbox","aria-label":"\u5168\u9009",disabled:!e||ge||0===qe.length,checked:Ge,onClick:e=>e.stopPropagation(),onChange:Qe})}),(0,k.jsx)("th",{scope:"col",className:"tpo-certs-th tpo-certs-th--order",children:"\u4f18\u5148\u7ea7"}),(0,k.jsx)("th",{scope:"col",className:"tpo-certs-th",children:"\u6b3e\u53f7"}),(0,k.jsx)("th",{scope:"col",className:"tpo-certs-th",children:"\u6a21\u677f\u540d\u79f0"}),(0,k.jsx)("th",{scope:"col",className:"tpo-certs-th",children:"\u7c7b\u76ee"}),(0,k.jsx)("th",{scope:"col",className:"tpo-certs-th tpo-certs-th--switch",children:"\u81ea\u52a8\u89c4\u5219"}),(0,k.jsx)("th",{scope:"col",className:"tpo-certs-th tpo-certs-th--switch",children:"\u542f\u7528"}),(0,k.jsx)("th",{scope:"col",className:"tpo-certs-th",children:"\u5df2\u586b\u5c5e\u6027"}),(0,k.jsx)("th",{scope:"col",className:"tpo-certs-th",children:"\u521b\u5efa\u65f6\u95f4"}),(0,k.jsx)("th",{scope:"col",className:"tpo-certs-th",children:"\u66f4\u65b0\u65f6\u95f4"}),(0,k.jsx)("th",{scope:"col",className:"tpo-certs-th",children:"\u521b\u5efa\u4eba"}),(0,k.jsx)("th",{scope:"col",className:"tpo-certs-th",children:"\u66f4\u65b0\u4eba"}),(0,k.jsx)("th",{scope:"col",className:"tpo-certs-th tpo-certs-th--ops",children:"\u64cd\u4f5c"})]})}),(0,k.jsx)("tbody",{children:ge||0===be.length?(0,k.jsx)("tr",{children:(0,k.jsx)("td",{colSpan:13,className:"tpo-certs-empty-cell",children:(0,k.jsx)("div",{className:"tpo-certs-empty",children:(0,k.jsx)("p",{className:"tpo-certs-empty__title",children:ot})})})}):be.map(t=>{var s,o;const l=E(t),r=(0,y.a_)(t),n=(0,y.N6)(t),d=(0,y.H)(t),m=n;return(0,k.jsxs)("tr",{className:m?"tpo-row--clickable":void 0,onClick:e=>{m&&(e.target.closest("button, a, input, .TEMU-draft-actions, .admin-temu-tpl-ops")||Ue(l))},children:[(0,k.jsx)("td",{className:"tpo-certs-td tpo-certs-td--check",children:(0,k.jsx)("input",{type:"checkbox","aria-label":`\u9009\u62e9 ${t.name||l}`,disabled:!m,checked:ke.has(l),onClick:e=>e.stopPropagation(),onChange:()=>{m&&Ue(l)}})}),(0,k.jsx)("td",{className:"tpo-certs-td tpo-certs-td--order",children:null!==(s=t.sortOrder)&&void 0!==s?s:0}),(0,k.jsx)("td",{className:"tpo-certs-td",children:t.styleNo||"\u2014"}),(0,k.jsxs)("td",{className:"tpo-certs-td",title:t.name||"",children:[(0,k.jsx)("strong",{children:t.name||"\u2014"}),t.remark?(0,k.jsx)("div",{className:"tpo-muted",children:t.remark}):null]}),(0,k.jsx)("td",{className:"tpo-certs-td",children:t.categoryPathLabel||t.productTypeId||"\u2014"}),(0,k.jsx)("td",{className:"tpo-certs-td tpo-certs-td--switch",children:(0,k.jsx)(i.A,{checked:!!t.autoRuleEnabled,disabled:!r||xe||Ae.has(l),ariaLabel:`${t.name||"\u6a21\u677f"}\u81ea\u52a8\u89c4\u5219`,onChange:s=>(async(t,s)=>{if(!e||null===t||void 0===t||!t.id||!(0,y.a_)(t))return;const o=t.id,l=String(o),c=!0===t.autoRuleEnabled||1===t.autoRuleEnabled;Ce(e=>new Set(e).add(l)),fe(e=>e.map(e=>String(e.id)===l?{...e,autoRuleEnabled:s}:e));try{await f.Er.updateOfficialTemuAttributeTemplate(o,{autoRuleEnabled:s,version:t.version}),a(s?"\u5df2\u5f00\u542f\u81ea\u52a8\u89c4\u5219":"\u5df2\u5173\u95ed\u81ea\u52a8\u89c4\u5219")}catch(r){fe(e=>e.map(e=>String(e.id)===l?{...e,autoRuleEnabled:c}:e)),O((null===r||void 0===r?void 0:r.message)||"\u66f4\u65b0\u81ea\u52a8\u89c4\u5219\u5931\u8d25")}finally{Ce(e=>{const t=new Set(e);return t.delete(l),t})}})(t,s)})}),(0,k.jsx)("td",{className:"tpo-certs-td tpo-certs-td--switch",children:(0,k.jsx)(i.A,{checked:!1!==t.enabled&&0!==t.enabled,disabled:!r||xe||Ae.has(l),ariaLabel:`${t.name||"\u6a21\u677f"}\u542f\u7528`,onChange:s=>(async(t,s)=>{if(!e||null===t||void 0===t||!t.id||!(0,y.a_)(t))return;const o=t.id,l=String(o),c=!1!==t.enabled&&0!==t.enabled;Ce(e=>new Set(e).add(l)),fe(e=>e.map(e=>String(e.id)===l?{...e,enabled:s}:e));try{var r;const e=await f.Er.updateOfficialTemuAttributeTemplate(o,{enabled:s,version:t.version}),c=null===e||void 0===e||null===(r=e.item)||void 0===r?void 0:r.version;null!=c&&fe(e=>e.map(e=>String(e.id)===l?{...e,enabled:s,version:c}:e)),a(s?"\u5df2\u542f\u7528":"\u5df2\u505c\u7528")}catch(i){fe(e=>e.map(e=>String(e.id)===l?{...e,enabled:c}:e)),O((null===i||void 0===i?void 0:i.message)||"\u66f4\u65b0\u542f\u7528\u72b6\u6001\u5931\u8d25")}finally{Ce(e=>{const t=new Set(e);return t.delete(l),t})}})(t,s)})}),(0,k.jsx)("td",{className:"tpo-certs-td",children:null!==(o=t.filledAttrCount)&&void 0!==o?o:0}),(0,k.jsx)("td",{className:"tpo-certs-td tpo-certs-td--time",children:(0,p.T)(t.createdAt)}),(0,k.jsx)("td",{className:"tpo-certs-td tpo-certs-td--time",children:(0,p.T)(t.updatedAt)}),(0,k.jsx)("td",{className:"tpo-certs-td",children:t.createdByName||"\u2014"}),(0,k.jsx)("td",{className:"tpo-certs-td",children:t.updatedByName||"\u2014"}),(0,k.jsx)("td",{className:"tpo-certs-td tpo-certs-td--ops",children:(0,k.jsx)(S.A,{currentShopType:$,canEdit:r,canCopy:d,canDelete:n,canMove:e&&r,busy:xe||null!=Ne||null!=Te,copying:Ne===t.id,moving:Te===t.id,onEdit:()=>st(t.id),onCopy:s=>
1(async(t,s)=>{if(e&&null!==t&&void 0!==t&&t.id&&!Ne){Se(t.id);try{const e=s||$;await f.Er.copyOfficialTemuAttributeTemplate(t.id,{name:(0,u.J)(t.name),shopType:e}),a(e!==$?`\u5df2\u590d\u5236\u5230${e}`:"\u5df2\u590d\u5236\u6a21\u677f"),pe(1),ne(e=>e+1)}catch(o){O((null===o||void 0===o?void 0:o.message)||"\u590d\u5236\u5931\u8d25")}finally{Se(null)}}})(t,s),onMove:s=>(async(t,s)=>{if(!e||null===t||void 0===t||!t.id||Te||!s)return;if(await(0,c.B)({title:"\u79fb\u52a8\u6a21\u677f",message:`\u786e\u8ba4\u5c06\u300c${t.name||t.id}\u300d\u79fb\u52a8\u5230\u300c${s}\u300d\uff1f`,confirmText:"\u79fb\u52a8"})){we(t.id);try{await f.Er.moveOfficialTemuAttributeTemplate(t.id,{shopType:s}),a(`\u5df2\u79fb\u52a8\u5230${s}`),ne(e=>e+1)}catch(o){O((null===o||void 0===o?void 0:o.message)||"\u79fb\u52a8\u5931\u8d25")}finally{we(null)}}})(t,s),onDelete:()=>(async t=>{if(!e||null===t||void 0===t||!t.id)return;if(await(0,c.B)({title:"\u5220\u9664\u6a21\u677f",message:`\u786e\u8ba4\u5220\u9664\u300c${t.name||t.id}\u300d\uff1f`,tone:"danger",confirmText:"\u5220\u9664"})){je(!0);try{await f.Er.deleteOfficialTemuAttributeTemplate(t.id),a("\u5df2\u5220\u9664"),Ee(e=>{const a=new Set(e);return a.delete(E(t)),a}),await He()}catch(s){O((null===s||void 0===s?void 0:s.message)||"\u5220\u9664\u5931\u8d25")}finally{je(!1)}}})(t)})})]},l)})})]})}),(0,k.jsx)(o.Ay,{page:de,pageSize:ue,total:he,loading:ge,onPageChange:pe,onPageSizeChange:e=>{me(e),pe(1)},ariaLabel:"\u5c5e\u6027\u6a21\u677f\u5206\u9875"})]})]})})})}),(0,k.jsx)(n.A,{open:_e,officialMode:!0,shopType:$,templateId:Ie,templateScope:b.NQ.official,onClose:()=>{$e(!1),De(null)},onSaved:()=>{Ee(new Set),ne(e=>e+1)}}),(0,k.jsx)(T.A,{open:Fe,selectedCount:ke.size,officialShopType:$,categories:I,catalogLoading:L,busy:Pe,onClose:()=>{Pe||Je(!1)},onConfirm:async e=>{let{categoryId:t,productTypeId:s,categoryPathLabel:o}=e;const l=et();if(l.length){Re(!0);try{const e=await(0,C.h)({rows:l,runOne:e=>f.Er.updateOfficialTemuAttributeTemplate(e.id,{categoryId:t,productTypeId:s,categoryPathLabel:o,version:e.version})});a(`\u5df2\u66f4\u6362 ${e} \u6761\u6a21\u677f\u7c7b\u76ee`),Je(!1),Ee(new Set),Oe.current.clear(),pe(1),ne(e=>e+1)}catch(c){O((null===c||void 0===c?void 0:c.message)||"\u6279\u91cf\u66f4\u6362\u7c7b\u76ee\u5931\u8d25")}finally{Re(!1)}}else O("\u9009\u4e2d\u8bb0\u5f55\u7f3a\u5c11\u6570\u636e\uff0c\u65e0\u6cd5\u66f4\u6362\u7c7b\u76ee")}})]})}}}]); 2//# sourceMappingURL=5308.9db6ff2f.chunk.js.map
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.