| 1 |
- function _newArrowCheck(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}exports.__esModule=!0,exports.clearCustomer=clearCustomer,exports.createRequestId=createRequestId,exports.didMount=didMount,exports.didUnmount=didUnmount,exports.forceUpdate=forceUpdate,exports.formatAmount=formatAmount,exports.formatDate=formatDate,exports.formatTime=formatTime,exports.getCustomState=getCustomState,exports.handleQueryResponse=handleQueryResponse,exports.queryCustomerInfo=queryCustomerInfo,exports.renderBalance=renderBalance,exports.renderBalanceSummary=renderBalanceSummary,exports.renderJsx=renderJsx,exports.renderOrders=renderOrders,exports.searchCustomers=searchCustomers,exports.selectCustomer=selectCustomer,exports.setCustomState=setCustomState,exports.setQueryType=setQueryType,exports.updateKeyword=updateKeyword;var _customState={},APP_TYPE="APP_N9NPHVTQLPBPO8MR6WFG",CUSTOMER_FORM_UUID="FORM-NO966791YOK2XKW9DMSEGD5L1IN73UHW3ME6LR1",STORAGE_KEY="tyson.customer-info-query.selected-customer",requestSequence=0,FIELDS={customerNumber:"textField_l6em70k2",customerName:"textField_l6em70k4"};function didMount(){var t=null;try{t=JSON.parse(window.localStorage.getItem(STORAGE_KEY)||"null")}catch(e){t=null}this.setCustomState({keyword:t&&t.customerNumber?t.customerNumber+" - "+(t.customerName||""):"",searching:!1,customers:[],selectedCustomer:t&&t.customerNumber?t:null,queryType:"balance",querying:!1,result:null,error:"",searchVisible:!1})}function didUnmount(){this._customerSearchTimer&&clearTimeout(this._customerSearchTimer)}function setQueryType(e){this.setCustomState({queryType:e,result:null,error:""}),this.forceUpdate()}function updateKeyword(e){var t=this,r=e||"";t.setCustomState({keyword:r,searchVisible:!0,error:""}),t.forceUpdate(),t._customerSearchTimer&&clearTimeout(t._customerSearchTimer),r.trim().length<2?(t.setCustomState({customers:[],searching:!1}),t.forceUpdate()):t._customerSearchTimer=setTimeout(function(){t.searchCustomers(r.trim())},300)}function searchCustomers(e){var t=this,r=this,a={formUuid:CUSTOMER_FORM_UUID,appType:APP_TYPE,currentPage:1,pageSize:20},o=[{key:FIELDS.customerNumber,value:e,type:"TEXT",operator:"contains",componentName:"TextField"}],e=[{key:FIELDS.customerName,value:e,type:"TEXT",operator:"contains",componentName:"TextField"}],s=(r.setCustomState({searching:!0}),r.forceUpdate(),{}),n={};return Object.keys(a).forEach(function(e){_newArrowCheck(this,t),s[e]=a[e],n[e]=a[e]}.bind(this)),s.searchFieldJson=JSON.stringify(o),n.searchFieldJson=JSON.stringify(e),Promise.all([r.utils.yida.searchFormDatas(s),r.utils.yida.searchFormDatas(n)]).then(function(e){var t=this,a={},o=[];e.forEach(function(e){var r=this;_newArrowCheck(this,t),(e&&e.data||e&&e.content&&e.content.data||[]).forEach(function(e){_newArrowCheck(this,r);var e=e.formData||{},t=e[FIELDS.customerNumber];t&&!a[t]&&(a[t]=!0,o.push({customerNumber:t,customerName:e[FIELDS.customerName]||""}))}.bind(this))}.bind(this)),r.setCustomState({customers:o,searching:!1}),r.forceUpdate()}).catch(function(e){r.setCustomState({searching:!1,customers:[]}),r.utils.toast({title:e&&e.message?e.message:"客户查询失败",type:"error"}),r.forceUpdate()})}function selectCustomer(e){try{window.localStorage.setItem(STORAGE_KEY,JSON.stringify(e))}catch(e){}this.setCustomState({selectedCustomer:e,keyword:e.customerNumber+" - "+e.customerName,searchVisible:!1,customers:[],result:null,error:""}),this.forceUpdate()}function clearCustomer(){try{window.localStorage.removeItem(STORAGE_KEY)}catch(e){}this.setCustomState({keyword:"",selectedCustomer:null,customers:[],result:null,error:""}),this.forceUpdate()}function queryCustomerInfo(){var t=this,e=t.getCustomState(),r=e.selectedCustomer;if(r){var e="balance"===e.queryType?"customerBalance":"customerUnlockOrders",a=t.dataSourceMap&&t.dataSourceMap[e];if(a&&a.load){t.setCustomState({querying:!0,error:"",result:null}),t.forceUpdate();r={inputs:JSON.stringify({Headers:{"Content-Type":"application/json"},Query:{},Body:{requestID:t.createRequestId(),CUSTOMER_NUMBER:r.customerNumber,CUSTOMER_NAME:r.customerName}})};try{return Promise.resolve(a.load(r)).then(function(e){t.handleQueryResponse(e)}).catch(function(e){t.setCustomState({querying:!1,result:null,error:e&&e.message?e.message:"SAP查询失败"}),t.utils.toast({title:e&&e.message?e.message:"SAP查询失败",type:"error"}),t.forceUpdate()})}catch(e){t.setCustomState({querying:!1,result:null,error:e&&e.message?e.message:"SAP查询初始化失败"}),t.utils.toast({title:e&&e.message?e.message:"SAP查询初始化失败",type:"error"}),t.forceUpdate()}}else a="查询数据源不可用:"+e+";当前数据源:"+(t.dataSourceMap?Object.keys(t.dataSourceMap).join(", "):"未初始化"),t.setCustomState({error:a,result:null}),t.utils.toast({title:a,type:"error"}),t.forceUpdate()}else t.utils.toast({title:"请先选择客户",type:"warning"})}function handleQueryResponse(t){var e,r=this,t=t&&void 0!==t.Response?t.Response:t;if("string"==typeof(t=(t=t&&void 0!==t.content?t.content:t)&&void 0!==t.serviceReturnValue?t.serviceReturnValue:t))try{t=JSON.parse(t)}catch(e){var a=t.toLowerCase(),a=0<=a.indexOf("502 bad gateway")||0<=a.indexOf("503 service unavailable")||0<=a.indexOf("<html")||0<=a.indexOf("<head")?"SAP查询服务暂时不可用,请稍后重试":"SAP查询服务返回格式异常";return this.setCustomState({querying:!1,result:null,error:a}),this.utils.toast({title:a,type:"error"}),void this.forceUpdate()}t&&!1===t.success?(a=t.message||t.errorMsg||"SAP查询失败",this.setCustomState({querying:!1,result:null,error:a}),this.utils.toast({title:a,type:"error"})):t&&t.STATUS&&"S"!==t.STATUS?(a=t.MESSAGE||"SAP查询失败,状态="+t.STATUS,this.setCustomState({querying:!1,result:null,error:a}),this.utils.toast({title:a,type:"error"})):(a=t&&t.MESSAGE,e=t&&t.ITEM&&t.ITEM.filter(function(e){return _newArrowCheck(this,r),e&&e.ERRO_MESSAGE}.bind(this))[0],a||e?(a=a||e.ERRO_MESSAGE,this.setCustomState({querying:!1,result:null,error:a}),this.utils.toast({title:a,type:"error"})):this.setCustomState({querying:!1,result:t||{}})),this.forceUpdate()}function createRequestId(){var e;return requestSequence+=1,window.crypto&&window.crypto.randomUUID?window.crypto.randomUUID():window.crypto&&window.crypto.getRandomValues?(e=new Uint32Array(4),window.crypto.getRandomValues(e),e[0].toString(16)+"-"+e[1].toString(16)+"-"+e[2].toString(16)+"-"+e[3].toString(16)):Date.now().toString(36)+"-"+requestSequence.toString(36)+"-"+Math.random().toString(36).slice(2)}function formatAmount(e){var t=Number(e||0);return isNaN(t)?e||"-":t.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}function formatDate(e){var t;return e?8===(e=String(e)).length?e.slice(0,4)+"-"+e.slice(4,6)+"-"+e.slice(6,8):(t=e.match(/^(\d{4}-\d{2}-\d{2})/))?t[1]:e:"-"}function formatTime(e){var t;return e?(t=String(e).match(/T(\d{2}:\d{2}:\d{2})/))?t[1]:String(e):"-"}function renderBalanceSummary(e){return React.createElement("div",{style:styles.balanceSummary},React.createElement("div",null,React.createElement("span",{style:styles.summaryLabel},"客户组"),React.createElement("strong",null,e.CUSTOMER_GROUP||"-")),React.createElement("div",null,React.createElement("span",{style:styles.summaryLabel},"客户组描述"),React.createElement("strong",null,e.CUSTOMER_GROUP_DESC||"-")),React.createElement("div",null,React.createElement("span",{style:styles.summaryLabel},"总风险金额"),React.createElement("strong",{style:styles.summaryAmount},this.formatAmount(e.TOTAL_RISK_AMT))))}function renderBalance(e,t){var r=this,e=e.result||{},a=e.ITEM||[];return a.length?React.createElement("div",null,this.renderBalanceSummary(e),React.createElement("div",{style:t?styles.balanceTableWrapMobile:styles.tableWrap},React.createElement("table",{className:"customer-query-table",style:t?styles.balanceTableMobile:styles.table},React.createElement("thead",null,React.createElement("tr",null,React.createElement("th",null,"公司代码"),React.createElement("th",null,"币种"),React.createElement("th",null,"未结金额"))),React.createElement("tbody",null,a.map(function(e,t){return _newArrowCheck(this,r),React.createElement("tr",{key:t},React.createElement("td",null,e.COMPANY_CODE||"-"),React.createElement("td",null,e.CURRENCY||"-"),React.createElement("td",{style:styles.amountHighlight},this.formatAmount(e.OUTSTAND_AMT)))}.bind(this)))))):React.createElement("div",{style:styles.empty},"未查询到余额数据")}function renderOrders(e,t){var r=this,e=e.result&&e.result.ITEM||[];return e.length?t?React.createElement("div",null,e.map(function(e,t){return _newArrowCheck(this,r),React.createElement("div",{key:t,style:styles.orderCard},React.createElement("div",{style:styles.orderCardHeader},React.createElement("strong",{style:styles.orderCardNumber},e.SALES_ORDER||"-"),React.createElement("span",{style:"S"===e.RELEASE_STATUS?styles.statusSuccess:styles.statusError},"S"===e.RELEASE_STATUS?"成功":"失败")),React.createElement("div",{style:styles.orderCardGrid},React.createElement("div",null,React.createElement("span",null,"公司代码"),React.createElement("b",null,e.COMPANY_CODE||"-")),React.createElement("div",null,React.createElement("span",null,"销售组织"),React.createElement("b",null,e.SALES_ORG||"-")),React.createElement("div",null,React.createElement("span",null,"订单金额"),React.createElement("b",{style:styles.orderCardAmount},this.formatAmount(e.SALES_AMOUNT)," ",e.CURRENCY||"")),React.createElement("div",null,React.createElement("span",null,"释放日期"),React.createElement("b",null,this.formatDate(e.RELEASE_DATE))),React.createElement("div",null,React.createElement("span",null,"释放时间"),React.createElement("b",null,this.formatTime(e.RELEASE_TIME)))))}.bind(this))):React.createElement("div",{style:styles.tableWrap},React.createElement("table",{className:"customer-query-table",style:styles.table},React.createElement("thead",null,React.createElement("tr",null,React.createElement("th",null,"公司代码"),React.createElement("th",null,"销售订单号"),React.createElement("th",null,"销售组织"),React.createElement("th",null,"订单金额"),React.createElement("th",null,"币种"),React.createElement("th",null,"释放日期"),React.createElement("th",null,"释放时间"),React.createElement("th",null,"状态"))),React.createElement("tbody",null,e.map(function(e,t){return _newArrowCheck(this,r),React.createElement("tr",{key:t},React.createElement("td",null,e.COMPANY_CODE||"-"),React.createElement("td",{style:styles.orderCell},e.SALES_ORDER||"-"),React.createElement("td",null,e.SALES_ORG||"-"),React.createElement("td",{style:styles.amountCell},this.formatAmount(e.SALES_AMOUNT)),React.createElement("td",null,e.CURRENCY||"-"),React.createElement("td",null,this.formatDate(e.RELEASE_DATE)),React.createElement("td",null,this.formatTime(e.RELEASE_TIME)),React.createElement("td",null,React.createElement("span",{style:"S"===e.RELEASE_STATUS?styles.statusSuccess:styles.statusError},"S"===e.RELEASE_STATUS?"成功":"失败")))}.bind(this))))):React.createElement("div",{style:styles.empty},"未查询到收款解锁订单")}function renderJsx(){var a=this,o=this,t=o.getCustomState(),e=o.utils.isMobile(),r=t.selectedCustomer,s=t.result;return React.createElement("div",{style:styles.page},React.createElement("style",null,".customer-query-table th{background:#EEF4F0;color:#405149;font-weight:700;white-space:nowrap;padding:10px 12px;border-bottom:1px solid #D7E1DB}.customer-query-table td{padding:9px 12px;border-bottom:1px solid #E7ECE9;white-space:nowrap}.customer-query-table tbody tr:last-child td{border-bottom:0}.customer-query-table tbody tr:nth-child(even){background:#FAFCFB}.customer-query-table tbody tr:hover{background:#F1F6F3}"),React.createElement("div",{style:styles.shell},React.createElement("div",{style:styles.header},React.createElement("div",null,React.createElement("div",{style:styles.eyebrow},"CUSTOMER SERVICE"),React.createElement("h1",{style:styles.title},"客户信息查询"),React.createElement("p",{style:styles.subtitle},"查询客户余额与收款解锁订单"))),React.createElement("section",{style:styles.panel},React.createElement("div",{style:e?styles.queryStack:styles.queryRow},React.createElement("div",{style:styles.customerField},React.createElement("div",{style:styles.fieldLabel},"选择客户"),React.createElement("div",{style:styles.searchWrap},React.createElement("input",{key:r?r.customerNumber:"empty",defaultValue:t.keyword||"",placeholder:"输入客户编码或名称,至少 2 个字符",onChange:function(e){_newArrowCheck(this,a),o.updateKeyword(e.target.value)}.bind(this),onFocus:function(e){_newArrowCheck(this,a),o.setCustomState({searchVisible:!0}),o.forceUpdate()}.bind(this),style:styles.input}),r&&React.createElement("button",{type:"button",onClick:function(e){_newArrowCheck(this,a),o.clearCustomer()}.bind(this),style:styles.clearButton},"清除"),t.searchVisible&&(t.searching||t.customers&&0<t.customers.length)&&React.createElement("div",{style:styles.searchMenu},t.searching&&React.createElement("div",{style:styles.searchHint},"正在搜索客户..."),!t.searching&&t.customers.map(function(t){var r=this;return _newArrowCheck(this,a),React.createElement("button",{type:"button",key:t.customerNumber,onClick:function(e){_newArrowCheck(this,r),o.selectCustomer(t)}.bind(this),style:styles.customerOption},React.createElement("b",null,t.customerNumber),React.createElement("span",null,t.customerName||"未维护名称"))}.bind(this))))),React.createElement("div",{style:styles.queryTypeField},React.createElement("div",{style:styles.fieldLabel},"查询内容"),React.createElement("div",{style:styles.switchRow},React.createElement("span",{style:"balance"===t.queryType?styles.switchLabelActive:styles.switchLabel},"客户余额"),React.createElement("button",{type:"button","aria-label":"切换查询内容",onClick:function(e){_newArrowCheck(this,a),o.setQueryType("balance"===t.queryType?"unlockOrders":"balance")}.bind(this),style:"balance"===t.queryType?styles.switchTrack:styles.switchTrackActive},React.createElement("span",{style:"balance"===t.queryType?styles.switchThumb:styles.switchThumbActive})),React.createElement("span",{style:"unlockOrders"===t.queryType?styles.switchLabelActive:styles.switchLabel},"收款解锁订单"))),React.createElement("div",{style:e?styles.queryActionFieldMobile:styles.queryActionField},!e&&React.createElement("div",{style:styles.fieldLabel},"操作"),React.createElement("button",{type:"button",disabled:t.querying,onClick:function(e){_newArrowCheck(this,a),r?o.queryCustomerInfo():(o.setCustomState({error:"请先选择客户后再查询",result:null}),o.forceUpdate())}.bind(this),style:t.querying||!r?e?styles.queryDisabledMobile:styles.queryDisabled:e?styles.queryButtonMobile:styles.queryButton},t.querying?"查询中...":"查询"))),!r&&React.createElement("div",{style:styles.validationHint},"请选择客户后再查询")),t.error&&React.createElement("div",{style:styles.error},t.error),s&&React.createElement("section",{style:styles.resultPanel},React.createElement("div",{style:styles.resultHeader},React.createElement("div",null,React.createElement("div",{style:styles.eyebrow},"balance"===t.queryType?"BALANCE":"UNLOCKED ORDERS"),React.createElement("h2",{style:styles.resultTitle},"balance"===t.queryType?"客户余额":"收款解锁订单")),React.createElement("div",{style:styles.customerSummary},React.createElement("span",null,"客户编码:",s.CUSTOMER_NUMBER||r&&r.customerNumber||"-"),React.createElement("span",null,"客户名称:",s.CUSTOMER_NAME||r&&r.customerName||"-"))),"balance"===t.queryType?o.renderBalance(t,e):o.renderOrders(t,e)),!s&&!t.error&&React.createElement("div",{style:styles.empty},"选择客户和查询内容后,可查看对应的 SAP 信息。")),React.createElement("div",{style:{display:"none"}},this.state&&this.state.timestamp))}var styles={page:{minHeight:"100vh",background:"#F4F6F5",color:"#17211E",fontFamily:"Microsoft YaHei, Arial, sans-serif",padding:"20px 16px 40px"},shell:{maxWidth:1120,margin:"0 auto"},header:{padding:"12px 0 22px",borderBottom:"1px solid #DCE3DF",marginBottom:20,textAlign:"center"},eyebrow:{color:"#3B6C55",fontSize:11,fontWeight:700,letterSpacing:1.2,marginBottom:6},title:{margin:0,fontSize:28,lineHeight:1.2,letterSpacing:"-0.5px"},subtitle:{margin:"8px 0 0",color:"#66746E",fontSize:14},panel:{background:"#FFFFFF",border:"1px solid #DCE3DF",padding:20,boxShadow:"0 10px 28px rgba(25,48,38,.06)"},fieldLabel:{color:"#405149",fontSize:13,fontWeight:700,margin:"0 0 8px"},queryRow:{display:"flex",alignItems:"flex-end",gap:14},queryStack:{display:"flex",flexDirection:"column",gap:14},customerField:{flex:1,minWidth:260},queryTypeField:{width:280},queryActionField:{width:110},queryActionFieldMobile:{width:"100%"},searchWrap:{position:"relative"},input:{width:"100%",boxSizing:"border-box",minHeight:46,border:"1px solid #B7C5BD",borderRadius:4,padding:"0 72px 0 13px",fontSize:15,outline:"none",background:"#fff"},clearButton:{position:"absolute",right:8,top:8,border:0,background:"#EEF3F0",color:"#466253",minHeight:30,borderRadius:3,padding:"0 10px",cursor:"pointer"},searchMenu:{position:"absolute",zIndex:20,top:49,left:0,right:0,maxHeight:280,overflowY:"auto",background:"#fff",border:"1px solid #B7C5BD",boxShadow:"0 12px 24px rgba(22,43,34,.14)"},searchHint:{padding:14,color:"#66746E",fontSize:13},customerOption:{display:"flex",width:"100%",minHeight:48,padding:"10px 13px",gap:12,alignItems:"center",border:0,borderBottom:"1px solid #EDF1EE",background:"#fff",textAlign:"left",cursor:"pointer",color:"#17211E"},switchRow:{display:"flex",minHeight:44,alignItems:"center",justifyContent:"space-between",gap:8},switchLabel:{color:"#89958F",fontSize:13,whiteSpace:"nowrap"},switchLabelActive:{color:"#24563E",fontSize:13,fontWeight:700,whiteSpace:"nowrap"},switchTrack:{position:"relative",width:46,height:24,flex:"0 0 46px",padding:0,border:0,borderRadius:12,background:"#24563E",cursor:"pointer"},switchTrackActive:{position:"relative",width:46,height:24,flex:"0 0 46px",padding:0,border:0,borderRadius:12,background:"#D76F2B",cursor:"pointer"},switchThumb:{position:"absolute",top:3,left:3,width:18,height:18,borderRadius:"50%",background:"#fff",boxShadow:"0 1px 3px rgba(0,0,0,.22)"},switchThumbActive:{position:"absolute",top:3,right:3,width:18,height:18,borderRadius:"50%",background:"#fff",boxShadow:"0 1px 3px rgba(0,0,0,.22)"},queryButton:{width:"100%",minHeight:46,border:0,borderRadius:4,background:"#D76F2B",color:"#fff",fontSize:15,fontWeight:700,cursor:"pointer"},queryDisabled:{width:"100%",minHeight:46,border:0,borderRadius:4,background:"#C8D0CB",color:"#FFFFFF",fontSize:15,fontWeight:700,cursor:"not-allowed"},queryButtonMobile:{width:"100%",minHeight:42,border:0,borderRadius:4,background:"#D76F2B",color:"#fff",fontSize:14,fontWeight:700,cursor:"pointer"},queryDisabledMobile:{width:"100%",minHeight:42,border:0,borderRadius:4,background:"#C8D0CB",color:"#FFFFFF",fontSize:14,fontWeight:700,cursor:"not-allowed"},validationHint:{marginTop:8,color:"#9B3D15",fontSize:12},resultPanel:{background:"#FFFFFF",border:"1px solid #DCE3DF",margin:"20px auto 0",padding:24,maxWidth:1120,boxSizing:"border-box"},resultHeader:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",gap:8,borderBottom:"1px solid #E7ECE9",paddingBottom:16,marginBottom:18,textAlign:"center"},resultTitle:{margin:0,fontSize:22},customerSummary:{display:"flex",justifyContent:"center",flexWrap:"wrap",gap:"4px 16px",color:"#5D6B64",fontSize:13,textAlign:"center"},balanceSummary:{display:"flex",justifyContent:"center",gap:40,marginBottom:18,padding:"14px 18px",background:"#F6F9F7",border:"1px solid #DDE6E0",color:"#405149",textAlign:"center"},summaryLabel:{display:"block",marginBottom:5,color:"#718078",fontSize:12,fontWeight:400},summaryAmount:{color:"#1D6141",fontVariantNumeric:"tabular-nums"},empty:{padding:"36px 18px",marginTop:20,textAlign:"center",color:"#7A8881",background:"#FFFFFF",border:"1px dashed #C9D5CE",fontSize:14},error:{marginTop:20,padding:"12px 14px",background:"#FFF1EB",border:"1px solid #F1B895",color:"#9B3D15",fontSize:14},tableWrap:{overflowX:"auto",border:"1px solid #DDE6E0",borderRadius:4,background:"#FFFFFF"},table:{width:"100%",borderCollapse:"collapse",fontSize:13,minWidth:620,textAlign:"center",lineHeight:1.35},balanceTableWrapMobile:{overflowX:"auto",border:"1px solid #DDE6E0",borderRadius:4,background:"#FFFFFF"},balanceTableMobile:{width:"100%",borderCollapse:"collapse",fontSize:12,minWidth:300,textAlign:"center",lineHeight:1.2},amountCell:{textAlign:"right",fontVariantNumeric:"tabular-nums"},amountHighlight:{textAlign:"right",color:"#1D6141",fontWeight:700,fontVariantNumeric:"tabular-nums"},nameCell:{textAlign:"left",minWidth:150},orderCell:{fontFamily:"Consolas, monospace",fontWeight:700},orderCard:{marginBottom:10,padding:"13px 14px",border:"1px solid #DDE6E0",borderRadius:4,background:"#FFFFFF"},orderCardHeader:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:10,marginBottom:10,borderBottom:"1px solid #E7ECE9"},orderCardNumber:{fontFamily:"Consolas, monospace",color:"#17211E",fontSize:15},orderCardGrid:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"10px 14px",color:"#64726B",fontSize:12},orderCardAmount:{color:"#1D6141",fontVariantNumeric:"tabular-nums"},mobileCard:{border:"1px solid #DFE7E2",padding:15,marginBottom:10,background:"#FBFCFB"},cardTop:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:14},currency:{color:"#5F6E66",fontSize:12},metric:{display:"flex",justifyContent:"space-between",gap:12,padding:"8px 0",borderTop:"1px solid #E7ECE9",color:"#64726B",fontSize:13},highlight:{color:"#1D6141",fontWeight:700},detailGrid:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px 12px",fontSize:13,color:"#64726B"},statusSuccess:{display:"inline-block",padding:"3px 8px",borderRadius:12,color:"#1D6141",background:"#E4F1E8",fontSize:12,fontWeight:700},statusError:{display:"inline-block",padding:"3px 8px",borderRadius:12,color:"#A83B27",background:"#FCE9E4",fontSize:12,fontWeight:700}};function getCustomState(e){return void 0===_customState?e?void 0:{}:e?_customState[e]:Object.assign({},_customState)}function setCustomState(t){void 0!==_customState&&(Object.keys(t||{}).forEach(function(e){_customState[e]=t[e]}),this.forceUpdate())}function forceUpdate(){this.setState({timestamp:(new Date).getTime()})}
|