1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e.SENTRY_RELEASE={id:"32294419671a40a47378b6bfcc3345f49f798a69"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cb4ceeea-bbc8-4ce6-af8b-afc99575c2a3",e._sentryDebugIdIdentifier="sentry-dbid-cb4ceeea-bbc8-4ce6-af8b-afc99575c2a3")}catch(e){}}();"use strict";(self.webpackChunkremind_me_mfe_main=self.webpackChunkremind_me_mfe_main||[]).push([["4091"],{65414(e,t,n){n.r(t),n.d(t,{default:()=>H});var r=n(74848),o=n(96540),u=n(47767),i=n(66230),l=n(81645),a=n(16110),s=n(53054),c=n(75942),m=n(76875),p=n(59664),f=n(16727),d=n(8232),b=n(7728),v=n(68464),y=n(7826),h=n(21008);function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function N(e,t,n,r,o,u,i){try{var l=e[u](i),a=l.value}catch(e){n(e);return}l.done?t(a):Promise.resolve(a).then(r,o)}function w(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var u=e.apply(t,n);function i(e){N(u,r,o,i,l,"next",e)}function l(e){N(u,r,o,i,l,"throw",e)}i(void 0)})}}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function S(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function P(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var u=[],i=!0,l=!1;try{for(o=o.call(e);!(i=(n=o.next()).done)&&(u.push(n.value),!t||u.length!==t);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==o.return||o.return()}finally{if(l)throw r}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){var n,r,o,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(i,"next",{value:a(0)}),l(i,"throw",{value:a(1)}),l(i,"return",{value:a(2)}),"function"==typeof Symbol&&l(i,Symbol.iterator,{value:function(){return this}}),i;function a(l){return function(a){var s=[l,a];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(u=0)),u;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return u.label++,{value:s[1],done:!1};case 5:u.label++,r=s[1],s=[0];continue;case 7:s=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){u=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){u.label=s[1];break}if(6===s[0]&&u.label<o[1]){u.label=o[1],o=s;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(s);break}o[2]&&u.ops.pop(),u.trys.pop();continue}s=t.call(e,u)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}}var j={consumption:"",consumptionHt:"",consumptionNt:"",installment:""},k=e=>{if(null!=e&&""!==e){var t="number"==typeof e?e:Number(String(e).replace(",","."));return isNaN(t)?void 0:t}},M=(e,t)=>{var n=k(e);
1return void 0===n?"â":"".concat(n.toLocaleString("de-DE")," ").concat(t)},C=e=>{var t,n=k(e);return void 0===n?"â":null!=(t=(0,f.vv)(n))?t:"â"},E=e=>{if(!e)return{};try{return JSON.parse(e)}catch(e){return{}}};function H(){var e=(0,u.g)(),t=e.category,n=e.id,o=(0,i.F6)(),a=(e=>{switch(e){case"strom":return"strom";case"gas":return"gas";case"heizstrom":return"heizstrom";default:return null}})(t);return a&&n&&o?(0,r.jsx)(D,{product:a,changeServiceId:n}):(0,r.jsx)(l.M,{})}function D(e){var t,n,u,g,N,H,D,I,x,_,A,B,L,U,Y,Q,F,Z,z,K,R,W,q,G,J,X,$,V,ee,et,en,er,eo,eu,ei,el,ea,es,ec,em,ep,ef,ed,eb,ev,ey,eh,eg,eN,ew,eO,eS,eP,eT,ej,ek,eM,eC,eE,eH,eD,eI,ex,e_,eA,eB,eL,eU,eY,eQ,eF,eZ,ez,eK,eR,eW,eq,eG,eJ,eX,e$,eV,e0,e1,e2,e4,e6,e5,e3,e7,e8,e9,te,tt,tn,tr,to,tu,ti,tl,ta,ts,tc,tm,tp,tf,td=e.product,tb=e.changeServiceId,tv=(g=(0,i.F6)(),N=(0,c.useQueryClient)(),H=(0,s.Bd)().t,D="heizstrom"===td,I=(0,b.l_)(td),x={enabled:!!g&&!!tb,retry:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,staleTime:3e5,cacheTime:6e5},A=(_=(0,c.useQuery)(["changeservice",tb],()=>(0,m.y7)(g,tb),x)).data,B=_.isLoading,L=_.error,Y=(U=(0,c.useQuery)(["installment-consumption-history",tb],()=>(0,m.rg)(tb),x)).data,Q=U.isLoading,F=(0,c.useQuery)(["tariff-history",tb],()=>(0,m.fW)(tb),x).data,Z=(0,o.useMemo)(()=>(0,f.A2)(F).currentTariff,[F]),z=(0,c.useQuery)(["tariff-detail",null==Z?void 0:Z.id],()=>{var e;return(0,p.bz)(null!=(e=null==Z?void 0:Z.id)?e:"")},S(O({},x),{enabled:!!(null==Z?void 0:Z.id)})).data,R=(K=P((0,o.useState)(""),2))[0],W=K[1],G=(q=P((0,o.useState)(""),2))[0],J=q[1],$=(X=P((0,o.useState)(""),2))[0],V=X[1],et=(ee=P((0,o.useState)(""),2))[0],en=ee[1],eo=(er=P((0,o.useState)("dual"),2))[0],eu=er[1],el=(ei=P((0,o.useState)({}),2))[0],ea=ei[1],ec=(es=P((0,o.useState)(!1),2))[0],em=es[1],ef=(ep=P((0,o.useState)(!1),2))[0],ed=ep[1],ev=(eb=P((0,o.useState)(!1),2))[0],ey=eb[1],eg=(eh=P((0,o.useState)(null),2))[0],eN=eh[1],eO=(ew=P((0,o.useState)(j),2))[0],eS=ew[1],eT=(eP=P((0,o.useState)(j),2))[0],ej=eP[1],eM=(ek=P((0,o.useState)({}),2))[0],eC=ek[1],eH=(eE=P((0,o.useState)(null),2))[0],eD=eE[1],ex=(eI=P((0,o.useState)(null),2))[0],e_=eI[1],eB=(eA=P((0,o.useState)(!1),2))[0],eL=eA[1],eY=(eU=P((0,o.useState)(!1),2))[0],eQ=eU[1],(0,o.useEffect)(()=>{!eY&&A&&(D&&eu("DOUBLE"===A.counterLayout?"dual":"single"),eQ(!0))},[A,D,eY]),eF=D&&"dual"===eo,eZ=(0,o.useMemo)(()=>(null!=Y?Y:[]).slice().sort((e,t)=>new Date(t.created).getTime()-new Date(e.created).getTime()),[Y]),ez=(0,o.useMemo)(()=>eZ.map((e,t)=>{var n,r,o,u;return n=0===t,u=(o=void 0!==(r=E(e.data)).consumptionNt)?M(Number(r.consumption||0)+Number(r.consumptionNt||0),I):void 0!==r.consumption?M(r.consumption,I):"â",{id:e.id,date:(0,y.x1)(e.created),consumption:u,consumptionHT:o&&void 0!==r.consumption?M(r.consumption,I):void 0,consumptionNT:r.consumptionNt?M(r.consumptionNt,I):void 0,installment:C(r.installment),editable:n}}),[eZ,I]),eK=eZ[0],eR=(0,o.useMemo)(()=>E(null==eK?void 0:eK.data),[eK]),eW=null!=(t=null==A?void 0:A.currentConsumption)?t:null==A?void 0:A.expectedConsumption,eq=(0,o.useMemo)(()=>{var e=k(eR.consumptionNt);if(void 0!==e){var t=k(eR.consumption);return{total:(null!=t?t:0)+e,ht:t,nt:e}}var n=k(eR.consumption);return void 0!==n?{total:n}:{total:k(eW)}},[eR,eW]),eG=(0,o.useMemo)(()=>M(eq.total,I),[eq,I]),eJ=(0,o.useMemo)(()=>{var e,t=k(null==z?void 0:z.newTotalPricePerMonth);if(void 0!==t)return t;var n=k(null==Z?void 0:Z.newTotalPricePerMonth);if(void 0!==n)return n;var r=k(null==Z?void 0:Z.totalPricePerYear);if(void 0!==r)return(r+(null!=(e=k(null==Z?void 0:Z.newBonusOnetimeTotal))?e:0))/12},[null==z?void 0:z.newTotalPricePerMonth,null==Z?void 0:Z.newTotalPricePerMonth,null==Z?void 0:Z.totalPricePerYear,null==Z?void 0:Z.newBonusOnetimeTotal]),eX=(0,o.useMemo)(()=>{var e;return null!=(e=k(eR.installment))?e:eJ},[eR.installment,eJ]),e$=(0,o.useMemo)(()=>C(eX),[eX]),eV=(0,o.useMemo)(()=>({consumption:eq.total,consumptionDisplay:eG,consumptionHT:eq.ht,consumptionHTDisplay:void 0===eq.ht?void 0:M(eq.ht,I),consumptionNT:eq.nt,consumptionNTDisplay:void 0===eq.nt?void 0:M(eq.nt,I),installment:eX,installmentDisplay:e$}),[eq,eG,eX,e$,I]),e0=(0,o.useMemo)(()=>{var e=eZ[1],t=k(E(null==e?void 0:e.data).installment);return null!=t?t:eJ},[eZ,eJ]),e1=(0,o.useMemo)(()=>(0,h.ah)(e0,null),[e0]),e2=(0,o.useMemo)(()=>
1{if(!Z)return null;var e,t=Number(Z.basicChargePerYear),n=Number(Z.pricePerUnit);if(isNaN(t)||isNaN(n))return null;if(eF){if(!G||!$||!Z.pricePerUnitNt)return null;var r=Number(G),o=Number($),u=Number(Z.pricePerUnitNt);if(isNaN(r)||isNaN(o)||isNaN(u))return null;e=n/100*r+u/100*o}else{if(!R)return null;var i=Number(R);if(isNaN(i))return null;e=n/100*i}return Math.round((t+e)/12)},[eF,R,G,$,Z]),e4=(0,o.useMemo)(()=>(0,h.e6)({consumption:R,consumptionHT:G,consumptionNT:$},eF,eq.total),[R,G,$,eF,eq.total]),e6=(0,o.useMemo)(()=>(0,h.ah)(eX,e2,e4),[eX,e2,e4]),e5=(0,o.useMemo)(()=>(0,h._j)(et,e6),[et,e6]),e3=(0,o.useMemo)(()=>(0,h.nB)(e2,e6,e5),[e2,e6,e5]),e7=(0,o.useCallback)(e=>{e&&!(0,h.Yv)(e)?ea(e=>S(O({},e),{consumption:"Bitte nur Zahlen eingeben."})):(W(e),ea(e=>S(O({},e),{consumption:void 0,abschlag:void 0})))},[]),e8=(0,o.useCallback)(e=>{e&&!(0,h.Yv)(e)?ea(e=>S(O({},e),{consumptionHT:"Bitte nur Zahlen eingeben."})):(J(e),ea(e=>S(O({},e),{consumptionHT:void 0,abschlag:void 0})))},[]),e9=(0,o.useCallback)(e=>{e&&!(0,h.Yv)(e)?ea(e=>S(O({},e),{consumptionNT:"Bitte nur Zahlen eingeben."})):(V(e),ea(e=>S(O({},e),{consumptionNT:void 0,abschlag:void 0})))},[]),te=(0,o.useCallback)(e=>{e&&!(0,h._P)(e)?ea(e=>S(O({},e),{abschlag:"Bitte nur Zahlen eingeben."})):(en(e),ea(e=>S(O({},e),{abschlag:void 0})))},[]),tt=(0,o.useCallback)(e=>{eu(e),"single"===e?(J(""),V("")):W(""),ea({})},[]),tn=(0,o.useCallback)(()=>{null!==e3&&(en(String(e3.amount)),ea(e=>S(O({},e),{abschlag:void 0})))},[e3]),tr=(0,o.useCallback)(()=>w(function(){var e,t,n,r;return T(this,function(o){switch(o.label){case 0:if(e=(0,h.Um)({consumption:R,consumptionHT:G,consumptionNT:$,amount:et,meterType:eo},eF,e6,eV),!(0,h.HK)(e))return ea(e),[2];ea({}),ey(!0),t={},eF?(G.trim()&&(t.consumption=G),$.trim()&&(t.consumptionNt=$)):R.trim()&&(t.consumption=R),et.trim()&&(t.installment=et.replace(",",".")),o.label=1;case 1:return o.trys.push([1,3,4,5]),[4,(0,m.aw)(tb,t)];case 2:return o.sent(),N.invalidateQueries(["installment-consumption-history",tb]),em(!0),W(""),J(""),V(""),en(""),[3,5];case 3:return ea(null!=(r=null==(n=o.sent())?void 0:n.errors)?r:{form:(0,v.Ix)(H,n)}),[3,5];case 4:return ey(!1),[7];case 5:return[2]}})})(),[R,G,$,et,eo,eF,e6,eV,tb,N,H]),to=(0,o.useCallback)(()=>ed(!0),[]),tu=(0,o.useCallback)(()=>ed(!1),[]),ti=(0,o.useCallback)(()=>em(!1),[]),(0,o.useEffect)(()=>{if(ec){var e=()=>em(!1),t=requestAnimationFrame(()=>{document.addEventListener("click",e,{once:!0})});return()=>{cancelAnimationFrame(t),document.removeEventListener("click",e)}}},[ec]),(0,o.useEffect)(()=>{if(ex){var e=setTimeout(()=>e_(null),3e3);return()=>clearTimeout(e)}},[ex]),tl=(0,o.useCallback)(()=>{if(!eg&&eK){var e,t,n,r=void 0!==eR.consumptionNt,o={consumption:r?"":null!=(e=eR.consumption)?e:"",consumptionHt:r&&null!=(t=eR.consumption)?t:"",consumptionNt:null!=(n=eR.consumptionNt)?n:"",installment:eR.installment?String(eR.installment).replace(".",","):""};eN(eK.id),eS(o),ej(o),eC({}),eD(null),e_(null)}},[eg,eK,eR]),ta=(0,o.useCallback)(()=>{eN(null),eS(j),ej(j),eC({}),eD(null)},[]),ts=(0,o.useCallback)((e,t)=>{var n="installment"===e?(0,h._P)(t):(0,h.Yv)(t);t&&!n?eC(t=>S(O({},t),{[e]:"Bitte nur Zahlen eingeben."})):(eS(n=>S(O({},n),{[e]:t})),eC(t=>S(O({},t),{[e]:void 0})),eD(null),e_(null))},[]),tc=(0,o.useCallback)(()=>w(function(){var e,t,n,r,o,u,i,l;return T(this,function(a){switch(a.label){case 0:if(!eg)return[2];if(e=(0,h.Um)({consumption:eO.consumption,consumptionHT:eO.consumptionHt,consumptionNT:eO.consumptionNt,amount:eO.installment,meterType:eo},eF,e1),!(0,h.HK)(e))return eC({consumption:e.consumption,consumptionHt:e.consumptionHT,consumptionNt:e.consumptionNT,installment:e.abschlag}),eD(null!=(t=null!=(n=null!=(r=null!=(o=e.consumption)?o:e.consumptionHT)?r:e.consumptionNT)?n:e.abschlag)?t:"Bitte pr\xfcfen Sie Ihre Eingaben."),[2];if(eO.consumption===eT.consumption&&eO.consumptionHt===eT.consumptionHt&&eO.consumptionNt===eT.consumptionNt&&eO.installment===eT.installment)return eD("Keine \xc4nderungen erkannt."),[2];eL(!0),eD(null),u={},eF?(eO.consumptionHt.trim()&&(u.consumption=eO.consumptionHt),eO.consumptionNt.trim()&&(u.consumptionNt=eO.consumptionNt)):eO.consumption.trim()&&(u.consumption=eO.consumption),eO.installment.trim()&&(u.installment=eO.installment.replace(",",".")),a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,(0,m.LU)(eg,u)];case 2:return a.sent(),N.invalidateQueries(["installment-consumption-history",tb]),eN(null),eS(j),ej(j),eC({}),e_("\xc4nderungen gespeichert."),[3,5];case 3:return(l=null==(i=a.sent())?void 0:i.errors)&&eC(l),eD((0,v.Ix)(H,i)),[3,5];case 4:return eL(!1),[7];case 5:return[2]}})})(),[eg,eO,eT,eo,eF,e1,tb,N,H]),tm=null!=(n=null==A?void 0:A.counterNumber)?n:"",tp=A?(0,f.OI)(A.street,A.streetNumber,A.postalcode,A.locationMainName):"",tf=null!=(u=null==A?void 0:A.referenceNumber)?u:"",{product:td,isHeizstrom:D,isDualMeter:eF,counterNumber:tm,address:tp,referenceNumber:tf,backHref:(null==A?void 0:A.id)?(0,d.XA)(td,A.id):"",consumption:R,consumptionHT:G,consumptionNT:$,amount:et,meterType:eo,currentConsumption:eG,currentAbschlag:e$,recommendation:e3,abschlagWarning:null!=e5?e5:null,errors:el,submitted:ec,showInfo:ef,isLoading:B||Q,isSubmitting:ev,loadError:L?(0,v.Ix)(H,L):null,history:ez,editingRecordId:eg,editValues:eO,editErrors:eM,isSavingEdit:eB,editError:eH,editSuccess:ex,onConsumptionChange:e7,onConsumptionHTChange:e8,onConsumptionNTChange:e9,onAmountChange:te,onMeterTypeChange:tt,onApplyRecommendedAbschlag:tn,onSubmit:tr,onShowInfo:to,onHideInfo:tu,onDismissSuccess:ti,onStartEdit:tl,onCancelEdit:ta,onEditValueChange:ts,onSaveEdit:tc});return tv.loadError?(0,r.jsx)(l.M,{}):(0,r.jsx)("div",{className:"ui-library",children:(0,r.jsx)(a.A,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},tv))})}}}]); 2//# sourceMappingURL=4091.affb28df4f9097b9.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.