PageSourceSearch

https://triio.ai/static/js/index-CLKMqd2Y.js

js triio.ai collected 2026-10-05 13:08:42 UTC 3,203 bytes, 3 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._posthogReleaseId=e._posthogReleaseId||"01a0f23b-3050-0000-9f5a-10c1aad2e1b6";var n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="de74eb83-35c4-5870-8506-511626eb6f45")}catch(e){}}();import{by as I,b$ as h,r as x,c4 as C,cd as T,j as f,bw as M}from"../jse/index-index-C-ZSJqRk.js";import{u as $,D as _}from"./DefaultErrorAlert-BzSaNoh8.js";import{d as w,u as S,g as P,k,l as A,S as b,o as j}from"./index-CwwgwO2L.js";import{u as D}from"./useTranslation-CkInUBVD.js";import"./common-3ulLous0.js";import"./index-DXjBxyHd.js";const m=["sessionId","paymentMethodType"];function p(e){const r={};return e.forEach((n,t)=>{m.includes(t)||(r[t]=n)}),r}function L(e){if(Array.from(e.keys()).length===0||!m.every(n=>e.has(n)))throw new Error(`缺少必须的参数 [${m.join(", ")}] 无法处理  当前参数: ${e.toString()}`)}function O(e){const r="/".replace(/\/$/,""),n=`${window.location.origin}${r}${I}/${e}`;window.location.replace(n)}function y(e,r){const{uiMode:n,returnUrl:t,requestSource:i}=e?.sessionContext??{};if(i==="API"&&t&&w(t)){const a=t,s=e?.currentOrder?.orderId;if(s){const c=a.includes("?")?`${a}&orderId=${s}`:`${a}?orderId=${s}`;window.location.replace(c);return}window.location.replace(t);return}if(n==="elements"&&t&&w(t)){window.location.replace(t);return}O(r)}const E=1500;function U(){const{paymentExecutionDetailId:e}=h(),{t:r}=D(),n=S(s=>s.setToken),[t,i]=x.useState(null);async function a(s,c={}){const o=JSON.stringify(c);let d=!1,u=null;try{u=await P(s,{errorMessageMode:"none"});const{tokenValue:l}=u;n(l);const g=await k({paymentExecutionDetailId:e,data:o});if(g.status!==A)throw new Error(g.message||r("request.operationFailed"));d=!0}catch(l){l instanceof Error&&(i(l.message),C.loading(r("payment.redirecting"),E))}finally{d?y(u,s):setTimeout(()=>{y(u,s)},E)}}return{handleThirdPart:a,errorMessage:t}}function N(){const[e]=T(),{paymentExecutionDetailId:r}=h(),{t:n}=D(),t=S(a=>a.setToken);async function i(){const a=p(e),s=JSON.stringify(a);let c=null;try{const o=e.get("sessionId"),d=await P(o),{tokenValue:u}=d;t(u);const l=await k({paymentExecutionDetailId:r,data:s});if(l.status!==A)throw new Error(l.message||n("payment.threeDsFailed"))}catch(o){c=o.message||n("payment.threeDsFailed")}finally{const o={from:"_clink",type:"3ds_finished",data:{message:c}};window.parent.postMessage(o,"*")}}return{handle3ds:i}}const R=["CARD","GOOGLEPAY","LINK"];function J(){const[e]=T(),{paymentExecutionDetailId:r}=h(),{handle3ds:n}=N(),{handleThirdPart:t,errorMessage:i}=U();return $(async()=>{const a=e.get("paymentMethodType"),s=e.get("sessionId");if(e.get("requestSource")==="API"&&s){await t(s,p(e));return}if(R.includes(a)){L(e),await n();return}if(s){await t(s,p(e));return}const o=await j(r??"");await t(o.sessionId)},[e,r]),i?f.jsx(_,{hideTitle:!0,message:i}):f.jsx("div",{className:M("w-screen h-screen overflow-hidden","flex justify-center items-center"),children:f.jsx(b,{size:"large"})})}export{J as default};
2
3//# chunkId=de74eb83-35c4-5870-8506-511626eb6f45

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.