1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e1f78317-4858-43cb-86c2-f22efb832c4f",e._sentryDebugIdIdentifier="sentry-dbid-e1f78317-4858-43cb-86c2-f22efb832c4f")}()}catch(e){}!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"b536d8afd6805652df2813ecb6ec0bc58faae7c4"}}catch(e){}}(),(globalThis.webpackChunkdxbx_fe=globalThis.webpackChunkdxbx_fe||[]).push([[6094],{16094(e,t,n){n.d(t,{eQ:()=>p,OZ:()=>s,aQ:()=>g,nY:()=>d,oS:()=>u,IJ:()=>r,SB:()=>a,WL:()=>y,qO:()=>c,jR:()=>k,_D:()=>z,Y7:()=>R,E8:()=>j,fk:()=>L,sV:()=>C,K:()=>x,GL:()=>X,UR:()=>V,HV:()=>P,cr:()=>m,au:()=>G,e8:()=>h,$T:()=>b,YF:()=>E});var i=n(50200),o=n(2531);const r="marking",a="MARKING",s="EGAIS",d=["EGAIS","USDO","DOCUMENT_FLOW"],c="VEGAIS",u="chz_connection",f="marking_autowriteoff_coverage",l="marking_writeoff_documents",g="invoice",p="egais",y="vegais",_="utm_exchange_availability_and_last_success",v="rsa_gost_certificate_expiration_dates",b=function(e){let{legalPersonId:t,settingId:n}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=void 0!==n,d=t??"",c=n??"";return(0,i.PX)({method:"GET",queryKey:s?[...o.iS,c,"metrics","aggregate"]:[...o.$X,d,"metrics","aggregate"],params:{product:r,codes:u},options:a})},h=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.PX)({method:"GET",queryKey:["front-gateway","marking","settings",e??0],options:t})},m=(e,t)=>[...o.$X,e??"","products",t,"metrics","aggregate"],E=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,i.PX)({method:"GET",queryKey:m(e,t),options:n})};var S=n(64467),O=n(53986),A=n(62041),T=n(58090);let w=function(e){return e.VALUE="VALUE",e.AVG="AVG",e.MIN="MIN",e.MAX="MAX",e.P95="P95",e.COUNT="COUNT",e}({});const U=["products"];function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){(0,S.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const I=e=>{if("object"!=typeof e||null===e)return!1;const t=e;return"string"==typeof t.product&&"boolean"==typeof t.enabled&&(null===t.comment||"string"==typeof t.comment)},P=e=>{let{productStates:t,product:n,isPending:i,isError:o}=e;if(i)return"pending";if(o||!Array.isArray(t)||!t.every(I))return"fail-open";const r=t.find((e=>e.product===n));return void 0===r?"fail-open":r.enabled?"enabled":"disabled"},k=e=>{let{products:t}=e,n=(0,O.A)(e,U);const i=t.map((e=>P(M(M({},n),{},{product:e}))));return i.includes("enabled")?"enabled":i.length>0&&i.every((e=>"disabled"===e))?"disabled":i.includes("pending")?"pending":"fail-open"},x=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(0,T.yf)();const i=e?.find((e=>e.code===u)),o=i?.values.find((e=>e.code===w.VALUE))?.value;if(void 0===o)return{level:"unknown"};const r=t??i?.tags?.find((e=>"successBalanceUpdateDate"===e.tag))?.value??i?.dateTime,a=r?T.yf.tz(r,A.Jc):void 0,s=n.tz(A.Jc),d=a&&a.isValid()?{minutesSinceUpdate:Math.max(0,s.diff(a,"minute")),hoursSinceUpdate:Math.max(0,s.diff(a,"hour")),daysSinceUpdate:Math.max(0,s.diff(a,"day"))}:void 0;return 1===o?M({level:"s1"},d):d?d.daysSinceUpdate>=7?M({level:"s5"},d):d.daysSinceUpdate>=4?M({level:"s4"},d):d.daysSinceUpdate>=1?M({level:"s3"},d):M({level:"s2"},d):{level:"lost"}},L=e=>{let{hoursSinceUpdate:t,daysSinceUpdate:n}=e;if(void 0!==t&&void 0!==n)return t<24?{unit:"hours",count:t}:{unit:"days",count:n}},R=e=>{let{minutesSinceUpdate:t,hoursSinceUpdate:n,daysSinceUpdate:i}=e;if(void 0!==t&&void 0!==n&&void 0!==i){if(i>=7)return{unit:"over7Days"};if(i>=1){const e=n-24*i;return e>0?{unit:"daysHours",days:i,hours:e}:{unit:"days",count:i}}return n>=1?{unit:"hours",count:n}:{unit:"minutes",count:t}}},C=e=>"lost"===e?"lost":"s3"===e||"s4"===e?"with-ago":"over-7-days",G=e=>{let{metrics:t,lastUpdateGisMt:n,isMetricsLoading:i,isMarkingSettingsError:o,isMarkingSettingsFetched:r,isMarkingSettingsQueryEnabled:a,now:s}=e;return i||a&&!r?{isLoading:!0,statusInfo:N}:a&&o?{isLoading:!1,statusInfo:N}:{isLoading:!1,statusInfo:x(t,n,s)}},N={level:"unknown"},Y=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w.VALUE;const i=e?.find((e=>e.code===t))?.values.find((e=>e.code===n))?.value;return"number"==typeof i?i:void 0},j=e=>({availableForAcceptance:Y(e,"invoice_available_for_acceptance_30"),exportedToAccounting:Y(e,"invoice_exported_to_accounting"),egaisErrors:Y(e,"invoice_egais_errors")}),V=e=>({utilized:Y(e,"vet_document_utilized_30"),notUtilized:Y(e,"vet_document_not_utilized_30")}),X=e=>{const t=Y(e,l,"CREATED");return{writeOffs:void 0===t?void 0:{total:t,errors:Y(e,l,"ERROR")},autoWriteOffShare:F(Y(e,f,"TOTAL_GTINS"),Y(e,f,"AUTO_WRITE_OFF_GTINS")),negativeBalances:Y(e,"marking_negative_positions"),categoriesToConnect:Y(e,"marking_disconnected_product_groups")}},z=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,T.yf)();return{exchange:K(e,t),writeOffActs:H(e,"write_off_act_processing_status_counts"),receipts:H(e,"receipt_processing_status_counts"),certificates:B(e,v)?{rsa:q(Y(e,v,"RSA_EXPIRES_ON_EPOCH_DAY"),t),gost:q(Y(e,v,"GOST_EXPIRES_ON_EPOCH_DAY"),t)}:void 0}},F=(e,t)=>{if(void 0!==e&&void 0!==t&&0!==e)return Math.floor(100*Math.min(t,e)/e)},B=(e,t)=>Boolean(e?.some((e=>e.code===t))),H=(e,t)=>B(e,t)?{created:Y(e,t,"CREATED"),sent:Y(e,t,"SENT"),errors:Y(e,t,"ERRORS")}:void 0,K=(e,t)=>{if(!B(e,_))return;const n=Y(e,_,"ENABLED"),i=Y(e,_,"LAST_SUCCESSFUL_AT_EPOCH_SECOND"),o=void 0===n?void 0:1===n;if(void 0===i)return{isEnabled:o};const r=T.yf.unix(i);return{isEnabled:o,minutesSince:Math.max(0,t.diff(r,"minute")),hoursSince:Math.max(0,t.diff(r,"hour")),daysSince:Math.max(0,t.diff(r,"day"))}},q=(e,t)=>
1{if(void 0===e)return;const n=T.yf.utc(0).add(e,"day"),i=T.yf.utc(t.format("YYYY-MM-DD"));return{expiresOn:n.format("YYYY-MM-DD"),daysLeft:n.diff(i,"day")}}}}]);
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.