PageSourceSearch

https://aoka.camera/cdn/shopifycloud/checkout-web/assets/c1/4a3d8599.DZZciK4C.js

js aoka.camera collected 2026-10-05 08:40:59 UTC 8,701 bytes, 1 lines download raw bytes

1import{u as e,g as n,q as t,a4 as a,a5 as o,z as r,o as i,h as c,T as s,S as l}from"./2c1ab0fe.XVnTovwp.js";import{b as d,a as m}from"./efa0389a.BZq4PXzm.js";import{aa as p,i as u,b,cj as f,bg as k,a8 as y,a9 as h,S as _,B as g,c as j,a0 as v}from"./164ad2e3.hrg71Gqs.js";import{a as C,b_ as S,a$ as B,aW as T}from"./f67abd2c.DYpmk7mw.js";import{P as A}from"./86720dbb.IevNfB5Y.js";import{P as I}from"./598fef4e.w_MKrvcK.js";import{g as N,F as w,D as x,M as E}from"./e77f7fe0.DoOL59j8.js";import{u as P,W as F}from"./8536083a.BOhtbiYt.js";import{S as D}from"./ee2bb050.B5w1nK0p.js";import{u as L,a as O}from"./3a819064.OcMtNpM1.js";import"./22345fd4.DGbyKJ7j.js";import"./app.Bke-0Cv3.js";import"./d0bb51ec.Bel_y502.js";import"./60a453ce.Al5ISuVm.js";import"./e12db40c.D-IRYT_x.js";import"./9dba8418.C8BcPjk_.js";import"./d25d1b95.BK5nRVN2.js";import"./dfca5da5.DaUPQuNF.js";import"./dae24aab.C7mdClmp.js";import"./55098bf1.B0Ycelf6.js";import"./0e67bd3b.DpcbzdW8.js";import"./74835653.CqvY5rnV.js";import"./3ca8ef7e.CxOwQQjW.js";import"./2495faa4.BfsiRcE8.js";import"./a9fa9fda.DndAb0hJ.js";import"./ca3e798e.DB3SxkCu.js";import"./47b970b2.B0ETP_eT.js";import"./064f6ac1.CIMGQtoa.js";import"./4b1c22b7.D2BMozDL.js";import"./f3fe2775.DhB4E-te.js";import"./ac5a19ff.C1LksOgD.js";import"./a422df8c.5gfasMpQ.js";import"./cc6ff67d.BrToxuCX.js";import"./08a3b809.D2TiFyOY.js";import"./bf513f9c.CtAeu42z.js";import"./e39bc11c.8KP_WUjj.js";import"./7a8217fd.Caa0VLP0.js";import"./8599b02a.CZRACGSm.js";import"./cf29e63b.Ys3W-wRm.js";import"./6f2620f5.k6Q_3Ov6.js";import"./f692f62f.rsCL6xsk.js";import"./9babe369.DIEG_YEx.js";import"./b684bff6.CBjxjafd.js";import"./79974aab.Di299gsN.js";import"./58314944.DulCe-h4.js";import"./1d34c07e.h4dJAaCz.js";import"./17e57de1.xgvFRsfl.js";function M({accountType:n,bankName:t,lastDigits:a,id:o}){const{i18n:r}=C();return e(d,{id:o,value:o,children:[e(p,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-200",padding:"none",alignItems:"center",alignContent:"center",children:[e(I,{type:N(t)}),e(u,{type:"strong",children:[t," ",e("span",{className:"vr1Ob",children:r.translate("payment.masked_digits_label",{last_digits:a})})]})]}),n&&e(b,{padding:"small-400 none none none",children:e(u,{children:(()=>{const e=n?.toLowerCase();return"checking"===e?r.translate("payment.bank_account_type.checking"):"savings"===e?r.translate("payment.bank_account_type.savings"):""})()})})]},o)}const q={id:"137c4da513561030856913c790967e4e298bea45ad3d6adfc786bc844ca55be2",type:"query",name:"StripeFinancialConnectionsClientSecret",source:""};class z extends Error{constructor(){super(...arguments),this.name="BankPaymentTokenInterceptError"}}function $(e){return{bankName:e.bankName??"",lastDigits:e.lastDigits??"",id:e.shopifyPublicToken??"",accountType:e.accountType??"savings",type:"SHOPIFY_PUBLIC_TOKEN"}}function H({method:d,setSelected:p,id:b,setIcon:T}){const{paymentProviderClientCredentials:A,availableInstruments:I}=d,{i18n:N,shop:w,observability:x}=C(),[E,H]=r(),{connectedBankAccount:K,handleBankConnectionClick:R,isLoading:W,Sandbox:G}=function({clientCredentials:s,observability:l,onBankAccountCollected:d}){const m=L(),p=P(),u=(()=>{const{observability:e,graphql:{coreGraphql:r}}=C(),i=n(null);return t(async()=>i.current?i.current:i.current=(async({graphql:e,observability:n})=>{const t=async n=>{const{data:t,error:a}=await e.staticQuery(q,{cache:!1,variables:{input:n?{pendingTask:{taskId:n}}:{}}});return null!=a?(c(a.message),null):null==t?(c("NO_DATA"),null):t};let r=0,i="";for(;;){const e=await t(i);if(null===e)return null;const{stripeFinancialConnectionsClientSecret:n}=e;switch(n.__typename){case"StripeFinancialConnectionsClientSecretCreationFailed":return c(n.errorCode),null;case"StripeFinancialConnectionsClientSecretCreationSuccess":return n.clientSecret;case"PendingTask":if(i=n.taskId,r+=1,r>=5)return c("REACHED_MAX_POLLING"),null;await o(n.pollDelay);break;default:a(n)}}function c(e){return n.counter({name:"stripe_financial_connections_client_secret_error",value:1,attributes:{code:e}}),n.log("use_get_client_secret_stripe_client_secret_creation_failed","createStripeFinancialConnectionsClientSecret failed",{attributes:{code:e}}),null}})({graphql:r,observability:e}).finally(()=>{i.current=null}),[r,e])})(),[b,y]=r(!0),h=f(),{i18n:_}=C(),g=i(null),[j,v]=r(!1),[S,B]=r(null),[T,A]=r(null);c(()=>{(async()=>{A(await u())})()},[u]);const I=()=>{y(!1),v(!1)},N=e=>{l.leaveErrorBreadcrumb("Bank account token collection failed",{error:e}),h(_.translate("payment.bank_account_generic_error")),I()},w=O({breadcrumb:m,onBankAccountCollected:e=>{l.leaveErrorBreadcrumb("bank_account_collected",{bankAccountId:e.id,bankName:e.bankName??"",type:e.type}),B(e),d(e),I()},onModalClosed:I,onError:N,telemetry:p}),x=()=>{g.value=null};return{connectedBankAccount:S,handleBankConnectionClick:async()=>
1{if(g.value){y(!T);const e=T||await u();v(!0),e?(g.value.call.collectBankAccount(e),T&&A(null)):(y(!1),v(!1),N("No client secret")),y(!1)}},terminateSandbox:x,isLoading:b,Sandbox:e(k,{children:e(F,{wallet:"STRIPE_BANK",onConnect:async e=>{g.value=e;const n=await e.call.configure(s?.apiClientKey??"",s?.merchantAccountId??"");n?.status!==D.Success&&(l.leaveErrorBreadcrumb("Stripe Bank sandbox configuration failed",{status:n.status}),h(_.translate("payment.bank_account_generic_error"))),y(!1)},hostMethods:w,isSdkOnly:!j,isFullScreen:j,onTerminate:x})})}}({clientCredentials:A,observability:x,onBankAccountCollected:e=>{Q(e??null),H(void 0)}});S(async({parts:e,reason:n})=>{const t=e.paymentLines.value.find(e=>"bank"===e.method.type);if(("completion"===n||"progression"===n)&&t){if(!Y)return{behavior:"block",reason:B.MissingBankAccount,perform(){H(N.translate("payment.bank_account_missing"))}};if(!t.method.selectedToken)return x.error(new z("Bank payment blocked at completion: selectedBankAccount is set but selectedToken is missing from payment line")),{behavior:"block",reason:B.MissingBankAccount,perform(){H(N.translate("payment.bank_account_missing"))}}}return{behavior:"allow"}});const U=s(()=>[...I.map($),...K?[K]:[]],[I,K]),{selectedBankAccount:Y,setSelectedBankAccount:Q}=function(e,n,a,o){const{checkout:{negotiator:i}}=C(),s=i.parts.paymentLines.value,{bankPaymentTokenSignal:l}=i.context,[d,m]=r(e[0]??null),p=t(e=>{e?(n(a,{type:"bank",selectedToken:e.id,selectedType:e.type}),o(e.bankName??"")):n(a,{type:"bank",selectedToken:void 0,selectedType:void 0})},[a,n,o]),u=t(e=>{m(e),l.value=e?{selectedToken:e.id,selectedType:e.type}:void 0,p(e),e&&o(e.bankName??"")},[m,p,o]);return c(()=>{const n=s.find(e=>"bank"===e.method.type)?.method;if(n)if(n.selectedToken&&n.selectedType){const t=e.find(e=>e.id===n.selectedToken);t?(m(t),o(t.bankName??"")):(l.value=void 0,p(null))}else if(d){if(!e.some(e=>e.id===d.id))return;l.value={selectedToken:d.id,selectedType:d.type},p(d)}},[e,p,s,d,o]),{selectedBankAccount:d,setSelectedBankAccount:u}}(U,p,b,T),X=t(([e])=>{const n=U.find(n=>n.id===e);Q(n??null)},[U,Q]),J=s(()=>[Y?.id??""],[Y?.id]),V=Boolean(K);return e(_,{gap:"base",children:[G,E&&e(y,{tone:"critical",errorType:h.PaymentError,children:E}),U.length>0?e(l,{children:[e(_,{gap:"small-100",padding:"none none small-100 none",children:[V?e(u,{color:"subdued",children:N.translate("payment.new_bank_account_disclaimer",{shop_name:w?.name||""})}):null,e(u,{color:"subdued",children:N.translate("payment.bank_account_disclaimer")})]}),e(m,{values:J,onChange:X,variant:"grid",children:U.map(n=>e(M,{...n},n.id))})]}):e(u,{children:N.translate("payment.bank_account_choose")}),e(g,{variant:"plain",textDecoration:"none",disabled:W,onClick:R,tone:W?"monochrome":"auto",children:e(_,{direction:"inline",alignItems:"center",gap:"small-100",minBlockSize:"10px",minInlineSize:"10px",children:[W?e(j,{size:"base"}):e(v,{type:"plus"}),e(u,{color:"subdued",children:U.length>0?N.translate("payment.bank_account_connect_another"):N.translate("payment.bank_account_connect")})]})})]})}function K({method:n,setSelected:a,id:o,showSelectedContent:i=!0,bare:c=!1}){const{i18n:s}=C(),l=n.availableInstruments[0]?.bankName,m=l?[N(l)]:x,[p,b]=r(m),[f,k]=r(l?void 0:E),y=n.displayName??s.translate("payment.bank_payment_method_label"),h=t(e=>{b([e?N(e):w]),k(void 0)},[]);if(c)return e(H,{id:o,method:n,setIcon:h,setSelected:a});const _=T(s,p,f),g=_?`${y}, ${_}`:y;return e(d,{renderSelectedContentWhenCollapsed:!0,secondaryContent:e(A,{paymentBrands:p,brandCountOverride:f}),value:o,accessibilityLabel:g,selectedContent:i?e(H,{id:o,method:n,setIcon:h,setSelected:a}):void 0,children:e(u,{type:"strong",children:y})})}export{K as BankPaymentMethod,H as BankPaymentMethodDetails};

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.