PageSourceSearch

https://ship.spaceshipapp.com/assets/index-14MzTKuX.js

js spaceshipapp.com collected 2026-10-03 21:34:03 UTC 78,241 bytes, 13 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="40430e57-35e3-5845-9218-7acd005f2f42")}catch(e){}}();
2import{gJ as At,gK as Tt,e7 as ut,gL as Dt,e6 as Mt,dM as wt,gM as Ot,r,e as x,a7 as Nt,gI as pt,gN as Q,bm as he,bn as _e,D as Et,j as e,gB as Pt,k as l,A as N,n as S,T as _,be as K,N as se,aA as oe,S as xt,B as W,ad as Ne,l as H,aG as L,o as q,ax as de,u as G,gH as V,aI as Ee,c as U,aa as Se,am as ne,a0 as Qe,a1 as Ze,dC as Je,al as ce,C as ht,t as Pe,M as J,ao as Ae,ab as St,aK as le,aL as re,c0 as et,bg as ve,d1 as Rt,av as me,F as j,b9 as Ft,an as Lt,bl as Wt,as as qt,bv as Ce,bi as te,bx as Ht,bk as Gt,W as X,ac as mt,bb as ft,bw as Bt,bt as Me,bu as Kt,p as tt,bj as pe,cE as $t,q as Te,ga as yt,s as jt,eH as Vt,bc as Oe,b8 as Yt,z as xe,dm as zt,L as Xt,gO as fe,gl as ie,gP as Ut,G as bt,aM as Qt,aN as it,P as Zt,bz as Jt,aR as ei,co as nt,gQ as ti,gR as ii,cc as ni,gS as oi,c8 as ai,bU as ri}from"./index-UOCn7uSZ.js";import{u as si}from"./useUserAddressBook-D_hNJ-hy.js";import{T as $}from"./TwoColumnLayout-X_thcygM.js";import{u as It,S as Re,C as di}from"./useShopifyOrderSyncTimeRangeChoices-2a5Y_ULC.js";import{C as vt}from"./ChoiceList-CPFy_hOh.js";import{c as li,C as z,I as ci}from"./countries-DNW89FL2.js";import{S as gi}from"./PlusMinor.svg-CBsm5TN3.js";import{C as ot,M as at,t as rt}from"./index-BxtxUg0l.js";import{a as ui}from"./useShipmentCountrySelectProps-B1G8_IuT.js";import{a as pi}from"./ShipmentTagsSelect-tws6GI27.js";import{T as hi}from"./TagList-H6es3gNs.js";import{u as Si,a as mi}from"./useShipmentTagOptions-h_etUmnj.js";import{m as fi,f as yi}from"./map-BFfX6MCq.js";import{u as bi}from"./useCountry-SoAGgjvq.js";import{u as Ct}from"./useHsCode-DpARyIJ6.js";import{I as Ii,i as vi}from"./IossAlertBanner-DmQANx6x.js";import{I as Ci}from"./IossNumberDropdown-DTro63KK.js";import{u as ki}from"./useShipmentPurposeOptions-DRSfSNL3.js";import{u as _i}from"./useTaxTermOptions-BqtcbBi7.js";import{C as Ai}from"./CountrySelect-CxMiYXtD.js";import{u as Ti,P as Di}from"./index-C7WzHlWQ.js";import{u as Mi}from"./useCountryErrorMap-BK29JJaK.js";import{P as be}from"./packagingType-CtI31ra9.js";import{M as ke,c as st}from"./shipment-BFTbbL-x.js";import{A as wi}from"./AddressDropdown-BzWuAXSB.js";import{A as Oi}from"./index-BMQRJKjU.js";import{E as Ni}from"./EmptySavedAddressCard-BmADteB8.js";import{T as Ei}from"./Tabs-j8lGiWPL.js";import"./saved-addresses-CrlTrR48.js";import"./addressType-Dq-BWODb.js";import"./shippingRuleConditionType-Bt5fjdHH.js";import"./useCountryOptions-BddP1S5D.js";import"./pick-DIGQHt1o.js";import"./_baseUnset-D3J9-uHi.js";import"./last-DXTTfs9a.js";import"./shippingConfigIossNumberDtoStatus-B0SmbTHA.js";import"./ResourceList-CvKBD3P2.js";import"./useIossEnabled-CYapogiy.js";import"./saved-packagings-lQGr45qY.js";import"./useSavedAddressFormSchema-Dv0yDLVw.js";import"./index-esm-C4bmqvkG.js";import"./index-1kgCi0dE.js";import"./_createAggregator-DdmNq_Lh.js";import"./option-DVC9NjBR.js";import"./index-DiyrwjHy.js";import"./CustomPhoneInput-67f5zHMH.js";import"./groupBy-2YQ_zGiF.js";import"./empty-saved-address-banner-image-GINpmc3z.js";function dt(){var t=arguments.length;if(!t)return[];for(var i=Array(t-1),n=arguments[0],o=t;o--;)i[o-1]=arguments[o];return At(ut(n)?Dt(n):[n],Tt(i))}function Pi(t,i){var n=[];return Mt(t,function(o,a,c){i(o,a,c)&&n.push(o)}),n}var xi="Expected a function";function Ri(t){if(typeof t!="function")throw new TypeError(xi);return function(){var i=arguments;switch(i.length){case 0:return!t.call(this);case 1:return!t.call(this,i[0]);case 2:return!t.call(this,i[0],i[1]);case 3:return!t.call(this,i[0],i[1],i[2])}return!t.apply(this,i)}}function lt(t,i){var n=ut(t)?Ot:Pi;return n(t,Ri(wt(i)))}const B={sender_country:"sender_country",receiver_country:"receiver_country",shipment_tag:"shipment_tag"};function Fi(t){var i=r.useRef();return r.useEffect(function(){i.current=t}),i.current}const Li=q("div",{target:"e1u3dhdf0"})({name:"177m9bg",styles:".Polaris-Spinner{display:flex;}"}),Wi=()=>r.useMemo(()=>L.object({timeRange:L.nativeEnum(Re)}),[]),qi=({store:t,onUpdated:i})=>{const{t:n}=x(),{formatDateTime:o}=Nt(),a=It(),{isLoading:c,data:s,cancel:m,retry:u,trigger:h}=pt(),d=(s==null?void 0:s.connectedStore.id)===t.id?s:null,f=Fi(d==null?void 0:d.status);r.useEffect(()=>{f===Q.enqueued&&(d==null?void 0:d.status)===Q.completed&&i()},[i,f,d==null?void 0:d.status]);const I=Wi(),{control:p,formState:{isSubmitting:g},handleSubmit:b,setValue:v}=he({resolver:_e(I)});r.useEffect(()=>{c||v("timeRange",(d==null?void 0:d.timeRange)??Re.last30d)},[c,d==null?void 0:d.timeRange,v]);const y=r.useMemo(()=>t.lastOrderManualSyncedAt?o(Et.fromISO(t.lastOrderManualSyncedAt)):"--",[o,t.lastOrderManualSyncedAt]),D=r.useCallback(async O=>{(d==null?void 0:d.status)!==Q.enqueued&&(await h({connectedStoreId:t.id,timeRange:O.timeRange}),await i())},[d==null?void 0:d.status,h,t.id,i]),[T,E]=r.useState(!1),w=r.useCallback(async()=>{E(!0);try{await u(),await i()}catch(O){throw E(!1),O}E(!1)},[i,u]),[C,k]=r.useState(!1),M=r.useCallback(async()=>{k(!0);try{await m(),await i()}catch(O){throw k(!1),O}k(!1)},[m,i]);return e($,{title:n("pages.editStoreIntegration.editShopifyStore.orderSync.manualSync.title"),description:e(H,{i18nKey:"pages.editStoreIntegration.editShopifyStore.orderSync.manualSync.description"}),children:e(Pt,{onSubmit:b(D),children:l(N,{children:[e(N.Section,{children:l(S,{vertical:!0,children:[e(_,{as:"p",variant:"bodyMd",children:n("pages.editStoreIntegration.editShopifyStore.orderSync.manualSync.details")}),e(K,{control:p,name:"timeRange",render:({field:O})=>e(vt,{...O,disabled:g||c||se(d==null?void 0:d.status).with(Q.enqueued,Q.failed,()=>!0).with(Q.completed,()=>!1).otherwise(()=>!1),title:null,choices:a,selected:[O.value],onChange:P=>O.onChange(P[0])})}),e(_,{as:"p",variant:"bodyMd",color:"subdued",children:n("pages.editStoreIntegration.editShopifyStore.orderSync.manualSync.note")}),(d==null?void 0:d.status)===Q.failed&&e(oe,{fieldID:"sync",message:n("pages.editStoreIntegration.editShopifyStore.orderSync.manualSync.error")})]})}),e(N.Section,{children:l(S,{alignment:"center",children:[l(S.Item,{fill:!0,children:[e(_,{as:"p",variant:"bodySm",children:n("pages.editStoreIntegration.editShopifyStore.orderSync.manualSync.lastSyncedAt")}),e(_,{as:"p",variant:"bodySm",color:"subdued",children:y})]}),!c&&se(d).with({status:Q.enqueued},()=>l(S,{spacing:"extraTight",alignment:"center",children:[e(Li,{children:e(xt,{size:"small"})}),e(_,{as:"p",variant:"bodySm",color:"subdued",children:n("pages.editStoreIntegration.editShopifyStore.orderSync.manualSync.syncing")})]})).with({status:Q.failed},()=>l(S,{spacing:"tight",children:[e(W,{onClick:M,disabled:T,loading:C,children:n("pages.editStoreIntegration.editShopifyStore.orderSync.manualSync.actions.cancel")}),e(W,{primary:!0,onClick:w,disabled:C,loading:T,children:n("pages.editStoreIntegration.editShopifyStore.orderSync.manualSync.actions.retry")})]})).otherwise(()=>s!==null&&s.status!==Q.completed?e(Ne,{content:n("pages.editStoreIntegration.editShopifyStore.orderSync.manualSync.concurrencyLimit",{storeName:s.connectedStore.name}),children:e(W,{primary:!0,disabled:!0,loading:g,children:n("pages.editStoreIntegration.editShopifyStore.orderSync.manualSync.actions.sync")})}):e(W,{primary:!0,submit:!0,loading:g,children:n("pages.editStoreIntegration.editShopifyStore.orderSync.manualSync.actions.sync")}))]})})]})})})},Hi=q("ol",{target:"e1kz4voq0"})({name:"hbe1c9",styles:"margin-block-start:0.5em;margin-block-end:0.5em;padding-inline-start:30px"}),Gi=({store:t,onUpdated:i})=>{var d;const{t:n}=x(),{showToast:o}=de(),{userOrganization:a}=G(),[c,s]=r.useState(!!((d=t.config.orderSync)!=null&&d.shouldOverrideExistingShipments)),{mutateAsync:m,isLoading:u}=V(),h=r.useCallback(async f=>{var p,g,b;const I=await m({orgId:Ee(a==null?void 0:a.id),connectedStoreId:t.id,data:{config:{orderSync:{shouldOverrideExistingShipments:f}}}});o({content:n(`pages.editStoreIntegration.editShopifyStore.orderSync.overrideExistingShipments.toast.${(p=I.config.orderSync)!=null&&p.shouldOverrideExistingShipments?"enabled":"disabled"}`),duration:2e3}),s(!!((g=I.config.orderSync)!=null&&g.shouldOverrideExistingShipments)),U.track({event:"store_settings_updated",properties:{store_id:t.id,store_provider:"shopify",store_settings:{override_on_update:!!((b=I.config.orderSync)!=null&&b.shouldOverrideExistingShipments)}}}),await i()},[i,m,o,t.id,n,a==null?void 0:a.id]);return e($,{title:n("pages.editStoreIntegration.editShopifyStore.orderSync.overrideExistingShipments.title"),description:e(H,{i18nKey:"pages.editStoreIntegration.editShopifyStore.orderSync.overrideExistingShipments.description"}),children:l(N,{children:[e(N.Section,{children:l(S,{alignment:"center",spacing:"tight",children:[e(S.Item,{children:e(_,{as:"span",variant:"bodyMd",fontWeight:"semibold",children:n("pages.editStoreIntegration.editShopifyStore.orderSync.overrideExistingShipments.status.title")})}),e(S.Item,{fill:!0,children:e(Se,{status:c?"success":void 0,children:n(`pages.editStoreIntegration.editShopifyStore.orderSync.overrideExistingShipments.status.${c?"enabled":"disabled"}`)})}),!t.isIntegratedWithGlobalE&&e(S.Item,{children:e(W,{outline:!0,loading:u,onClick:()=>h(!c),children:n(`pages.editStoreIntegration.editShopifyStore.orderSync.overrideExistingShipments.button.${c?"disable":"enable"}`)})})]})}),e(N.Section,{children:l(S,{vertical:!0,children:[e(_,{as:"p",variant:"bodyMd",color:"subdued",children:n("pages.editStoreIntegration.editShopifyStore.orderSync.overrideExistingShipments.intro")}),e(_,{variant:"headingSm",as:"p",children:e(H,{i18nKey:"pages.editStoreIntegration.editShopifyStore.orderSync.overrideExistingShipments.details",components:{list:e(Hi,{}),listItem:e("li",{})}})}),e(ne,{status:"info",children:e(H,{i18nKey:"pages.editStoreIntegration.editShopifyStore.orderSync.overrideExistingShipments.warning"})})]})})]})})};var Z=(t=>(t.ROUTE="route",t.SHOPIFY_ORDER_TAGS="shopify_order_tags",t))(Z||{}),Ie=(t=>(t.IS_ANY_OF="is_any_of",t.IS_NONE_OF="is_none_of",t))(Ie||{}),ge=(t=>(t.IN="in",t.NOT_IN="not_in",t))(ge||{});const Bi=({conditions:t,onAddCondition:i,onEditCondition:n,onDeleteCondition:o})=>{const{t:a,i18n:c}=x(),[s,m]=r.useState(!1),[u,h]=r.useState(!1),d=()=>m(!s),f=()=>m(!1),I=()=>h(!u),p=()=>h(!1),g=(k,M)=>[{content:a("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditions.editCondition","Edit Condition"),onAction:()=>{n==null||n(k),M()}},{content:a("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditions.deleteCondition","Delete Condition"),destructive:!0,onAction:()=>
2{if(k===Z.SHOPIFY_ORDER_TAGS){o==null||o([B.shipment_tag]),M();return}o==null||o([B.sender_country,B.receiver_country]),M()}}],b=g(Z.ROUTE,f),v=g(Z.SHOPIFY_ORDER_TAGS,p),y=k=>{var M;return((M=li[k])==null?void 0:M[c.language])??k},D=r.useMemo(()=>{const k=[],M=[];return t.forEach(O=>{var P,R;O.type===B.sender_country&&((P=O.expression)!=null&&P.countries)&&k.push(...O.expression.countries),O.type===B.receiver_country&&((R=O.expression)!=null&&R.countries)&&M.push(...O.expression.countries)}),{senderCountries:[...new Set(k)],receiverCountries:[...new Set(M)]}},[t]),T=D.senderCountries.length>0||D.receiverCountries.length>0,E=r.useMemo(()=>t.some(k=>{var M,O;return k.type===B.shipment_tag&&(((O=(M=k.expression)==null?void 0:M.shipmentTagNames)==null?void 0:O.length)??0)>0}),[t]),w=r.useMemo(()=>{const k=[];return t.forEach(M=>{var O;M.type===B.shipment_tag&&((O=M.expression)!=null&&O.shipmentTagNames)&&k.push(...M.expression.shipmentTagNames)}),[...new Set(k)]},[t]),C=r.useMemo(()=>{var M;const k=t.find(O=>O.type===B.shipment_tag);return(M=k==null?void 0:k.expression)==null?void 0:M.operator},[t]);return e("div",{children:e(N,{children:e(N.Section,{children:l(S,{vertical:!0,spacing:"tight",children:[l("div",{children:[e(_,{variant:"headingMd",as:"h2",children:a("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditions.title","Conditions")}),e(_,{variant:"bodySm",as:"p",color:"subdued",children:a("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditions.description","Select conditions that orders must meet to be synchronized.")})]}),T&&l(S,{vertical:!0,spacing:"tight",children:[l(S,{alignment:"center",distribution:"equalSpacing",children:[e(_,{variant:"headingSm",as:"h3",children:a("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditions.route.title","Route")}),e("div",{onMouseLeave:f,children:e(Qe,{active:s,activator:e(W,{plain:!0,size:"slim",icon:Je,onClick:d,accessibilityLabel:a("common.moreActions","More actions")}),onClose:f,children:e("div",{onMouseLeave:f,children:e(Ze,{actionRole:"menuitem",items:b})})})})]}),D.senderCountries.length>0&&e("div",{children:l(_,{variant:"bodySm",as:"p",color:"subdued",children:[a("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditions.route.shipFrom","Ship from")," ",e(_,{variant:"bodySm",as:"span",fontWeight:"medium",children:D.senderCountries.map(y).join(", ")})]})}),D.receiverCountries.length>0&&e("div",{children:l(_,{variant:"bodySm",as:"p",color:"subdued",children:[a("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditions.route.shipTo","Ship to")," ",e(_,{variant:"bodySm",as:"span",fontWeight:"medium",children:D.receiverCountries.map(y).join(", ")})]})})]}),T&&l(S,{alignment:"center",spacing:"tight",children:[e(S.Item,{fill:!0,children:e(ce,{})}),e(_,{variant:"bodySm",as:"p",color:"subdued",children:a("common.and","And")}),e(S.Item,{fill:!0,children:e(ce,{})})]}),E&&l(S,{vertical:!0,spacing:"tight",children:[l(S,{alignment:"center",distribution:"equalSpacing",children:[e(_,{variant:"headingSm",as:"h3",children:a("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditions.tags.title","Tags")}),e("div",{onMouseLeave:p,children:e(Qe,{active:u,activator:e(W,{plain:!0,size:"slim",icon:Je,onClick:I,accessibilityLabel:a("common.moreActions","More actions")}),onClose:p,children:e("div",{onMouseLeave:p,children:e(Ze,{actionRole:"menuitem",items:v})})})})]}),l(_,{variant:"bodySm",as:"p",color:"subdued",children:[a(`pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditions.tags.description.${C}`),e(_,{variant:"bodySm",as:"span",fontWeight:"medium",children:w.join(", ")})]})]}),!(T&&E)&&e(W,{outline:!0,size:"slim",icon:gi,onClick:i,children:a("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditions.addCondition","Add Condition")})]})})})})},Ki=q(ht,{target:"e4iae7o2"})("width:60px;height:60px;color:",Pe.colors["icon-success"],";"),$i=q("div",{target:"e4iae7o1"})({name:"fdajuh",styles:"text-align:center;padding:var(--p-space-6) var(--p-space-4);padding-bottom:var(--p-space-12)"}),ji=q("div",{target:"e4iae7o0"})({name:"1ky82ct",styles:"max-width:400px;margin-top:var(--p-space-4);margin-bottom:var(--p-space-3);text-align:center"}),Vi=({onAddSyncConditions:t})=>{const{t:i}=x();return e(N,{children:e(N.Section,{children:e($i,{children:l(S,{vertical:!0,alignment:"center",spacing:"loose",children:[e(Ki,{}),l(S,{vertical:!0,alignment:"center",spacing:"tight",children:[e(_,{as:"h2",variant:"headingMd",children:i("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.emptyState.title")}),e(ji,{children:e(_,{as:"p",variant:"bodyMd",color:"subdued",children:i("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.emptyState.description")})})]}),e(W,{onClick:t,children:i("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.emptyState.button")})]})})})})},Yi=(t=[],i="add")=>{const{t:n}=x(),o=r.useMemo(()=>t.some(s=>s.type===B.sender_country||s.type===B.receiver_country),[t]),a=r.useMemo(()=>t.some(s=>s.type===B.shipment_tag),[t]);return r.useMemo(()=>[{options:[{label:n("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditionOptions.route.label"),value:Z.ROUTE},{label:n("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditionOptions.shopifyOrderTags.label"),value:Z.SHOPIFY_ORDER_TAGS}].filter(u=>!(i==="add"&&(u.value===Z.ROUTE&&o||u.value===Z.SHOPIFY_ORDER_TAGS&&a)))}],[n,o,a,i])},zi=({mode:t,conditionSelector:i,conditions:n,onSubmit:o})=>{const{t:a}=x(),{userOrgConfigs:c}=G(),s=C=>{var M;const k=C==null?void 0:C.find(O=>O.type===B.sender_country);return(M=k==null?void 0:k.expression)!=null&&M.countries?k.expression.countries.map(O=>O):[]},m=C=>{var M;const k=C==null?void 0:C.find(O=>O.type===B.receiver_country);return(M=k==null?void 0:k.expression)!=null&&M.countries?k.expression.countries.map(O=>O):[]},[u,h]=r.useState(s(n)),[d,f]=r.useState(m(n)),{isSenderCountrySelectionDisabled:I,featuredSenderCountries:p,includedSenderCountries:g,excludedSenderCountries:b,isReceiverCountrySelectionDisabled:v,excludedReceiverCountries:y}=ui({fromCountries:u}),D=r.useCallback(C=>{h(C),C.some(k=>![z.HK,z.CN].includes(k))&&f([z.HK])},[]),T=r.useCallback(C=>{f(C)},[]),E=r.useCallback(C=>{if(C.preventDefault(),C.stopPropagation(),u.length===0||d.length===0)return;const k={type:B.sender_country,expression:{countries:u.map(O=>O),operator:ge.IN}},M={type:B.receiver_country,expression:{countries:d.map(O=>O),operator:ge.IN}};
2o([k,M])},[u,d,o]),w=u.length===0||d.length===0;return l(Ae,{onSubmit:E,children:[e(J.Section,{children:l(S,{vertical:!0,spacing:"loose",children:[i,e(ce,{}),e(ot,{required:!0,allowMultiple:c==null?void 0:c.isAllowGoodsImportToHk,disabled:I,value:u,featured:p,included:g,excluded:b,label:a("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditionModal.route.senderCountries"),onChange:D}),e(ot,{required:!0,allowMultiple:u.every(C=>[z.HK,z.CN].includes(C)),disabled:v,value:d,featured:[z.US,z.AU,z.GB,z.CA,z.DE],excluded:y,label:a("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditionModal.route.receiverCountries"),onChange:T})]})}),e(J.Section,{children:e(S,{distribution:"trailing",children:e(W,{primary:!0,disabled:w,submit:!0,children:a(`pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditionModal.button.${t}`)})})})]})},Xi=()=>{const{t}=x();return{operatorOptions:r.useMemo(()=>{const n={[Ie.IS_ANY_OF]:ge.IN,[Ie.IS_NONE_OF]:ge.NOT_IN};return Object.values(Ie).map(o=>({label:t(`pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.operators.${St(o)}.label`),value:n[o]}))},[t])}},Ui=q("div",{target:"e1ai0rqw1"})({name:"1xe63ku",styles:"line-height:1"}),Qi=q("div",{target:"e1ai0rqw0"})({name:"1tu1qg3",styles:"color:var(--p-text)"}),Zi=({name:t,label:i,placeholder:n,required:o,error:a,disabled:c,value:s,multiline:m,helpText:u,onChange:h})=>{const{userOrganization:d}=G(),{shipmentTagOptions:f,refetch:I}=Si(),{mutateAsync:p}=mi({mutation:{onSettled:async()=>I()}}),g=r.useMemo(()=>f.map(P=>({value:P.label,label:P.label})),[f]),[b,v]=r.useState(""),[y,D]=r.useState(g),T=r.useMemo(()=>le(g,re.filter(P=>s.map(R=>R.toLowerCase()).includes(P.value.toLowerCase())),re.map(P=>P.value)),[g,s]),E=r.useCallback(P=>{const R=P.trim();R.length!==0&&(s.length<at&&h(le(et(s.concat(R),rt),Y=>Y.sort((ue,De)=>ue.localeCompare(De)))),g.some(Y=>Y.value.toLowerCase()===R.toLowerCase())||p({orgId:d.id,data:{name:R}}),v(""))},[h,s,g,p,d]),w=r.useCallback(P=>{v(P),D(g.filter(R=>R.label.toLowerCase().includes(P.trim().toLowerCase())))},[g]),C=r.useCallback(P=>{P.stopPropagation(),P.key==="Enter"&&E(b)},[E,b]),k=r.useCallback(P=>{const R=le(s,re.filter(Y=>!g.some(ue=>ue.value.toLowerCase()===Y.toLowerCase())||P.includes(Y)));h(le(et(R.concat(P),rt),re.sortBy(Y=>Y)))},[h,g,s]),M=r.useCallback(P=>{const R=s.filter(Y=>Y!==P);h(R)},[h,s]),O=r.useMemo(()=>b.trim().length>0&&!g.find(P=>P.value.toLowerCase()===b.trim().toLowerCase()),[b,g]);return r.useEffect(()=>{D(g)},[g]),l(j,{children:[e(ve,{options:y.map(P=>{const R=s.length>=at&&!s.includes(P.value);return{...P,disabled:R}}),selected:T,allowMultiple:!0,actionBefore:O?{helpText:e(Qi,{children:e(_,{as:"p",variant:"bodyMd",children:e(H,{i18nKey:"pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditionModal.shopifyOrderTags.options.add",values:{tagName:b},components:{strong:e("strong",{})}})})}),ellipsis:!0,prefix:e(Ui,{children:e(Rt,{style:{fill:"var(--p-text)"}})}),onAction:()=>{E(b)}}:void 0,textField:e("div",{role:"textbox",onKeyDown:C,children:e(ve.TextField,{name:t,requiredIndicator:o,disabled:c,autoComplete:"off",label:i,placeholder:s.length>0?void 0:n,value:b,onChange:w,error:a,helpText:u,multiline:m,maxLength:pi,showCharacterCount:!0})}),onSelect:k}),e(me,{heightSpace:"2"}),e(hi,{tags:le(s,re.map(P=>({label:P,value:P}))),onRemove:M})]})},Ji=()=>{const{t}=x();return r.useMemo(()=>L.object({operator:L.nativeEnum(ge,{required_error:t("form.validation.required")}),tags:L.array(L.string()).min(1,t("form.validation.required"))}),[t])},en=({mode:t,conditionSelector:i,conditions:n,onSubmit:o})=>{var b,v;const{t:a}=x(),c=Ji(),{operatorOptions:s}=Xi(),m=r.useMemo(()=>n==null?void 0:n.find(y=>y.type===B.shipment_tag),[n]),{control:u,watch:h,handleSubmit:d}=he({resolver:_e(c),defaultValues:m?{operator:(b=m.expression)==null?void 0:b.operator,tags:((v=m.expression)==null?void 0:v.shipmentTagNames)??[]}:{operator:void 0,tags:[]}}),f=h("operator"),I=h("tags"),p=r.useCallback(y=>{o([{type:B.shipment_tag,expression:{operator:y.operator,shipmentTagNames:y.tags}}])},[o]),g=Ft(f)||I.length===0;return l(Ae,{onSubmit:d(p),children:[e(J.Section,{children:l(S,{vertical:!0,spacing:"loose",children:[i,e(ce,{}),l(S,{vertical:!0,children:[e(S.Item,{children:e(K,{name:"operator",control:u,render:({field:y,fieldState:{error:D}})=>e(Lt,{label:a("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditionModal.shopifyOrderTags.operator.label"),placeholder:a("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditionModal.shopifyOrderTags.operator.placeholder"),options:s,value:y.value,error:D==null?void 0:D.message,required:!0,onChange:y.onChange})})}),e(S.Item,{children:e(K,{name:"tags",control:u,render:({field:{name:y,value:D,onChange:T},fieldState:{error:E}})=>e(Zi,{name:y,value:D,onChange:T,label:a("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditionModal.shopifyOrderTags.label"),placeholder:a("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditionModal.shopifyOrderTags.placeholder"),required:!0,error:E==null?void 0:E.message})})})]})]})}),e(J.Section,{children:e(S,{distribution:"trailing",children:e(W,{primary:!0,disabled:g,submit:!0,
2children:a(`pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditionModal.button.${t}`)})})})]})},tn=({conditions:t,editingType:i,onClose:n,onSubmit:o})=>{const{t:a}=x(),c=r.useMemo(()=>i??void 0,[i]),[s,m]=r.useState(c),u=r.useMemo(()=>i!==void 0?"update":"add",[i]),h=Yi(t,u),d=r.useMemo(()=>{const[v]=le(h,re.flatMap(y=>y.options),re.filter(({value:y})=>y===s));return(v==null?void 0:v.label)??""},[s,h]),f=r.useCallback(v=>{m(v[0])},[m]),I=r.useCallback(async v=>{await o(v),n()},[o,n]),p=r.useMemo(()=>e(ve,{options:h,selected:s?[s]:[],onSelect:f,textField:e(ve.TextField,{requiredIndicator:!0,autoComplete:"off",label:a("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditionModal.condition"),placeholder:a("form.placeholder.select"),value:d,onChange:()=>{}})}),[s,h,d,a,f]),g=r.useCallback(()=>{if(!s)return e("div",{style:{padding:"20px"},children:p});const v={mode:u,conditionSelector:p,conditions:t,onSubmit:I};return se(s).with(Z.ROUTE,()=>e(zi,{...v})).with(Z.SHOPIFY_ORDER_TAGS,()=>e(en,{...v})).exhaustive()},[s,u,p,t,I]),b=r.useMemo(()=>g(),[g]);return l(J,{open:!0,fullScreen:!0,titleHidden:!0,title:"",onClose:()=>{},children:[e(Wt,{title:a(`pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.conditionModal.${u==="add"?"addCondition":"updateCondition"}`),onClose:n}),b]})},nn=({store:t,onUpdated:i})=>{var v;const{t:n}=x(),{userOrganization:o}=G(),[a,c]=r.useState(!1),[s,m]=r.useState(void 0),[u,h]=r.useState([]),{mutateAsync:d}=V();r.useEffect(()=>{var y;h(((y=t.config.orderSync)==null?void 0:y.conditions)??[])},[(v=t.config.orderSync)==null?void 0:v.conditions]);const f=r.useCallback(()=>{m(void 0),c(!0)},[]),I=r.useCallback(y=>{m(y),c(!0)},[]),p=r.useCallback(()=>{c(!1),m(void 0)},[]),g=r.useCallback(async y=>{var T,E,w;if(!(o!=null&&o.id))return;const D=(()=>{if(s===void 0)return dt(u,y);const C=fi(y,M=>M.type),k=lt(u,M=>C.includes(M.type));return dt(k,y)})();await d({orgId:o.id,connectedStoreId:t.id,data:{config:{orderSync:{conditions:(D==null?void 0:D.length)>0?D:null,shouldOnlySyncPaidOrders:(T=t.config.orderSync)==null?void 0:T.shouldOnlySyncPaidOrders,shouldOverrideExistingShipments:(E=t.config.orderSync)==null?void 0:E.shouldOverrideExistingShipments,orderPriceSource:(w=t.config.orderSync)==null?void 0:w.orderPriceSource}}}}),c(!1),await i()},[o==null?void 0:o.id,t,d,i,u,s]),b=r.useCallback(async y=>{var T,E,w;if(!(o!=null&&o.id))return;const D=lt(u,C=>y.includes(C.type));h(D),await d({orgId:o.id,connectedStoreId:t.id,data:{config:{orderSync:{conditions:(D==null?void 0:D.length)>0?D:null,shouldOnlySyncPaidOrders:(T=t.config.orderSync)==null?void 0:T.shouldOnlySyncPaidOrders,shouldOverrideExistingShipments:(E=t.config.orderSync)==null?void 0:E.shouldOverrideExistingShipments,orderPriceSource:(w=t.config.orderSync)==null?void 0:w.orderPriceSource}}}}),await i()},[o==null?void 0:o.id,t,u,d,i]);return l($,{title:n("pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.title"),description:e(H,{i18nKey:"pages.editStoreIntegration.editShopifyStore.orderSync.shopifyOrderSyncRule.description"}),children:[u.length>0?e(Bi,{conditions:u,onAddCondition:f,onEditCondition:I,onDeleteCondition:b}):e(Vi,{onAddSyncConditions:f}),a&&e(tn,{conditions:u,editingType:s,store:t,onClose:p,onSubmit:g,onUpdated:i})]})},on=({store:t,onUpdated:i})=>l(S,{vertical:!0,spacing:"none",children:[e(nn,{store:t,onUpdated:i}),e(qi,{store:t,onUpdated:i}),e(Gi,{store:t,onUpdated:i})]}),an=({store:t,onUpdated:i})=>{var d;const{t:n}=x(),{showToast:o}=de(),{userOrganization:a}=G(),[c,s]=r.useState(!!((d=t.config.productSync)!=null&&d.shouldAutoSyncInventory)),{mutateAsync:m,isLoading:u}=V(),h=r.useCallback(async f=>{var p,g,b;if(!(a!=null&&a.id))return;const I=await m({orgId:a.id,connectedStoreId:t.id,data:{config:{productSync:{shouldAutoSyncInventory:f}}}});o({content:n(`pages.editStoreIntegration.editShopifyStore.productSync.autoSyncInventory.toast.${(p=I.config.productSync)!=null&&p.shouldAutoSyncInventory?"enabled":"disabled"}`),duration:2e3}),s(!!((g=I.config.productSync)!=null&&g.shouldAutoSyncInventory)),U.track({event:"store_settings_updated",properties:{store_id:t.id,store_provider:"shopify",store_settings:{auto_sync_inventory:!!((b=I.config.productSync)!=null&&b.shouldAutoSyncInventory)}}}),await i()},[i,m,o,t.id,n,a==null?void 0:a.id]);return e($,{title:n("pages.editStoreIntegration.editShopifyStore.productSync.autoSyncInventory.title"),description:e(H,{i18nKey:"pages.editStoreIntegration.editShopifyStore.productSync.autoSyncInventory.description"}),children:l(N,{children:[e(N.Section,{children:l(S,{alignment:"center",spacing:"tight",children:[e(S.Item,{children:e(_,{as:"span",variant:"bodyMd",fontWeight:"semibold",children:n("pages.editStoreIntegration.editShopifyStore.productSync.autoSyncInventory.status.title")})}),e(S.Item,{fill:!0,children:e(Se,{status:c?"success":void 0,children:n(`pages.editStoreIntegration.editShopifyStore.productSync.autoSyncInventory.status.${c?"enabled":"disabled"}`)})}),e(S.Item,{children:e(W,{outline:!0,loading:u,onClick:()=>h(!c),children:n(`pages.editStoreIntegration.editShopifyStore.productSync.autoSyncInventory.button.${c?"disable":"enable"}`)})})]})}),e(N.Section,{children:e(ne,{status:"info",children:e(H,{i18nKey:"pages.editStoreIntegration.editShopifyStore.productSync.autoSyncInventory.warning"})})})]})})},rn=({store:t,onUpdated:i})=>{var d;const{t:n}=x(),{showToast:o}=de(),{userOrganization:a}=G(),[c,s]=r.useState(!!((d=t.config.productSync)!=null&&d.shouldAutoSyncNewProducts)),{mutateAsync:m,isLoading:u}=V(),h=r.useCallback(async f=>{var p,g,b;if(!(a!=null&&a.id))return;const I=await m({orgId:a.id,connectedStoreId:t.id,data:{config:{productSync:{shouldAutoSyncNewProducts:f}}}});o({content:n(`pages.editStoreIntegration.editShopifyStore.productSync.autoSyncNewProducts.toast.${(p=I.config.productSync)!=null&&p.shouldAutoSyncNewProducts?"enabled":"disabled"}`),duration:2e3}),s(!!((g=I.config.productSync)!=null&&g.shouldAutoSyncNewProducts)),U.track({event:"store_settings_updated",properties:{store_id:t.id,store_provider:"shopify",store_settings:{auto_sync_new_products:!!((b=I.config.productSync)!=null&&b.shouldAutoSyncNewProducts)}}}),await i()},[i,m,o,t.id,n,a==null?void 0:a.id]);return e($,{title:n("pages.editStoreIntegration.editShopifyStore.productSync.autoSyncNewProducts.title"),description:e(H,{i18nKey:"pages.editStoreIntegration.editShopifyStore.productSync.autoSyncNewProducts.description"}),children:l(N,{children:[e(N.Section,{children:l(S,{alignment:"center",spacing:"tight",children:[e(S.Item,{children:e(_,{as:"span",variant:"bodyMd",fontWeight:"semibold",children:n("pages.editStoreIntegration.editShopifyStore.productSync.autoSyncNewProducts.status.title")})}),e(S.Item,{fill:!0,children:e(Se,{status:c?"success":void 0,children:n(`pages.editStoreIntegration.editShopifyStore.productSync.autoSyncNewProducts.status.${c?"enabled":"disabled"}`)})}),e(S.Item,{children:e(W,{outline:!0,loading:u,onClick:()=>h(!c),children:n(`pages.editStoreIntegration.editShopifyStore.productSync.autoSyncNewProducts.button.${c?"disable":"enable"}`)})})]})}),e(N.Section,{children:e(ne,{status:"info",children:e(H,{i18nKey:"pages.editStoreIntegration.editShopifyStore.productSync.autoSyncNewProducts.warning"})})})]})})},sn=({store:t,onUpdated:i})=>{const{userOrgConfigs:n}=G();return l(S,{vertical:!0,spacing:"none",children:[e(rn,{store:t,onUpdated:i}),(n==null?void 0:n.isFulfillmentEnabled)&&e(an,{store:t,onUpdated:i})]})},dn=q("div",{target:"e1mmtvp40"})({name:"936uu",styles:"margin-top:var(--p-space-4)"}),ln=({store:t,onClose:i,onUpdated:n})=>{var p,g,b;const{t:o}=x(),{userOrganization:a}=G(),[c,s]=r.useState(String(((p=t.config.budgetControl)==null?void 0:p.thresholdPercent)??"")),{mutateAsync:m,isLoading:u}=V(),h=r.useMemo(()=>{var v;return c!==String(((v=t.config.budgetControl)==null?void 0:v.thresholdPercent)??"")},[(g=t.config.budgetControl)==null?void 0:g.thresholdPercent,c]),d=r.useMemo(()=>{const v=Number.parseFloat(c);return Number.isFinite(v)&&v>0?v:null},[c]),f=r.useCallback(v=>{s(v)},[]),I=r.useCallback(async()=>{var v;d!=null&&(await m({connectedStoreId:t.id,orgId:a.id,data:{config:{budgetControl:{isEnabled:((v=t.config.budgetControl)==null?void 0:v.isEnabled)??!1,thresholdPercent:d}}}}),await n(d),i())},[m,i,n,d,(b=t.config.budgetControl)==null?void 0:b.isEnabled,t.id,a]);return e(J,{open:!0,title:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.budgetControl.editThresholdModal.title"),primaryAction:{disabled:!h||d==null,content:o("common.save"),loading:u,onAction:I},secondaryActions:[{content:o("common.cancel"),onAction:i}],onClose:i,children:l(J.Section,{children:[e(ne,{status:"info",children:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.budgetControl.editThresholdModal.description")}),e(dn,{children:e(qt,{type:"number",label:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.budgetControl.editThresholdModal.label"),suffix:"%",autoComplete:"off",min:.01,step:.
201,value:c,onChange:f,placeholder:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.budgetControl.editThresholdModal.placeholder")})})]})})},cn=100,gn=({store:t,onUpdated:i})=>{var g,b,v,y,D;const{t:n}=x(),{showToast:o}=de(),{userOrganization:a}=G(),[c,s]=r.useState(!!((g=t.config.budgetControl)!=null&&g.isEnabled)),[m,u]=r.useState(!1);r.useEffect(()=>{var T;s(((T=t.config.budgetControl)==null?void 0:T.isEnabled)??!1)},[(b=t.config.budgetControl)==null?void 0:b.isEnabled]);const{mutateAsync:h,isLoading:d}=V(),f=r.useCallback(T=>{U.track({event:"store_settings_updated",properties:{store_id:t.id,store_provider:"shopify",store_settings:T}})},[t.id]),I=r.useCallback(async T=>{var C,k,M;const E=((C=t.config.budgetControl)==null?void 0:C.thresholdPercent)??cn,w=await h({orgId:a.id,connectedStoreId:t.id,data:{config:{budgetControl:{isEnabled:T,thresholdPercent:E}}}});f({budget_control_enabled:T}),o({content:n(`pages.editStoreIntegration.editShopifyStore.shipmentDetails.budgetControl.toast.${(k=w.config.budgetControl)!=null&&k.isEnabled?"enabled":"disabled"}`),duration:2e3}),s(!!((M=w.config.budgetControl)!=null&&M.isEnabled)),await i()},[h,i,o,t.id,(v=t.config.budgetControl)==null?void 0:v.thresholdPercent,n,f,a]),p=r.useCallback(async T=>{f({budget_control_threshold:T}),await i()},[i,f]);return l(j,{children:[e(N.Section,{children:l(S,{alignment:"center",spacing:"tight",children:[e(S.Item,{children:e(_,{as:"span",variant:"bodyMd",fontWeight:"semibold",children:n("pages.editStoreIntegration.editShopifyStore.shipmentDetails.budgetControl.status.title")})}),e(S.Item,{fill:!0,children:e(Se,{status:c?"success":void 0,children:n(`pages.editStoreIntegration.editShopifyStore.shipmentDetails.budgetControl.status.${c?"enabled":"disabled"}`)})}),e(S.Item,{children:e(W,{outline:!0,loading:d,onClick:()=>I(!c),children:n(`pages.editStoreIntegration.editShopifyStore.shipmentDetails.budgetControl.button.${c?"disable":"enable"}`)})})]})}),e(N.Section,{children:e(S,{distribution:"fillEvenly",children:l(S.Item,{children:[l(S,{alignment:"center",children:[e(S.Item,{fill:!0,children:e(_,{as:"span",variant:"bodyMd",color:"subdued",children:n("pages.editStoreIntegration.editShopifyStore.shipmentDetails.budgetControl.fields.threshold.label")})}),e(W,{plain:!0,onClick:()=>u(!0),children:n("common.edit")})]}),e("div",{children:e(H,{i18nKey:"pages.editStoreIntegration.editShopifyStore.shipmentDetails.budgetControl.fields.threshold.value",values:{value:((y=t.config.budgetControl)==null?void 0:y.thresholdPercent)!==void 0&&((D=t.config.budgetControl)==null?void 0:D.thresholdPercent)!==null?`${t.config.budgetControl.thresholdPercent}%`:"--"}})})]})})}),m&&e(ln,{store:{id:t.id,config:{budgetControl:t.config.budgetControl}},onClose:()=>u(!1),onUpdated:p})]})},ct=q("div",{target:"e1giu7kt0"})({name:"15ms6eq",styles:"display:inline;&>*{display:inline;}"}),un=({taxTerm:t})=>{const{t:i}=x();return se(t).with(Ce.DDP,()=>e(ne,{status:"info",title:i("shipment.shipmentDetails.sections.shipmentDetails.ddpHint.title"),children:e(ct,{children:e(H,{i18nKey:"shipment.shipmentDetails.sections.shipmentDetails.ddpHint.description",components:{ctaLink:e(W,{plain:!0,external:!0,url:i("shipment.shipmentDetails.sections.shipmentDetails.fields.taxHandling.supportUrl")})}})})})).with(Ce.DAP,()=>e(ne,{status:"info",title:i("shipment.shipmentDetails.sections.shipmentDetails.dapHint.title"),children:e(ct,{children:e(H,{i18nKey:"shipment.shipmentDetails.sections.shipmentDetails.dapHint.description",components:{ctaLink:e(W,{plain:!0,external:!0,url:i("shipment.shipmentDetails.sections.shipmentDetails.fields.taxHandling.supportUrl")})}})})})).otherwise(()=>null)},pn=()=>{const{t}=x();return r.useMemo(()=>L.object({purpose:L.nativeEnum(Bt,{required_error:t("form.validation.pleaseSelect",{fieldName:t("pages.editStoreIntegration.editShopifyStore.shipmentDetails.customsDeclaration.fields.shipmentPurpose.label")})}),taxTerm:L.nativeEnum(Ce,{required_error:t("form.validation.pleaseSelect",{fieldName:t("pages.editStoreIntegration.editShopifyStore.shipmentDetails.customsDeclaration.fields.taxHandling.label")})}),iossNumberId:L.string().uuid().optional()}),[t])},hn=q("div",{target:"estsynq1"})({name:"5g75tq",styles:".Polaris-Label{width:100%;}"}),Sn=q("div",{target:"estsynq0"})({name:"7ppu6v",styles:"display:flex;align-items:center;*+*{margin-left:var(--p-space-1);}"}),mn=({store:t,onClose:i,onUpdated:n})=>{var D,T,E;const{t:o}=x(),{userOrganization:a,userOrgConfigs:c}=G(),{shipmentPurposeOptions:s}=ki(),{taxTermOptions:m}=_i({receiverCountry:ci[0]}),u=pn(),{control:h,watch:d,handleSubmit:f,formState:{isSubmitting:I,isDirty:p}}=he({resolver:_e(u),defaultValues:{purpose:((D=t.config.shipment)==null?void 0:D.purpose)??void 0,taxTerm:((T=t.config.shipment)==null?void 0:T.taxTerm)??void 0,iossNumberId:((E=t.config.shipment)==null?void 0:E.iossNumberId)??void 0}}),g=d("taxTerm"),b=d("iossNumberId"),{mutateAsync:v}=V(),y=r.useMemo(()=>f(async w=>{await v({connectedStoreId:t.id,orgId:a.id,data:{config:{shipment:{purpose:w.purpose,taxTerm:w.taxTerm,iossNumberId:w.iossNumberId}}}}),U.track({event:"store_settings_updated",properties:{store_id:t.id,store_provider:"shopify",store_settings:{shipment_purpose:w.purpose,shipment_tax_term:w.taxTerm,shipment_ioss_id:w.iossNumberId}}}),await n(),i()}),[f,v,i,n,t.id,a]);return e(J,{open:!0,title:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.customsDeclaration.title","Custom Declaration"),primaryAction:{disabled:!p,content:o("common.save"),loading:I,onAction:y},secondaryActions:[{content:o("common.cancel"),onAction:i}],onClose:i,children:e(N,{sectioned:!0,children:e(hn,{children:e(Ae,{onSubmit:y,children:l(te,{children:[e(te.Group,{children:e(K,{control:h,name:"purpose",render:({field:w,fieldState:{error:C}})=>l(j,{children:[e(Ne,{content:o("shipment.shipmentDetails.sections.shipmentDetails.fields.shipmentPurpose.hint"),preferredPosition:"mostSpace",children:l(Sn,{children:[e("span",{children:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.customsDeclaration.fields.shipmentPurpose.label")}),e(Ht,{size:16,color:"var(--p-icon)"})]})}),e(me,{heightSpace:"1"}),e(Gt,{...w,label:null,labelHidden:!0,placeholder:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.customsDeclaration.fields.shipmentPurpose.placeholder"),options:s,error:C==null?void 0:C.message})]})})}),e(te.Group,{children:l(S,{vertical:!0,children:[e("span",{children:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.customsDeclaration.fields.taxHandling.label")}),e(K,{name:"taxTerm",control:h,render:({field:w,fieldState:{error:C}})=>l(S,{vertical:!0,spacing:"tight",children:[m.map(k=>e(X,{...w,id:k.value,checked:g===k.value,label:o(`taxTerm.${k.value}.label`),onChange:()=>{w.onChange(k.value)}})),(C==null?void 0:C.message)&&e(mt,{items:[{status:"critical",icon:ft,title:C==null?void 0:C.message}]})]})})]})}),g===Ce.IOSS&&e(te.Group,{children:e(K,{name:"iossNumberId",control:h,render:({field:w,fieldState:{error:C}})=>e(Ci,{error:C==null?void 0:C.message,selectedId:b??null,onSelect:k=>{w.onChange(k.id)}})})}),e(un,{taxTerm:g}),(c==null?void 0:c.isIossEnabled)&&e(Ii,{})]})})})})})},fn=({store:t,onUpdated:i})=>{var I,p,g;const{t:n}=x(),{userOrganization:o,userOrgConfigs:a}=G(),{showToast:c}=de(),[s,m]=r.useState(((I=t.config.fulfillment)==null?void 0:I.fulfilledStatusTrigger)??"label_created");r.useEffect(()=>{var b;m(((b=t.config.fulfillment)==null?void 0:b.fulfilledStatusTrigger)??"label_created")},[(p=t.config.fulfillment)==null?void 0:p.fulfilledStatusTrigger]);const{mutateAsync:u,isLoading:h,error:d}=V(),f=r.useCallback(async(b,v)=>{var D;const y=s;m(v);try{await u({orgId:o.id,connectedStoreId:t.id,data:{config:{fulfillment:{shouldNotifyCustomer:(D=t.config.fulfillment)==null?void 0:D.shouldNotifyCustomer,fulfilledStatusTrigger:v}}}}),U.track({event:"store_settings_updated",properties:{store_id:t.id,store_provider:"shopify",store_settings:{fulfilled_status_trigger:v}}}),await i()}catch{m(y)}c({content:(d==null?void 0:d.message)??n("pages.editStoreIntegration.editShopifyStore.shipmentDetails.fulfilledStatusTrigger.fields.updated")})},[u,i,t.id,(g=t.config.fulfillment)==null?void 0:g.shouldNotifyCustomer,s,c,o,n,d]);return l(S,{distribution:"fillEvenly",vertical:!0,children:[!t.isIntegratedWithGlobalE&&e(X,{id:"never",n
2ame:"fulfilledStatusTrigger",label:n("pages.editStoreIntegration.editShopifyStore.shipmentDetails.fulfilledStatusTrigger.fields.never.label"),checked:s==="never",disabled:h,onChange:f}),e(X,{id:"label_created",name:"fulfilledStatusTrigger",label:n("pages.editStoreIntegration.editShopifyStore.shipmentDetails.fulfilledStatusTrigger.fields.labelCreated.label"),checked:s==="label_created",disabled:h,onChange:f}),e(X,{id:"pickup_scheduled",name:"fulfilledStatusTrigger",label:n("pages.editStoreIntegration.editShopifyStore.shipmentDetails.fulfilledStatusTrigger.fields.pickupScheduled.label"),checked:s==="pickup_scheduled",disabled:h,onChange:f}),e(X,{id:"shipment_in_transit",name:"fulfilledStatusTrigger",label:n("pages.editStoreIntegration.editShopifyStore.shipmentDetails.fulfilledStatusTrigger.fields.shipmentInTransit.label"),checked:s==="shipment_in_transit",disabled:h,onChange:f}),(a==null?void 0:a.isFulfillmentEnabled)&&e(ne,{status:"info",children:e("p",{children:n("pages.editStoreIntegration.editShopifyStore.shipmentDetails.fulfilledStatusTrigger.fulfillment.note")})})]})},yn=({store:t,onUpdated:i})=>{var f,I;const{t:n}=x(),{userOrganization:o}=G(),{showToast:a}=de(),[c,s]=r.useState(((f=t.config.orderSync)==null?void 0:f.orderPriceSource)??"product_list");r.useEffect(()=>{var p;s(((p=t.config.orderSync)==null?void 0:p.orderPriceSource)??"product_list")},[(I=t.config.orderSync)==null?void 0:I.orderPriceSource]);const{mutateAsync:m,isLoading:u,error:h}=V(),d=r.useCallback(async(p,g)=>{const b=c;s(g);try{await m({orgId:o.id,connectedStoreId:t.id,data:{config:{orderSync:{orderPriceSource:g}}}}),U.track({event:"store_settings_updated",properties:{store_id:t.id,store_provider:"shopify",store_settings:{order_price_source:g}}}),await i()}catch{s(b)}a({content:(h==null?void 0:h.message)??n("pages.editStoreIntegration.editShopifyStore.shipmentDetails.orderPriceSource.fields.updated")})},[c,a,h,n,m,o,t.id,i]);return l(S,{distribution:"fillEvenly",vertical:!0,children:[e(X,{id:"product_list",name:"orderPriceSource",label:n("pages.editStoreIntegration.editShopifyStore.shipmentDetails.orderPriceSource.fields.productList.label"),checked:c==="product_list",disabled:u,onChange:d}),e(X,{id:"store_original_price",name:"orderPriceSource",label:n("pages.editStoreIntegration.editShopifyStore.shipmentDetails.orderPriceSource.fields.storeOriginalPrice.label"),checked:c==="store_original_price",disabled:u,onChange:d}),e(X,{id:"store_discounted_price",name:"orderPriceSource",label:n("pages.editStoreIntegration.editShopifyStore.shipmentDetails.orderPriceSource.fields.storeDiscountedPrice.label"),checked:c==="store_discounted_price",disabled:u,onChange:d})]})},kt=t=>{const{t:i}=x();return r.useMemo(()=>L.object({package:L.object({packagingType:L.nativeEnum(be).superRefine((n,o)=>{t.isFedexPackagingEnabled===!1&&n.startsWith("fedex")&&o.addIssue({code:L.ZodIssueCode.custom,message:i("form.fields.packageDropdown.error.fedexPackagingNotEnabled")})}),length:L.number({invalid_type_error:i("form.validation.required",{fieldName:i("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.length.label")}),required_error:i("form.validation.required",{fieldName:i("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.length.label")})}).min(1,{message:i("form.validation.invalidNumber.greaterThanOrEqualTo",{fieldName:i("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.length.label"),min:1})}),width:L.number({invalid_type_error:i("form.validation.required",{fieldName:i("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.width.label")}),required_error:i("form.validation.required",{fieldName:i("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.width.label")})}).min(1,{message:i("form.validation.invalidNumber.greaterThanOrEqualTo",{fieldName:i("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.width.label"),min:1})}
2),height:L.number({invalid_type_error:i("form.validation.required",{fieldName:i("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.height.label")}),required_error:i("form.validation.required",{fieldName:i("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.height.label")})}).min(1,{message:i("form.validation.invalidNumber.greaterThanOrEqualTo",{fieldName:i("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.height.label"),min:1})})}),packagingWeight:L.number({invalid_type_error:i("form.validation.required",{fieldName:i("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.packagingWeight.label")}),required_error:i("form.validation.required",{fieldName:i("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.packagingWeight.label")})}).min(st,{message:i("form.validation.invalidNumber.greaterThanOrEqualTo",{fieldName:i("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.packagingWeight.label"),min:st})})}),[t.isFedexPackagingEnabled,i])},bn=()=>{const{t}=x(),{countryErrorMap:i}=Mi(t("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.item.fields.countryOfManufacture.label"));return r.useMemo(()=>L.object({item:L.object({countryOfManufacture:L.nativeEnum(z,{errorMap:i}),weight:L.number({invalid_type_error:t("form.validation.required",{fieldName:t("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.item.fields.unitWeight.label")}),required_error:t("form.validation.required",{fieldName:t("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.item.fields.unitWeight.label")})}).min(ke,{message:t("form.validation.invalidNumber.greaterThanOrEqualTo",{fieldName:t("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.item.fields.unitWeight.label"),min:ke})}),hsCode:L.string().min(6,{message:t("form.validation.invalidMinLength",{fieldName:t("shipment.shipmentDetails.sections.shipmentItems.fields.hsCode.label"),minLength:6})}).max(12,{message:t("form.validation.invalidMaxLength",{fieldName:t("shipment.shipmentDetails.sections.shipmentItems.fields.hsCode.label"),maxLength:12})})})}),[i,t])},In=t=>{const i=kt(t),n=bn();return r.useMemo(()=>i.merge(n),[n,i])},vn=q("div",{target:"e1teworn0"})({name:"5g75tq",styles:".Polaris-Label{width:100%;}"}),Cn=({store:t,onUpdated:i,onClose:n,shouldValidate:o})=>{var Le,We,qe,He,Ge,Be,Ke;const{t:a}=x(),{userOrganization:c}=G(),{isFedexPackagingEnabled:s,isLoading:m}=Ti(),{hsCodes:u}=Ct(),h=r.useMemo(()=>{var A,F,ee,ae,$e,je,Ve,Ye,ze,Xe;return{package:{packagingType:((A=t.config.package)==null?void 0:A.packagingType)??be.custom,length:((F=t.config.package)==null?void 0:F.length)??void 0,width:((ee=t.config.package)==null?void 0:ee.width)??void 0,height:((ae=t.config.package)==null?void 0:ae.height)??void 0,weight:(($e=t.config.package)==null?void 0:$e.weight)??void 0},packagingWeight:((je=t.config.packagingWeight)==null?void 0:je.value)??void 0,item:{countryOfManufacture:((Ve=t.config.item)==null?void 0:Ve.countryOfManufacture)??void 0,weight:((Ye=t.config.item)==null?void 0:Ye.weightValue)??void 0,hsCode:((ze=t.config.item)==null?void 0:ze.hsCode)??void 0,category:((Xe=u.find(_t=>{var Ue;return _t.value===((Ue=t.config.item)==null?void 0:Ue.hsCode)}))==null?void 0:Xe.label)??void 0}}},[u,t.config]),d=In({isFedexPackagingEnabled:s}),f=kt({isFedexPackagingEnabled:s}),I=t.isIntegratedWithGlobalE?f:d,{control:p,handleSubmit:g,formState:{isSubmitting:b,isDirty:v,errors:y},watch:D,setValue:T}=he({resolver:_e(I),defaultValues:h}),E=D("package"),{packagingType:w,length:C,width:k,height:M}=E,{mutateAsync:O}=V(),P=r.useMemo(()=>g(async A=>{var F;await O({connectedStoreId:t.id,orgId:c.id,data:{config:{package:"package"in A?{packagingType:A.package.packagingType,length:A.package.length,height:A.package.height,width:A.package.width,dimUnit:Kt.CM,weightUnit:Me.KG}:void 0,packagingWeight:"packagingWeight"in A?{value:A.packagingWeight,unit:Me.KG}:void 0,item:"item"in A?{countryOfManufacture:A.item.countryOfManufacture,weightValue:A.item.weight,weightUnit:Me.KG,hsCode:A.item.hsCode}:void 0}}}),U.track({event:"store_settings_updated",properties:{store_id:t.id,store_provider:"shopify",store_settings:{..."package"in A?{default_packaging_l:A.package.length,default_packaging_w:A.package.width,default_packaging_h:A.package.height}:{},..."packagingWeight"in A?{default_packaging_wgt:A.packagingWeight}:{},..."item"in A?{product_country_of_manufacture:A.item.countryOfManufacture,default_product_category:((F=u.find(ee=>{var ae;return ee.value===((ae=t.config.item)==null?void 0:ae.hsCode)}
2))==null?void 0:F.label)??A.item.hsCode,default_item_wgt:A.item.weight}:{}}}}),await i(),n()}),[g,u,O,n,i,(Le=t.config.item)==null?void 0:Le.hsCode,t.id,c]),[R,Y]=r.useState(w!==be.custom),ue=r.useCallback(()=>{Y(!1),T("package.packagingType",be.custom,{shouldValidate:!0})},[T]),De=r.useCallback(A=>{Y(!0),T("package.packagingType",A.packagingType,{shouldValidate:!0,shouldDirty:!0}),T("package.height",A.height),T("package.width",A.width),T("package.length",A.length),A.weightValue&&T("packagingWeight",A.weightValue)},[T]);r.useEffect(()=>{o&&g(tt)(),m||T("package.packagingType",w,{shouldValidate:!0})},[m,T,w,g,o]);const Fe=b||!v||Object.values(y).some(A=>!vi(A));return e(J,{open:!0,title:a("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.title"),primaryAction:{content:a("common.save"),loading:b,onAction:P,disabled:Fe},secondaryActions:[{content:a("common.cancel"),onAction:n}],onClose:n,children:e(N,{sectioned:!0,children:e(vn,{children:l(Ae,{onSubmit:b||Fe?tt:P,children:[l(te,{children:[e(_,{as:"p",variant:"headingXs",children:a("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.title")}),e(Di,{initialPackagingType:w,onCustomPackageSelected:ue,onSavedPackagingSelected:De}),"package"in y&&((qe=(We=y.package)==null?void 0:We.packagingType)==null?void 0:qe.message)&&e(oe,{message:y.package.packagingType.message,fieldID:"box"}),l(te.Group,{condensed:!0,children:[e(K,{control:p,name:"package.length",render:({field:A,fieldState:{error:F}})=>e(pe,{...A,readOnly:R,disabled:R,type:"integer",label:a("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.length.label"),suffix:"cm",autoComplete:"off",min:1,requiredIndicator:!0,error:!!F,value:String(A.value)})}),e(K,{control:p,name:"package.width",render:({field:A,fieldState:{error:F}})=>e(pe,{...A,readOnly:R,disabled:R,type:"integer",label:a("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.width.label"),suffix:"cm",autoComplete:"off",min:1,requiredIndicator:!0,error:!!F})}),e(K,{control:p,name:"package.height",render:({field:A,fieldState:{error:F}})=>e(pe,{...A,readOnly:R,disabled:R,type:"integer",label:a("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.height.label"),suffix:"cm",autoComplete:"off",min:1,requiredIndicator:!0,error:!!F})}),e(K,{control:p,name:"packagingWeight",render:({field:A,fieldState:{error:F}})=>e(pe,{...A,readOnly:R,disabled:R,type:"two-decimal",label:a("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.packagingWeight.label"),suffix:"kg",min:ke,autoComplete:"off",requiredIndicator:!0,error:!!F,value:String(A.value)})})]}),(C>120||k>120||M>120)&&e(ne,{status:"warning",children:a("pages.settings.tabs.packages.addBoxModal.warning")}),"package"in y&&(((He=y.package)==null?void 0:He.length)||((Ge=y.package)==null?void 0:Ge.width)||((Be=y.package)==null?void 0:Be.height))&&e(oe,{message:a("form.validation.invalidNumber.greaterThanOrEqualTo",{fieldName:[a("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.length.label"),a("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.width.label"),a("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.height.label")].join(", "),min:1}),fieldID:"box"}),"package"in y&&((Ke=y.packagingWeight)==null?void 0:Ke.message)&&e(oe,{message:y.packagingWeight.message,fieldID:"packagingWeight"})]}),!t.isIntegratedWithGlobalE&&l(j,{children:[e(me,{heightSpace:"10"}),l(te,{children:[e(_,{as:"p",variant:"headingXs",children:a("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.item.title")}),l(te.Group,{children:[e(K,{name:"item.countryOfManufacture",control:p,render:({field:A,fieldState:F})=>{var ee;return e(Ai,{required:!0,name:"item.countryOfManufacture",value:[A.value],label:a("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.item.fields.countryOfManufacture.label"),featured:[z.CN,z.HK],onChange:([ae])=>A.onChange(ae),error:(ee=F.error)==null?void 0:ee.message,helpText:a("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.item.fields.countryOfManufacture.hint")})}}),e(K,{control:p,name:"item.weight",render:({field:A,fieldState:{error:F}})=>e(pe,{...A,type:"two-decimal",label:a("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.item.fields.unitWeight.label"),suffix:"kg",min:ke,autoComplete:"off",requiredIndicator:!0,error:F==null?void 0:F.message,value:String(A.value)})})]}),e(te.Group,{children:e(K,{name:"item.hsCode",control:p,render:({field:A,fieldState:{error:F}})=>l(S,{vertical:!0,spacing:"extraTight",children:[e($t,{id:"hsCode",requiredIndicator:!0,children:a("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.item.fields.hsCodeCategory.label")}),e(di,{...A,required:!0,defaultValue:A.value,error:F==null?void 0:F.message,helpText:a("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.item.fields.hsCodeCategory.hint"),onCategorySelected:({hsCode:ee})=>A.onChange(ee)})]})})})]})]})]})})})})},kn=({store:t,onUpdated:i})=>{var d,f;const{t:n}=x(),{showToast:o}=de(),{userOrganization:a}=G(),[c,s]=r.useState(!!((d=t.config.fulfillment)!=null&&d.shouldCancelFulfillmentOnShipmentCancellation));r.useEffect(()=>{var I;s(((I=t.config.fulfillment)==null?void 0:I.shouldCancelFulfillmentOnShipmentCancellation)??!1)},[(f=t.config.fulfillment)==null?void 0:f.shouldCancelFulfillmentOnShipmentCancellation]);const{mutateAsync:m,isLoading:u}=V(),h=r.useCallback(async I=>{var g,b;const p=await m({orgId:Ee(a==null?void 0:a.id),connectedStoreId:t.id,data:{config:{fulfillment:{shouldCancelFulfillmentOnShipmentCancellation:I}}}});U.track({event:"store_settings_updated",properties:{store_id:t.id,store_provider:"shopify",store_settings:{cancel_fulfillment_on_shipment_cancellation:I}}}),o({content:n(`pages.editStoreIntegration.editShopifyStore.shipmentDetails.shouldCancelFulfillmentOnShipmentCancellation.toast.${(g=p.config.fulfillment)!=null&&g.shouldCancelFulfillmentOnShipmentCancellation?"enabled":"disabled"}`),duration:2e3}),s(!!((b=p.config.fulfillment)!=null&&b.shouldCancelFulfillmentOnShipmentCancellation)),await i()},[m,i,o,t.id,n,a==null?void 0:a.id]);return l(j,{children:[e(N.Section,{children:l(S,{alignment:"center",spacing:"tight",children:[e(S.Item,{children:e(_,{as:"span",variant:"bodyMd",fontWeight:"semibold",children:n("pages.editStoreIntegration.editShopifyStore.shipmentDetails.shouldCancelFulfillmentOnShipmentCancellation.status.title")})}),e(S.Item,{fill:!0,children:e(Se,{status:c?"success":void 0,children:n(`pages.editStoreIntegration.editShopifyStore.shipmentDetails.shouldCancelFulfillmentOnShipmentCancellation.status.${c?"enabled":"disabled"}`)})}),e(S.Item,{children:e(W,{outline:!0,loading:u,onClick:()=>h(!c),children:n(`pages.editStoreIntegration.editShopifyStore.shipmentDetails.shouldCancelFulfillmentOnShipmentCancellation.button.${c?"disable":"enable"}`)})})]})}),e(N.Section,{children:e(S,{vertical:!0,children:e(_,{as:"p",variant:"bodyMd",color:"subdued",children:n("pages.editStoreIntegration.editShopifyStore.shipmentDetails.shouldCancelFulfillmentOnShipmentCancellation.intro")})})})]})},_n=({store:t,onUpdated:i,disabled:n})=>{var g,b,v;const{t:o}=x(),{userOrganization:a}=G(),{value:c,setFalse:s,setTrue:m}=Te(!1),[u,h]=r.useState(((g=t.config.fulfillment)==null?void 0:g.shouldNotifyCustomer)??!1);r.useEffect(()=>{var y;h(((y=t.config.fulfillment)==null?void 0:y.shouldNotifyCustomer)??!1)},[(b=t.config.fulfillment)==null?void 0:b.shouldNotifyCustomer]);const{mutateAsync:d,isLoading:f,error:I}=V(),p=r.useCallback(async(y,D)=>{var E;const T=D==="shouldNotifyCustomer";h(T);try{await d({orgId:a.id,connectedStoreId:t.id,data:{config:{fulfillment:{shouldNotifyCustomer:T,fulfilledStatusTrigger:(E=t.config.fulfillment)==null?void 0:E.fulfilledStatusTrigger}}}}),U.track({event:"store_settings_updated",properties:{store_id:t.id,store_provider:"shopify",store_settings:{notify_customer_on_shipment_creation:T}}}),await i()}catch{h(!T)}m()},[d,i,(v=t.config.fulfillment)==null?void 0:v.fulfilledStatusTrigger,t.id,m,a]);return l(j,{children:[l(S,{distribution:"fillEvenly",vertical:!0,children:[e(X,{id:"shouldNotifyCustomer",name:"shouldOrShouldNotNotifyCustomer",label:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.notifyCustomer.fields.shouldNotifyCustomer.label"),checked:u,disabled:f||n,onChange:p}),e(X,{id:"shouldNotNotifyCustomer",name:"shouldOrShouldNotNotifyCustomer",label:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.notifyCustomer.fields.shouldNotNotifyCustomer.label"),checked:!u,disabled:f||n,onChange:p}),n&&e(mt,{items:[{status:"warning",icon:ft,description:e(H,{i18nKey:"pages.editStoreIntegration.editShopifyStore.shipmentDetails.notifyCustomer.disabledNotes",components:{warningText:e(_,{as:"span",color:"warning",variant:"bodyMd",children:e("div",{})})}})}]})]}),c&&e(yt,{content:(I==null?void 0:I.message)??o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.notifyCustomer.fields.updated"),onDismiss:s})]})},An=q("div",{target:"e1l6zqgz1"})({name:"18eb9mn",styles:"padding:var(--p-space-10) 0"}),gt=q("div",{target:"e1l6zqgz0"})("&>*{padding-right:20px;}",({$isDesktop:t})=>t?`
3                display: flex;
4                & > * {
5                    flex: 1;
6                }
7            `:`
8                & > *:not(:first-child) {
9                    margin-top: var(--p-space-4);
10                }
11            `,";"),ye=()=>e(An,{children:e(ce,{})}),Tn=({store:t,onUpdated:i,showErrors:n})=>{var v,y,D,T,E;const{t:o,i18n:a}=x(),[c,s]=r.useState(null),m=r.useCallback(()=>s(null),[]),{getCountryByAlpha2:u}=bi(),{hsCodes:h}=Ct(),d=jt(),f=r.useMemo(()=>{var w,C,k,M;return(w=t.config.item)!=null&&w.countryOfManufacture?((M=(k=u((C=t.config.item)==null?void 0:C.countryOfManufacture))==null?void 0:k.name)==null?void 0:M[Vt[a.language]])??null:null},[u,a.language,(v=t.config.item)==null?void 0:v.countryOfManufacture]),I=r.useMemo(()=>{var C;if(!((C=t.config.item)!=null&&C.hsCode))return null;const w=h.find(k=>{var M;return k.value===((M=t.config.item)==null?void 0:M.hsCode)});return(w==null?void 0:w.label)??t.config.item.hsCode},[h,(y=t.config.item)==null?void 0:y.hsCode]),{itemWeight:p,itemWeightUnit:g}=r.useMemo(()=>{var w,C;return{itemWeight:(w=t.config.item)==null?void 0:w.weightValue,itemWeightUnit:(C=t.config.item)==null?void 0:C.weightUnit}},[t.config.item]),b=r.useMemo(()=>t.config.package,[t.config.package]);return l(S,{vertical:!0,spacing:"none",children:[se(c).with("CUSTOM_DECLARATION",()=>e(mn,{store:t,onClose:m,onUpdated:i}
11)).with("PACKAGING_AND_ITEM",()=>e(Cn,{store:t,onClose:m,onUpdated:i,shouldValidate:n})).otherwise(()=>null),!t.isIntegratedWithGlobalE&&l(j,{children:[e($,{title:e("span",{"data-onboarding-checklist-element":"shopify-store-settings-customs-declaration",children:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.customsDeclaration.title")}),description:e(Oe,{children:e(H,{i18nKey:"pages.editStoreIntegration.editShopifyStore.shipmentDetails.customsDeclaration.description",components:{div:e("div",{})}})}),children:e(N,{sectioned:!0,title:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.customsDeclaration.title"),actions:t.isIntegratedWithGlobalE?[]:[{content:o("common.edit"),onAction:()=>s("CUSTOM_DECLARATION")}],children:l(S,{distribution:"fillEvenly",children:[e(S,{distribution:"fillEvenly",children:l(S.Item,{children:[e(_,{as:"span",variant:"bodyMd",color:"subdued",children:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.customsDeclaration.fields.shipmentPurpose.label")}),e("div",{children:(D=t.config.shipment)!=null&&D.purpose?o(`general.shipmentPurpose.${St(t.config.shipment.purpose)}`):"--"})]})}),e(S,{distribution:"fillEvenly",children:l(S.Item,{children:[e(_,{as:"span",variant:"bodyMd",color:"subdued",children:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.customsDeclaration.fields.taxHandling.label")}),e("div",{children:(T=t.config.shipment)!=null&&T.taxTerm?t.config.shipment.taxTerm.toUpperCase():"--"})]})})]})})}),e(ye,{})]}),e($,{title:e("span",{"data-onboarding-checklist-element":"shopify-store-settings-packaging-and-item-settings",children:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.title")}),description:e(Oe,{children:e(H,{i18nKey:"pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.description",components:{div:e("div",{})}})}),children:l(N,{title:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.title"),actions:[{content:o("common.edit"),onAction:()=>s("PACKAGING_AND_ITEM")}],children:[e(N.Section,{title:e(_,{as:"p",variant:"headingXs",children:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.title")}),children:e(S,{distribution:"fillEvenly",children:e(S,{distribution:"fillEvenly",children:e(gt,{$isDesktop:d,children:l(S.Item,{children:[e(_,{as:"span",variant:"bodyMd",color:"subdued",children:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.dimensionsAndPackagingWeight.label")}),e(_,{as:"span",variant:"bodyMd",color:"critical",children:" *"}),e("div",{children:b&&b.length?e("div",{children:l(_,{as:"p",variant:"bodyMd",children:[o("general.package.formattedDimensionWithLabel",{length:b.length,height:b.height,width:b.width,unit:b.dimUnit}),t.config.packagingWeight&&`, ${o("general.package.formattedWeight",{weight:t.config.packagingWeight.value,unit:t.config.packagingWeight.unit})}`]})}):l(j,{children:["--",n&&e(oe,{message:o("form.validation.required",{fieldName:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.package.fields.dimensionsAndPackagingWeight.labelInErrorMessage")}),fieldID:"dimensions"})]})})]})})})})}),!t.isIntegratedWithGlobalE&&e(N.Section,{title:e(_,{as:"p",variant:"headingXs",children:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.item.title")}),children:l(S,{vertical:!0,children:[e(S,{distribution:"fillEvenly",children:l(gt,{$isDesktop:d,children:[l(S.Item,{children:[e(_,{as:"span",variant:"bodyMd",color:"subdued",children:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.item.fields.countryOfManufacture.label")}),e(_,{as:"span",variant:"bodyMd",color:"critical",children:" *"}),e("div",{children:f??l(j,{children:["--",n&&e(oe,{message:o("form.validation.required",{fieldName:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.item.fields.countryOfManufacture.label")}),fieldID:"country-of-manufacture"})]})})]}),l(S.Item,{children:[e(_,{as:"span",variant:"bodyMd",color:"subdued",children:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.item.fields.unitWeight.label")}),e(_,{as:"span",variant:"bodyMd",color:"critical",children:" *"}),e("div",{children:p&&g?e("div",{children:e(_,{as:"p",variant:"bodyMd",children:o("general.package.formattedWeight",{weight:p,unit:g})})}):l(j,{children:["--",n&&e(oe,{message:o("form.validation.required",{fieldName:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.item.fields.unitWeight.label")}),fieldID:"unit-weight"})]})})]})]})}),e(S,{distribution:"fillEvenly",children:l(S.Item,{children:[e(_,{as:"span",variant:"bodyMd",color:"subdued",children:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.item.fields.hsCodeCategory.label")}),e(_,{as:"span",variant:"bodyMd",color:"critical",children:" *"}),e("div",{children:I??l(j,{children:["--",n&&e(oe,{message:o("form.validation.required",{fieldName:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.packagingAndItemSettings.sections.item.fields.hsCodeCategory.label")}),fieldID:"item-category"})]})})]})})]})})]})}),e(ye,{}),e($,{title:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.orderPriceSource.title"),description:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.orderPriceSource.description"),children:e(N,{sectioned:!0,children:e(yn,{store:t,onUpdated:i})})}),e(ye,{}),e($,{title:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.fulfilledStatusTrigger.title"),description:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.fulfilledStatusTrigger.description"),children:e(N,{sectioned:!0,children:e(fn,{store:t,onUpdated:i})})}),e(ye,{}),e($,{title:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.shouldCancelFulfillmentOnShipmentCancellation.title"),description:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.shouldCancelFulfillmentOnShipmentCancellation.description"),children:e(N,{children:e(kn,{store:t,onUpdated:i})})}),e($,{title:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.notifyCustomer.title"),description:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.notifyCustomer.description"),children:e(N,{sectioned:!0,children:e(_n,{store:t,onUpdated:i,disabled:((E=t.config.fulfillment)==null?void 0:E.fulfilledStatusTrigger)==="never"})})}),e($,{title:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.budgetControl.title"),description:o("pages.editStoreIntegration.editShopifyStore.shipmentDetails.budgetControl.description"),children:e(N,{children:e(gn,{store:{id:t.
11id,config:{budgetControl:t.config.budgetControl}},onUpdated:i})})})]})},Dn=({store:t,onUpdated:i})=>{var p,g;const{t:n}=x(),{userOrganization:o}=G(),{value:a,setFalse:c,setTrue:s}=Te(!1),[m,u]=r.useState(((p=t.config.receiverAddress)==null?void 0:p.isResidential)??!0);r.useEffect(()=>{var b;u(((b=t.config.receiverAddress)==null?void 0:b.isResidential)??!1)},[(g=t.config.receiverAddress)==null?void 0:g.isResidential]);const{mutateAsync:h,isLoading:d,error:f}=V(),I=r.useCallback(async(b,v)=>{const y=v==="isResidential";u(y);try{await h({connectedStoreId:t.id,orgId:o.id,data:{config:{receiverAddress:{isResidential:y}}}}),U.track({event:"store_settings_updated",properties:{store_id:t.id,store_provider:"shopify",store_settings:{treat_all_as_residential:y}}}),await i()}catch{u(!y)}s()},[h,i,t.id,s,o]);return l(j,{children:[l(S,{distribution:"fillEvenly",vertical:!0,children:[e(X,{id:"isResidential",name:"receiverAddressIsResidential",label:n("pages.editStoreIntegration.editShopifyStore.shippingAddress.receiverAddress.fields.isResidential.label"),checked:m,disabled:d,onChange:I}),e(X,{id:"isNotResidential",name:"receiverAddressIsResidential",label:n("pages.editStoreIntegration.editShopifyStore.shippingAddress.receiverAddress.fields.isNotResidential.label"),checked:!m,disabled:d,onChange:I})]}),a&&e(yt,{content:(f==null?void 0:f.message)??n("pages.editStoreIntegration.editShopifyStore.shippingAddress.receiverAddress.fields.updated"),onDismiss:c})]})},Mn=q(Xt,{target:"esijfcd3"})({name:"f3qp4h",styles:"color:var(--p-text-on-surface)"}),wn=q("div",{target:"esijfcd2"})("@media (max-width: ",Pe.breakpoints["breakpoints-sm"],"){margin:0 var(--p-space-4);}"),On=q("div",{target:"esijfcd1"})({name:"18eb9mn",styles:"padding:var(--p-space-10) 0"}),Nn=q("div",{target:"esijfcd0"})({name:"n66x3k",styles:".Polaris-Tag{background-color:var(--p-decorative-one-surface);}"}),En=()=>e(On,{children:e(ce,{})}),Pn=({store:t,addresses:i,onUpdated:n,refetchAddresses:o})=>{const{t:a}=x(),{userOrganization:c}=G(),s=r.useMemo(()=>i.find(g=>g.id===t.config.senderAddressSavedAddressId)??i.find(g=>g.isDefault)??null,[i,t.config.senderAddressSavedAddressId]),{value:m,setTrue:u,setFalse:h}=Te(!1),d=r.useCallback(()=>{u()},[u]),{mutateAsync:f}=V(),I=r.useCallback(async g=>{await f({orgId:c.id,connectedStoreId:t.id,data:{config:{senderAddressSavedAddressId:g.id}}}),U.track({event:"store_settings_updated",properties:{store_id:t.id,store_provider:"shopify",store_settings:{default_from_country:g.country}}}),await n()},[f,n,t.id,c]),p=r.useCallback(async g=>{h(),await o(),await I(g)},[h,I,o]);return l(S,{vertical:!0,spacing:"none",children:[e($,{title:a("pages.editStoreIntegration.editShopifyStore.shippingAddress.senderAddress.title"),description:e(H,{i18nKey:"pages.editStoreIntegration.editShopifyStore.shippingAddress.senderAddress.description",components:{a:e(Mn,{to:xe.settings({tab:zt.ADDRESSES})})}}),children:l(S,{vertical:!0,children:[i.length===0?e(Ni,{title:a("pages.editStoreIntegration.editShopifyStore.shippingAddress.senderAddress.title"),heading:a("pages.editStoreIntegration.editShopifyStore.shippingAddress.senderAddress.emptySelection.heading"),content:a("pages.editStoreIntegration.editShopifyStore.shippingAddress.senderAddress.emptySelection.content"),ctaAction:{content:a("pages.editStoreIntegration.editShopifyStore.shippingAddress.senderAddress.addAddressButton"),onAction:d},forFieldId:"senderAddress"}):e(N,{title:a("pages.editStoreIntegration.editShopifyStore.shippingAddress.senderAddress.title"),children:l(N.Section,{children:[e(wi,{disableAddressAddition:!1,addAddressButtonLabel:a("pages.editStoreIntegration.editShopifyStore.shippingAddress.senderAddress.addAddressButton"),options:i,selectedAddressId:(s==null?void 0:s.id)??null,placeholder:a("shipment.addressInformation.sections.senderAddress.dropdown.placeholder"),onAddAddressClick:d,onSelect:I}),s&&l(j,{children:[e(me,{heightSpace:"3"}),l(Oe,{spacing:"tight",children:[s.addressNickname?l("div",{children:[e(_,{as:"p",variant:"bodyMd",children:s.addressNickname}),e(_,{as:"p",variant:"bodyMd",children:[s.addressLine1,s.addressLine2].join(", ")})]}):l("div",{children:[e(_,{as:"p",variant:"bodyMd",children:s.addressLine1}),e(_,{as:"p",variant:"bodyMd",children:s.addressLine2})]}),l("div",{children:[e(_,{variant:"bodyMd",as:"p",color:"subdued",children:s.name}),e(_,{variant:"bodyMd",as:"p",color:"subdued",children:`+${s.phoneCountryCode} ${s.phone}`})]}),s.isDefault&&e(Nn,{children:e(Yt,{children:e(_,{variant:"bodySm",as:"span",children:a("pages.settings.tabs.addresses.defaultAddress")})})})]})]})]})}),m&&e(Oi,{title:a("shipment.addressInformation.sections.senderAddress.addSenderAddress"),onClose:h,onSubmitted:p}),e(wn,{children:e(ne,{status:"info",children:a("pages.editStoreIntegration.editShopifyStore.shippingAddress.senderAddress.banner")})})]})}),!t.isIntegratedWithGlobalE&&l(j,{children:[e(En,{}),e($,{title:a("pages.editStoreIntegration.editShopifyStore.shippingAddress.receiverAddress.title"),description:a("pages.editStoreIntegration.editShopifyStore.shippingAddress.receiverAddress.description"),children:e(N,{sectioned:!0,children:e(Dn,{store:t,onUpdated:n})})})]})]})},xn=q("div",{target:"e1kcc3r00"})({name:"1cyngw3",styles:"max-width:460px;margin:0 auto;text-align:center"}),Rn=({store:t,onClose:i})=>{const{t:n}=x(),{data:o,trigger:a}=pt(),c=It(),{control:s,formState:{isSubmitting:m},handleSubmit:u}=he({defaultValues:{timeRange:Re.last30d}}),h=r.useCallback(async d=>{await a({connectedStoreId:t.id,timeRange:d.timeRange}),i()},[i,t.id,a]);return e(J,{open:!0,titleHidden:!0,title:null,onClose:i,children:l(N,{children:[l(N.Section,{children:[e(me,{heightSpace:"3"}),e(xn,{children:l(S,{vertical:!0,alignment:"center",children:[e(ht,{width:60,height:60,color:"var(--p-icon-success)"}),e(_,{as:"h2",variant:"headingLg",children:n("pages.editStoreIntegration.editShopifyStore.storeConnected.title",{storeName:t.name})}),e(_,{as:"p",variant:"bodyLg",color:"subdued",children:e(H,{i18nKey:"pages.editStoreIntegration.editShopifyStore.storeConnected.syncWindowDescription"})}),e(_,{as:"p",variant:"bodyLg",color:"subdued",children:n("pages.editStoreIntegration.editShopifyStore.storeConnected.orderSyncDescription")})]})})]}),e(N.Section,{children:e(K,{control:s,name:"timeRange",render:({field:d})=>e(vt,{disabled:m,title:e(_,{as:"p",variant:"bodyMd",color:"subdued",children:n("pages.editStoreIntegration.editShopifyStore.orderSync.manualSync.fields.timeRange.label")}),choices:c,selected:[d.value],onChange:f=>d.onChange(f[0])})})}),e(N.Section,{children:l(S,{distribution:"trailing",children:[e(W,{disabled:m,onClick:i,children:n("pages.editStoreIntegration.editShopifyStore.storeConnected.actions.syncOrdersLater","I Will Sync Later")}),o!==null&&o.status!==Q.completed?e(Ne,{content:n("pages.editStoreIntegration.editShopifyStore.orderSync.manualSync.concurrencyLimit",{storeName:o.connectedStore.name}),children:e(W,{primary:!0,disabled:!0,loading:m,children:n("pages.editStoreIntegration.editShopifyStore.orderSync.manualSync.actions.sync")})}):e(W,{primary:!0,loading:m,onClick:u(h),children:n("pages.editStoreIntegration.editShopifyStore.orderSync.manualSync.actions.sync")})]})})]})})},Fn=q("div",{target:"exz43ow2"})("@media (min-width: ",Pe.breakpoints["breakpoints-sm"],"){&.Polaris-Page-Header{padding:0 0 var(--p-space-5);}}"),Ln=q("div",{target:"exz43ow1"})({name:"i7uvlk",styles:".Polaris-Tabs__Tab:focus:not(:active) .Polaris-Tabs__Title::after{box-shadow:none;}"}),Wn=q("div",{target:"exz43ow0"})({name:"il9zd3",styles:"padding:var(--p-space-4) 0"}),we=[{id:ie.ORDER_SYNC,contentI18nKey:"pages.editStoreIntegration.editShopifyStore.tabs.orderSync",analyticsPageName:fe.SHOPIFY_SETTINGS_ORDER_SYNC},{id:ie.PRODUCT_SYNC,contentI18nKey:"pages.editStoreIntegration.editShopifyStore.tabs.productSync",analyticsPageName:fe.SHOPIFY_SETTINGS_PRODUCT_SYNC},{id:ie.SHIPMENT_DETAILS,contentI18nKey:"pages.editStoreIntegration.editShopifyStore.tabs.shipmentDetails",analyticsPageName:fe.SHOPIFY_SETTINGS_SHIPPING_DETAILS},{id:ie.SHIPPING_ADDRESS,contentI18nKey:"pages.editStoreIntegration.editShopifyStore.tabs.shippingAddress",analyticsPageName:fe.SHOPIFY_SETTINGS_SHIPPING_ADDRESSES}],qn=({showStoreConnectedModalWhenLoaded:t,store:i,onUpdated:n,onStoreConnectedModalClosed:o,tab:a,showShipmentDetailsErrors:c})=>{const{t:s}=x(),[m,u]=r.useState(a?yi(we,y=>y.id===a):0),h=r.useMemo(()=>Ee(we[m]),[m]),{value:d,setFalse:f}=Te(t),I=r.useCallback(()=>{f(),o(),n()},[f,o,n]),{addresses:p,refetch:g,isLoading:b}=si(),v=r.useMemo(()=>we.map(y=>
11({id:y.id,content:s(y.contentI18nKey)})),[s]);return Ut({pageName:h.analyticsPageName}),b?e(bt,{}):l(Zt,{children:[l(Fn,{className:"Polaris-Page-Header Polaris-Page-Header--isSingleRow Polaris-Page-Header--hasNavigation Polaris-Page-Header--longTitle",children:[e(W,{plain:!0,monochrome:!0,removeUnderline:!0,icon:e(Qt,{}),url:xe.storeIntegrations(),children:s("pages.editStoreIntegration.backToStoreIntegration")}),l("div",{className:"Polaris-Page-Header__Row",children:[e("div",{className:"Polaris-Page-Header__TitleWrapper",children:e("h1",{className:"Polaris-Header-Title Polaris-Header-Title__TitleWithSubtitle",children:s("pages.editStoreIntegration.editShopifyStore.title")})}),e("div",{className:"Polaris-Page-Header__RightAlign"})]})]}),e(it,{children:e(it.Section,{children:e(Ln,{children:e(Ei,{tabs:v,selected:m,onSelect:u,children:e(Wn,{children:se(h).with({id:ie.ORDER_SYNC},()=>e(on,{store:i,onUpdated:n})).with({id:ie.PRODUCT_SYNC},()=>e(sn,{store:i,onUpdated:n})).with({id:ie.SHIPMENT_DETAILS},()=>e(Tn,{store:i,onUpdated:n,showErrors:c})).with({id:ie.SHIPPING_ADDRESS},()=>e(Pn,{addresses:p,store:i,onUpdated:n,refetchAddresses:g})).exhaustive()})})})})}),d&&e(Rn,{store:i,onClose:I})]})},Hn=({orgId:t})=>{const{id:i}=Jt(),[n,o]=ei(),a=r.useMemo(()=>nt.parse(n.toString()),[n]),[c]=r.useState((a==null?void 0:a.showStoreConnectedModal)??!1),[s]=r.useState((a==null?void 0:a.tab)??ie.ORDER_SYNC),[m]=r.useState((s&&(a==null?void 0:a.fromProductSync))??!1),u=r.useCallback(()=>{const p=ti(a);if(p!=null&&p.showStoreConnectedModal&&(p==null||delete p.showStoreConnectedModal),!ii(a,p)){const g=nt.stringify(p);o(ni(g),{replace:!0})}},[a,o]),{data:h,isLoading:d,refetch:f}=oi(t,i??""),I=r.useCallback(async()=>{await f()},[f]);return!h||d?e(bt,{}):se(h).with({provider:ai.SHOPIFY},p=>e(qn,{showStoreConnectedModalWhenLoaded:c,store:p,onUpdated:I,onStoreConnectedModalClosed:u,tab:s,showShipmentDetailsErrors:m})).otherwise(()=>e(ri,{to:xe.storeIntegrations(),replace:!0}))},Fo=()=>{const{userOrganization:t}=G();return t?e(Hn,{orgId:t.id}):null};export{Fo as default};
12//# debugId=40430e57-35e3-5845-9218-7acd005f2f42
13//# sourceMappingURL=index-14MzTKuX.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.